Diagnostic Showcase Gallery

This gallery presents unedited, real-world terminal runs comparing standard LaTeX compilation tools (latexmk on xelatex) directly against latex_it.

Every comparison below was generated by running genuine compilations of both tools on the exact same .tex source files.


1. Unclosed Dollar Sign ($) Inversion & Pinpointing

Problem Scenario: An unclosed $ on line 4 propagates across five lines of dense mathematical prose, inverting text and math across multiple formulas until TeX crashes far downstream.

\documentclass{article}
\begin{document}

Let $S be a finite metric space containing $n$ elements.
We consider the pairwise distance matrix $D$ with entries $d(u, v) = 0$.
Under the assumption that the doubling dimension is bounded by $k$,
the geometric embedding maintains pairwise separation throughout the domain.
Finally, we obtain that the distortion factor is strictly below $1 + \epsilon$ overall.

Next section begins here.
\end{document}

1. Unclosed Dollar Sign ($) Inversion & Pinpointing

Commentary & Diagnosis


2. Unclosed Curly Brace Pinpointing

Problem Scenario: A macro argument or group opened with { is left unclosed across a paragraph or EOF.

\documentclass{article}
\begin{document}
Here is an unclosed macro \textbf{that forgot
the closing brace.
\par
And here is some text that should not be in the bold.
\end{document}

2. Unclosed Curly Brace Pinpointing

Commentary & Diagnosis


3. Misplaced Alignment Tab (&) inside equation*

Problem Scenario: The author used & to align multi-part equations, but placed it inside equation* instead of align*.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
  x = 1 & y = 2
\end{equation*}
\end{document}

3. Misplaced Alignment Tab (&) inside equation*

Commentary & Diagnosis


4. Macro Spelling & Typo Fuzzy Matching (\includegrahics)

Problem Scenario: A minor typo in a common macro name (\includegrahics instead of \includegraphics).

\documentclass{article}
\begin{document}
\includegrahics{my_figure.png}
\end{document}

4. Macro Spelling & Typo Fuzzy Matching (\includegrahics)

Commentary & Diagnosis


5. Missing Package Macro (\toprule)

Problem Scenario: Using standard publication-quality table markup (\toprule) without importing the prerequisite package.

\documentclass{article}
\begin{document}
\begin{tabular}{cc}
  \toprule
  A & B \\
\end{tabular}
\end{document}

5. Missing Package Macro (\toprule)

Commentary & Diagnosis


6. Inverted \label Before \caption (Silent Reference Corruption)

Problem Scenario: Placing \label{...} before \caption{...} inside a floating figure or table.

\documentclass{article}
\begin{document}
\section{Introduction}\label{sec:intro}
See Figure~\ref{fig:myfig}.
\begin{figure}[htbp]
  \label{fig:myfig}
  \caption{A sample diagram.}
\end{figure}
\end{document}

6. Inverted \label Before \caption (Silent Reference Corruption)

Commentary & Diagnosis


7. Bibliography Syntax Crash at \printbibliography (Pinpointing the Exact .bib Entry)

Problem Scenario: An unescaped underscore (_) in a .bib database field (such as journal = {NORDIC_J_COMP}).

\documentclass{article}
\usepackage[backend=biber]{biblatex}
\addbibresource{refs.bib}
\begin{document}
Citing a seminal paper \cite{grss95}.
\printbibliography
\end{document}

Companion refs.bib:

@article{grss95,
  author  = {Sariel Har-Peled},
  title   = {A Fast Approximation Algorithm},
  journal = {NORDIC_J_COMP},
  year    = {1995}
}

7. Bibliography Syntax Crash at \printbibliography (Pinpointing the Exact .bib Entry)

Commentary & Diagnosis