Formatter
Overview
This skill checks and corrects LaTeX formatting in thesis documents. It applies the formatting rules defined in the thesis conventions without changing the content or meaning of the text.
When to Use This Skill
- •After the
writerskill has produced LaTeX prose - •When reviewing existing chapter files for formatting compliance
- •Before compilation to catch formatting issues early
Formatting Rules
Figure and Table Placement
- •Use
[tb]placement specifiers (never[h!]or[H]) - •Floats should appear immediately after their first reference where possible
- •Related figures may use
subcaptionfor subfigures
latex
\begin{figure}[tb]
\centering
\includegraphics[width=\columnwidth]{graphics/example}
\caption{Descriptive caption.}
\label{fig:example}
\end{figure>
Equation Alignment
Multi-line equations must align on the equals sign using align (never eqnarray):
latex
\begin{align}
y &= mx + b \\
z &= ax^2 + bx + c
\end{align}
Use \left and \right for scalable delimiters:
latex
\left( \frac{a}{b} \right)
Units with siunitx
All units must use siunitx:
latex
\SI{5}{\kilo\hertz}
\SI{3.2}{\milli\volt}
\si{\meter\per\second}
\num{1.23e-4}
Cross-References with cleveref
All cross-references must use cleveref:
latex
\cref{fig:example} % figure 1
\Cref{fig:example} % Figure 1 (sentence start)
\cref{eq:rmssd} % equation (1)
\cref{tab:results} % table 1
\cref{sec:methods} % section 2.3
Tables with booktabs
Use \toprule, \midrule, \bottomrule (never \hline):
latex
\begin{table}[tb]
\centering
\caption{Caption above table.}
\label{tab:example}
\begin{tabular}{lcc}
\toprule
Parameter & Group A & Group B \\
\midrule
Mean & 0.42 & 0.38 \\
SD & 0.05 & 0.07 \\
\bottomrule
\end{tabular}
\end{table}
Font Size
- •Never reduce font size in tables or figures (
\small,\footnotesizeetc.) - •Let LaTeX handle equation sizing automatically
- •Follow document class defaults for captions
Subfigures
latex
\begin{figure}[tb]
\centering
\begin{subfigure}[b]{0.48\columnwidth}
\centering
\includegraphics[width=\textwidth]{graphics/fig_a}
\caption{First subfigure.}
\label{fig:sub_a}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.48\columnwidth}
\centering
\includegraphics[width=\textwidth]{graphics/fig_b}
\caption{Second subfigure.}
\label{fig:sub_b}
\end{subfigure}
\caption{Main figure caption.}
\label{fig:main}
\end{figure}
Formatting Checklist
Before completing:
- • All figures use
[tb]placement - • All floats appear near their first reference
- • Multi-line equations use
alignand align on= - • Delimiters use
\leftand\rightwhere appropriate - • No font size reductions in tables or figures
- • All units use
\SI{}{}or\si{} - • All cross-references use
\cref{}/\Cref{} - • Tables use
booktabsrules - • No
eqnarrayenvironments - • No
[h!]or[H]float specifiers - • Consistent styling throughout document
Workflow
- •Read the target
.texfile(s) - •Scan for each formatting rule violation
- •Make corrections directly to the LaTeX source
- •Add
% TODO:comments for issues requiring author decision (e.g., ambiguous figure sizing) - •Report a summary of changes made
What This Skill Does NOT Do
- •Does not change content, wording, or meaning
- •Does not restructure sections
- •Does not add or remove citations
- •Does not verify reference accuracy (that's
reviewer) - •Does not compile the document (user handles this)
LaTeX Style and Packages
Document Class
The thesis uses a custom or institutional document class. Chapter files use subfiles for standalone compilation:
latex
\documentclass[../main.tex]{subfiles}
\begin{document}
% chapter content
\end{document}
Required Packages
| Package | Options | Purpose |
|---|---|---|
graphicx | Figure inclusion | |
tikz | Figure markup and overlays | |
overpic | percent | LaTeX annotations on figures |
amsmath | Mathematics environments | |
amsfonts | Mathematical fonts | |
amssymb | Mathematical symbols | |
upgreek | Upright Greek letters (e.g., \upmu) | |
siunitx | Units and numbers | |
hyperref | Hyperlinks and PDF metadata | |
cleveref | capitalise | Smart cross-references |
subfiles | Standalone chapter compilation | |
booktabs | Professional table rules | |
subcaption | Subfigures | |
multirow | Table multirow cells | |
placeins | Float barriers (\FloatBarrier) | |
float | Float placement control |
Package Usage Notes
- •cleveref must be loaded last (after hyperref)
- •hyperref should be loaded near-last, before cleveref
- •siunitx: Use
\SI{value}{unit}for all quantities,\si{unit}for standalone units - •overpic: Use
percentoption so coordinates are 0–100 regardless of image size - •upgreek: Use
\upmunot\mufor unit prefixes (micro) - •placeins: Insert
\FloatBarrierbefore new sections to prevent floats drifting past section boundaries - •subfiles: Each chapter
.texcan compile standalone with\documentclass[../main.tex]{subfiles}
Integration
- •Receives from:
writerskill (LaTeX prose) - •Produces: Formatted LaTeX files
- •Hands off to:
reviewerskill for content and reference verification