Skip to main content
Datatool360

How to Convert Maths and Equations in a PDF to LaTeX

By the Datatool360 team ·

Copy a formula out of a PDF and you will usually get a few letters and numbers in a row, with the fraction bar, the root sign and the powers gone. Maths is the hardest content to get out of a PDF. This guide explains why, and how to keep equations as LaTeX that you can edit, reuse and publish.

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

Why equations break when you copy them

In an equation the layout carries the meaning. A fraction is one thing written above a line above another thing. A root has a drawn sign. A sum has its limits above and below. A PDF stores all of this as separate letters and little lines at positions on the page, so copying gives you the pieces without the structure. The numerator and the denominator end up on different lines, powers lose their raised position, and special symbols turn into odd characters.

To get the equation back, a program has to look at the positions, work out what belongs together, and write it in a language that describes the structure. LaTeX is that language, and it is also what most maths websites, journals and editors understand.

Convert a maths document step by step

  1. Open the Math PDF converter and upload your PDF, Word file, image, TXT or TeX file.
  2. Press convert. Equations are recognised and written as LaTeX. Question numbers, options and headings are kept in their order.
  3. Look at the result in the live preview. Equations the converter is not sure about are highlighted, so you know where to look first.
  4. Fix what you want in the editor, then export to TXT, Word (with real Word equations), Markdown, LaTeX or JSON.

What decides how good the result is

  • A PDF with real text, or a Word file with Word equations, usually converts very well, because the structure can be read from the file itself.
  • A scan or a photograph has to be read as a picture. That is much less exact, and equations suffer most. The converter highlights the equations it had to read this way, and you should check them against the original.
  • A clear, straight scan with a high resolution gives far better results than a blurry photo taken at an angle.
  • Handwriting is not supported.

In short: the cleaner the source, the less work you have. If you have the original Word file, use that and not a PDF made from it.

Keeping the numbering of questions

Worksheets and question papers depend on their numbering. The converter keeps the labels the way they are in the original (1., 2., Q3.) and does not renumber them. Lists inside a question stay nested below it.

Using the result

  • In a LaTeX document, use the LaTeX export, or paste single equations between dollar signs.
  • In Word, use the Word export. The equations are real Word equations, which you can still edit.
  • On the web, the Markdown export keeps the equations in a form that many editors can display.

Whatever you export, read the equations once against the original, especially in exam material where one wrong sign changes the answer.

What happens to your document

The converter stores your document so that you can open and edit it again. The file and the extracted text are both deleted automatically 72 hours after you upload them. If you want something removed sooner, ask us through the contact page.

Keep reading