A thesis in LaTeX starts from your university’s template, if it publishes one. If it does not, use the book class, build a title page that follows your institution’s rules, and keep each chapter in its own file. This guide covers the setup, the structure of a thesis, and the compile step. It also points to shorter guides for reports, papers and Word conversion.
What you need before you start
- A LaTeX system. Overleaf runs in the browser and needs no install, which makes it the easiest start for most students. A local install uses TeX Live on Linux and macOS, or MiKTeX on Windows.
- Your university’s formatting rules. Margins, font size, line spacing, title page wording and the submission format are usually set out in a document from the graduate office. Keep it open while you work.
- A reference manager that exports BibTeX. Zotero and JabRef both export
.bibfiles that LaTeX can read. To choose a tool, see is it better, Mendeley or Zotero?
Start from your university’s template
Many universities publish a LaTeX thesis class or template. It usually sets the margins, the title page and the order of the front matter. Use it when it exists, because submission checks often reject a thesis that departs from the required layout. Search your graduate school’s pages for “LaTeX thesis template” to find the current version.
Overleaf’s template gallery also has many thesis templates, from individual universities and from general-purpose designs. A general design such as the Classic Thesis package gives a polished look, but it does not match every university’s rules. Treat a gallery template as a starting point and check it against your own requirements before you write any chapters.
If you are searching for a Cambridge template, look at the graduate pages for your own school or department first. Those pages name the template to use and any changes your institution asks for.
Choose between the book and report classes
bookis the usual choice for a thesis. It is two-sided by default, starts chapters on right-hand pages, and provides the\frontmatter,\mainmatterand\backmattercommands that split the document into parts.reportis single-sided by default and has chapters, but no front-matter commands. It suits shorter theses and long project reports. See our guide to project reports in LaTeX for that case.
If your university prints single-sided, add the oneside option to book. Check which one it requires before you set up the file.
Build a title page
Most universities specify the title page closely, so copy their wording exactly. This example shows the layout pattern:
\begin{titlepage}
\centering
{\Large Your University Name\par}
\vspace{2cm}
{\huge\bfseries Thesis Title Goes Here\par}
\vspace{1.5cm}
{\Large Your Full Name\par}
\vfill
A thesis submitted for the degree of Doctor of Philosophy\par
\vspace{1cm}
Department of Your Department\par
\vspace{1cm}
{\large Submission month and year\par}
\end{titlepage}
Set the date line to the month and year your university asks for. The \today command prints the compile date, which may not match the submission date. A titlepage environment gives you full control over position, which is why thesis templates use it instead of \maketitle.
Set up front matter, chapters and back matter
The skeleton below shows the usual order. Each chapter lives in its own file, and \include adds it to the main document.
\documentclass[12pt,a4paper]{book}
\usepackage[margin=2.5cm]{geometry}
\usepackage{graphicx}
\usepackage[hidelinks]{hyperref}
\begin{document}
\begin{titlepage}
% title page from the previous section
\end{titlepage}
\frontmatter
\tableofcontents
\listoffigures
\listoftables
\mainmatter
\include{chapters/introduction}
\include{chapters/literature}
\include{chapters/method}
\include{chapters/conclusion}
\backmatter
\bibliographystyle{plain}
\bibliography{references}
\end{document}
Each chapter file starts with \chapter{Introduction} and contains only that chapter’s text. While you draft, use \includeonly{chapters/method} in the preamble to compile one chapter at a time. Many universities want appendices after the bibliography, and you can add them with \appendix in the same way. How to add an appendix in LaTeX covers the details. Check your rules for the order.
Figures, tables and equations
Use vector PDF files for plots and diagrams where you can. They scale without blurring, and pdflatex reads them directly.
\begin{figure}[htbp]
\centering
\includegraphics[width=0.8\textwidth]{figures/accuracy.pdf}
\caption{Accuracy against training set size.}
\label{fig:accuracy}
\end{figure}
Refer to the figure in the text with Figure~\ref{fig:accuracy}. The tilde keeps the number with its word. For tables, the booktabs package adds clean horizontal rules, and for equations the amsmath package provides the standard environments. Labels and cross-references are the reason to use LaTeX for a long document: they update when you move a figure or add a chapter.
References with BibTeX or biblatex
Keep every reference in one references.bib file and export it from your reference manager. The simplest setup uses the \bibliographystyle and \bibliography commands shown in the skeleton. That gives numbered references with the plain style.
If your department asks for author-year citations or a specific style, biblatex with the biber backend gives more control:
\usepackage[backend=biber,style=authoryear]{biblatex}
\addbibresource{references.bib}
% at the end of the document
\printbibliography
Pick one system and stick with it. Mixing natbib and biblatex in one thesis causes errors that are hard to trace.
Compile to PDF
On Overleaf, press the compile button. Locally, run latexmk -pdf thesis.tex, which runs the bibliography tool and repeats the compile as many times as needed. Without latexmk, the order is pdflatex, then biber or bibtex, then pdflatex twice more.
Older guides describe converting a DVI file to PostScript and then to PDF. That route is no longer needed with a modern pdflatex or lualatex workflow. If your template names a different engine, such as xelatex for fonts, use the one it names.
When the log says “Label(s) may have changed. Rerun to get cross-references right”, compile again. Undefined citations or references usually mean a missing key in references.bib or a label that does not exist.
Synopsis and proposal documents
In some institutions, particularly in India, a synopsis is the short document a PhD candidate submits before the full thesis. The layout is simpler than a thesis, so an article or report class with your department’s format usually works. Keep the same references.bib file so the synopsis and the thesis share their references. If the proposal needs a timeline, making a PhD Gantt chart in LaTeX shows one way to draw it.
Working with supervisors who want Word
Supervisors and co-authors who do not use LaTeX often ask for a Word copy. Pandoc can convert the source, but equations, tables and cross-references usually need cleanup afterwards. Our guide to converting LaTeX to Word with Pandoc covers the commands and the checks. For comments, shared Overleaf projects are often easier than a Word file, and the LaTeX vs Word comparison explains the trade-offs.
Next steps
Once the thesis is set up, the other parts of the work often need their own layouts:
- If a chapter becomes a journal paper, the research paper guide covers the standard sections.
- For venue-specific layouts, see the IEEE paper guide, the ACM paper guide and the Elsevier template guide.
- For a shorter document, the project report guide gives a minimal working file.
Set up the template first, check the rules, and then write one chapter at a time. A thesis that compiles from the first day is much easier to finish.