And so the thesis writing begins

After nearly three years of research, I have started the long and arduous process of writing up. I am going to use LaTeX to compile my writing, mainly because it makes it easier to make beautiful looking documents. Also word processing packages have a nasty habit of corrupting the formatting, and make numbering of equations difficult.

In January I pulled together my notes and various bits of writing into a first semblance of a structure. I had started most of the writing in Word, but using the LibreOffice export plugin I have mentioned previously, I was able to convert this to basic LaTeX fairly easily. I have since added in plots from MATLAB, which I had been avoiding inserting into Word, as it doesn’t handle images in a sensible vector format (e.g. SVG, EPS, PDF).

LaTeX template

For the report template, I am using Matthew Topper’s unofficial University of Edinburgh thesis template “edengths”. I have made some changes to the formatting, as discussed below. I had three main gripes with the formatting that I have managed to overcome. I am also using some additional packages, to augment the template, but will leave these to a future post.

Fonts

The first of these was the font. The default LaTeX font, “computer modern” may be excellent for readability, and may have every glyph ever needed, but to my eyes it is quite an ugly font. It is also somewhat overused in engineering theses. I wanted a font with nice ligatures for ‘fi’ etc., but also one that had old style numbers. Additionally the font needed to be available in Type1 format, to give compatibility with the pdfLaTeX template. Unfortunately this rules out the possibility of a lot of more exquisite fonts, but maybe that is for the better.

After a bit of deliberation, I decided on Baskerville using the package baskervaldx. For headings and captions, I am using Open Sans, as this is available in a range of weights and also a condensed variant, which will be useful for figures that need to squeeze a lot of text into a small space.

Update: I forgot to mention that I also din’t want the text to be fully justified, as that can make it more difficult to read. Including the command \RaggedRight in the preamble to the document takes care of this. Additionally using the package ragged2e gives partially hyphenation, to avoid the right margin being overly ragged, but still minimising hyphenation and excessive spacing between words.

Page headings

The template is set up to give the section number and name at the top of every page, which I like. Unfortunately a limitation in the code means that this is the section at the end of the page, rather than the top! So in the example below, the top of the page notes it is section 1.3, even though the first thing on the page is the heading for section 1.2.

Thankfully, someone a lot more computer literate than me has resolved this, and it was just a case of opening the formatting file and tweaking a few lines. In case you are interested, change the following in edengfmt.tex (about line 287) from:

\newpagestyle{main}[\defaultfont\bfseries]{%
\headrule%
\sethead%
 {\ifthesection{\thesection{.} \space}{\ifthechapter{\thechapter{.}%
 \space}{}}\ifthesection{\sectiontitle}{\ifthechapter{\chaptertitle}{%
 \MakeUppercase{\chaptertitle}}}}%
 {}{\thepage}%
 \setfoot{}{}{}%
 }
...
\newpagestyle{twomain}[\defaultfont\bfseries]{%
 \headrule%
 \sethead%
 [\thepage]%
 [][\ifthechapter{\chaptertitle}{\MakeUppercase{\chaptertitle}}]%
 {\ifthesection{\thesection{.} \space}{\ifthechapter{\thechapter{.}%
 \space}{}}\ifthesection{\sectiontitle}{\ifthechapter{\chaptertitle}{%
 \MakeUppercase{\chaptertitle}}}}%
 {}{\thepage}%
 \setfoot[][][]{}{}{}%
 }

To use the simpler command, \toptitlemarks:

\newpagestyle{main}[\defaultfont\bfseries]{%
 \headrule%
 \sethead{\toptitlemarks\thesection\quad\sectiontitle}{}{\textsb\thepage}%
 \setfoot{}{}{}%
}
...
\newpagestyle{twomain}[\defaultfont\bfseries]{%
 \headrule%
 \sethead%
 [\thepage][][\toptitlemarks\chaptertitle]%
 {\toptitlemarks\thesection\quad\sectiontitle}{}{\thepage}%
 \setfoot[][][]{}{}{}%
}

Chapter heading format

The final issue is minor, but I have tweaked the chapter headings to something I think looks cleaner and better. I have made use of the slight and semi-bold font weights available in Open Sans, and also removed the double ruled line at the top.