# PDF Formula Extractor (LaTeX / MathML / MathJax) with AMS Equation-Number Preservation

Detect and reconstruct embedded math formulas from vector PDFs: math-font recognition (CMMI/CMSY/CMEX, STIX, Cambria Math), Unicode math, super/subscripts and stacked fractions, AMS equation numbers ((2a)/(2b) subequations) preserved; outputs copyable LaTeX, presentation MathML (MathJax/KaTeX-compatible) and a downloadable .tex bundle.

> Canonical page: https://elysiatools.com/en/tools/pdf-latex-mathml-mathjax-formula-extractor-and-equation-number-preserver

- **Category:** Document Tools

- **Keywords:** pdf formula extractor, pdf latex extraction, equation number preserver, ams equation numbering, mathml from pdf, mathjax, katex, temml, cmmi font detection, subequations, academic paper workflow, formula ocr alternative

## Overview

Extracts embedded formulas from vector PDFs into LaTeX and MathML. Math detection is font+layout based: LaTeX PDFs render equations in dedicated math fonts (CMMI math italic, CMSY/CMEX symbols, MSAM/MSBM AMS symbols), readable from pdf.js operator lists; super/subscripts come from baseline offsets, fractions from vertically aligned line pairs, and right-margin (N)/(Na) runs give AMS equation/subequation numbers. Every reconstructed LaTeX string is validated through temml and exported as presentation MathML, which MathJax v3 accepts directly. Scanned/image-only PDFs have no text layer and are rejected with a clear message (run OCR first).

## Inputs

- **PDF file** (file)
- **Formula scope** (select)
- **Max pages to scan** (number)
- **Render MathML preview** (checkbox)
- **Write .tex bundle** (checkbox)

## When to use

- Extracting display or inline equations from academic vector PDFs into editable LaTeX code.
- Converting PDF formulas into presentation MathML for web rendering with MathJax or KaTeX.
- Preserving numbered equation structures, including AMS subequations like (2a) and (2b), when migrating research papers.

## How it works

- Inspects PDF operator lists to detect dedicated math fonts such as CMMI, CMSY, CMEX, STIX, and Cambria Math alongside Unicode symbols.
- Calculates baseline offsets to reconstruct superscripts and subscripts, and identifies vertically aligned runs to format stacked fractions.
- Detects right-margin equation labels to preserve standard AMS numbering and subequation sequences.
- Validates reconstructed formulas with Temml and outputs copyable LaTeX, Presentation MathML, and an optional .tex bundle.

## Use cases

- Digitizing equations from arXiv preprints and journal vector PDFs into LaTeX manuscripts.
- Importing math formulas from technical PDF specifications into MathJax-enabled documentation sites.
- Batch-extracting numbered equations and subequations for academic literature reviews.

## Frequently asked questions

### Does this tool work on scanned or photographed PDFs?

No, it requires vector PDFs with an embedded font layer; image-only scanned PDFs without text layers are rejected.

### Which equation scopes can be extracted?

You can select display equations only, all display and inline math runs, or exclusively numbered equations.

### How are subequations like (1a) and (1b) handled?

Right-margin markers are detected and mapped to amsmath subequation structures to preserve original numbering.

### Is the generated MathML compatible with web renderers?

Yes, the tool generates presentation MathML validated by Temml, which works directly with MathJax v3 and KaTeX.

### What is included in the downloadable .tex bundle?

The bundle packages all extracted formulas structured into ready-to-compile LaTeX files with preserved equation labels.

## Related tools

- [OCR PDF to Structured JSON Bridge](https://elysiatools.com/en/tools/ocr-pdf-to-structured-json-bridge): Extract the PDF text layer with geometry (lines by y-position, tables by column gaps, headings by font size, colon key-value pairs), then fill a user-supplied JSON Schema field by field — labels matched by normalized keys, values coerced to declared types and validated with ajv.
- [PDF/A Convert](https://elysiatools.com/en/tools/pdf-a-convert): Convert PDF documents to a self-declared PDF/A archival profile with zero external dependencies
- [PDF Text Extractor](https://elysiatools.com/en/tools/pdf-text-extractor): Extract text content from PDF documents with support for page selection, formatting options, and multi-language processing
- [PDF to Excel](https://elysiatools.com/en/tools/pdf-to-excel): Extract tabular data from PDF files and convert to Excel spreadsheets with customizable parsing options
- [PDF to PowerPoint](https://elysiatools.com/en/tools/pdf-to-powerpoint): Extract text content from PDF files and convert to PowerPoint presentation slides
- [PDF to Text Advanced](https://elysiatools.com/en/tools/pdf-to-text-advanced): Advanced PDF to text converter with page selection, formatting options, and metadata extraction
- [Formula / Chart Heavy PDF Analyzer](https://elysiatools.com/en/tools/formula-chart-heavy-pdf-analyzer): Compare local and hybrid OpenDataLoader extraction to identify PDF pages where formulas, charts, or dense visuals may need AI-assisted parsing
- [PDF Header/Footer Noise Remover](https://elysiatools.com/en/tools/pdf-header-footer-noise-remover): Compare extraction with and without repeated page furniture to spot header/footer noise before using PDF text in RAG, summarization, or editing workflows

## Samples

- [PDF Samples](https://elysiatools.com/en/samples/pdf-samples): Generated PDF samples from tools dated 2026-02-01 to 2026-02-10
- [Markdown Slide Deck Samples](https://elysiatools.com/en/samples/md-slide-deck-to-pdf): Remark/Marp style Markdown slide decks for testing PDF export layouts
- [Phone Number Extractor Samples](https://elysiatools.com/en/samples/phone-number-extractor): Collection of mixed text containing phone numbers from various countries for extraction testing
- [Number & Currency Samples](https://elysiatools.com/en/samples/number-currency-samples): Text containing various number and currency formats for testing currency extraction
