Skip to content

philipdarke/simple-thesis

Repository files navigation

LaTeX thesis template

A PhD thesis template with a simple one-column design. See an example.

Features:

  • Draft mode with to-do notes, word count and other features to help with writing, see example.
  • Support for single- or double-sided theses.
  • PDF mode to format for on-screen reading, see example.
  • The thesis builds automatically when you push to GitHub.

ℹ️ The class complies with the May 2023 Newcastle University thesis requirements as set out below. Another option for Newcastle University theses is the NUTT template (based on the popular CUED template). This has extra formatting options but, in my view, doesn't look as good.1

Instructions

  1. Download the simple-thesis.zip template from Releases.
  2. Update the package options and PhD details section of thesis.tex.
  3. Start writing! Keep each chapter in a directory named chapterX (do the same for any appendices). Figures and images should go in figures or images sub-directories.
  4. Add each chapter and appendix to thesis.tex using \input{} commands.
  5. Build the PDF by running make.

If you have issues building the PDF locally, try first running make purge or see below.

:octocat: Using Git

Recommended!

  1. Run git init in your thesis directory to set up Git.
  2. Commit your changes.
  3. Create an empty private repository on GitHub for your thesis.
  4. Follow the instructions to set up a remote and push your work to GitHub.
  5. Make and push regular commits to back up your work. The PDF will build each time you push to GitHub. Go to Actions, choose the most recent commit and click thesis-[TIMESTAMP] under Artifacts to download the PDF.

Using the template

📦 Package options

Option Description
oneside Double-sided is the default. Use the oneside option for a single-sided thesis.
draft Use the draft option to add a word count, line numbers etc and enable to-do notes. Remove the draft option to create the final thesis for printing.
pdf You may wish to also disseminate your thesis as a PDF. Use the pdf option to format the thesis for reading on screen. Hyperlinks are shown in blue, pages with landscape tables/figures are rotated and blank pages inserted in two-sided theses are marked This page is intentionally blank. Margins are equalised to remove the binding edge.

📘 Thesis formatting

The class includes a number of packages I find useful to typeset documents. See chapter one in the example thesis for more information.

🗒️ To-do notes

To-do notes can be added using:

  • \todonote{} to create a to-do
  • \reference{} to note a missing reference
  • \issue{} to highlight a problem
  • \misc{} for a miscellaneous note

When the draft package option is used, to-do notes are summarised on the first page, see example thesis. All to-do notes are disabled when producing the final thesis.

💻 Building the PDF locally

The Makefile has been tested on Ubuntu2 and MacOS3. It uses latexmk to automate the build with the pdflatex engine and biber for references. If you are unable to use make or latexmk, or prefer to use a recipe in Visual Studio Code or TeXStudio, follow the instructions below.

Run the following to generate the word count files:

texcount abstract/* *.tex -sum=1,0,1 -inc -out=wordcount.txt
texcount abstract/* -sum=1,0,1 -1 -out=wordcount.abstract
texcount introduction/* chapter*/* conclusion/* -sum=1,0,1 -brief -out=wordcount.summary
texcount introduction/* chapter*/* conclusion/* -sum=1,0,1 -1 -out=wordcount.total

To generate the bibliography, acronyms and index sections run:

pdflatex thesis.tex
biber thesis
makeglossaries thesis
makeindex thesis

To build the final thesis, you will need to run pdflatex thesis.tex at least another two times to add all the sections and update the table of contents.

Building standalone chapters

To build a standalone chapter (for example to share with your supervisors) place a stub file chapterX-standalone.tex in the chapter directory. See chapter1/chapter1-standalone.tex for an example. Run make standalone to build a PDF for each stub file.

Formatting

All formatting can be updated in simple-thesis.cls.

Font

  • Body text is 12pt.
  • Captions and footnotes are smaller to distinguish them from body text4.

Layout

  • 2cm margins with 3cm along the binding edge.
  • Text is fully justified in a single column.
  • One-and-a-half spacing between lines except for footnotes and quotes which are single spaced.

Pagination

  • Preliminary pages are numbered in lower case Roman numerals.
  • Pages from Chapter 1 onwards are numbered in Arabic.

Headings

  • Chapters begin on a new page.
  • Chapter headings are 14pt bold in Title Case5 and center-aligned.
  • Section headings are 12pt bold in Title Case5 and left-aligned.
  • Sub-section headings are 12pt italic bold and left-aligned.

Figures and tables

  • Figures and tables are numbered within chapters.

Header and footer

  • Current chapter and section are included in the header.
  • Page numbers are centered in the footer.

Known bugs 🪲

  1. To-do notes only display correctly in double-sided mode i.e. without setting the oneside package option.
  2. PDF rotation (for example landscape pages when using the sidewaysfigure or sidewaystable environments) does not show correctly on Mac OS e.g. see the PDF example in Safari and Preview6. The same PDF renders correctly on Ubuntu and Windows.

Advanced notes on GitHub

It is not possible to directly clone a public GitHub repository to a private one. To use a private repository for your thesis whilst retaining the ability to pull future changes made to the template:

  1. Run git clone --bare [email protected]:philipdarke/simple-thesis.git to create a bare clone of the repository using SSH6.
  2. Create an empty private repository on GitHub for your thesis.
  3. Mirror push the cloned repository to your private repository using git push --mirror [email protected]:user/new-repository.git.
  4. Delete the cloned repository and clone your private repository. Use this to write your thesis.
  5. Add a remote to the public repository using git remote add public [email protected]:philipdarke/simple-thesis.git.

To pull any changes made to the template run git fetch public main and git rebase public/main. You will need to handle conflicts. To push changes to your private repository run git push [origin remote] as normal.

⚠️ I wouldn't recommend this approach unless you are confident it's right for you.

License

Made available under the MIT License.

Footnotes

  1. Largely due to the use of Times New Roman

  2. Ubuntu 18.04, 20.04 and 22.04 with TexLive installed using sudo apt install texlive-full

  3. MacOS 12 Monterey, 13 Ventura and 14 Sonoma with MacTeX installed using brew install --cask mactex-no-gui

  4. This is a departure from Newcastle University requirements which state "All text should be 12-point except for headings"

  5. \thesischapter and \thesissection commands must be used to convert titles to Title Case 2

  6. However the PDF renders correctly in the VS Code PDF viewer on Mac OS. 2