Writing Chemistry Formulas in LaTeX

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 19K views
Messages
6,735
Reaction score
2,437
Hi!

How can i write chemistry formulas in LaTeX ?

Such as:
MgC_12 etc...

It does not look good if it is done in math-environment...:rolleyes:
 
Physics news on Phys.org
how do these look?

[tex]\text{Mg C}_{12}[/tex]

[tex]2 \text{H}_2 + \text{O}_2 \rightarrow 2 \text{H}_2\text{O}[/tex]