How to Insert and Format Formulas in LibreOffice Writer

LibreOffice Writer includes a dedicated equation editor called LibreOffice Math that allows users to create, insert, and format mathematical formulas within text documents. This guide explains how to open the equation editor, construct formulas using visual tools and markup syntax, customize fonts and spacing, and align or number equations for professional academic and technical documentation.

Inserting a Formula Object

To create a new mathematical equation in LibreOffice Writer:

  1. Place your cursor where you want the equation to appear.
  2. Go to the top menu and select Insert > Object > Formula.
  3. The document view will split, opening the formula editing pane at the bottom of the screen and the Elements dock on the side.

Writing Formulas

You can write formulas using two methods: the graphical interface or the Math markup language.

1. Using the Elements Dock

The Elements dock groups symbols and operations into categories such as Unary/Binary Operators, Relations, Set Operations, Functions, and Brackets. Clicking any symbol automatically inserts its syntax template into the equation pane at the bottom.

2. Using Math Markup Syntax

You can type directly into the command pane at the bottom for faster input. Common examples include:

Formatting Formulas

When the formula editor is active, use the Format menu to modify styling across the formula:

To apply text colors within an individual formula, use the markup command color [name] { expression } (e.g., color red {x + y}).

Aligning and Numbering Equations

Editing Existing Formulas

To edit an existing equation, double-click the formula object in the document. The formula editing pane will reopen, allowing you to update the markup or styling. Click anywhere outside the formula pane to save changes and return to the standard document editor.