This short tutorial demonstrates via examples the required changes to the document files to produce sections and features typically used in thesis documents. Some of the features are standard LaTeX, others make use of special macros introduced in the thesis class file.

Empty document

First, we begin with an empty document (e.g. thesis.tex) by filling in the basic document metadata:

\documentclass[language=finnish,mainfont=none]{utuftthesis}

\pubyear{2019}
\pubmonth{6}
\publab{Labran nimi}
\publaben{Laboratory Name}
\pubtype{gradu}

\title{Name of Thesis}
\author{My Name}

\begin{document}

\maketitle

\end{document}

❗ Non-standard utuftthesis.cls macros: documentclass, pubyear, pubmonth, publab, publaben, pubtype. ❗

Abstract and keywords

Documents with abstracts in two languages (the "native" language is defined in utuftthesis.cls, the document's language is the default language):

...
\begin{document}

\maketitle

\keywords{asia, sanoja}
\keywordsen{here, a, list, of, keywords}

\begin{abstract}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.
\end{abstract}

\begin{abstracten}
Second abstract in english (in case the document main language is
not english)
\end{abstracten}
...

You can switch the rendering order by switching the order of the environments.

Or just use plain english:

...
\begin{document}

\maketitle

\keywords{here, a, list, of, keywords}

\begin{abstract}
Second abstract in english (in case the document main language is
not english)
\end{abstract}
...

❗ Non-standard utuftthesis.cls macros: keywordsen, abstracten. ❗

Bibliography

The 'thesis' template defaults to using the biblatex package and the Biber engine to generate bibliographies and citations.

Note that the biblatex package is not necessarily compatible with the packages bibtex and natbib! The use of biblatex is highly recommended as styling can more easily be defined in ordinary LaTeX with Unicode support. Bibtex uses a special legacy syntax for the style definitions.

See the advanced section for configuring bibliography styles.

The use of bibliography requires two steps. First, the bibliography file needs to be included with \addbibresource.

\addbibresource{mybibs.bib}

...
\begin{document}
...

The contents of the file mybibs.bib may look like this:

@article{crawley2007write,
  title={How to Write a Research Proposal and Succeed},
  author={Crawley, Gerard M and O'Sullivan, Eoin},
  year={2007},
  publisher={World Scientific}
}

When citing, use the bibliography ID specified in the bib file. See the biblatex manual for more advanced instructions.

\begin{document}
...

According to \textcite{crawley2007write} this is a rather
interesting observation. Further work is required to fully
analyze the consequences.

On the other hand, this citation appears at the end of
this paragraph \cite{crawley2007write}.
...

cite

The following resources may also help with the biblatex configuration:


Table of contents and other lists

All the \listofX commands are optional.

\begin{document}
...
\tableofcontents
\listoffigures
\listoftables
\listofacronyms
...

❗ Non-standard utuftthesis.cls macros: listofacronyms. ❗


Sections

\begin{document}
...
\chapter{Introduction} \label{chap:intro}

\section{Section} \label{sec:mysection}
\subsection{Subsection} \label{subsec:mysubsection}
\subsubsection{SubSubsection} \label{subsubsec:mysubsubsection}

Figures

Note the order of \caption and \label inside the figure environment!

\begin{document}
...
\begin{figure}
\centering \includegraphics[width=0.5\textwidth]{figs/utulogoen}
\caption{University of Turku logo}
\label{fig:utu-logo} 
\end{figure}

figure


Tables

\begin{document}
...
\begin{table}
\centering{}\caption{The caption comes before the table\label{tab:my-table1}}
\begin{tabular}{l|c|r|}
Elements separated & with & characters \tabularnewline
\hline 
as  & you can & see \tabularnewline
cell can also  &  & be empty \tabularnewline
\end{tabular}
\end{table}

table

Source code

The 'thesis' template supports two approaches to embedding source code: 'minted' and listings.

'Listing' is the old standard way of including source code. It is a bit easier to set up and has wider support in LaTeX installations out of the box. Unfortunately it does not support 8-bit extended ASCII or Unicode (there's an updated 'listingsutf8' which unfortunately does not support full Unicode). 'Listings' is not recommended for modern programming languages and does not even support finnish äåö characters properly.

When using 'minted', one should build the thesis with the latexmk script (see the test code for examples). Setting minted=false in the document class will set up a fake 'minted' environment to actually render the code with 'listings'.

\documentclass[language=finnish,mainfont=none,minted=true]{utuftthesis}
...

\begin{document}
...
Algorithm \ref{alg:example} contains an example of using monads.

\begin{algorithm}[tbh]
\begin{minted}{haskell}
main =
  return "Your name:" >>=
  putStr >>=
  \_ -> getLine >>=
  \n -> putStrLn ("Hey " ++ n)
\end{minted}
\caption{Monads rule.\label{alg:example}}
\end{algorithm}

source

Appendices

Simply use \appchapter instead of \chapter to guide the page count logic. \printbibliography must appear before all appendices.

\begin{document}
...
\printbibliography
\appchapter{Appendix 1}

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
...
\end{document}

❗ Non-standard utuftthesis.cls macros: appchapter. ❗

Acronyms

This Example generates few pages of acronyms.

\documentclass[language=finnish,version=final,mainfont=none,sharelatex=false]{utuftthesis}
\setcounter{secnumdepth}{2}
\setcounter{tocdepth}{2}

\begin{document}

\pubyear{2019}
\pubmonth{6}
\publab{Labran nimi}
\publaben{Laboratory Name}
\pubtype{tkk}
\title{Name of Thesis}
\author{My Name}

\maketitle
\input{abstract.tex}

\tableofcontents
\listoffigures
\listoftables

% Note: rendered here
\listofacronyms

\chapter{Johdanto} \label{Johdanto}

% Note: declared here
Tyyppiluokan voi nähdä eräänlaisena abstraktina
ohjelmointirajapintana
(API\nomenclature[API]{API}{Application Programming Interface}),
joka muodostaa ohjelmoijalle abstraktin ohjelmointikielen käyttöliittymän
(UI\nomenclature[UI]{UI}{User Interface}).

\newpage

More stuff:

% Note: declared here
(UI1\nomenclature[UI1]{UI1}{User Interface}).
(UI2\nomenclature[UI2]{UI2}{User Interface}).
(UI3\nomenclature[UI3]{UI3}{User Interface}).
(UI4\nomenclature[UI4]{UI4}{User Interface}).
(UI5\nomenclature[UI5]{UI5}{User Interface}).
(UI6\nomenclature[UI6]{UI6}{User Interface}).
(UI7\nomenclature[UI7]{UI7}{User Interface}).
(UI8\nomenclature[UI8]{UI8}{User Interface}).
(UI9\nomenclature[UI9]{UI9}{User Interface}).
(UI11\nomenclature[UI11]{UI11}{User Interface}).
(UI12\nomenclature[UI12]{UI12}{User Interface}).
(UI13\nomenclature[UI13]{UI13}{User Interface}).
(UI14\nomenclature[UI14]{UI14}{User Interface}).
(UI15\nomenclature[UI15]{UI15}{User Interface}).
(UI16\nomenclature[UI16]{UI16}{User Interface}).
(UI17\nomenclature[UI17]{UI17}{User Interface}).
(UI18\nomenclature[UI18]{UI18}{User Interface}).
(UI19\nomenclature[UI19]{UI19}{User Interface}).
\printbibliography

\end{document}