Chemistry notation using mhchem
RWTHmoodle allows the graphical representation of chemical formulas written in LaTeX. For this purpose, the cross-browser JavaScript-based library MathJax is used, which has been extended by the package mhchem for the representation of chemical formula notation.
Users can write formulas and equations in LaTeX wherever a text editor is available. In order for the LaTeX part to be recognized and rendered as a graphic, separators are needed to separate the LaTeX part from the rest of the text. The following separators work in RWTHmoodle:
\(...\)
for in-line math\[...\]
as well as $$...$$ for displayed equations
For the display of chemical formulas using the LaTeX package mhchem the separators \ce{...}
have to be set additionally. These are placed inside the mathematical separators, i.e. one writes \[\ce{...}\]
or $$\ce{...}$$
for formulas in display mode and \(\ce{...}\)
for in-line mode.
Detailed information is provided by this Moodle tutorial on chemical formula notation, which contains many examples.
Instead of writing the necessary LaTeX code yourself, you can also use the button for the chemical formula editor in the text editor "Atto" and compile the formula by clicking on the appropriate characters. The option is not yet available in the TinyMCE editor.
For further information: