Skip to main content
Datatool360

How to Use LaTeX Equations in Word, Notebooks and Markdown

By the Datatool360 team ·

A converter gives you LaTeX, such as \frac{a}{b} or x^{2}. That is exactly what you want, but where does it go? This guide shows the usual places where LaTeX equations work, and what to do when they show up as plain text.

Want to do it right now? Open the Math PDF to LaTeX tool

The two ways to write an equation

LaTeX equations come in two forms. An inline equation sits inside a line of text and is written between single dollar signs, like $x^2 + 1$. A display equation stands on its own line and is written between double dollar signs, like $$\frac{a}{b}$$. Most places that understand LaTeX use these two forms.

In a LaTeX document

Paste the equation between the dollar signs, or inside an equation environment, in your document. The LaTeX export of the converter gives you the whole document as LaTeX text that you can compile. You need the amsmath package for many equations: add \usepackage{amsmath} at the top.

In Word

The easiest way is the Word export of the converter, in which the equations are already real Word equations. If you have a single LaTeX equation, recent versions of Word can read it: insert an equation (Alt and the equals sign), type or paste the LaTeX, and convert it with the LaTeX option of the equation tools. Not every very old version of Word can do this, and not every LaTeX command is understood, so check the result.

In Markdown, notebooks and note apps

  • Many Markdown editors and note apps show equations written between dollar signs. Some need an option in the settings to turn this on.
  • Jupyter notebooks show LaTeX in Markdown cells.
  • GitHub shows equations written between dollar signs in Markdown files.
  • Plain text editors and some chat apps do not render maths: you see the code as it is.

The Markdown export of the converter keeps equations in this dollar-sign form.

Google Docs and other word processors

Some word processors have no direct way to read LaTeX in their own equation editor. If yours does not, the Word export is the easier route: open that file in the program. You may need to check how its equations arrive.

If an equation shows as code

  • Check that the dollar signs are there, and that none is missing at the end.
  • Check the settings of your app for “math” or “LaTeX” support.
  • A command is unknown to the program (it prints an error or the raw text). Replace it by a simpler one, or load the package it needs.
  • A percent sign must be written as \% in LaTeX, or the rest of the line is treated as a comment.
  • A curly bracket group such as x^{10} needs both brackets. Without them only the first digit is raised.

The guide on LaTeX basics lists the commands that appear most often in maths documents.

Keep reading