What is the Block Macro?
The Block Macro renders mathematical equations in display mode - centered, larger, and separated from surrounding text. Perfect for important formulas, complex equations, and multi-line mathematical expressions.When to Use Block Macros
Use block macros when:- ✅ Displaying important equations
- ✅ Creating multi-line mathematical expressions
- ✅ Showing complex formulas that need emphasis
- ✅ Using matrices, systems of equations, or aligned expressions
- ✅ Presenting theorems and proofs
- ❌ Simple variables within text
- ❌ Short formulas in sentences
- ❌ Inline mathematical notation
How to Add a Block Macro
Method 1: Slash Command (Recommended)
- Open a Confluence page in edit mode
- Position your cursor on a new line
- Type:
- Select “LaTeX Math for Confluence” or “LaTeX Math for Confluence (Block)”
- Enter your LaTeX equation
- Save the macro
Method 2: Insert Menu
- Open a page in edit mode
- Click “Insert” → “Other macros”
- Search for “latex”
- Select “LaTeX Math for Confluence”
- Click “Insert”
Writing Block Equations
Syntax Options
The block macro supports multiple LaTeX syntaxes:Display Math Delimiters
Double Dollar Signs
No Delimiters (Automatic Display Mode)
The macro automatically renders in display mode
LaTeX Environments
Alignment Options
Block macros support three alignment modes:Center (Default)
Equations are centered on the page.Left Align
Equations align to the left margin.Right Align
Equations align to the right margin. To change alignment:- Edit the macro
- Use the alignment buttons in the preview pane
- Save changes
Examples
1. Simple Equations
LaTeX:2. Fractions and Roots
LaTeX:3. Integrals
LaTeX:4. Summations
LaTeX:5. Matrices
LaTeX:6. Systems of Equations
LaTeX:7. Aligned Equations
LaTeX:8. Limits
LaTeX:9. Partial Derivatives
LaTeX:10. Complex Formulas
LaTeX:Advanced Features
Multi-line Equations
Use environments likealign, gather, or multline:
Matrices and Arrays
Multiple matrix styles are supported:Chemical Equations
Text in Equations
Best Practices
✅ Do’s
- Use for important equations - Make key formulas stand out
- Add spacing - Leave blank lines before/after block macros
- Organize content - Use one equation per block for clarity
- Test rendering - Preview before saving
- Use proper environments - Choose the right LaTeX environment
❌ Don’ts
- Don’t overuse - Too many blocks can overwhelm readers
- Avoid inline delimiters - Don’t use
$...$in block macros - Don’t mix content - Keep equations separate from text
- No excessive whitespace - Clean LaTeX is better
Editing Block Macros
Edit Existing Macro
- Hover over the equation block
- Click the edit icon (⚙️)
- Modify your LaTeX in the editor
- Use Live Preview to verify changes
- Save when satisfied
Change Alignment
- Open the macro editor
- Click alignment buttons in the preview pane:
- Left align button
- Center align button
- Right align button
- Save changes
Mixed Content
You can combine text and equations in a single block:
Note: Inline equations ($...$) within block macros work as expected.
Troubleshooting
Equation Not Centering
Problem: Block equation appears left-aligned Solution:- Open the macro editor
- Check alignment setting in preview pane
- Select Center alignment
- Save changes
Line Breaks Not Working
Problem: Multi-line equations appear on one line Solution:- Use proper LaTeX environments (
align,gather) - Use
\\for line breaks within environments - Don’t use
\nor\newline
Matrix Not Rendering
Problem: Matrix shows as text Solution:- Verify you’re using
\begin{matrix}...\end{matrix} - Check for proper
\\line breaks - Use
&for column separation - Ensure balanced braces
Spacing Too Tight
Problem: Equations too close to text Solution:- Add blank lines before/after the macro in Confluence
- Don’t add extra LaTeX spacing commands
- Let Confluence handle paragraph spacing
Performance Considerations
- ✅ Block macros handle complex equations efficiently
- ✅ Multiple blocks on one page are supported
- ⚠️ Very large matrices (>10×10) may slow rendering
- ⚠️ Limit to 20-30 block macros per page for best performance
Common Use Cases
1. Textbook Equations
Display important formulas prominently in educational content.2. Research Documentation
Present theorems, proofs, and derivations clearly.3. Engineering Specifications
Show calculations and formulas in technical docs.4. Scientific Papers
Format equations according to academic standards.5. Data Science
Display statistical formulas and models.Related Documentation
- 📖 Inline Macro - For inline equations
- 📖 Live Preview - Real-time rendering
- 📖 LaTeX Syntax Guide
- ❓ FAQ
