How to use LaTeX math formulas and equations in Confluence Cloud
Share on socials
How to use LaTeX math formulas and equations in Confluence Cloud
Holly Aspinall
21 January 2025
2 min read
Holly Aspinall
21 January 2025
2 min read
Jump to Section
Jump to section
What is LaTeX?
How to add LaTeX to Confluence
Why add LaTeX to a Confluence page?
3 ways to format LaTeX in Confluence
- Inline vs block formatting
- Add colour
- Format as a matrix/array
Integrated packages
Adding LaTeX formulas to your Confluence pages has never been easier! Follow our quick guided demo to learn how.
In Confluence, displaying complex formulas or ensuring consistent formatting can be tricky. Enter LaTeX - an easier way to integrate technical content on your pages. Discover how to easily add LaTeX in Confluence with our handy guide.
Looking for other ways to boost your documentation? Read our guide and tips on how to effectively use Confluence for documentation.
Note: You’ll need some previous knowledge of LaTeX in order to use it in Confluence. Confluence also requires a macro that converts LaTeX to HTML using MathJax (we’ll cover it below). You might want to read the MathJax documentation to better understand how it works.
What is LaTeX?
LaTeX is a typesetting system that’s able to handle complex equations and structures. It’s most often used when creating scientific and mathematical documents.
Users input plain text alongside commands that indicate the structure and formatting of the text. The commands begin with a backslash and a keyword, followed by your content within curly brackets. For example, to create a title, you would use “\title{This is my title}”.
LaTeX can be used for:
- Scientific research documentation
- Financial and economic formulas
- Engineering calculations
- Machine learning and data science models
How to add LaTeX to Confluence
To add LaTeX to Confluence, you’ll need an extra plugin to help you. You have two options:
- LaTeX for Confluence: a standalone macro that unlocks LaTeX formatting within Confluence.
- Content Formatting Macros for Confluence: a complete macro toolkit that includes LaTeX plus many other macros to format and structure your pages, including BibTeX, footnotes, and tooltips.
You can try both apps free for 30 days to help you make your choice.
- In edit mode on your Confluence page, type “/latex”.
- Click the LaTeX macro in the dropdown menu to bring up the editor.
- Type or paste your LaTeX formula in the “Content” section and format its alignment.
- Press “Save”.
- Click “Publish” or “Update” to see your new LaTeX formula on your page.
Why add LaTeX to a Confluence page?
Because it’s so highly technical, LaTeX might not be right for everyone’s Confluence needs. However, there are many contexts where this typesetting system is crucial. If your Confluence pages contain scientific, mathematical, or highly technical content, you’ll likely find LaTeX formatting invaluable.
3 ways to format LaTeX in Confluence
1. Inline vs block formatting
To display an equation inline (on the same line as any other text), place a single dollar sign on either side of the text:
1$ax^2 + bx + c = 0$
To display an equation as a block (separately on its own), place two dollar signs on either side of the text:
1$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$
Here’s a comparison of what they look like side-by-side:
2. Add colour to LaTeX formulas
Want to make your LaTeX formatting stand out? Add the “\color{your_color}” parameter at the beginning of your text. For example:
1$\color{red}{ax^2 + 1 + 55 + bx + c =0}$
This will display as:
3. Format as a matrix or an array
Format as a matrix
Display numbers or symbols in rows and columns to represent a mathematical object or one of its properties. Here’s an example:
1\begin{bmatrix}
2\alpha& \beta^{*}\\
3\gamma^{*}& \delta
4\end{bmatrix}
This will display as:
Formatting as an array
Format equations in a table with the ability to left, centre, or right align elements in each column. For example:
1\begin{array}{lcl}
2z & = & a \\
3& = & a \\
4f(x,y,z) & = & x + y + z
5\end{array}
This will display as:
Integrated packages
LaTex for Confluence comes with additional packages included for even more functionality. Users can take advantage of the Unit, mhChem, and Physics packages, which are especially helpful for scientific and academic work.
Unit
Add units such as angles to your LaTeX formatting. Learn more about what units you can use with the siunitx LaTeX documentation.
mhChem
Easily typeset chemical molecular equations and formulae. Explore the mhChem LaTeX package documentation for more information.
Physics
Quickly and easily format physics equations such as the Cauchy principal value (shown below). Read the LaTeX physics package documentation to learn more.
Want to enhance your documentation with LaTeX, BibTeX, references, and more? Discover the power of Content Formatting Macros.
Written by
Holly Aspinall
Content Marketing Manager
As an experienced Content Marketing Manager, Holly is dedicated to writing valuable, accessible guides that help users understand their tools better and get more out of their workday.
LinkedIn →
LinkedIn →