This documentation is for a new macro in a future release of the app.
Our LaTeX macros support LaTeX as well as mhchem.
There are 2 LaTeX macros available:
LaTeX (Block) for block level equations
LaTeX (Inline) for inline equations
How to Use
In the Confluence editor, type /latex and select LaTeX (Block) or LaTeX (Inline).
Add your LaTeX formula or chemical equation in mhchem format into the macro body screen.
Save the Confluence page.
Your mathematical formula or chemical equation will be displayed.
Example syntax
Mathematics – LaTeX syntax
Example 1 - Pythagorean theorem
Macro body
x^2 + y^2 = z^2
Output:
Example 2 - Mass-energy equivalence
Macro body
E=mc^2
Output:
Example 2 - Binomial coefficient
Macro body:
\binom{n}{k} = \frac{n!}{k!(n-k)!}
Output:
Example 4 - Reference
Description | Syntax | Output |
---|---|---|
Greek letters |
| |
Binary operators |
| |
Relation operators |
| |
Others |
|
Chemistry – mhchem syntax
Comprehensive mhchem syntax documentation is available here.
Chemical equations
Example 1.
Macro body:
\ce{CO2 + C -> 2 CO}
Output:
Example 2.
Macro body:
\ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-}
Output:
Chemical formulae
Example 1.
Macro body:
\ce{H2O}
Output:
Example 2.
Macro body:
\ce{Sb2O3}
Output:
Charges
Example 1.
Macro body:
\ce{CrO4^2-}
Output:
Example 2.
Macro body:
[AgCl2]-
Output:
Nuclides, isotopes
Example 1.
Macro body:
\ce{^{227}_{90}Th+}
or
\ce{^227_90Th+}
Output:
Example 2.
Macro body:
\ce{^{0}_{-1}n^{-}}
or
\ce{^0_-1n-}
Output:
It might be ambiguous whether a superscript belongs to the left or right element. There is automatic detection (digits only = mass number = belongs to right side), but to make sure you can type {}
as a separator.
Example 3.
Macro body:
\ce{H{}^3HO}
or
\ce{H^3HO}
Output:
Reaction arrows
Example 1.
Macro body:
\ce{A -> B}
Output:
Example 2.
Macro body:
\ce{A <- B}
Output:
Example 3.
Macro body:
\ce{A <-> B}
Output:
Not to be used according to IUPAC and ACS
Example 4.
Macro body:
\ce{A <--> B}
Output:
Example 5.
Macro body:
\ce{A <=> B}
Output:
Example 6.
Macro body:
\ce{A <=>> B}
Output:
Example 7.
Macro body:
\ce{A <<=> B}
Output:
Each arrow can take two optional arguments: one for above and one for below. The arrow arguments use the same input syntax as the \ce
command.
Example 8.
Macro body:
\ce{A ->[H2O] B}
Output:
Example 9.
Macro body:
A ->[{text above}][{text below}] B}
Output:
Example 10.
Macro body:
\ce{A ->[$x$][$x_i$] B}
Output:
Parentheses, brackets, braces
Use parentheses ( )
and brackets [ ]
normally. Write braces as \{ \}
.
Example 1.
Macro body:
\ce{(NH4)2S}
Output:
Example 2.
Macro body:
\ce{[\{(X2)3\}2]^3+}
Output:
For large parentheses, \left
and \right
macros need to be in the same math environment, so you might have to put \ce
into $
into \ce
, but that’s fine.
Example 3.
Macro body:
\ce{CH4 + 2 $\left( \ce{O2 + 79/21 N2} \right)$}
Output: