Skip to content

Commit

Permalink
add class for phd thesis
Browse files Browse the repository at this point in the history
  • Loading branch information
nllong committed Oct 16, 2023
1 parent 3b5f5fd commit 89deff0
Show file tree
Hide file tree
Showing 9 changed files with 2,936 additions and 1,318 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
*.aux
*.bbl
*.blg
*.fdb_latexmk
*.fls
*.ist
*.lof
*.log
*.lol
*.lot
*.out
*.synctex.gz
*.toc
*.toc
32 changes: 32 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"latex-workshop.latex.recipes":[
{
"name": "Build with glossaries",
"tools": [
"pdflatex",
"makeglossaries",
"pdflatex",
"pdflatex"
]
},
],
"latex-workshop.latex.tools":[
{
"name": "pdflatex",
"command": "pdflatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
]
},
{
"name": "makeglossaries",
"command": "makeglossaries",
"args": [
"%DOCFILE%"
]
}
]
}
45 changes: 42 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,47 @@ This repository contains an updated version of CU's LaTeX class with support for
* table of acronyms
* table of code snippets

The resulting PDF contains examples on how to best use LaTeX for a PhD Prospectus.
The resulting PDF contains examples on how to best use LaTeX for a PhD Prospectus or PhD Thesis.

To use, open `main-cu-prospectus.tex` in your favorite Tex editor. I use TexStudio. You can also upload this entire package to Overleaf to edit collaboratively online.
To use, open `main-cu-prospectus.tex` in your favorite Tex editor such as TexStudio or VSCode. You can also upload this entire package to Overleaf to edit collaboratively online.

One catch is that to see the acronyms the `makeglossaries` command needs to be in the build step. This repo committed the .vscode/settings.json file with the changes. In TexStudio, this will need to be
manually configured as well. Also, it is common to have to call the `pdflatex` command twice to have the glossaries show up correctly.

```
"latex-workshop.latex.recipes":[
{
"name": "Build with glossaries",
"tools": [
"pdflatex",
"makeglossaries",
"pdflatex",
"pdflatex"
]
},
],
"latex-workshop.latex.tools":[
{
"name": "pdflatex",
"command": "pdflatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
]
},
{
"name": "makeglossaries",
"command": "makeglossaries",
"args": [
"%DOCFILE%"
]
}
]
```

An example PDF is in this project [here](./main-cu-prospectus.pdf) and [here](./main-cu-phd-thesis.pdf) but a version is created each commit on GitHub. The GitHub veresion is [here](https://github.com/henze-research-group/latex-template/actions). Go to the latest passing workflow run, then click on the PDF text in the Artifacts section. Note that the GitHub build version does not have the Acronyms listing since the build step does not know how to `makeglossaries`.

The difference between the prospectus and thesis is minimal. The prospectus version contains language that it is just that, a prospectus, and the thesis.cls has the approval page.

An example PDF is in this project [here](./main-cu-prospectus.pdf) but a version is created each commit on GitHub. The GitHub veresion is [here](https://github.com/henze-research-group/latex-template/actions). Go to the latest passing workflow run, then click on the PDF text in the Artifacts section. Note that this version does not have the Acronyms listing since the build step does not know how to `makeglossaries`.
Binary file added main-cu-phd-thesis.pdf
Binary file not shown.
173 changes: 173 additions & 0 deletions main-cu-phd-thesis.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
\documentclass[defaultstyle,11pt]{thesis}


% custom added -- must go first
\usepackage[table,xcdraw]{xcolor} % support using rowcolor when pasting from table generator

% default packages from CU Boulder's template
\usepackage{amssymb} % to get all AMS symbols
\usepackage{amsmath}
\usepackage{graphicx} % to insert figures
\usepackage{float}
\usepackage{todonotes}
\usepackage{multirow}

% setup hyperlinks and colors
\usepackage{hyperref}
\hypersetup{
colorlinks = true, %Colours links instead of ugly boxes
urlcolor = blue, %Colour for external hyperlinks
linkcolor = blue, %Colour of internal links
citecolor = blue %Colour of citations
}

% custom added
\usepackage{subfiles}
\usepackage{subcaption}
\usepackage[export]{adjustbox} % allow margin definition in tables (center images)
\usepackage[acronym,toc,nomain]{glossaries}
\loadglsentries{acronyms}
\makeglossaries % for acronyms
\renewcommand*{\glspostdescription}{} % Removes dots at the end of each entry.
\glsnogroupskiptrue % skip spaces in acronym list (that is don't group alphabetically)
\renewcommand*{\glstextformat}[1]{\textcolor{darkgray}{#1}} % Hyperlink color of glossary links

% column with ragged right and hyphenation
\usepackage{array}
\usepackage{ragged2e}

% table layout settings
\newcolumntype{P}[1]{>{\RaggedRight\hspace{0pt}}p{#1}}
\newcolumntype{L}[1]{>{\RaggedRight\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\RaggedLeft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{M}[1]{>{\RaggedRight\arraybackslash}m{#1}}

% enum hyperlinks
\usepackage{enumitem}

% code highlighting
\usepackage{listings}
\input{listings-modelica.cfg}
\lstset{language = modelica,
basicstyle=\fontsize{9pt}{10pt}\ttfamily}
\renewcommand\lstlistingname{Code}
\renewcommand\lstlistlistingname{Code}
% color for the background of the code snippets
\definecolor{aliceblue}{rgb}{0.94, 0.97, 1.0}

%\DeclareCaptionStyle{listing} []{}
%\captionsetup[lstlisting]{style=listing, labelsep=none}

% landscape pages
\usepackage{pdflscape}
\usepackage{afterpage}

% Method for block comment
\newcommand{\comment}[1]{}

%%%%%%%%%%%% All the preamble material: %%%%%%%%%%%%

\title{CU Example Prospectus Document}

\author{First Middle}{Last}

\otherdegrees{B.S., University of Colorado, 2016 \\
M.S., University of Colorado, 2020}

\degree{Doctor of Philosophy} % #1 {long descr.}
{Ph.D., Architectural Engineering} % #2 {short descr.}

\dept{Department of} % #1 {designation}
{Civil, Environmental and Architectural Engineering} % #2 {department name}

\advisor{Gregor Henze, Ph.D, P.E.} {\normalsize } % #1 {title}
%{Ph.D., P.E.} % #2 {name}

\reader{Second Advisor , Ph.D.} % 2nd person to sign thesis
\readerThree{Third Advisor, Ph.D.} % 3rd person to sign thesis
\readerFour{Fourth Advisor, Ph.D.} % 4th person to sign thesis
\readerFive{Fifth Advisor, Ph.D.} % 5th person to sign thesis

\abstract{ \OnePageChapter % because it is very short

What is the purpose of this document
}

% To create a dedication, remove the \comment{ block below. Don't
% forget to remove the last curly brace }.
\comment{
\dedication[Dedication]{ % NEVER use \OnePageChapter here.
To my friends and family
}
}

% To create the acknowledgments, remove the \comment{ block below. Don't
% forget to remove the last curly brace }.
\comment{
\acknowledgements{ \OnePageChapter % *MUST* BE ONLY ONE PAGE!
Support Team:
Amy Allen
Sourav Dey
Thibault Marzullo
}
}

% \IRBprotocol{E927F29.001X} % optional!

\ToCisShort

\LoFisShort
% \emptyLoF % use this if there is no List of Figures

\LoTisShort
% \emptyLoT % use this if there is no List of Tables

% LIst of listings (i.e., snippets of code)
\LoLisShort
% \emptyLoL % use this if there is no List of Listings (code chunks)

% List of acronyms
\LoAisShort
% \emptyLoA % use this if there are no acronyms

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%% BEGIN DOCUMENT... %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

% path to where the figures are saved
\graphicspath{{\subfix{figures}}}
\input macros.tex

% main content
\input{chapter1-intro.tex}

\input{chapter2-litreview.tex}

\input{chapter3-methodology.tex}

\input{chapter4-results.tex}

\input{chapter5-conclusions.tex}

%%%%%%%%% then the Bibliography, if any %%%%%%%%%
%bibliographystyle{plain} % or "siam", or "alpha", etc.

% Use IEEEtr to order based on appearance in document. This will make the citations
% numbered by the order of appearance.

\bibliographystyle{ieeetr}
%\nocite{*} % list all refs in database, cited or not

% Change the name of the bibliography file if needed.
\bibliography{bibliography}


%%%%%%%%% then the Appendices, if any %%%%%%%%%
\appendix
\input{appendix-a.tex}

\end{document}

Binary file modified main-cu-prospectus.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion main-cu-prospectus.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\documentclass[defaultstyle,11pt]{thesis}
\documentclass[defaultstyle,11pt]{prospectus}


% custom added -- must go first
Expand Down
Loading

0 comments on commit 89deff0

Please sign in to comment.