diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7a932ed --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Dissertation Template Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..675d1a3 --- /dev/null +++ b/Makefile @@ -0,0 +1,40 @@ +# ======================================================================== +# Makefile for dissertation template +# ======================================================================== +# This Makefile provides convenient shortcuts for building the dissertation. +# It is primarily intended for local CLI usage (VimTeX users can also call +# make targets if desired). Overleaf does not support Makefiles. +# +# Usage: +# make -- build the dissertation PDF +# make clean -- remove auxiliary files +# make distclean-- remove everything including the PDF +# make watch -- continuous preview mode (latexmk -pvc) +# ======================================================================== + +MAIN := main +LATEXMK := latexmk +OUTDIR := build + +.PHONY: all clean distclean watch help + +all: $(MAIN).pdf + +$(MAIN).pdf: $(MAIN).tex + $(LATEXMK) -pdf -synctex=1 $(MAIN).tex + +clean: + $(LATEXMK) -c $(MAIN).tex + +distclean: + $(LATEXMK) -C $(MAIN).tex + +watch: + $(LATEXMK) -pdf -pvc -synctex=1 $(MAIN).tex + +help: + @echo "Dissertation build targets:" + @echo " make - Build the PDF" + @echo " make clean - Remove auxiliary files" + @echo " make distclean - Remove PDF and all generated files" + @echo " make watch - Continuous preview mode" diff --git a/README.md b/README.md new file mode 100644 index 0000000..e59e12d --- /dev/null +++ b/README.md @@ -0,0 +1,180 @@ +# Dissertation LaTeX Template + +A clean, modular LaTeX template for PhD dissertations. Designed for compatibility with both **Overleaf** (web-based, no installation) and **local toolchains** like VimTeX. + +--- + +## Quick Start + +### Overleaf (Recommended for Beginners) + +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 your metadata (name, title, committee, etc.). +4. Write your chapters in `chapter//main.tex` files. +5. Add bibliography entries to `bibliography.bib`. +6. Click **Recompile** to build. + +> **Note:** Overleaf automatically detects `.latexmkrc` and uses the correct build settings. No manual compiler configuration needed. + +### Local Build (VimTeX / CLI) + +**Prerequisites:** A working TeX distribution (TeX Live, MiKTeX, or MacTeX) with `latexmk` and `biber` installed. + +**Build:** +```bash +latexmk main.tex +``` + +**Clean auxiliary files:** +```bash +latexmk -c main.tex +``` + +**Clean everything (including PDF):** +```bash +latexmk -C main.tex +``` + +**Continuous preview (auto-rebuild on save):** +```bash +latexmk -pvc main.tex +``` + +**Or use the Makefile:** +```bash +make # Build +make clean # Clean aux files +make distclean # Clean everything +make watch # Continuous preview +``` + +**VimTeX users:** The included `.latexmkrc` is automatically picked up by VimTeX. Just open `main.tex` in Neovim/Vim and use your usual VimTeX mappings (e.g., `ll` to compile, `lv` to view). + +--- + +## Project Structure + +``` +. +├── main.tex # Root document (do not edit structure lightly) +├── definitions.tex # Your metadata: name, title, committee, etc. +├── definitions-extra.tex # Extra preamble: custom commands, theorem styles +├── bibliography.bib # BibLaTeX bibliography database +├── .latexmkrc # Build configuration (Overleaf + local) +├── Makefile # CLI shortcuts +├── README.md # This file +│ +├── dissertation-style/ # Internal style files (rarely need editing) +│ ├── preamble.tex # Package imports and setup +│ ├── front-matter.tex # Title page, abstract, TOC, etc. +│ └── back-matter.tex # Appendix setup +│ +├── front-matter/ # Content for roman-numeraled pages +│ ├── abstract.tex # Dissertation abstract +│ ├── dedication.tex # Optional dedication page +│ └── acknowledgements.tex # Optional acknowledgements +│ +└── chapter/ # Your chapters + ├── introduction/ + │ └── main.tex # Introduction chapter + └── conclusion/ + └── main.tex # Conclusion chapter + # Add more: chapter//main.tex, then \input in main.tex +``` + +--- + +## Customization Guide + +### 1. Set Your Metadata + +Edit `definitions.tex`: + +```latex +\def\dissertationtitle{Your Actual Title} +\def\fullname{Your Full Name} +\def\defenseyear{2027} +\def\defensemonth{May} +\def\defenseday{15} +\def\advisor{Dr. Advisor Name} +``` + +Also update: +- `\university`, `\department`, `\degree` (defaults to Duke Math PhD) +- Committee members in `\committeelist` + +### 2. Enable/Disable Optional Pages + +In `definitions.tex`, toggle these flags: + +```latex +\dedicationtrue % Dedication page +\tablestrue % List of Tables +\figurestrue % List of Figures +\symbolstrue % List of Symbols (requires makeglossaries) +\acknowledgementstrue % Acknowledgements +\appendixtrue % Appendices +``` + +Comment out or set `\...false` to disable. + +### 3. Add a New Chapter + +1. Create the directory: `chapter/my_chapter/` +2. Create `chapter/my_chapter/main.tex`: + ```latex + \chapter{My Chapter Title} + \section{First Section} + Your content here. + ``` +3. Add to `main.tex`: + ```latex + \input{chapter/my_chapter/main.tex} + ``` + +### 4. Add Bibliography Entries + +Edit `bibliography.bib`: + +```bibtex +@article{smith2024, + author = {Smith, Alice and Jones, Bob}, + title = {A Great Paper}, + journal = {Journal of Examples}, + year = {2024}, + volume = {42}, + pages = {1--20} +} +``` + +Cite in your text: `\cite{smith2024}`. + +### 5. Define Symbols (Optional) + +If `\symbolstrue` is enabled, add symbols in `definitions.tex`: + +```latex +\glsxtrnewsymbol[description={the special linear group}]{SL2}{\ensuremath{\mathrm{SL}(2, \mathbb{R})}} +``` + +They will appear in the List of Symbols. + +--- + +## Troubleshooting + +| Problem | Solution | +|---|---| +| "Missing bibliography" error | Ensure `bibliography.bib` exists and has at least one entry. Run `latexmk` twice. | +| "Missing glossary" error | The `.latexmkrc` runs `makeglossaries` automatically. If building manually, run `makeglossaries main` between pdflatex passes. | +| Overleaf won't compile | Check that `definitions.tex` has no unfilled `%% FILL IN %%` comments left in active macro definitions. | +| VimTeX not detecting `.latexmkrc` | Ensure your VimTeX config does not override `g:vimtex_compiler_latexmk`. The defaults work. | + +--- + +## License + +MIT License — see [LICENSE](LICENSE) for details. + +You are free to use, modify, and distribute this template for personal or departmental use. diff --git a/bibliography.bib b/bibliography.bib new file mode 100644 index 0000000..9ecb427 --- /dev/null +++ b/bibliography.bib @@ -0,0 +1,26 @@ +%% ======================================================================== +%% BIBLIOGRAPHY FILE +%% ======================================================================== +%% Add your bibliography entries here. Each entry follows the BibLaTeX format. +%% +%% Common entry types: +%% @article{key, author={}, title={}, journal={}, year={}, volume={}, pages={}} +%% @book{key, author={}, title={}, publisher={}, year={}} +%% @inproceedings{key, author={}, title={}, booktitle={}, year={}} +%% @phdthesis{key, author={}, title={}, school={}, year={}} +%% @misc{key, author={}, title={}, howpublished={}, year={}} +%% +%% Example: +%% @article{example2024, +%% author = {Author, Alice and Writer, Bob}, +%% title = {An Example Paper}, +%% journal = {Journal of Examples}, +%% year = {2024}, +%% volume = {42}, +%% number = {7}, +%% pages = {123--456} +%% } +%% +%% Cite in your text with: \cite{example2024} +%% ======================================================================== + diff --git a/chapter/conclusion/main.tex b/chapter/conclusion/main.tex new file mode 100644 index 0000000..74c9378 --- /dev/null +++ b/chapter/conclusion/main.tex @@ -0,0 +1,19 @@ +%% FILL IN: Write your conclusion here. +%% +%% Typical structure: +%% - Summary of results +%% - Discussion of implications +%% - Limitations +%% - Future work +%% +%% Delete these comments and replace with your text. + +\chapter{Conclusion} + +\section{Summary} + +[Summarize your main results and contributions.] + +\section{Future Work} + +[Discuss open problems and directions for future research.] diff --git a/chapter/introduction/main.tex b/chapter/introduction/main.tex new file mode 100644 index 0000000..f941f20 --- /dev/null +++ b/chapter/introduction/main.tex @@ -0,0 +1,28 @@ +%% FILL IN: Write your introduction here. +%% +%% Typical structure: +%% - Motivation and context +%% - Literature review / related work +%% - Problem statement +%% - Overview of contributions +%% - Organization of the dissertation +%% +%% Delete these comments and replace with your text. + +\chapter{Introduction} + +\section{Motivation} + +[Your introduction text goes here.] + +\section{Related Work} + +[Cite relevant literature using \cite{key}.] + +\section{Contributions} + +[Summarize your main contributions.] + +\section{Organization} + +[Outline the structure of the remaining chapters.] diff --git a/definitions-extra.tex b/definitions-extra.tex new file mode 100644 index 0000000..51fa1b6 --- /dev/null +++ b/definitions-extra.tex @@ -0,0 +1,12 @@ +% Some common AMSTHM configurations +\newtheorem{theorem}{Theorem}[section] +\newtheorem{lemma}[theorem]{Lemma} +\newtheorem{corollary}[theorem]{Corollary} +\newtheorem{proposition}[theorem]{Proposition} +\newtheorem{conjecture}[theorem]{Conjecture} +\theoremstyle{definition} +\newtheorem{question}[theorem]{Question} +\newtheorem{construction}[theorem]{Construction} +\newtheorem{definition}[theorem]{Definition} +\newtheorem{remark}[theorem]{Remark} +\newtheorem{example}[theorem]{Example} diff --git a/definitions.tex b/definitions.tex new file mode 100644 index 0000000..f9c697d --- /dev/null +++ b/definitions.tex @@ -0,0 +1,53 @@ +%% ======================================================================== +%% DISSERTATION METADATA -- FILL IN ALL FIELDS BELOW +%% ======================================================================== + +% Title should be in Title Case; capitalize the first letter of words +% other than articles, coordinating conjunctions, or prepositions of +% no more than 4 letters. +\def\dissertationtitle{%% FILL IN: Your Dissertation Title} +\def\fullname{%% FILL IN: Your Full Name} +\def\defenseyear{%% FILL IN: 2027} +\def\defensemonth{%% FILL IN: March} +\def\defenseday{%% FILL IN: 31} +\def\advisor{%% FILL IN: Advisor Name} +\def\biblatexfile{bibliography} % the name of your .bib file (without extension) + +% Institution settings -- change if not Duke Mathematics +\def\university{Duke University} +\def\department{Department of Mathematics} +\def\degree{Doctor of Philosophy} + +% +% OPTIONAL PAGE VARIABLES +% + +% Set the following variables to TRUE if your dissertation requires any +% of the following optional pages. Set to FALSE (or comment out) to disable. + +% A dedication should be defined in dedication.tex at the top level +\dedicationtrue% +%\tablestrue % Enable if you have tables +%\figurestrue % Enable if you have figures +\symbolstrue% % Enable if you use the list of symbols +\acknowledgementstrue% +%\appendixtrue % Enable if you have appendices + +% Committee members (add/remove lines as needed) +\listadd{\committeelist}{%% FILL IN: Committee Member 1} +\listadd{\committeelist}{%% FILL IN: Committee Member 2} +\listadd{\committeelist}{%% FILL IN: Committee Member 3} + +% +% SYMBOL DEFINITIONS +% + +\ifsymbols% +\newcommand{\nomname}{List of Symbols} + +% Define your symbols as follows; one \glsxtrnewsymbol line for each symbol. +% Use ensuremath for math-mode and provide a unique slug (like 'SU2') for each symbol. +% Example: +% \glsxtrnewsymbol[description={the group of $2 \times 2$ unitary matrices with determinant 1}]{SU2}{\ensuremath{\mathrm{SU}(2)}} + +\fi diff --git a/dissertation-style/back-matter.tex b/dissertation-style/back-matter.tex new file mode 100644 index 0000000..6fa46df --- /dev/null +++ b/dissertation-style/back-matter.tex @@ -0,0 +1,10 @@ +\backmatter + +\makeatletter +\renewcommand\mainmatter{% + \@mainmattertrue + %\pagenumbering{arabic}% Don't reset +} +\makeatother +\mainmatter +\appendix diff --git a/dissertation-style/front-matter.tex b/dissertation-style/front-matter.tex new file mode 100644 index 0000000..61d6f56 --- /dev/null +++ b/dissertation-style/front-matter.tex @@ -0,0 +1,146 @@ +\frontmatter + +\pagestyle{empty} +% TITLE +\begin{titlepage} +\begin{center} +\vspace*{1cm} + +\dissertationtitle + +\vspace{1cm} +by + +\vspace{1cm} + +\fullname + +\vspace{1cm} + +\department \\ +\university + +Defense Date: \defensemonth\ \defenseday, \defenseyear + +\vspace{1cm} + +Approved: + +\vspace{1cm} + +\underline{Dissertation Advisor} \\ +\advisor + +\printlist{\committeelist} + +\vfill + +Dissertation submitted in partial fulfillment of the degree requirements for the degree of \degree\ in the \department\ in the Graduate School of \university \\ +\defenseyear +\end{center} +\end{titlepage} + +% abstract title +\begin{center} +ABSTRACT +\vspace*{1cm} + + +\dissertationtitle + +\vspace{1cm} +by + +\vspace{1cm} + +\fullname + +\vspace{1cm} + +\department \\ +\university + +Defense Date: \defensemonth\ \defenseday, \defenseyear + +\vspace{1cm} + +Approved: + +\vspace{1cm} + +\underline{Dissertation Advisor} \\ +\advisor + +\printlist{\committeelist} + +\vfill + +An abstract of a dissertation submitted in partial fulfillment of the degree requirements for the degree of \degree\ in the \department\ in the Graduate School of \university \\ +\defenseyear +\end{center} +\newpage + +% COPYRIGHT +\vspace*{\fill} +\begin{center} + Copyright by\\ + \fullname\\ + \defenseyear +\end{center} +\clearpage + +% ABSTRACT +\pagestyle{plain} +\pagenumbering{roman} +\begin{abstract} + \input{front-matter/abstract.tex} +\end{abstract} +\setcounter{page}{4} +\addcontentsline{toc}{chapter}{Abstract} + + +% DEDICATION +\ifdedication +\newpage +\input{front-matter/dedication.tex} +\fi + + + +% TABLE OF CONTENTS +\newpage +\tableofcontents + +% LIST OF TABLES +\iftables +\newpage +\listoftables +\addcontentsline{toc}{chapter}{List of Tables} +\fi + +% LIST OF FIGURES +\iffigures +\newpage +\listoffigures +\addcontentsline{toc}{chapter}{List of Figures} +\fi + +%SYMBOLS +\ifsymbols +\newpage +\printunsrtglossary[type=symbols,style=long,title={List of Symbols}] +\addcontentsline{toc}{chapter}{List of Symbols} +\fi + +% ACKNOWLEDGEMENTS +\ifacknowledgements +\newpage +\input{front-matter/acknowledgements.tex} +\addcontentsline{toc}{chapter}{Acknowledgements} +\fi + +\clearpage +%\thispagestyle{empty} +\pagebreak + +\pagenumbering{arabic} diff --git a/dissertation-style/preamble.tex b/dissertation-style/preamble.tex new file mode 100644 index 0000000..b75e275 --- /dev/null +++ b/dissertation-style/preamble.tex @@ -0,0 +1,53 @@ +\documentclass[11pt,letterpaper]{book} +\usepackage{amsmath,amssymb,amsthm,graphicx,tikz,tikz-cd,fancyhdr} +\usepackage[nottoc]{tocbibind} +\usepackage[backend=bibtex,sorting=nyt,maxbibnames=99]{biblatex} +\usepackage[margin=1.25in]{geometry} +\usepackage[english]{babel} +\usepackage{microtype} +\usepackage[toc]{appendix} +\usepackage[symbols,nogroupskip,sort=none]{glossaries-extra} +\usepackage{etoolbox} +\usepackage{lipsum} +\usepackage{silence} +\WarningsOff[biblatex] + +\setcounter{secnumdepth}{5} +\renewcommand{\theparagraph}{\arabic{paragraph}} +\allowdisplaybreaks +\newenvironment{abstract}% +{\cleardoublepage\null \vfill\begin{center}% + \bfseries \abstractname \end{center}}% + {\vfill\null } +\usepackage[hidelinks]{hyperref} +\addto\captionsenglish{% + \renewcommand{\contentsname}% + {Table of Contents}% +} + +\newcommand{\printlist}[2][\\]{{ + \def\listsep{\def\listsep{#1}}% Delayed execution of list separator + \renewcommand{\do}[1]{\listsep \underline{Committee Member}\\##1}% + \dolistloop\committeelist +}} + +\newcommand{\printchapters}[2][\pagebreak]{{ + \def\listsep{\def\listsep{#1}}% Delayed execution of list separator + \renewcommand{\do}[1]{\listsep \include{##1/main.tex}}% + \dolistloop\chapterlist +}} + +\fancyhead{} +\fancyfoot[C]{\thepage} + +\newif\ifdedication +\newif\ifacknowledgements +\newif\iffigures +\newif\ifsymbols +\newif\iftables +\newif\ifappendix + +\input{definitions.tex} +\input{definitions-extra.tex} + +\bibliography{\biblatexfile} diff --git a/front-matter/abstract.tex b/front-matter/abstract.tex new file mode 100644 index 0000000..5b8dc63 --- /dev/null +++ b/front-matter/abstract.tex @@ -0,0 +1,11 @@ +%% FILL IN: Write your abstract here (typically 150--300 words). +%% +%% Tips: +%% - State the problem your research addresses +%% - Describe your approach/methods +%% - Summarize key results +%% - State the significance/contribution +%% +%% Delete these comments and replace with your text. + +This dissertation presents... [your abstract text goes here] diff --git a/front-matter/acknowledgements.tex b/front-matter/acknowledgements.tex new file mode 100644 index 0000000..fce0e9f --- /dev/null +++ b/front-matter/acknowledgements.tex @@ -0,0 +1,7 @@ +%% FILL IN: Write your acknowledgements here. +%% Thank advisors, committee members, collaborators, family, funding sources, etc. +%% Delete these comments and replace with your text. + +\section*{Acknowledgements} + +I would like to thank... [your acknowledgements go here] diff --git a/front-matter/dedication.tex b/front-matter/dedication.tex new file mode 100644 index 0000000..a8bf7e2 --- /dev/null +++ b/front-matter/dedication.tex @@ -0,0 +1,8 @@ +%% FILL IN: Optional dedication page. +%% Delete this entire file or leave empty if you do not want a dedication. +%% Set \dedicationfalse in definitions.tex to disable. + +\section*{Dedication} +\begin{flushright} +[Your dedication goes here.] +\end{flushright} diff --git a/main.tex b/main.tex new file mode 100644 index 0000000..fb0c0ee --- /dev/null +++ b/main.tex @@ -0,0 +1,44 @@ +\input{dissertation-style/preamble.tex} + +\begin{document} + +\input{dissertation-style/front-matter.tex} + +\mainmatter% + +%%%% +% +% PART 1 +% +%%%% +\input{chapter/introduction/main.tex} + +%%%% +% +% PART 2 +% +%%%% + +\input{chapter/conclusion/main.tex} + + +%%%% +% +% BACK MATTER +% +%%%% + +\input{dissertation-style/back-matter.tex} +\addcontentsline{toc}{chapter}{Bibliography} +\printbibliography% + +\ifappendix% +\chapter*{Appendices} + +\begin{appendices} + %input appendices here like + %\input{chapter/background_material/main.tex} +\end{appendices} +\fi + +\end{document}