Inline Macro
Create mathematical equations that flow seamlessly within your text using the LaTeX Math Inline Macro.
The Inline Macro allows you to embed mathematical equations directly within paragraphs of text, appearing on the same line as surrounding content. Perfect for formulas, variables, and mathematical expressions that are part of a sentence.
Use inline macros when:
- ✅ Embedding formulas within sentences
- ✅ Referencing variables in paragraphs
- ✅ Creating mathematical notation in lists
- ✅ Writing technical documentation with inline equations
Don't use inline macros for:
- ❌ Large, complex equations (use Block Macro instead)
- ❌ Multi-line equations
- ❌ Equations that need emphasis
- Open a Confluence page in edit mode
- Position your cursor where you want the equation
- Type:
/latex inline
- Select "LaTeX Math for Confluence (Inline)" from the dropdown
- Enter your LaTeX equation
- Save the macro
- Open a page in edit mode
- Click "Insert" → "Other macros"
- Search for "latex"
- Select "LaTeX Math for Confluence (Inline)"
- Click "Insert"
The inline macro supports multiple LaTeX delimiters:
Single Dollar Sign (Recommended)
$E = mc^2$
Inline Math Delimiters
\(E = mc^2\)
No Delimiters (Automatic)
E = mc^2
The macro automatically treats content as inline math
LaTeX:
$x$
Result: Shows x as a mathematical variable within text
LaTeX:
The area is $A = \pi r^2$ where $r$ is the radius.
Result: The area is πr² where r is the radius.
LaTeX:
The golden ratio $\phi = \frac{1 + \sqrt{5}}{2}$ appears in nature.
Result: The golden ratio φ = (1+√5)/2 appears in nature.
LaTeX:
The angle $\theta$ and coefficient $\alpha$ are important parameters.
Result: The angle θ and coefficient α are important parameters.
LaTeX:
The sum $\sum_{i=1}^{n} i$ equals $\frac{n(n+1)}{2}$.
Result: The sum Σᵢ₌₁ⁿ i equals n(n+1)/2.
- Keep equations simple - Inline equations should be concise
- Use consistent notation - Maintain variable naming throughout
- Test in preview - Always verify rendering before saving
- Use plain LaTeX - Avoid complex environments
- Don't use display math delimiters - No
$$ or \[...\]
- Avoid multi-line equations - Use block macros instead
- Don't nest environments - Keep inline equations flat
- No large matrices - Use block macros for complex structures
The inline macro has specific restrictions to ensure proper rendering:
$$ display math delimiters → Converted to inline
\[...\] display delimiters → Converted to inline
\begin{equation} environments → Converted to inline
- Multiple newlines → Converted to spaces
- Multi-line equations
- Display-style matrices (will render inline)
- Alignment environments
- Large delimiters
💡 Tip: If you need these features, use the Block Macro instead.
- Hover over the equation
- Click the edit icon (✏️)
- Modify your LaTeX
- Save changes
- Click on the rendered equation
- The editor opens automatically
- Make your changes
- Click Save
Inline equations automatically align with surrounding text baseline:
- Superscripts extend above the line
- Subscripts extend below the line
- Main equation body aligns with text
Inline equations match the surrounding text size:
- Normal paragraph: Standard size
- Headings: Larger size
- Small text: Proportionally smaller
Einstein's mass-energy equivalence $E = mc^2$ revolutionized physics.
A prime number $p$ is divisible only by $1$ and $p$.
The standard deviation $\sigma$ measures data spread.
Time complexity is $O(n \log n)$ for merge sort.
Ohm's law states that $V = IR$ where $V$ is voltage.
Problem: Inline equation shows as raw LaTeX text
Solutions:
- Check for syntax errors in your LaTeX
- Verify you're using inline-compatible syntax
- Remove any display math delimiters (
$$, \[)
- Refresh the page
Problem: Inline equation breaks text flow
Solution: Convert to a Block Macro:
- Copy your LaTeX code
- Delete the inline macro
- Insert a block macro
- Paste your code
Problem: Odd spacing around equations
Solution:
- Check for extra spaces in LaTeX
- Ensure no trailing newlines
- Use proper inline delimiters (
$...$)
- ✅ Use inline macros for simple, short equations
- ✅ Limit to 5-10 inline equations per paragraph
- ✅ Keep LaTeX code clean and concise
- ⚠️ Too many inline equations may slow page loading