# TeXpert: A Multi-Level Benchmark for Evaluating LaTeX Code Generation by LLMs

arXiv: https://arxiv.org/abs/2506.16990 · HTML: https://mlsanity.com/paper/2506.16990/

## Key facts

- Cited by 7 papers in the map (data through 14 Oct 2026).
- Builds on 11 of its 23 references that are in the map.
- First posted on arXiv 20 Jun 2025.

## Builds on (most cited first, 11 of 11)

- [Measuring Mathematical Problem Solving With the MATH Dataset](https://mlsanity.com/paper/2103.03874/) (2021)
- [Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context](https://mlsanity.com/paper/2403.05530/) (2024)
- [DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligence](https://mlsanity.com/paper/2401.14196/) (2024)
- [MathVerse: Does Your Multi-modal LLM Truly See the Diagrams in Visual Math Problems?](https://mlsanity.com/paper/2403.14624/) (2024)
- [InFoBench: Evaluating Instruction Following Ability in Large Language Models](https://mlsanity.com/paper/2401.03601/) (2024)
- [MEDEC: A Benchmark for Medical Error Detection and Correction in Clinical Notes](https://mlsanity.com/paper/2412.19260/) (2024)
- [Image-to-Markup Generation with Coarse-to-Fine Attention](https://mlsanity.com/paper/1609.04938/) (2016)
- [The SIFo Benchmark: Investigating the Sequential Instruction Following Ability of Large Language Models](https://mlsanity.com/paper/2406.19999/) (2024)
- [Struc-Bench: Are Large Language Models Really Good at Generating Complex Structured Data?](https://mlsanity.com/paper/2309.08963/) (2023)
- [MathBridge: A Large Corpus Dataset for Translating Spoken Mathematical Expressions into LaTeX Formulas for Improved Readability](https://mlsanity.com/paper/2408.07081/) (2024)
- [The Potential of LLMs in Automating Software Testing: From Generation to Reporting](https://mlsanity.com/paper/2501.00217/) (2024)

## Built on by (most cited first, 7 of 7)

- [AI for Auto-Research: Roadmap & User Guide](https://mlsanity.com/paper/2605.18661/) (2026)
- [Visual-TableQA: Open-Domain Benchmark for Reasoning over Table Images](https://mlsanity.com/paper/2509.07966/) (2025)
- [Speech-to-LaTeX: New Models and Datasets for Converting Spoken Equations and Sentences](https://mlsanity.com/paper/2508.03542/) (2025)
- [.tmu: A Low-Entropy Tree-Structured Representation for LLM-Assisted Scientific Writing](https://mlsanity.com/paper/2603.02873/) (2026)
- [CangjieBench: Benchmarking LLMs on a Low-Resource General-Purpose Programming Language](https://mlsanity.com/paper/2603.14501/) (2026)
- [A Dual-Track Framework for Template-Constrained LaTeX Conversion](https://mlsanity.com/paper/2606.23107/) (2026)
- [Curriculum as Code: An AI-Assisted Architecture for Instructional Design in STEM Education](https://mlsanity.com/paper/2608.07364/) (2026)

## Abstract (arXiv)

LaTeX's precision and flexibility in typesetting have made it the gold standard for the preparation of scientific documentation. Large Language Models (LLMs) present a promising opportunity for researchers to produce publication-ready material using LaTeX with natural language instructions, yet current benchmarks completely lack evaluation of this ability. By introducing TeXpert, our benchmark dataset with natural language prompts for generating LaTeX code focused on components of scientific documents across multiple difficulty levels, we conduct an in-depth analysis of LLM performance in this regard and identify frequent error types. Our evaluation across open and closed-source LLMs highlights multiple key findings: LLMs excelling on standard benchmarks perform poorly in LaTeX generation with a significant accuracy drop-off as the complexity of tasks increases; open-source models like DeepSeek v3 and DeepSeek Coder strongly rival closed-source counterparts in LaTeX tasks; and formatting and package errors are unexpectedly prevalent, suggesting a lack of diverse LaTeX examples in the training datasets of most LLMs. Our dataset, code, and model evaluations are available at https://github.com/knowledge-verse-ai/TeXpert.
