Practical guideResearch writingAll disciplines

Writing a thesis in LaTeX: structure, figures, tables, equations and references

A practical guide to writing a doctoral thesis in LaTeX, with working examples for the main file, chapters, floats, equations and biblatex references, and corrections to common but outdated advice.

What you will learn

  • Set up a thesis as a main file with one file per chapter
  • Insert figures and tables as floats with correct placement options and labels
  • Write displayed and aligned equations with amsmath instead of obsolete syntax
  • Manage references with biblatex and biber
  • Follow a working routine that keeps a long LaTeX document reliable

What you will unlearn

  • Displayed equations go between double dollar signs.$$ ... $$ is plain TeX; in LaTeX use \[ ... \] or the equation and align environments.
  • Figure placement is set with options to \includegraphics.Placement options belong to the figure environment; \includegraphics takes size options such as width.
  • Overleaf and TeXstudio are LaTeX compilers.They are editors that call a TeX engine such as pdfLaTeX, XeLaTeX or LuaLaTeX.
  • The default LaTeX layout satisfies thesis regulations.Margins, spacing and preliminary pages are set by your university and must be configured.

Skills you will practise

  • LaTeX document structure
  • Floats and cross-references
  • amsmath equations
  • biblatex and biber
  • Thesis templates
  • Version control

Why write a thesis in LaTeX

LaTeX is a document preparation system: you write plain text with markup commands, and a TeX engine typesets it into a PDF. It is widely used for theses in mathematics, physics, computer science, engineering and economics because it handles equations, cross-references, numbered figures and tables, and large bibliographies reliably across hundreds of pages. The standard free introduction, The not so short introduction to LaTeX, is a good companion to this guide (Oetiker, 2021).

Before you start, check two things. First, your university's presentation rules: margins, line spacing, fonts, the order of preliminary pages and the declaration are set by regulation, not by LaTeX defaults (University of Manchester, 2026). Many universities or student societies publish a LaTeX thesis template that already meets them. Second, whether your supervisor and co-authors use LaTeX; if they comment in a word processor, agree a workflow early.

You need a TeX distribution (TeX Live or MiKTeX), which provides the engines, and an editor. Editors such as TeXstudio, or the online editor Overleaf, are not compilers: they call an engine for you. The engines are pdfLaTeX and the Unicode engines XeLaTeX and LuaLaTeX; the latter two make it easier to use system fonts and non-Latin scripts.

Structure: one main file, one file per chapter

A thesis is easier to manage as a main file that loads one file per chapter. The report and book classes provide chapters; the article class does not. The skeleton below shows a minimal main file.

A minimal main file for a thesis (illustrative)
Line in thesis.texWhat it does
\documentclass[12pt,a4paper]{report}Report class with chapters; 12-point text on A4 paper
\usepackage[margin=25mm]{geometry}Sets margins; replace with your regulations' values
\usepackage{amsmath}Mathematical environments such as align and \eqref
\usepackage{graphicx}Provides \includegraphics for figures
\usepackage{booktabs}Professional horizontal rules for tables
\usepackage[style=authoryear]{biblatex}Bibliography and citations (choose the style your university requires)
\addbibresource{references.bib}Points biblatex to your reference database
\usepackage{hyperref}Clickable cross-references and links (usually loaded last)
\begin{document}Start of the text
\include{chapters/introduction}Inserts chapters/introduction.tex on a new page
\include{chapters/literature-review}One line per chapter file
\printbibliographyPrints the reference list
\end{document}End of the text

While drafting, the command \includeonly{chapters/introduction} in the preamble compiles a single chapter while keeping page numbers and cross-references from the others. Sectioning inside each chapter uses \chapter, \section, \subsection and \subsubsection; LaTeX numbers them and builds the table of contents with \tableofcontents.

Front matter, appendices and lists

A thesis needs elements that a journal article does not: a title page, a declaration, an abstract, acknowledgements, a table of contents, lists of figures and tables, often a list of abbreviations, and appendices. Your regulations set their order and wording (University of Manchester, 2026), so build them to match.

  • Number preliminary pages in roman numerals with \pagenumbering{roman}, then switch to arabic numerals with \pagenumbering{arabic} at the first chapter. The book class offers \frontmatter and \mainmatter for the same purpose.
  • Generate the lists automatically with \tableofcontents, \listoffigures and \listoftables; they update from your captions and headings at each compilation.
  • Start the appendices with \appendix, after which \chapter produces Appendix A, Appendix B and so on.
  • Write the title page and declaration as separate files so that they can be adjusted to the regulations without touching the chapters.
  • If you need a list of abbreviations or a glossary, use a dedicated package rather than a hand-made table, so that entries stay consistent with the text.

Line spacing, if your university requires 1.5 or double spacing, is best set with a package such as setspace rather than by changing low-level lengths, and margins with geometry as in the skeleton above. Check the printed or PDF result against the regulations before submission, including the binding margin if a printed copy is still required.

Figures and tables

Figures and tables are floats: LaTeX places them where they fit best, guided by placement options given to the figure or table environment, not to \includegraphics. The options are h (here), t (top of a page), b (bottom) and p (a separate page of floats); [htbp] lets LaTeX choose among all four (Oetiker, 2021). \includegraphics, from the graphicx package, takes size options such as width (Carlisle & LaTeX Project Team, 2026).

Inserting a figure (illustrative)
LinePurpose
\begin{figure}[htbp]Start a float, with permitted placements
\centeringCentre the content
\includegraphics[width=0.8\textwidth]{figures/response-rates.pdf}Insert a vector PDF at 80% of the text width
\caption{Response rates by survey wave.}Numbered caption, also used in the list of figures
\label{fig:response}A label for cross-referencing; place it after the caption
\end{figure}End the float

Refer to the figure in the text with Figure~\ref{fig:response}, never with "the figure below", because the float may move. Captions should explain what the reader is looking at, and default plotting settings are rarely the best choice for a thesis figure (Rougier et al., 2014). Export plots as vector PDF where possible so that text and lines stay sharp.

Tables use the tabular environment inside a table float. Columns are separated by & and rows end with \\. The booktabs package provides \toprule, \midrule and \bottomrule for clean horizontal rules; vertical rules are best avoided. For what to put in tables and figures, see tables and figures in a thesis.

Equations

Inline mathematics goes between single dollar signs, as in $y = \beta_0 + \beta_1 x$. For displayed equations, do not use the plain TeX form $$ ... $$: it is not LaTeX syntax and produces inconsistent vertical spacing (Trettin, 2007). Use \[ ... \] for an unnumbered display, or the equation environment for a numbered one.

Recommended mathematical markup (Trettin, 2007; LaTeX Project Team, 2025)
NeedUseAvoid
Unnumbered display\[ E = mc^2 \]$$ E = mc^2 $$
Numbered display\begin{equation} ... \label{eq:model} \end{equation}Typing numbers by hand
Several aligned lines\begin{align} a &= b + c \\ d &= e \end{align}eqnarray (not supported by amsmath)
Referring to an equation\eqref{eq:model}"the equation above"
Bold or italic text\textbf{...}, \textit{...}{\bf ...}, {\it ...} (obsolete)

The amsmath package, maintained by the LaTeX Project, provides align, gather, multline, cases and many other environments (LaTeX Project Team, 2025); the American Mathematical Society's short guide is a concise reference to them (American Mathematical Society, 2017). Obsolete constructs such as eqnarray and the two-letter font commands (\bf, \it) still compile but cause spacing and font problems, which is why guides on LaTeX usage recommend replacing them (Trettin, 2007).

References with biblatex and biber

Store references in a .bib file, one entry per source with a citation key, for example @article{webster2002, ... }. Most reference managers can export to this format. biblatex controls how citations and the bibliography look, using styles written in LaTeX itself (Kime et al., 2026). Its recommended backend is biber, which supports full UTF-8 and flexible sorting (Charette & Kime, 2026).

  • Cite in parentheses with \parencite{webster2002} and in running text with \textcite{webster2002}.
  • Choose the style in the package options: style=authoryear, style=numeric, or a style package such as biblatex-apa (loaded with style=apa) if your university requires APA.
  • Compile in the order: LaTeX, biber, LaTeX, LaTeX. Editors and Overleaf usually do this automatically.
  • Check entries for capitalisation, missing DOIs and wrong entry types; exported records are often imperfect. See how to cite a doctoral thesis.

A working routine

  1. Start from your university's template, or set the class and geometry to match its regulations.
  2. Create one folder for chapters, one for figures and one .bib file; keep everything under version control (for example Git) or use Overleaf's history.
  3. Write with labels from the start: fig:, tab:, eq: and sec: prefixes keep cross-references readable.
  4. Compile often. When an error appears, read the first error in the log and the line number it gives; most errors are a missing brace or an unescaped special character such as %, & or _.
  5. Before submission, check overfull boxes, the table of contents, list of figures and tables, and that every citation and cross-reference resolves (no question marks in the PDF).

Collaboration needs a plan. If your supervisor reads PDFs, ask for comments as PDF annotations and keep a list of changes; if they prefer to edit directly, a shared Overleaf project or a Git repository lets you see every change. Converting a LaTeX chapter to a word-processor file for a reviewer is possible with conversion tools, but equations, citations and cross-references rarely survive intact, so agree the format of feedback before the first draft rather than converting each time.

For presenting code and algorithms in a thesis, see how to present computer code in a thesis; for the structure of the whole thesis, see structuring a PhD thesis.

Common mistakes

  • Using $$ ... $$ or eqnarray for displayed equations instead of \[ ... \], equation or align.
  • Giving placement options to \includegraphics instead of the figure environment, or forcing every float with [h].
  • Referring to "the table below" instead of using a label and reference.
  • Placing \label before \caption, which makes references point to the wrong number.
  • Ignoring the university's presentation rules because the default LaTeX layout "looks professional".
  • Inserting plots as low-resolution bitmaps rather than vector files.
  • Keeping the whole thesis in one enormous file without version control.

Key takeaways

Your next step

Want to apply this to your own study?

  1. 1Tell us your topic, data and deadline
  2. 2A subject mentor reviews your work with you
  3. 3You get a plan and a quote
Full dissertation mentoring

References

  1. American Mathematical Society. (2017). Short math guide for LaTeX (Version 2.0; originally by M. Downes) [Computer software documentation]. CTAN. https://www.ctan.org/pkg/short-math-guide
  2. Carlisle, D., & LaTeX Project Team. (2026). graphicx: Enhanced support for graphics (Version 1.2e) [Computer software]. CTAN. https://www.ctan.org/pkg/graphicx
  3. Charette, F., & Kime, P. (2026). Biber: A BibTeX replacement for users of BibLaTeX (Version 2.22) [Computer software]. CTAN. https://www.ctan.org/pkg/biber
  4. Kime, P., Wemheuer, M., Boruvka, A., Wright, J., & Lehman, P. (2026). biblatex: Sophisticated bibliographies in LaTeX (Version 3.22) [Computer software]. CTAN. https://www.ctan.org/pkg/biblatex
  5. LaTeX Project Team. (2025). amsmath: AMS mathematical facilities for LaTeX (Version 2.17z) [Computer software]. CTAN. https://www.ctan.org/pkg/amsmath
  6. Oetiker, T. (2021). The not so short introduction to LaTeX 2ε (Version 6.4) [Computer software documentation]. CTAN. https://ctan.org/pkg/lshort-english
  7. Rougier, N. P., Droettboom, M., & Bourne, P. E. (2014). Ten simple rules for better figures. PLoS Computational Biology, 10(9), e1003833. https://doi.org/10.1371/journal.pcbi.1003833
  8. The University of Manchester. (2026). Presentation of theses policy (Version 12). https://documents.manchester.ac.uk/display.aspx?DocID=7420
  9. Trettin, M. (2007). An essential guide to LaTeX 2ε usage: Obsolete commands and packages (J. Fenn, Trans.; Version 1.8.5.7). CTAN. https://ctan.math.washington.edu/tex-archive/documentation/l2tabu/english/l2tabuen.pdf

How to cite this article

Choose your referencing style, then copy. Check your university's or journal's guide for local variations.

PhD Research Lab Academy. (2024, February 12). Writing a thesis in LaTeX: structure, figures, tables, equations and references. PhD Research Lab. https://www.phdassistance.com/study-guide/guide-to-mastering-latex-formatting/

PhD Research Lab Academy. “Writing a Thesis in LaTeX: Structure, Figures, Tables, Equations and References.” PhD Research Lab, 12 Feb. 2024, www.phdassistance.com/study-guide/guide-to-mastering-latex-formatting. Accessed [access date].

PhD Research Lab Academy (2024) Writing a thesis in LaTeX: structure, figures, tables, equations and references. PhD Research Lab. Available at: https://www.phdassistance.com/study-guide/guide-to-mastering-latex-formatting/ (Accessed: [access date]).

PhD Research Lab Academy. “Writing a Thesis in LaTeX: Structure, Figures, Tables, Equations and References.” PhD Research Lab. February 12, 2024. https://www.phdassistance.com/study-guide/guide-to-mastering-latex-formatting.

PhD Research Lab Academy, ‘Writing a Thesis in LaTeX: Structure, Figures, Tables, Equations and References’ (PhD Research Lab, 12 February 2024) <https://www.phdassistance.com/study-guide/guide-to-mastering-latex-formatting> accessed [access date].

PhD Research Lab Academy. Writing a thesis in LaTeX: structure, figures, tables, equations and references [Internet]. PhD Research Lab; 2024 Feb 12 [cited [access date]]. Available from: https://www.phdassistance.com/study-guide/guide-to-mastering-latex-formatting/

PhD Research Lab Academy, “Writing a thesis in LaTeX: structure, figures, tables, equations and references,” PhD Research Lab, Feb. 12, 2024. [Online]. Available: https://www.phdassistance.com/study-guide/guide-to-mastering-latex-formatting. [Accessed: [access date]].

@online{guide_to_mastering_latex_formatting_2024,
  author = {{PhD Research Lab Academy}},
  title = {{Writing a thesis in LaTeX: structure, figures, tables, equations and references}},
  organization = {PhD Research Lab},
  date = {2024-02-12},
  url = {https://www.phdassistance.com/study-guide/guide-to-mastering-latex-formatting},
  urldate = {[access date]}
}

This article is for learning. Use it to understand the method and cite the original sources above in your own work; do not copy or submit it as your own.

Writing a thesis in LaTeXNeed help applying it to your study?
Full dissertation mentoring