No description
  • TeX 92.3%
  • Makefile 7.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-15 11:19:31 -04:00
chapter Template v2.0: fix build errors, follow Duke formatting, pullable updates 2026-10-15 11:15:44 -04:00
dissertation-style Template v2.0: fix build errors, follow Duke formatting, pullable updates 2026-10-15 11:15:44 -04:00
front-matter Template v1 2026-08-24 22:58:09 -04:00
.gitattributes Template v2.0: fix build errors, follow Duke formatting, pullable updates 2026-10-15 11:15:44 -04:00
.gitignore Template v2.0: fix build errors, follow Duke formatting, pullable updates 2026-10-15 11:15:44 -04:00
.latexmkrc Template v2.0: fix build errors, follow Duke formatting, pullable updates 2026-10-15 11:15:44 -04:00
bibliography.bib Template v2.0: fix build errors, follow Duke formatting, pullable updates 2026-10-15 11:15:44 -04:00
definitions-extra.tex Template v2.0: fix build errors, follow Duke formatting, pullable updates 2026-10-15 11:15:44 -04:00
definitions.tex Template v2.0: fix build errors, follow Duke formatting, pullable updates 2026-10-15 11:15:44 -04:00
LICENSE Template v1 2026-08-24 22:58:09 -04:00
main.tex Template v2.0: fix build errors, follow Duke formatting, pullable updates 2026-10-15 11:15:44 -04:00
Makefile Template v2.0: fix build errors, follow Duke formatting, pullable updates 2026-10-15 11:15:44 -04:00
MIGRATION.md Update template URLs 2026-10-15 11:19:31 -04:00
README.md Update template URLs 2026-10-15 11:19:31 -04:00

Duke Dissertation LaTeX Template

A modular LaTeX template for Duke University PhD dissertations (defaults to the Department of Mathematics), laid out according to the Graduate School's Guide for Electronic Submission of Thesis and Dissertation. It works on Overleaf and with local toolchains (latexmk, VimTeX, tectonic).

Template version 2.0; the number is in \dissertationtemplateversion and printed in the build log. If your project started from an older copy of this template, read MIGRATION.md.


Quick Start

Overleaf

  1. Download this repository as a ZIP file.
  2. In Overleaf, click New Project → Upload Project and select the ZIP.
  3. Open definitions.tex and fill in every line marked % FILL IN (title, name, committee, etc.).
  4. Write your chapters in chapter/<name>/main.tex files and list them in main.tex.
  5. Add bibliography entries to bibliography.bib.
  6. Click Recompile.

Overleaf detects .latexmkrc automatically; no compiler configuration is needed.

Local build

Prerequisites: a TeX distribution (TeX Live, MiKTeX or MacTeX) with latexmk. You do not need biber: the template uses biblatex's BibTeX backend.

latexmk main.tex        # build
latexmk -pvc main.tex   # rebuild on every save
latexmk -c main.tex     # remove auxiliary files
latexmk -C main.tex     # remove auxiliary files and the PDF

The Makefile wraps the same commands: make, make watch, make clean, make distclean.

tectonic: tectonic -X compile main.tex (or tectonic main.tex) works with no extra setup.

VimTeX: the included .latexmkrc is picked up automatically; open main.tex and use your usual mappings (<localleader>ll, <localleader>lv).


Which Files Are Yours

The project is split into files that you own and files that belong to the template. Template updates only ever replace template files, so as long as you never edit those, updating is a clean git pull (see Updating the Template).

Path Owner What it is for
main.tex you The list of chapters and appendices
definitions.tex you Title, name, dates, committee, .bib files, optional-page switches, symbols
definitions-extra.tex you Your packages, macros, theorem environments, and overrides of template settings
*.bib you Bibliography databases
front-matter/ you Text of the abstract, dedication and acknowledgements
chapter/ you Chapters and appendices (plus their figures)
dissertation-style/ template Page layout, title pages, front and back matter. Do not edit.
.latexmkrc, Makefile, .gitignore, .gitattributes template Build and repository configuration
README.md, MIGRATION.md, LICENSE template Documentation

Anything you might want to change about the template's behaviour can be done from your own files:

  • Extra packages, macros, theorem styles: definitions-extra.tex. It is loaded after all of the template's packages (including hyperref).
  • Overriding a template setting: also definitions-extra.tex, e.g. \singlespacing while drafting.
  • Options for a package the template loads: add \PassOptionsToPackage{<options>}{<package>} at the very top of main.tex, before \input{dissertation-style/preamble.tex}. For example, \PassOptionsToPackage{style=alphabetic}{biblatex} gives alphabetic citation labels.
  • Something after the bibliography (such as a biography): add it after \input{dissertation-style/back-matter.tex} in main.tex.

If you really must change a template file, keep the change small and expect to re-apply it when you update.


Project Structure

.
├── main.tex                      # Root document: your chapter and appendix list
├── definitions.tex               # Your metadata, optional-page switches, .bib files, symbols
├── definitions-extra.tex         # Your extra preamble: packages, macros, theorem styles
├── bibliography.bib              # BibLaTeX bibliography database
├── .latexmkrc                    # Build configuration (Overleaf + local)
├── Makefile                      # CLI shortcuts
├── README.md                     # This file
├── MIGRATION.md                  # How to upgrade a project from an older template version
│
├── dissertation-style/           # Template internals (do not edit)
│   ├── preamble.tex              # Document class, packages, page layout
│   ├── front-matter.tex          # Title pages, copyright, abstract, TOC, lists, acknowledgements
│   └── back-matter.tex           # Bibliography
│
├── front-matter/                 # Text for the roman-numbered pages
│   ├── abstract.tex
│   ├── dedication.tex            # Optional
│   └── acknowledgements.tex      # Optional
│
└── chapter/                      # Your chapters
    ├── introduction/main.tex
    └── conclusion/main.tex
    # Add more: chapter/<name>/main.tex, then \input it in main.tex

Customization Guide

1. Set your metadata

Edit definitions.tex and replace every value marked % FILL IN:

\def\dissertationtitle{Your Actual Title}       % FILL IN
\def\fullname{Your Full Name}                   % FILL IN
\def\defenseyear{2027}                          % FILL IN
\def\defensemonth{May}                          % FILL IN
\def\defenseday{15}                             % FILL IN
\def\advisor{Advisor Name}                      % FILL IN

Also check \university, \department, \degree (defaults: Duke Mathematics PhD) and the committee members in \committeelist. Use names as listed in DukeHub, without titles such as Dr. or Ph.D.

2. Enable or disable optional pages

In definitions.tex:

\dedicationtrue        % Dedication page (text in front-matter/dedication.tex)
\tablestrue            % List of Tables (required if you have any tables)
\figurestrue           % List of Figures (required if you have any figures)
\symbolstrue           % List of Symbols
\acknowledgementstrue  % Acknowledgements (text in front-matter/acknowledgements.tex)
\appendixtrue          % Appendices

Comment a line out to disable that page.

3. Add a chapter

  1. Create chapter/my-chapter/main.tex:
    \chapter{My Chapter Title}
    \section{First Section}
    Your content here.
    
  2. Add it to the chapter list in main.tex:
    \input{chapter/my-chapter/main.tex}
    

Keep figures next to the chapter that uses them, e.g. chapter/my-chapter/diagram.pdf, and include them with their path from the project root: \includegraphics{chapter/my-chapter/diagram.pdf}.

4. Add an appendix

Set \appendixtrue in definitions.tex, write the appendix as an ordinary chapter (\chapter{...}) in chapter/<name>/main.tex, and \input it inside the appendices environment in main.tex. Appendices are lettered (Appendix A, B, ...) and come before the bibliography, as the Graduate School requires.

5. Bibliography

Add entries to bibliography.bib and cite them with \cite{key}:

@article{smith2024,
  author  = {Smith, Alice and Jones, Bob},
  title   = {A Great Paper},
  journal = {Journal of Examples},
  year    = {2024},
  volume  = {42},
  pages   = {1--20}
}
  • Several .bib files (e.g. a Zotero export plus hand-written entries): add one \addbibresource{<file>.bib} line per file in definitions.tex.
  • Citation style: see \PassOptionsToPackage above.
  • Heading: to call it "References", add \DefineBibliographyStrings{english}{bibliography = {References}} to definitions-extra.tex.
  • Comments in .bib files: BibTeX does not treat % as a comment character. Never put an @ in comment text, or BibTeX will try to read it as an entry.

6. Define symbols (optional)

With \symbolstrue, add one line per symbol inside the \ifsymbols block of definitions.tex:

\glsxtrnewsymbol[description={the special linear group}]{SL2}{\ensuremath{\mathrm{SL}(2, \mathbb{R})}}

Symbols appear in the List of Symbols in the order they are defined. No extra tools (such as makeglossaries) are needed.


Duke Formatting

The template implements these rules from the Graduate School's guide:

  • Margins of 1.5in on the left and 1in elsewhere, with the bottom margin measured below the page number.
  • Double-spaced text. The title pages, footnotes and captions are single-spaced, and bibliography entries are single-spaced with a blank line between them.
  • Page order: title page, abstract title page, copyright page, abstract (page iv), dedication, table of contents, lists of tables, figures and symbols, acknowledgements, chapters (page 1), appendices, bibliography.
  • No blank pages.
  • No duplicate table-of-contents entries.

Before your final submission:

  • Remove hyperlinks and PDF bookmarks. The guide asks for none in the submitted PDF. Add \hypersetup{draft} to definitions-extra.tex; leave it out while drafting if you like clickable links.
  • Turn on the List of Tables and List of Figures if your dissertation has any tables or figures (\tablestrue, \figurestrue).
  • Biography (optional): add it after the bibliography in main.tex:
    \input{dissertation-style/back-matter.tex}
    \chapter*{Biography}
    \addcontentsline{toc}{chapter}{Biography}
    ...
    
  • Check the current guide. Rules change; check the Graduate School's current guide and ask your DGSA if in doubt.

Updating the Template

Template updates replace only the template-owned files listed above. If a release ever needs a change to one of your files, MIGRATION.md says exactly what to do, and old forms keep working where possible.

One-time setup in your dissertation repository:

git remote add template https://git.touhou.ca/spencer/dissertation-template.git
git fetch template

If your project did not start as a clone of this repository (you downloaded a ZIP, copied files, or started from template v1), first follow MIGRATION.md once. It ends by recording the template's history in yours, which is what makes later pulls clean.

From then on, to update:

git pull template main

Then read any new section in MIGRATION.md and rebuild. If git reports a conflict in a template-owned file, you had edited it: take the template's version with git checkout --theirs <file> and move your change into definitions-extra.tex or main.tex.

Overleaf without git

Download the new template, delete the dissertation-style/ folder in your Overleaf project, upload the new one, and also replace .latexmkrc. Then follow any new section of MIGRATION.md. (If your Overleaf project is linked to git or GitHub, use the git workflow from a local clone instead.)

For template maintainers

  • Keep changes inside dissertation-style/ and the build files whenever possible.
  • When changing behaviour, bump \dissertationtemplateversion in dissertation-style/preamble.tex, add a section to MIGRATION.md, and tag the release (git tag v2.1).
  • If a user-owned file must change, keep the old form working (see how \biblatexfile is still accepted) and describe the edit in MIGRATION.md.
  • Starter content in user-owned files (main.tex, definitions*.tex, front-matter/, chapter/, bibliography.bib) only matters to new projects; existing projects never receive changes to it.

Troubleshooting

Problem Solution
BibTeX reports "You're missing a field name" at a comment line A .bib comment contains @. Remove the @ from comment text.
BibTeX reports "You can't mess with entries here" (tectonic) Harmless: it comes from biblatex's BibTeX backend in tectonic's TeX bundle, and the bibliography is still correct.
Bibliography printed twice, or an empty "Appendices" page Your main.tex is from template v1; see MIGRATION.md.
Option clash for package ... The template already loads that package. Remove your \usepackage line and pass options with \PassOptionsToPackage at the top of main.tex.
Warning: no entries defined in glossary symbols Define a symbol in definitions.tex or disable \symbolstrue.
Figures missing from the repository Versions before 2.0 ignored every *.pdf/*.eps file in git. Run git status and git add your figures.
VimTeX not detecting .latexmkrc Make sure your VimTeX config does not override g:vimtex_compiler_latexmk.

License

MIT License: see LICENSE.

You are free to use, modify, and distribute this template for personal or departmental use.