# Typesetting my Master’s Thesis in LaTeX

When I saw the LaTeX thesis template provided by my department I cringed. It seemed like the only goal of the unknown creator was to preserve paper, completely neglecting aesthetics and readability. Fortunately I was allowed to create my own template.

Problem: Find and adapt a LaTeX thesis template that meets both established and my own aesthetic standards.

Full page view of my Thesis.

A lot of thought has gone into the age old art of typesetting and typography. Although I am very interested in these topics, I’m not an expert. I therefore looked for a good LaTeX thesis template and finally found the classicthesis package by André Miede which is inspired by Robert Bringhurst’s “The Elements of Typographic Style”.

My thesis features a lot of figures that need to be displayed as large as possible. I therefore defined commands that allow figures to reach into the margin of the page. In combination with my numerous margin quotes, this is a great trade-off between keeping the proper page area for readability and providing enough space for wide figures. Having a floating, multi-picture figure extend to the left on odd pages and to the right on even pages was no easy task, but I finally managed to define the new commands \bigfigure\bigdoublefigure, and \bigtriplefigure. An example of \bigtriplefigure is shown at the top left of the above image. The code is too long to feature here, if you have any questions feel free to contact me.

Example quotation in the Thesis.

I also made heavy use of the \graffito command for margin notes and quotations. Margin notes are useful for providing contextual, interesting information that is not important for the primary content. If something is too insignificant for a footnote, it might be a good margin note. More frequently however, I used quotations to make the thesis more lively and less bland. The following command ensures that all quotations look the same. The first parameter is the quote, while the second is the quoted person.
\newcommand{\quotegraffito}[2]{\graffito{#1\\--~\emph{#2}}}

For more information on the typographic side of my thesis you can read the colophon at the very end of my thesis.

Edit (2015-06-27): Since I repeatedly get requests for actual LaTeX code, I uploaded my full source code. The code does not compile with current LaTeX distributions, mainly because of dirty hacks that work around previous errors in other LaTeX packages. I also did not include the required data and images with the code. If I were you, I would download the latest ClassicThesis version and try to incorporate the parts you need from this code. The figure definitions are in
SpecialDefinitions.tex, their usage is all around the source code in /Chapters.

1. Brett

Hi Benjamin

I would like to make some modifications to the classicthesis template to allow figures to expand into the margin, just like how you have done. I would appreciate some pointers as to how you achieved it. I’ve been using latex for a couple of years but previously I had always stuck with the same basic template.

• I currently have no time to create a minimal working example. I will copy the according code parts into here.
The code is quite complex, because
– firstly, I’m no LaTeX expert,
– secondly, I needed many different configurations (for example triple-figures with sub-captions), and
– thirdly, I wanted to switch between normal figures and big figures (i.e., extenting into margin) without changing anything but the command.

What basically happens is that I use the changepage package to determine if I am on the right or left page, and then align a minipage with my figures accordingly.

Usage example for a single figure extenting into the margin:

 \bigfigure[pos=tbhp, %width=13.75cm, label={fig:intro:designprocess-combined}, shortcaption={Resistance graph design process.}] {intro-designprocess-combined} {Design process using a few \protect\acs{CFD} simulations and converting them to resistance graphs. \protect\acs{CFD} simulations are applied to the \threeD-model for some operation points (OP2 and OP5), which usually takes a few hours per simulation on a standard workstation. The resulting flow fields of these simulations are then partitioned and converted to flow graphs which again can be converted to a resistance graphs. If the resistance graphs are also valid for similar operation points (\eg, OP1 and OP3 are similar to OP2, OP4, and OP6 are similar to OP5), these similar operation points can be directly simulated using the resistance graphs and computation time can be decreased significantly. The process is an iterative optimization process, \ie, after design changes are made, simulations have to be redone.} 

A usage example for a double-figure extending into the margin:

 \bigdoublefigure[pos=tbhp, mainlabel={fig:intro:simple-vector-field}, maincaption={A simple \twoD vector field partitioned into two good (left) and two poor (right) regions, from a homogeneity standpoint. The smaller top right copies represent the information reduction after conversion to the flow graph: Each region is represented by only one average velocity. Clearly, the good partition retains more information about the flow field. The poor partition however, is almost as descriptive as using only one region for the whole field (small blue figure).}, mainshortcaption={Good and poor flow partitions.},% %leftopt={width=0.47\textwidth}, leftlabel={fig:intro:simple-vector-field-homogeneous}, leftcaption={Good, homogeneous partition.}, leftshortcaption={},% %rightopt={width=0.47\textwidth}, rightlabel={fig:intro:simple-vector-field-nonhomogeneous}, rightcaption={Bad, inhomogeneous partition.}, rightshortcaption={}, spacing={\hspace{1cm}} ] {intro-simple-vector-field-good}{intro-simple-vector-field-bad} 

These are the underlying definitions, the following packages (and maybe some more?) will be required:

\usepackage[strict]{changepage}%to know on which page we are (left or right)
\usepackage{xkeyval}
\usepackage{subfig}
\usepackage{graphicx}

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % FIGURE TOOLS % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%helper functions, no direct use


\newcommand{\normtriplefigure}[4][]{% \begingroup %Default values: \setkeys[FigTools]{ThreeFig}{ pos=!htp, mainlabel={fig:#2-#3}, maincaption={}, mainshortcaption={},% leftopt={},%width=0.45\textwidth}, leftlabel={fig:#2-left}, leftcaption={}, leftshortcaption={},% midopt={},%width=0.45\textwidth}, midlabel={fig:#3-mid}, midcaption={}, midshortcaption={},% rightopt={},%width=0.45\textwidth}, rightlabel={fig:#4-right}, rightcaption={}, rightshortcaption={}, spacing={\hfill}, spacingtwo={} } %User provided values: \setkeys[FigTools]{ThreeFig}{#1} \def\efigure{\begin{figure}}% \expandafter\efigure\expandafter[\FtPos] \centering \subFloatCorrCaps{\FtLeftCaption} {\FtLeftShortCaption} {\FtLeftLabel} {\FtLeftOpt} {#2} \FtSpacing \subFloatCorrCaps{\FtMidCaption} {\FtMidShortCaption} {\FtMidLabel} {\FtMidOpt} {#3} \FtSpacing \FtSpacingTwo \subFloatCorrCaps{\FtRightCaption} {\FtRightShortCaption} {\FtRightLabel} {\FtRightOpt} {#4} \caption[\FtMainShortCaption]{\FtMainCaption} \label{\FtMainLabel} \end{figure} \endgroup } 

• Brett

Thanks for sharing your code, I appreciate it. I’ve had a quick play with it and managed to incorporate it into my code (kind of). I still need to do some tweaking but I think I should be able to get it working nicely.

Thanks again!

2. Luis

I’m an insurance broker, I’m looking for a personalice calc to use with my clients, do you do that work ?

• In theory yes, I worked at an insurance company before.
In practice I work mainly in scientific data visualization and 3d processing right now.
All calculations that are not provided by your insurance companies’ software can most likely easily be done in a spreadsheet program (Google Docs, Excel, …).