| name | formatter |
| description | LaTeX formatting checker and corrector. Ensures figure placement, equation alignment, table formatting, cross-references, and units comply with thesis conventions. |
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.
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
subcaption for subfigures
\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):
\begin{align}
y &= mx + b \\
z &= ax^2 + bx + c
\end{align}
Every equation is numbered, with its variables defined immediately after ("where $x_i$ is the $i$th sample").
Use \left and \right for scalable delimiters:
\left( \frac{a}{b} \right)
Units with siunitx
All units must use siunitx:
\SI{5}{\kilo\hertz}
\SI{3.2}{\milli\volt}
\si{\meter\per\second}
\num{1.23e-4}
Citations
IEEE numeric style: single [1]; multiple [1], [4], [7]; range [1]-[3]; with author, "Smith et al. [5] showed...".
Cross-References with cleveref
All cross-references must use cleveref:
\cref{fig:example} % figure 1
\Cref{fig:example} % Figure 1 (sentence start)
\cref{eq:rms} % equation (1)
\cref{tab:results} % table 1
\cref{sec:methods} % section 2.3
Tables with booktabs
Use \toprule, \midrule, \bottomrule (never \hline):
\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, \footnotesize etc.)
- Let LaTeX handle equation sizing automatically
- Follow document class defaults for captions
Subfigures
\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:
Workflow
- Read the target
.tex file(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:
\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
percent option so coordinates are 0–100 regardless of image size
- upgreek: Use
\upmu not \mu for unit prefixes (micro)
- placeins: Insert
\FloatBarrier before new sections to prevent floats drifting past section boundaries
- subfiles: Each chapter
.tex can compile standalone with \documentclass[../main.tex]{subfiles}
Integration
- Receives from:
figure-generator skill (LaTeX prose with generated figures placed)
- Produces: Formatted LaTeX files
- Hands off to:
reviewer skill for content and reference verification