Write a thesis in LaTeX

Introduction

You may have already had the unpleasant experience of writing a large document in Word (or OpenOffice etc). As the document grows, the program groans as you keep adding more figures that bog your system down. You end up expending a large amount of time on formatting text and resizing figures, rather than what you should be focusing your effort on - the content. If you are about to embark on a postgraduate degree that involves writing a large document, i.e., a thesis/dissertation, you should contemplate about doing this in LaTeX. I did, and it was a breath of fresh air.

Reasons why LaTeX is awesome:

  • It handles large documents very well.
  • Mathematical equations are much faster to type in rather than enter in via a GUI.
  • It takes care of the formatting for you, so you can concentrate on the content. You will have to be spending a massive amount of time in formatting a Word document to get looking as polished as one produced by a LaTeX processor.
  • I find it faster to create quality documents in LaTeX (now that I don't have mess about formatting it).
  • LaTeX uses raw text files, so if you are like me and have these documents under version control, you can find what has changed between revisions. This is particularly useful if you have a team of people working on one document.
  • You can write comments into your LaTeX source file that are not shown in the outputted *.pdf file. When I have some incomplete ideas that I plan to later look at, I'll write a comment to myself which is prefixed with 'TODO'. When I'm doing my pass through, I'll search for all 'TODO' entries and fix them up.  

When you might want to stick to Word or OpenOffice:

  • You don't have the time or patience to learn how to use LaTeX.
  • Perhaps you're not a programmer.
  • The document isn't going to be that big, or you want to format it in a peculiar manner. 
  • Your thesis does not require many equations.
Either way, I'm sure knowing how create documents in LaTeX is useful. If you've been put off by the difficult and steep learning curve of LaTeX, this page is devoted to helping you to get started and write your thesis or large document in LaTeX.

Setting up your computer

Firstly, I'm going to describe how to setup LaTeX under Ubuntu, because this is the setup I use myself. I'm sure you can still use these ideas to get things done under Windows, but admittedly I have not tried so myself. The first step is to install LaTeX. Fortunately, you do not need to build LaTeX from source, and is available as binaries through public repositories. For Ubuntu 10.04, fire up a terminal and enter in the following:

sudo apt-get install texlive texlive-latex-base texlive-latex-extra texlive-humanities texlive-science texlive-publishers texlive-metapost kbibtex

This will download a fair bit of stuff, but is useful to have anyway. After thats done you are pretty much ready to start making high quality documents with LaTeX!

Template

When I'm writing a document using LaTeX, all I need is a general text editor (I use gedit) and a terminal. Just like the approach I take to programming, I also like breaking up the document into multiple files. Each chapter is written in a separate file along with a file for references that are mostly used in that chapter. I have a top level file that pulls in each chapter, and also contains the document preamble and custom macros. I also like to have a makefile for me that compiles the LaTeX files and produces an output *.pdf file. A skeleton thesis template that I used for my thesis can be found here. To use it, unzip it to a destination and provided that you have correctly installed LaTeX on your system, simply type in "make". Easy as!

Formatting a thesis

Here are a formatting related tips that I have learnt over the duration of my masters. Some of these tips also apply to large documents created in Word or OpenOffice.

  • Whenever possible, use vector-based graphics. They look so much better, and result in a more professional looking document. For instance, when I write Matlab code to automatically save figures for me, I will save the figure as an *.eps via the line "print('-depsc2', 'figure.eps')". Look at the provided thesis template for how to import these into your document.
  • Chapters should begin on odd numbered pages.
  • Equations should be written to read in with the text, using appropriate punctation marks. For instance, if the equation is in the middle of the sentence (but too tall to fit inline), you should have a comma at the end of the equation, then the follow paragraph should not be indented. This is done by putting a "%" symbol inbetween the equation code and you follow on paragraph.
  • Values should have units that are separated from the number by a half space, i.e., "10\,mm" instead of "10mm". 
  • When writing a formal document, put "however" at the start of a sentence followed by a comma, rather than in a middle of a sentence. Generally, a sentence starting with "However," should immediately preceed a statement or position, and not be in a new paragraph. 
  • Do not use future tense. Banish the word "will" from you thesis!

Handy tips

Here are a few handy tips that I have learnt.

  • The program Dia is quite useful for creating basic diagrams. Install it by typing in "sudo apt-get install dia". You can find some examples in the thesis template that I've provided you. What's more is that you can get LaTeX to render maths symbols in diagrams made in Dia, how cool is that? Again, you want to use vector-based graphics in your figures when possible. When I editting and updating my diagrams, I get Dia to output a pdf of the *.dia file (I could have got the makefile to do this automatically, but I was lazy and haven't bothered to do so!).
  • You need to reference material that backs up any bold statement or position that you may make.
  • If you have problems with a sentence overflowing the right margin (this can be caused by formatting some text by \texttt{}), surround the offending paragraph with "\begin{sloppypar} ... \end{sloppypar)".

Resources

A skeleton template to produce a clean looking thesis in LaTeX can be downloaded here.

Share |