# LaTeX Rendering for Equations and Formulas

#### chip

Forum Staff
LaTeX rending works throughout the forum, and you can use your choice of MATH or TEX tags to wrap your LaTeX:

Using MATH Tags

Here is the Quadratic Formula using MATH tags:
Code:
[MATH]x = {-b \pm \sqrt{b^2-4ac} \over 2a}[/MATH]
$$\displaystyle x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$

Using TEX Tags

Here is the Quadratic Formula using TEX tags:
Code:
[TEX]x = {-b \pm \sqrt{b^2-4ac} \over 2a}[/TEX]
$$\displaystyle x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$

#### chip

Forum Staff
Chemistry Formulas

Chemistry LaTeX has also been added. In addition to math formulas, chemistry inputs will also work when entering them into LaTeX.

Some chemistry formulas:
Code:
[MATH]
\ce{C6H5-CHO}
\ce{$A$ ->[\ce{+H2O}] $B$}
\ce{SO4^2- + Ba^2+ -> BaSO4 v}
[/MATH]
$$\displaystyle \ce{C6H5-CHO} \ce{A ->[\ce{+H2O}] B} \ce{SO4^2- + Ba^2+ -> BaSO4 v}$$

Using \ce for Chemistry Equations

Here are some examples showing this:
Code:
[MATH]\ce{Na2SO4 ->[H2O] Na+ + SO4^2-}[/MATH]

[MATH]\ce{(2Na+,SO4^2-) + (Ba^2+, 2Cl- ) -> BaSO4 v + 2NaCl}[/MATH]

[MATH]\ce{2LiOH_{(s)} + CO_{2(g)} -> Li_{2}CO_{3(s)}+ H_{2}O_{(g)}}[/MATH]
$$\displaystyle \ce{Na2SO4 ->[H2O] Na+ + SO4^2-}$$

$$\displaystyle \ce{(2Na+,SO4^2-) + (Ba^2+, 2Cl- ) -> BaSO4 v + 2NaCl}$$

$$\displaystyle \ce{2LiOH_{(s)} + CO_{2(g)} -> Li_{2}CO_{3(s)}+ H_{2}O_{(g)}}$$

Using \cf for Chemistry Equations

For those who prefer:
Code:
[MATH]\cf{ A + B -> C + D }[/MATH]
$$\displaystyle \cf{ A + B -> C + D }$$

Using Arrows

You could use \rightarrow instead of ->
Code:
[MATH]\ce{2LiOH_{(s)} + CO_{2(g)} {\rightarrow} Li_{2}CO_{3(s)}+ H_{2}O_{(g)}}[/MATH]
$$\displaystyle \ce{2LiOH_{(s)} + CO_{2(g)} {\rightarrow} Li_{2}CO_{3(s)}+ H_{2}O_{(g)}}$$

Package Numbers in Chemical Formulas

Package numbers in chemical formulas are assumed to be subscripts, to save some typing:
Code:
[MATH]\ce{2LiOH_{(s)} +CO2_{(g)} -> Li2CO3_{(s)} +H2O_{(g)}}[/MATH]
$$\displaystyle \ce{2LiOH_{(s)} +CO2_{(g)} -> Li2CO3_{(s)} +H2O_{(g)}}$$

greg1313