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
| Scenario | Use |
|---|---|
| A key formula that needs to stand alone and be read clearly | LaTeX Block |
| A formula referenced inside a sentence | LaTeX Inline |
| A derivation with multiple aligned steps | LaTeX Block (with aligned) |
| A variable defined within a sentence like "where x is ..." | LaTeX Inline |
Step 1 - Insert a Display Equation (LaTeX Block)
- Edit the Confluence page, type
/→ LaTeX Block Equations → insert - In the Source panel, write raw LaTeX:
\hat{y} = \sigma\left(\sum_{i=1}^{n} w_i x_i + b\right) - Preview shows the rendered equation centred on the page
- Click Save
Step 2 - Embed Inline Math in a Paragraph
- Type
/→ LaTeX Inline Equations → insert - 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. - Preview shows the paragraph with rendered inline formulas
- 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
| Problem | Likely Cause | Fix |
|---|---|---|
| Red error panel | Syntax error in LaTeX | Check for unmatched {}, missing \\ in aligned, typos in command names |
| Blank preview | Empty source panel | Type or paste LaTeX into Source panel |