From CUGC Wiki
< User:TW466
Revision as of 16:57, 12 March 2019 by TW466 (talk | contribs) (Add note on previews.)

\(\LaTeX\) can be included in wiki articles by using <math>...</math> tags.

For instance, the following line results in:

<math>x_{1,2} = \frac{-b \pm \sqrt{b^2 - 4 a c}}{2 a}</math>

[math]x_{1,2} = \frac{-b \pm \sqrt{b^2 - 4 a c}}{2 a}[/math]

\( ... \) can also be used as maths delimiters, for instance: \( \nabla B = \nabla \times \vec Q \) becomes \( \nabla B = \nabla \times \vec Q \). <nowiki> tags don't escape them unfortunately (but do escape <math> tags).

SimpleMathJax also supports <chem> tags, like so:

<chem>CO2 + C -> 2 CO</chem>

[math]\ce{CO2 + C -> 2 CO}[/math]

Thanks to a hack in MediaWiki:Common.js, maths now show up in edit previews. At least sometimes.