Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Add Text and Annotations Inside LaTeX Equations in Confluence

Hi again from the team behind LaTeX Math for Confluence (Cloud)! 👋

Sometimes, formulas need annotations like explanations, labels, or conditions within the equation itself. That’s why in this guide, we’ll share some tips on how to add text directly inside your equations in Confluence.

Missed earlier guides?

Adding text inside formulas and equations

In LaTeX math mode, you should use the \text{} command to insert regular, upright text into equations.

Basic Syntax:

\text{your annotation here}

 Using this command ensures the text:

  • Uses regular (non-italic) font

  • Is properly spaced in math expressions

If you’d like to format your text, you can also use the following commands:

  • Italic text: \textit{your text}

  • Bold text: \textbf{your text}

Common mistakes to avoid

  • Writing plain text in math mode. It will render as italic and have incorrect spacing.

  • Forgetting to escape special characters like _, ^, and \. It will cause rendering errors.

Practical examples of annotations in LaTeX equations

Example 1: Inserting explanatory text
 

x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \quad \text{(quadratic formula)}

Renders as:

LaTeX - text example 2.jpg

💡 Tip: Use \quad, \;, or \, to insert spacing between math and text elements for better readability.

Example 2: Adding conditions to piecewise functions

f(x) = \begin{cases}
x^2 & \text{if } x \ge 0 \\
-x  & \text{if } x < 0
\end{cases}

Renders as:

LaTeX - text example 1.jpg

All the examples in this guide were rendered using the LaTeX Math for Confluence (Cloud) app.

Using \text{} in LaTeX equations allows you to add context, explanations, and annotations that make your math easier to read and understand on Confluence pages.

📌 Next up in our series: Learn how to align multi-line equations in Confluence using LaTeX commands.

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events