What the Doctor checks for
- Unbalanced braces — every
{ needs a matching }.
- Broken environments — every
\begin{...} needs a matching
\end{...} with the same name, in the right order.
- Math mode mishaps — unclosed
$...$, $$...$$,
\[...\] or \(...\), and stray closing delimiters.
- Missing document scaffolding — a
\begin{document} without a
\documentclass, or a \documentclass without a
\begin{document}.
- Unescaped special characters — a bare
&, _ or
# outside math mode, a table, or a macro definition, where LaTeX would stop with
an error.
- Missing packages — commands such as
\includegraphics,
\textcolor or \toprule used without the \usepackage
that provides them.
- Typos — near-miss spellings of common commands and environment names, such as
\beign or \begin{enumarate}.
Comments (%), verbatim/lstlisting blocks and
\verb spans are skipped, exactly as LaTeX skips them, so they never raise false alarms.
The Doctor reads syntax only: it does not compile anything, so it cannot know whether your packages
are installed, whether a referenced file exists, or whether a macro is defined elsewhere. Treat a
clean bill of health as “no obvious syntax problems”, not as a guaranteed successful build.