LaTeX macros

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

These macros are only available in the commercial cloud version of the app – available December 2023.

How to Use

  1. In the Confluence editor, type /latex and select LaTeX (Block) or LaTeX (Inline).

  2. Add your LaTeX formula or chemical equation in mhchem format into the macro body screen.

  3. 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

Description

Syntax

Output

Greek letters

\alpha \beta \gamma \rho \sigma \delta \epsilon

Binary operators

\times \otimes \oplus \cup \cap

 

Relation operators

< > \subset \supset \subseteq \supseteq

Others

\int \oint \sum \prod

Chemistry – mhchem syntax

Comprehensive mhchem syntax documentation is available here.

Chemical equations

Example 1.

Macro body:

Output:

Example 2.

Macro body:

Output:

Chemical formulae

Example 1.

Macro body:

Output:

Example 2.

Macro body:

Output:

Charges
Example 1.

Macro body:

Output:

Example 2.

Macro body:

Output:

Nuclides, isotopes

Example 1.

Macro body:

or

Output:

Example 2.

Macro body:

or

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:

or

Output:

Reaction arrows

Example 1.

Macro body:

Output:

 

Example 2.

Macro body:

Output:

 

Example 3.

Macro body:

Output:

 

Example 4.

Macro body:

Output:

Example 5.

Macro body:

Output:

Example 6.

Macro body:

Output:

Example 7.

Macro body:

Output:

Example 8.

Macro body:

Output:

Example 9.

Macro body:

Output:

Example 10.

Macro body:

Output:

Parentheses, brackets, braces

Use parentheses ( ) and brackets [ ] normally. Write braces as \{ \}.

Example 1.

Macro body:

Output:

Example 2.

Macro body:

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:

Output:

Â