How to format equations and formulas with LaTeX in Confluence Cloud

Share on socials

# How to format equations and formulas with LaTeX in Confluence Cloud

Holly Aspinall

24th January, 2024

Holly Aspinall

24th January, 2024

Jump to section

jump to section

What is LaTeX?

Why add LaTeX to a Confluence page?

How to add LaTeX to Confluence

Get more out of LaTeX in Confluence: formatting options

## Adding LaTeX formulas to your documentation has never been easier! Here’s how to quickly format LaTeX in Confluence.

In Confluence, expressing 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. Furthermore, Confluence requires a macro that converts LaTeX to HTML using MathJax. You may also 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}**”.

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

## How to add LaTeX to Confluence

To add LaTeX to Confluence, you’ll need an extra app 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 for Confluence plus many other macros to format and structure your pages, including BibTeX, footnotes, and tooltips.

**Unsure which app to get? Try both free for 30 days to help you make your choice.**

1. Head to your chosen Confluence page and click the

**pencil icon**(or press**“E”**on your keyboard) to start editing.2. Type “

**/latex**” on the page and select the LaTeX macro in the dropdown menu.3. In the pop-up dialog, add your LaTeX to the “

**Content**” section and format its alignment, and press “**Save**”.4. Click “

**Publish**” (or “**Update**”, if it’s an existing page) to see your new LaTeX formula on your page.## Get more out of LaTeX in Confluence: formatting options

### 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:

**$**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:

**$$**x = {-b \pm \sqrt{b^2-4ac} \over 2a}

**$$**

Here’s a comparison of what they look like side-by-side:

### 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:

$

**\color{red}**{ax^2 + 1 + 55 + bx + c =0}$This will display as:

### Formatting as a matrix and an array

#### Matrix

Display numbers or symbols in rows and columns to represent a mathematical object or one of its properties. Here’s an example:

\begin{bmatrix}

\alpha& \beta^{*}\\

\gamma^{*}& \delta

\end{bmatrix}

\alpha& \beta^{*}\\

\gamma^{*}& \delta

\end{bmatrix}

This will display as:

#### Array

Format equations in a table with the ability to left, centre, or right align elements in each column. For example:

\begin{array}{lcl}

z & = & a \\

& = & a \\

f(x,y,z) & = & x + y + z

\end{array}

z & = & a \\

& = & a \\

f(x,y,z) & = & x + y + z

\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 for Confluence.**

Related Content

Read moreWritten by

Holly Aspinall

Content Marketing Manager

Holly is dedicated to writing valuable, accessible guides that help users understand their tools better. She champions products that help modern workers do more with Confluence, monday.com, and beyond.

LinkedIn →

LinkedIn →

Confluence

Content Formatting

Related Content

Read more