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

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

autor Julian Whitehead -
Počet odpovědí: 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
Průměr hodnocení: -
V odpovědi na Julian Whitehead

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

autor Laurie Savage -
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 odpovědi na Laurie Savage

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

autor Laurie Savage -
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 odpovědi na Laurie Savage

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

autor Julian Whitehead -
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 odpovědi na Julian Whitehead

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

autor Julian Whitehead -
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 odpovědi na Julian Whitehead

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

autor Breanndan O'Cinneide -
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...
mrknout


V odpovědi na Julian Whitehead

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

autor Mark Winter -
Why not write α directly? Or

2H<sub>2</sub> + O<sub>2</sub> &rarr; 2H<sub>2</sub>O
V odpovědi na Julian Whitehead

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

autor Laurie Savage -
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$$ mrzutost
\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 odpovědi na Laurie Savage

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

autor Julian Whitehead -
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