Difference between revisions of "User:TW466/MathJaxTest"
From CUGC Wiki
(Create some test maths content.) |
(Demonstrate use of all maths delimiters.) |
||
Line 1: | Line 1: | ||
− | <math> | + | $\LaTeX$ can be included in wiki articles by using <tt><nowiki><math>...</math></nowiki></tt> tags. |
− | |||
− | </math> | ||
− | + | For instance, the following line results in: | |
+ | <nowiki><math>x_{1,2} = \frac{-b \pm \sqrt{b^2 - 4 a c}}{2 a}</math></nowiki> | ||
+ | <math>x_{1,2} = \frac{-b \pm \sqrt{b^2 - 4 a c}}{2 a}</math> | ||
+ | |||
+ | <nowiki>$...$</nowiki> and <nowiki>\( ... \)</nowiki> can also be used as maths delimiters, for instance: $\nabla \vec B = \nabla \cdot Q$ or \( 0 = a x^2 + b x + c \). | ||
+ | |||
+ | [https://www.mediawiki.org/wiki/Extension:SimpleMathJax SimpleMathJax] also supports <nowiki><chem></nowiki> tags, like so: | ||
+ | <nowiki><chem>CO2 + C -> 2 CO</chem></nowiki> | ||
+ | <chem>CO2 + C -> 2 CO</chem> |
Revision as of 14:39, 12 March 2019
$\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]
$...$ and \( ... \) can also be used as maths delimiters, for instance: $\nabla \vec B = \nabla \cdot Q$ or \( 0 = a x^2 + b x + c \).
SimpleMathJax also supports <chem> tags, like so:
<chem>CO2 + C -> 2 CO</chem>
[math]\ce{CO2 + C -> 2 CO}[/math]