# PhD dissertation: templates vs scratch

I am still getting my feet wet with LaTeX (starting to read 'LaTeX for complete novices'). I have decided to use LaTeX for writing my dissertation. As I begin I was wondering if it would be better to start from scratch (and follow a book like 'Using LaTeX to write a dissertation') or to use a template.

And if a template is used, would it be better (and easy?) to go with a beautiful template like classicthesis and modify it for my university requirements, or use a template produced by an old PhD student from my university that I found off the Internet?

I am asking some of these because I thought maybe going from scratch might be easier for a novice since I can't understand all that code in a template, and by starting from scratch with a guide book might help me in learning instead of trying to debug a given template.

Thoughts?

EDIT: I feel like there is a number of folks who are saying that it is best to write my dissertation in LaTeX from scratch. the reasons make sense: customizability, learning LaTeX, debugging templates can be a mess, and going with something scratch can make a more streamlined and cleaner document. I think this is the way that I will go forward. This options seems less intimidating considering the problems of trying to figure out how to make complex template work. At this point I will research into KOMA vs Memoir.

• (This must have been asked on this site already.) I'd say start from scratch for the reasons stated in your last paragraph. A dissertation is the best time to learn LaTeX, because you (probably) have a year or more to write it and learn what you're doing. Plus, if your school has strict rules about the final product, a template is not likely to be very useful unless it's from your institution (and happens to be well-designed -- which is not always the case!). – jon Dec 2 '14 at 4:09
• I think you should try ConTeXt. It offers an astonishing customization degree, lots and lots of features, and the code is beautiful and easy to read :) – Manuel Dec 2 '14 at 7:37
• Word of advice: Do not use classicthesis! – Johannes_B Dec 2 '14 at 7:52
• I agree with Andrews answer on using an extended class. My pick are the KOMA classes (scrartcl for example). They make it very easy to customize the layout, but don't load as many packages. Also you should biblatex + biber for your citations instead of the old bibtex. – Juri Robl Dec 2 '14 at 9:37
• Still valid tex.stackexchange.com/a/31119/963 – Yiannis Lazarides Dec 2 '14 at 11:40

Welcome! Just look at all the questions on this site from people who are struggling to adapt thesis templates to their needs and their university's requirements. I think that shows it is better to start from scratch if you have the time.

My recommendation is to use the memoir class and base your customized design on the model thesis demonstrated in the manual (texdoc memoir).

My other very strong recommendation is that you try to write very few LaTeX commands when you are writing in the early stages, and just focus on the words, not the formatting. Learn LaTeX using books, package documentation, and this site on the side for a while before trying to do anything heavy. Use mockups and MWEs to practice different types of layouts before implementing them with your own text. If you use the most neutral, default version of LaTeX markup early on, it will be easier to adapt later. And as a beginner I did not realize for a long time how much you could actually do with just the default setup.

Along the same lines, you can create semantic commands that will allow you to focus on content instead of style, but will also make it easier to customize down the road. For example, use \enquote from the csquotes package instead of hard-coding your quotes''. Commands inspired by TEI-XML tags like \ti or \booktitle, \foreign, \socalled can be then mapped however you want. For example, titles and foreign words are aliases for \emph and \socalled for "scare quotes" is really \enquote (so, \newcommand{\socalled}[1]{\enquote{#1}}).

• and their university's requirements - of course, the presence of any such requirements makes the existence of a template by someone in that university that fulfils exactly the requirements of the university quite a bit more likely. – O. R. Mapper Dec 2 '14 at 16:58

If they don't, then I would definitely ask around other students that have indeed produced a "valid" thesis with LaTeX. Then use that, scrap all the text out, and there you have your university-proof template. Make sure it conforms to the standards by asking whoever enforces the requirements, and be a hero by sharing it with other students.

If you really can't find a working template, then yes start from scratch, because tweaking the visual appearance of an existing template is a nightmare.

• if there's an "official" template, good. but if you end up creating a conforming template, be even more of a hero by making it into an easy-to-use package, with good documentation, and persuading the powers that be to "bless" it ... after you've completed your own dissertation, of course. – barbara beeton Dec 2 '14 at 14:05
• templates that are given from one generation to the next is always a bit like a rusty wheel barrow. It may do the work even with all those little patches that were cobbled on it. At one point, you just need to do the right thing and scrap it. – Johannes_B Dec 2 '14 at 15:11

Start from scratch. There is no other way to learn how things work.

At least if you are from Europe: use the class "scrbook" from the KOMAscript bundle. Clean, good manual, all you need, no nonsense.

Spent some time to set up a work flow for your citations and bibliography. People nowadays use biblatex and biber. I'm a fan of Zotero, but there are many other software packages.

My most important advice: Always have a look at the manual of a package. You get it in an instant with texdoc <packagename> on the command line. I'm writing on Linux, Yakuake is the tool to get a command line in an instant.

• I am a big fan of Zotero as well. My plan is to use Zotero and jabref for citation management, and Texmaker/LaTeX for writing the dissertation. And i might need some tex2docx converters so as to communicate with my supervisor. – Francis Dec 3 '14 at 3:09
• I have been using tex4ht to this purpose for years. However, recently I had to convert a huge docx file to tex and tried Word2TeX; I can recommend that. Other way round would be TeX2Word, see here: chikrii.com/store It's commercial, non-free software and I have no relations to who ever runs that site. – Keks Dose Dec 3 '14 at 10:05

Since nobody else has done so, I include my own thesis template as an example of how simple it can be.

\documentclass[a4paper, 12pt]{report}
\usepackage[cmex10]{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[pdftex]{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{cite}
\usepackage[toc,xindy,nonumberlist,acronym,shortcuts]{glossaries}
\usepackage{subfig}
\usepackage[font=footnotesize,labelfont=bf]{caption}
\usepackage{setspace}
\usepackage{todonotes}
\usepackage{fixltx2e}
\usepackage{url}
%\usepackage{showframe} % use this to help visualising margins given in geometry package
\usepackage{fancyhdr}
\usepackage{booktabs}
\usepackage[a4paper,left=4cm,right=2.5cm,top=3cm,bottom=3cm]{geometry}

\graphicspath{{../images/}}
\DeclareGraphicsExtensions{.pdf,.eps}

\makeglossaries

\makeatletter
\renewenvironment{titlepage}
{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse\newpage
\fi
\thispagestyle{plain}% remove the empty page style
%\setcounter{page}\z@ %remove the counter reset
}%
\makeatother

% Example definitions.
% --------------------
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\argmin}{arg\,min}
\newcommand{\mat}[1]{\mathbf{#1}}
\renewcommand{\vec}[1]{\underline{#1}}
%
%

% Use “\cite{citation_needed}” to get Wikipedia-style “citation needed” in document
% Taken from http://www.gijsk.com/blog/2008/06/absence-citation-needed/
\usepackage{ifthen}
\let\oldcite=\cite
\renewcommand\cite[1]{\ifthenelse{\equal{#1}{citation_needed}}{\ensuremath{^\texttt{[citation~needed]}}}{\oldcite{#1}}}

% See tug.ctan.org/tex-archive/macros/latex/contrib/todonotes/todonotes.pdf
% for documentation
\newcommand{\todoauthor1}[2][]
{\todo[size=\tiny, color=cyan, author=author1, #1]{#2}}
% End todo redefines

\begin{document}
\doublespacing
\pagestyle{plain}
\pagestyle{fancyplain}

\renewcommand{\sectionmark}[1]{\markboth{\thesection.\ #1}{}}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}

\setcounter{secnumdepth}{4}

% acronyms go here ...
\newacronym{glo}{GLO}{glossary entries}
% end acronyms

% Title.
% ------
\begin{titlepage}
Titlepage
\end{titlepage}

%
\begin{abstract}
Abstract
\end{abstract}

\tableofcontents
\listoffigures
\listoftables
\listoftodos
\printglossaries

\include{chapter1}
%repeat for N chapter files

\bibliographystyle{bibstyle}
\bibliography{bibfiles}

\end{document}


I was motivated to make my own template from scratch because most other people I knew were using Cambridge University Engineering Department (CUED) thesis class, and quite frankly I found it unintuitive and clumsy.

In order to explain the template;

1) A base set of packages that most technical theses would require (in my opinion), including useful utility packages such as todonotes, booktabs (always a must for tables), amsmath, glossaries, caption and subfig. It is lazy with graphicx, assuming only a pdf compilation route will be used rather than DVI. Modification for this case is fairly straightforward.

2) \makeatletter and following code is all for the purpose of setting pagenumbers from the titlepage (university requirement).

3) A section with definitions for semantic commands you will use throughout the thesis to enable consistency

4) A hack to enable insertion of citation_needed wiki style

5) A per-author definition of some inline comment commands, using todonotes. Unlikely to have multiple authors but you can create more and tailor them as needed

6) \renewcommand{\sectionmark}[1]{\markboth{\thesection.\ #1}{}} and the following command is for styling the page headers in a particular way

7) Then finally title page (fairly straightforward), abstract, and main body of the document, it should probably be familiar.

For me, creating this in order to fit my needs was far more straightforward than use of any number of pre-defined templates and class files floating around out there.

Personally I find it easier to learn a coding language by trying to understand an example rather than starting with a blank page, but you may be different.

It really doesn't matter right now, though. Depending on your subject, by the time you've written the content of your thesis including, diagrams, tables, formulae and whatever else you might need, you'll have learnt plenty of LaTeX and feel much more comfortable either adapting a template or writing your own. Once you "get" the language it's really all just variations on a theme.

But most importantly, rather than sit there with your nose in a guide book, ask for help. It's not research and you don't have to do it all on your own. There must be someone you know who's been in the same position very recently...

As I said in a comment. I would try ConTeXt. Why LaTeX? I guess the answer is the same that happened to me: because is what you find everywhere. You come here, and everything is about LaTeX. You read in any other topic that talks about publications in science and they mention LaTeX. You see that there are LaTeX templates, and there seems to be nothing else. I started with LaTeX because in my univerity they gave a small course about LaTeX. But no one told me about ConTeXt.

Well, there are more things. And one of the most serious ones is ConTeXt. It offers lots of possibilites, lots of configurability, and a lot of cohesion between its different parts.

At least stay an afternoon surfing and finding about ConTeXt, and try it. The only reason people don't use it is because no one knows about it (in general).

• while context has really marvelous possibilities, if there is any interest in publishing the dissertation, and the publishing medium is to be a journal, context is likely to limit the possibilities, since most journals can't work with context; if they accept tex at all, it's almost certain to be latex. one can chalk this up to the fact that "latex got there first", but it's a fact that must be recognized. – barbara beeton Dec 2 '14 at 13:56
• People don't use it because they don't find all the documentation they need to learn on their own... – s__C Dec 2 '14 at 13:59
• @s__C That's true. But on the list they are pretty active. But that's true, that was my main problem. – Manuel Dec 2 '14 at 14:18
• I am not sure ConTeXt is so suitable for most peoples purpose. On the wiki page, I found this: "ConTeXt from the ground up is a typography and typesetting system meant to provide users easy and consistent access to advanced typographical control—important for general-purpose typesetting tasks. The original vision of LaTeX is to insulate the user from typographical decisions" -- I would say this is exactly the thrust of why everybody uses latex. Insulation from the typographical stuff (once you get used to it) is both powerful and incredibly useful. – user1207217 Dec 2 '14 at 14:21
• @barbarabeeton You are also right. And you definitely know what you are talking about. Of course, if he can't use ConTeXt then he can't use it; there's no discussion. But I think if it's possible to use it, it's definitely a quite good format to work with which many many times is forgotten in the bottom of the trunk (literal translation from my language, sorry if it's not understandable). – Manuel Dec 2 '14 at 14:21