Usage
Beautiful Math for Confluence provides 7 (3 LaTeX + 2 MathML + 2 AsciiMath) macros for Confluence to insert and reference math expressions.
To add one of these macros to a page:
In the Confluence editor, choose Insert > Other Macros.
Find and select the required macro ("External Content" category).
Speeding up macro input with auto-complete: Type {Math to see a list of suggested macros.
To edit an existing macro: Click the macro placeholder and choose Edit. A macro dialog window will open, where you can edit the parameters of the macro.
All macros support the definition of a render mode:
HTML/CSS or MathML: uses native MathML when the browser supports it well enough (which is the fastest option), and HTML/CSS otherwise. With this option, you can be certain that your math is shown on all browsers in perfect quality.
SVG: uses Scalable Vector Graphics which is supported in nearly all major browsers and most mobile devices. Note, however, that Internet Explorer prior to version 9 does not support SVG.
LaTeX
See this reference on how to use LaTeX math.
LaTeX Math Block
This macro allows you to include LaTeX math equations which will be rendered as a block macro (standalone).
Type {LaTeX Math Block and enter your equation. Note that you are not expected to type the LaTeX math delimiters by yourselves. Instead, the add-on adds the pre- and suffix characters ($$). Just type your math expression in:
\begin{equation} x = a_0 + \cfrac{1}{a_1 + \cfrac{1}{a_2 + \cfrac{1}{a_3 + \cfrac{1}{a_4} } } } \end{equation}
which results in
If you want your expressions to be numbered, put them in a \begin{equation}...\end{equation}
environment as in this example. If you don't want your equations being numbered, use the starred version \begin{equation*}...\end{equation*}.
You also have the possibility to define an anchor which can be used to link to this equation.
LaTeX Math Inline
This macro allows you to include LaTeX math inline in your text.
Type {LaTeX Math Inline and enter your equation. Note that you are not expected to type the LaTeX math delimiters by yourselves. Instead, the add-on adds the pre- and suffix characters ($). Just type \frac{n!}{k!(n-k)!} = \binom{n}{k}
for example and you should see
Configure LaTeX macros
Do you like to use LaTeX macros to reuse common LaTeX code by using functions for your math equations? Beautiful Math allows you to enter macros in its add-on settings (Confluence Admin->Beautiful Math page):
Just separate them by newlines. They will be available in all LaTeX block macros!
MathML
See this reference for more information about MathML.
MathML Block
This macro allows you to include MathML math equations which will be rendered as a block macro (standalone).
Type {MathML Math Block and enter your equation. Note that you are not expected to type the MathML tags (<math>
) by yourselves. Instead, the add-on adds them for you:
<mrow> <mi>a</mi> <mo>⁢</mo> <msup> <mi>x</mi> <mn>2</mn> </msup> <mo>+</mo> <mi>b</mi> <mo>⁢ </mo> <mi>x</mi> <mo>+</mo> <mi>c</mi> </mrow>
which results in:
Please do not use self-closing tags, but rather explicit open and close tags. For example, instead of <mspace width="5pt"/>
use <mspace width="5pt"></mspace>
.
Note that although you can use MathML 3.0 here, not all tags are supported yet.
MathML Inline
This macro allows you to include MathML inline in your text.
Type {MathML Math Inline and enter your equation. Note that you are not expected to type the MathML tags (<math>) by yourselves. Instead, the add-on adds them for you.
AsciiMath
See this reference for more information about AsciiMath.
AsciiMath Block
This macro allows you to include AsciiMath math equations which will be rendered as a block macro (standalone).
Type {AsciiMath Block and enter your equation. Note that you are not expected to type the AsciiMath delimiters (``) by yourselves. Instead, the add-on adds them for you:
x = (-b +- sqrt(b^2 – 4ac)) / (2a)
which results in:
Be careful that your math expressions don't look like HTML tags to the browser. As an example, please use x < y
instead of x<y
.
AsciiMath Inline
This macro allows you to include AsciiMath math equations which will be rendered inline in your text.
Type {AsciiMath Inline and enter your equation. Note that you are not expected to type the AsciiMath delimiters (``) by yourselves. Instead, the add-on adds them for you.
Exporting
Note that Beautiful Math for Confluence does not support exporting to PDF, Word or HTML.