User Guide

How to: Create Technical Docs with Math

A workflow for embedding mathematical notation in Confluence pages - both standalone display equations and inline math within paragraphs. Common for data science, engineering, and research documentation.

LaTeX Block Equations · LaTeX Inline Equations

When to Use Block vs Inline

ScenarioUse
A key formula that needs to stand alone and be read clearlyLaTeX Block
A formula referenced inside a sentenceLaTeX Inline
A derivation with multiple aligned stepsLaTeX Block (with aligned)
A variable defined within a sentence like "where x is ..."LaTeX Inline

Step 1 - Insert a Display Equation (LaTeX Block)

  1. Edit the Confluence page, type /LaTeX Block Equations → insert
  2. In the Source panel, write raw LaTeX:
    \hat{y} = \sigma\left(\sum_{i=1}^{n} w_i x_i + b\right)
    
  3. Preview shows the rendered equation centred on the page
  4. Click Save

Step 2 - Embed Inline Math in a Paragraph

  1. Type /LaTeX Inline Equations → insert
  2. In the Source panel, write normal paragraph text with math:
    The mean squared error is defined as \text{MSE} = \frac{1}{n}\sum_{i=1}^{n}(y_i - \hat{y}_i)^2, where n is the number of observations.
    
  3. Preview shows the paragraph with rendered inline formulas
  4. Click Save

Step 3 - Build a Multi-Step Derivation

For aligned multi-line equations, use the LaTeX Block macro with the aligned environment:

\begin{aligned}
L(\theta) &= \prod_{i=1}^{n} p(y_i | x_i; \theta) \\
\log L(\theta) &= \sum_{i=1}^{n} \log p(y_i | x_i; \theta) \\
\hat{\theta} &= \arg\max_{\theta} \log L(\theta)
\end{aligned}

Step 4 - Combine with Standard Confluence Formatting

Mix LaTeX macros with standard Confluence elements:

  • Use headings to label equation sections (Definition, Derivation, Result)
  • Use tables to summarise variable definitions alongside inline equations
  • Use code blocks for algorithmic pseudocode adjacent to math

Common Debugging Tips

ProblemLikely CauseFix
Red error panelSyntax error in LaTeXCheck for unmatched {}, missing \\ in aligned, typos in command names
Blank previewEmpty source panelType or paste LaTeX into Source panel

Formula Library Reference