Pièce de Résistance: Master Thesis Template

I would now like to present my pièce de résistance, my gift to you: a LaTeX-template, including a BiBTeX-database with all the examples discussed in my previous blogposts. You can find all the code in either (ironically) a .docx-file, or a PDF. You will also need the figures attached at the end of this blogpost.

The bones of the front page come from the Faculty of Science template, which I adapted by replacing some colors and text. The document is well structured and the comments explain what each block of code does. This means you can adapt page settings, additional cover settings, and so on. Before you get started, add the title and subtitle, your name, (co)supervisor, master and academic year.

Before the table of contents, the template starts with acknowledgements and an abstract. You can add the copyright-page by removing the % sign in front of \input{docs/copyright}. Furthermore, the table of contents precedes a list of tables and figures, which are all numbered in roman style (i, ii, iii). The page numbering switches to arabic numbers from the introduction on. The master file then starts including five exemplary chapters, as well as the bibliography in the plainnat style as explained in BiBTeX – your new best friend.

Here is everything you need:

Guide and code of the Master Thesis Template (docx)

Guide and code of the Master Thesis Template (PDF)

Master Thesis Template (PDF)

 

BiBTeX – your new best friend

We’ve all been there. You finished your text, your lay out is great, you more or less added footnotes and references. But now you have to start adding your bibliography. Preferably adhering to pages and pages of guidelines and rules. Luckily, 20 years ago, Oren Patashnik figured you needed help. He created BiBTeX to work along LaTeX by utilizing a plain-text file-format which can be created and modified in any arbitrary text-editor (learn more here).

A BiBTeX database contains all your entries in a .bib file, which can be used and reused in any LaTeX file. An example of an entry in this database is:

@article{perspectiveshistory,
title={Has the Battle Been Won? The Feminzation of History},
author={Hunt, L.},
journal={Perspectives on History},
volume={36},
number={5},
year={1998},
doi={https://www.historians.org/publications-and-directories/perspectives-on-history/may-1998/has-the-battle-been-won-the-feminization-of-history}
}

In this case the reference type is an @article, while all details are listed inbetween {}. The first word after the opening curly brace is the citation key or the BiBTeX key, unique for each entry and used to cross-reference a citation to your bibliography. This means you don’t even have to manually add the author and year to your in-text references, but simply \cite{citation key} in your text. In this case I can refer to the article by \cite{perspectiveshistory}, but more on citations later. An article entry needs to contain the author, journal, title, and year of publication. You can add these elements as demonstrated in the example, by element={} or element=””. The optional elements in case of the article type are the month, note, number, pages, and volume. I also included the doi, or domain object identifier, a specific and unique link to the article. You can find the required and optional fields for each reference type here.

The standard BiBTeX entries include: @article, @book, @booklet, @inbook (for a specific chapter or entry in a book), @inproceedings (a conference paper), @manual, @mastersthesis or @phdthesis, @misc (for other publication types), @proceedings (a collection of conference papers), @techreport, and @unpublished. For more information on standard templates, you can always go the the wikibooks documentation.

Once you added all your references to your BiBTeX database – no worries, most online bibliographies allow you to export the citation in a BiBTeX format – you need to insert your bibliography in your LaTeX file. Usually a bibliography comes after your content, but before you \end{document}. First, you choose the \bibliographystyle{plain}, which refers to the standard included plain.bst or style file. You can also find style files for most journals that defined their own reference style. Next, you simply include your \bibliography{bibfile} withouth adding the .bib extension. If your BiBTeX database is located in another file, you need to add the location such as \bibliography{refs/references}. Once you included your bibliography, you can create citations easily with \cite{reference}, or \citep{reference} if you want to use the plain bibliography style for your citations.

Finally, I would like to add that in order to adapt the appearance of your bibliograhpy to the document language for words such as editors, and, or in, you can add \usepackage[fixlanguage]{babelbib} to your preamula and \selectbiblanguage{dutch}. You also need to select a bibliography style which supports this package, such as \bibliographystyle{babplain}. If you want LaTeX to also display BiBTeX entries which were not cited in the text, you can add \notice{*} to show all entries, or \notice{name} for a specific entry. For my next and final entry on LaTeX, I will try to create a template for the master thesis of the faculty of Arts at the KU Leuven. Wish me luck!

LaTeX – The Ulyssis Workshop (part 2)

Last time I introduced the very basics of LaTeX after a workshop organised by Ulyssis, which you can find here. As I promised earlier, today I will talk you through the code to insert tables and figures into your text. For those of you who want to really impress their peers, I will also explain how you can format two figures next to each other (which required some serious googling skills on my behalf). But let’s get started with the basics first.

You can add your table within a \part{Title goes here}, \section{Subtitle goes here}, or \subsection{Subsubtitle goes here} of your \begin{document}, but before your \end{document}. There are several kinds of tables, the most basic one starts by \begin{tabular}{c c c} to specify that you want three columns, and for each row you add item & item & item \\ to fill in the three columns. After you added several rows, don’t forget to \end{tabular}.

For your fancy table you \begin{table}[h] right here, but you want it in the \begin{center} and then you can \begin{tabular}{c c c} with some columns, which you know how to fill in by now (item & item & item \\ for each row). After you \end{tabular}, you add a \caption{fancy table}, you \end{center} and finally, you \end{table}. Once you understand the basics, you can make your life easier by creating your tables in a tool such as http://www.tablesgenerator.com/.

Now in order to add figures to your document, you need to add a package in your preambula – the thing that comes right after \documentclass[11pt]{article} at the start of your document. You can \usepackage{graphicx} to insert some fancy figures. Of course you need to save your picture in the same folder as your .tex file, otherwise it might be hard to find. Now you’re ready to \begin{figure} and \includegraphcs[width=0.5\textwidth]{your figure}, where you define the width of your figure, in this case 50%, but you could also set [width=100mm] to include a figure of 10 cm wide. To center your figure you can use the \centering command, and adding a \caption{your figure} works the same as for tables. Again you need to \end{figure} before you start with the rest of your text.

If you want two figures side by side (or even three, but you can probably figure it out if you understand the mechanism), stackexchange comes to the rescue. Because you need a specific type of \caption, you need to add another package in your preambula called \usepackage{caption}. So again you \begin{figure} by \centering both your figures in the middle of the page. But you now split your figure into two \begin{minipage}{.5\textwidth} each taking up 50% of the width of your page. In order for each figure to look spot on, you should use \centering again, then \includegraphics[width=0.9\linewidth]{first image}. In this case the linewidth for each figure takes up only half of the page, so the 90% used here, actually means you have a 10% margin between this figure and the next. In this case, you need the \captionof{figure}{This figure} to add a caption to the first figure. If you want to refer to your figure in the text you can always add a \label{fig:figure1} and inside your text \ref{fig:figure1} so that the number of the figure is always correct, even if you add other figures. Now you need to \end{minipage} number one, and in order for the two minipages to appear next to each other, you need a % inbetween. Now you can repeat the \begin{minipage}{.5\textwidth} process to add one more figure, and after you \end{minipage}, also \end{figure}.

So there you go, the perfect tables and figures to impress any reader! Next time, I will explain how to add your citations and bibliographic references, BiBTeX style.