Adding a 'macro' to sort out chemical equations / symbols

Adding a 'macro' to sort out chemical equations / symbols

Julian Whitehead írta időpontban
Válaszok szám: 11
As a science teacher I quite regularly need to add subscript and superscript to text in moodle. In Word kind people have written macros to do this.
While with a little moodle page this is not a problem, if quite a few equations are added, it can become difficult, especially when adding Greek Symbols.
To see what I mean, look here:
How do I go about it, or can something be modified to do this?
Cheers
Jools
Értékelések átlaga: -
Válasz erre: Julian Whitehead

Re: Adding a 'macro' to sort out chemical equations / symbols

Laurie Savage írta időpontban
I use the TeX filter for this sort of thing
$$2\mathrm{H}_2\mathrm{O} \arrow 2\mathrm{H}_2 + \mathrm{O}_2$$
Válasz erre: Laurie Savage

Re: Adding a 'macro' to sort out chemical equations / symbols

Laurie Savage írta időpontban
My server crashed befor I had the chance to fix things!

$$2H_2O \Rightarrow 2H_2 + O_2 + \theta$$

The text version is attached
Válasz erre: Laurie Savage

Re: Adding a 'macro' to sort out chemical equations / symbols

Julian Whitehead írta időpontban
Forgive my complete ignorance, how does this work?
I have seen the filter section, but not really sure how they work. I take it there is a guide somewhere.
Válasz erre: Julian Whitehead

Re: Adding a 'macro' to sort out chemical equations / symbols

Julian Whitehead írta időpontban
Okay, had a quick look and activated the filter (from admin). If I stick in something that should give me a greek letter alpha $$\alpha$$ I get the image that indicates that an image cannot be loaded or viewed (the X in a box).
Any ideas anyone?
Cheers
A TeX ignorant person - looks quite exciting!
Válasz erre: Julian Whitehead

Re: Adding a 'macro' to sort out chemical equations / symbols

Zbigniew Fiedorowicz írta időpontban
Right click on the broken image, select Properties, then go to that url directly in your browser. You will get further guidance.  If you need further help, please post to the Mathematics Tools forum
Válasz erre: Julian Whitehead

Re: Adding a 'macro' to sort out chemical equations / symbols

Breanndan O'Cinneide írta időpontban
Julian,

    the tex filter depends on an executable mimetex.exe which is in the directory moodle/filter/tex and should be about 322Kb in size. Recent zip downloads have not had  the correct  version of this (just a small 2kb file). The correct version is available, I think, on www.forkosh.com.
Check what you have...
kacsintás


Válasz erre: Julian Whitehead

Re: Adding a 'macro' to sort out chemical equations / symbols

Mark Winter írta időpontban
Why not write α directly? Or

2H<sub>2</sub> + O<sub>2</sub> &rarr; 2H<sub>2</sub>O
Válasz erre: Julian Whitehead

Re: Adding a 'macro' to sort out chemical equations / symbols

Laurie Savage írta időpontban
TeX/LaTex is huge and powerful. I use it for any technical typesetting (Physics/Maths exams, papers). The part that Moodle will play with is its mathematical component. For chemistry these symbols are prety much all you need. Remember to enclose the expression in double dollar signs.

H^a_b gives you $$H^a_b$$
\rightarrow gives you $$\rightarrow$$
\omega + \Omega gives you $$\omega + \Omega$$
\frac{A}{B} gives you $$\frac{A}{B}$$
\rightleftharpoons gives you $$\rightleftharpoons$$ szomorú
\leftrightarrow gives you $$\leftrightarrow$$


More Symbols at
http://www.artofproblemsolving.com/LaTeX/AoPS_L_GuideSym.php

There is extensive documentation on the net and on your computer if you are running a standard Linux installation.

Check out Chapter 3 in

http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf

I think the first couple of paragraphs are all you need to know.

Email me if you need help. BTW its nice to see a trombone - tenor sax is my weapon of choice!
Válasz erre: Laurie Savage

Re: Adding a 'macro' to sort out chemical equations / symbols

Julian Whitehead írta időpontban
Thanks for all that, perhaps we ought to start a moodle band, to see the gang I mainly play with (blatent advertising www.subb.co.uk ) though don't listen to the tracks on there as they were recorded a while ago.

Help much appreciated.
Regards

Jools