Guides/Create content/Code/Display math using LaTeX syntax

Display math using LaTeX syntax

Last reviewed on December 3, 2025

LaTeX (pronounced “LAY-tek” or “LAH-tek”, not “LAY-tex”) is a typesetting system for formatting mathematical formulas and equations. This guide will show you how to display LaTeX on your website.

Add a Math block

In the WordPress editor, you can use the Math block to present complex equations, scientific formulas, or mathematical expressions in a clean, professional format.

Follow these steps to add the Math block to a page or post:

  1. Go to your site’s dashboard.
  2. Navigate to the page or post where you want to add the formula and open it for editing.
  3. Click the + block inserter and search for “Math.”
  4. Click the Math icon to insert the block.
  5. Enter your formula using LaTeX syntax in the text field. The block renders your equation automatically.
The Math block, with a sample formula inserted.

💡

If you’re new to LaTeX, use an online generator like HostMath to build your formulas, then copy them into the Math block.

Add an inline math formula

You can also insert math formulas directly within a paragraph or other text blocks. To add inline math, follow these steps:

  1. Place your cursor in a text block (such as a Paragraph blockHeading blockList block, or Table block) where you want the formula to appear.
  2. In the block toolbar, click the downward arrow icon and select the Math option.
  3. Type or paste your math formula into the text box that appears.
A 1 appears beside the downward arrow icon and a 2 appears next to the text box for writing the math formula.

Inline math formulas flow naturally within your sentences, making them ideal for referencing variables or simple expressions within explanatory text.

LaTeX errors

If your LaTeX is not structured correctly, the notation will not be rendered on the front-end of the site. Instead, the Math block will include error messages to help you correct the syntax:

An error message is shown beneath the text box.

Was this guide helpful for you?

Not quite what you're looking for? Get Help!

Copied to clipboard!