The original repository is at Bitbucket. I noticed a few things I wanted to correct (spelling mistakes, a \\
that caused underfull hbox warnings etc.), and also make it more friendly to VSCode spell checking extension (see bottom of README). The reasons I didn't simply push it to the original repository:
- The author doesn't seem interested in pull requests; this PR from September 2014 has not been accepted, rejected or discussed.
- I'm more familiar with {Git, GitHub, Markdown}, than {Mercurial, Bitbucket, reStructuredText}.
Another fork of the template focused on using LuaTeX instead of XeLaTeX can be found here https://github.com/martinjlowm/dtu-latex-thesis-template.
Note that I haven't touched the "class" branch, so no corrections or additions are present in the document class version of this template. I might do it if I use it at some point myself. PRs are welcome.
It's not an official template, but is based on official DTU graphics and is recommended on both latex.dtu.dk and one of the recommended templates on the internal article Report writing and submission, DTU Compute on DTU Inside.
This is an alternative to the "LUKE'S PHD THESIS TEMPLATE 1.2" used as standard layout for the thesis written at DTU Compute.
The template is using the Memoir class which includes a lot of useful and predefined commands. See the "Miscellaneous" chapter of the Memoir manual. Furthermore it uses XeLaTeX for maximum unicode support local fonts.
An updated version of the code can be downloaded from the repository at bitbucket.org.
All static information such as title, author, degree and so on can be changed in preamble/static.txt
.
Standard (>2014) TeX Live package including XeLaTeX and BibLaTeX.
The template uses the sans serif font TeX Gyre Adventor, which is contained in TeXLive and MiKTeX installation by default so no extra setup is necessary.
Note that Neo Sans font (DTU's main font) is the ultimate font for headings.
A similar font called Neo Sans Intel is also a good alternative which typically contains more symbols. If the Neo Sans (Intel) font are installed on your system (un)comment the respective lines in preamble/fonts.tex
.
Run the following for manual typesetting the document:
xelatex Thesis.tex
biber Thesis.bcf
xelatex Thesis.tex
xelatex Thesis.tex
With the templates comes a Makefile
using latexmk
for easy
compiling. There are two ways to use make either by:
make
or the auto
mode which automatic updates the pdf if *.tex or *.bib
files are changed:
make auto
To clean up project run:
make clean
If you plan on using the todonotes system, I highly recommend you set \def\showtrims
to true in static.tex
. This will increase the paper size and give extra margin space for the todonotes, which makes them more readable, looks better and avoids loads of Overfull \hbox
warnings in the LaTeX output. The content itself will still fit into the same size as the set paper size, so the extra margin space is just for comments. Remember to put back to false
before final hand-in. All pages will be marked with the filename, date, page number and visual indicators in the corners of the extra margin space, so fortunately it's not easy to forget.
If using TextMate simply press "⌘R".
Remember to run BibLaTeX too.
Open preferences and set
- Under "Editor" set "Editor Font Encoding" to "UFT8"
- Under "Build" set "Default Compiler" to "XeLaTeX"
Open Preferences and ensure under "Editor" that "Editor Font Encoding" is set to:
UTF-8
In Preferences under "Quick Build" change it to "User" and the following.
For Windows users:
"xelatex -synctex=1 -interaction=nonstopmode %.tex|biber %.bcf|xelatex -synctex=1 -interaction=nonstopmode %.tex|xelatex -synctex=1 -interaction=nonstopmode %.tex"
For Mac users:
"/usr/texbin/xelatex" -synctex=1 -interaction=nonstopmode %.tex|"/usr/texbin/biber" %.bcf|"/usr/texbin/xelatex" -synctex=1 -interaction=nonstopmode %.tex|"/usr/texbin/xelatex" -synctex=1 -interaction=nonstopmode %.tex|open %.pdf
Simply press "Quick Build". This will run all necessary commands including setting up your bibliography if there are any changes to it.
If the bibliography is not changed only xelatex
needs to run one single time. You can therefore select XeLaTeX from the run menu instead of the default in Quick build.
Install the LaTeX Workshop extension. It pretty much just works out of the box, and documentation is good.
For spell checking, I would recommend trying Code Spell Checker or Spell Right.
Both extensions do more or less the same thing, but have some differences.
- Is Based on the open Hunspell dictionary, so is OS-independent.
- Tries reduce the number of false positives, but may catch less errors.
- By default saves custom dictionary words in User or Workspace (
.vscode/
)settings.json
along with the other settings (but can also be set up to point dictionary files)
- Taps into your OS system dictionary, so is OS-dependent.
- Will typically give more spelling errors, but may catch slightly more errors.
- Save dictionary of words in
spellright.dict
plaintext file that is found in User or Workspace (.vscode/
) folder.
The template includes quite a few words that will trigger both cSpell
and spelling
:
.vscode/lauersens-cspell.txt
is a dictionary for thecSpell
extension..vscode/lauersens-spelling.dict
a dictionary for thespelling
extension.
They are both enabled with the settings in .vscode/settings.json
.
When adding new words via the Quick Fix (⌘+. or Ctrl+.) menu, adding word to workspace dictionary:
- for
cSpell
they will go into a new list in.vscode/settings.json
. - for
spelling
they will go into.vscode/spellright.dict
that will be created on first use.
In some sense it would be nice just to have one dictionary for both extensions, but it doesn't seem feasible until this issue is fixed.
I usually keep "Code Spell Checker" on all the time, and activate "Spell Right" periodically when I'm in mood for low-energy work and some extra spell checking. But one could also do just fine with just one of them.