Use the LaTeX macro
The LaTeX Builder macro enables users to add mathematical equations and formulas to Confluence pages using LaTeX syntax. It includes a code-style editor with live preview, allowing equations to be written and rendered in real time.
This macro requires some previous knowledge of using LaTeX and LaTeX Mathematics. It may also be helpful to review the documentation for MathJax, which enables the conversion between LaTeX and HTML and provides a range of informative examples of using the language.
Add a Latex Builder macro to a page
Editor Formatting Options
You can identify formulas and equations using the editor buttons. These options also let you control how the content is displayed.
Manual Formatting Options
Inline vs. block formatting
$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} $ $$
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$Left or right aligned blocks can be achieved by using flalign*.
flalign* with two &s placed after the equation. eg.\begin{flalign*}
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} &&
\end{flalign*}flalign* with the equation placed after two &s eg.\begin{flalign*}
&& x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
\end{flalign*}Array
This is an array:
\begin{array}{lcl}
z & = & a \\
& = & a \\
f(x,y,z) & = & x + y + z
\end{array}Matrix
$$
\begin{bmatrix}
1 & 2 \\
3 & 4
\end{bmatrix}
$$Color
$$
{\color{red}x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}}
$$Error Handling and Smart Suggestions
LaTeX builder provides live feedback as you work, including syntax validation, error highlighting and intelligent command suggestions.
Syntax Error Detection
As you type LaTeX Builder validates your content and highlight potential syntax errors.
- Missing or unmatched brackets/braces
- Unclosed environments
Smart Suggestions
As soon as you start typing a LaTeX command, the autocompleter displays matching suggestions based on your input. Once selected, the full command is inserted with any required parameters and closing syntax.
Use the Library
The library allows you to add equations without needing to type them out. You can choose from our existing presets or you can save your own equations/excerpts as favorites to save you time.
Add an item from the library
- Ensure your cursor is positioned where you want to add the equation.
- Click the library button.
- Select the equation you need from the library.
Save a favorite
- Highlight the content you want to reuse.
- Click the favorites button.
- Give the excerpt a name.
- Optional: Add a descrption to help identify the excerpt.
- Click Add.