Adding LaTeX Macros
Learn how to add LaTeX Math macros to your Confluence pages using the slash command.
LaTeX Math for Confluence makes it easy to add mathematical equations to your pages. Simply use the /latex slash command to insert either inline or block macros.

Step 1: Open a Confluence Page
- Navigate to any Confluence page
- Click Edit to enter edit mode
- Place your cursor where you want to add the equation
- Type
/latex in the editor
- A dropdown menu appears with two options:
- LaTeX Math for Confluence (Inline) - For inline equations
- LaTeX Math for Confluence (Block) - For display equations
For inline equations:
- Select LaTeX Math for Confluence (Inline)
- Use for equations within text (e.g., E = mc²)
For block equations:
- Select LaTeX Math for Confluence (Block)
- Use for standalone equations on their own line
- The macro editor opens
- Type your LaTeX equation
- See live preview as you type
- Click Insert or Save
Step 5: Publish the Page
- Click Publish in Confluence
- Your equation renders on the published page
- Everyone with page access can view it
Use case: Equation within a sentence
Steps:
- Type:
/latex
- Select: LaTeX Math for Confluence (Inline)
- Enter:
E = mc^2
- Click Insert
Result: The equation appears inline with your text like this: E = mc²
Use case: Standalone equation with emphasis
Steps:
- Type:
/latex
- Select: LaTeX Math for Confluence (Block)
- Enter:
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
- Click Insert
Result: The equation appears centered on its own line
Characteristics:
- Flows with text
- Smaller size
- No line breaks
- Ideal for simple equations
Best for:
- Variables in sentences (x, y, z)
- Simple formulas (a² + b²)
- Chemical formulas (H₂O)
- Mathematical notation in paragraphs
Example usage:
The Pythagorean theorem states that a² + b² = c² for right triangles.
Characteristics:
- Standalone display
- Centered on page
- Larger size
- Emphasized presentation
Best for:
- Complex equations
- Important formulas
- Multi-line expressions
- Equations needing emphasis
Example usage:
Display the quadratic formula prominently:
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
| Operation |
LaTeX Code |
Example |
| Superscript |
x^2 |
x² |
| Subscript |
x_1 |
x₁ |
| Fraction |
\frac{a}{b} |
a/b |
| Square root |
\sqrt{x} |
√x |
| Sum |
\sum_{i=1}^{n} |
Σ |
| Integral |
\int_{a}^{b} |
∫ |
| Letter |
LaTeX Code |
| Alpha |
\alpha |
| Beta |
\beta |
| Gamma |
\gamma |
| Delta |
\delta |
| Pi |
\pi |
| Sigma |
\sigma |
| Symbol |
LaTeX Code |
| Infinity |
\infty |
| Plus/minus |
\pm |
| Multiplication |
\times |
| Division |
\div |
| Not equal |
\neq |
| Less than or equal |
\leq |
| Greater than or equal |
\geq |
-
Choose the right macro type
- Inline for text integration
- Block for standalone equations
-
Use live preview
- Check your equation before inserting
- Fix errors immediately
-
Keep it simple
- Use clear LaTeX syntax
- Avoid overly complex expressions
-
Test before publishing
- Preview in edit mode
- Ensure equation renders correctly
-
Use standard LaTeX
-
Wrong macro type
- Using inline for complex equations (too small)
- Using block for simple variables (too much space)
-
Syntax errors
- Missing braces { }
- Unclosed delimiters
- Typos in commands
-
Unsupported commands
- Using LaTeX packages not in KaTeX
- Custom commands that don't exist
-
Not using preview
- Inserting without checking
- Missing errors until published
- Open the page in edit mode
- Click on the macro you want to edit
- Edit the LaTeX code in the editor
- See live preview of changes
- Save and Publish
- Open page in edit mode
- Click on the macro
- Press Delete or Backspace
- Macro is removed
- Publish to save changes
Problem: /latex doesn't show macro options
Solutions:
- Check you're in edit mode
- Ensure app is installed
- Verify you have edit permissions
- Check access control settings
- Try typing the full command:
/latex
Problem: Insert button doesn't work
Solutions:
- Fix syntax errors - Check LaTeX code
- Wait for preview - Let it render
- Refresh the page - Try again
- Check permissions - Ensure you're in whitelist (if enabled)
Problem: Macro inserted but not visible
Solutions:
- Publish the page - Save changes
- Refresh browser - Clear cache
- Check syntax - Ensure valid LaTeX
- Try different browser - Rule out browser issues
| Action |
Shortcut |
| Insert macro |
Enter |
| Cancel |
Escape |
| New line |
Shift + Enter |
Last Updated: Nov 2025