1. Project structure
  2. Document class configuration

Project structure

You're free to organize the project as you wish. A sane default structure looks like this:

  • root
    • .gitlab-ci.yml: configures CI/CD
    • .gitignore: configures git to ignore temp files
    • utuftlabreport.cls: document class description
    • latexmkrc: build instructions for latexmk
    • images/: embedded images
    • sources/: embedded source code listings
    • bibliography.bib: biblioraphy data (multiple bibs also possible)

In case you're using LaTeX, the following extra files are needed:

  • root
    • exercise.tex: main document (links to sub-documents)
    • section-X.tex: sub-documents for sections

In case you're using LyX, the following extra files are needed (the tex files can be generated from the lyx files):

  • root
    • utuftlabreport.layout: document class configuration for LyX
    • exercise.lyx: main document (links to sub-documents)
    • section-X.lyx: sub-documents for sections

In case you're using Pandoc, the following extra files are needed (the tex files can be generated from the md files):

  • root
    • utuftlabreport.pandoc: document class configuration for LyX
    • exercise.md: main document
    • pandoc-minted.py: sub-documents for sections

The standard files included in the template consist of:

  • The latex directory contains the LaTeX template.
  • The lyx directory contains the LyX template.
  • The pandoc directory contains the Pandoc template.

You can freely pick one of the versions and delete the other directories. The document class file utuftlabreport.cls is always required.


Document class configuration

The document class is described in utuftlabreport.cls.

  • Based on the standard LaTeX report class
  • Proper page sizes as required by university guide for students:
    • proper font sizes as well as linespacings
    • proper size of margins
  • Document parameters (command: \documentclass[the,params]{utuftlabreport})
    • version: draft / final (default: draft) shows/hides [draft] in the footer
    • language: finnish / english (default: finnish) defines the main document language, affects the general document appearance and hyphenation
    • mainfont: (default: times)
      • pdftex: main font package (lmodern, fourier, ...), special value: times, none
      • xetex: main font name (Arial, Comic Sans, ...), special value: times enables Times New Roman, none
      • note: use none in cloud/CI services in place of times unless you provide the fonts yourself. The copyrighted fonts cannot be included in free platform distributions due to licensing issues.
    • hidechapters: true / false (default: true) hides/shows the chapter/luku text at the beginning of each Chapter
    • countbibpages: true / false (default: false) include bibliography pages when calculating the total number of pages
    • sharelatex: true / false (default: false) don't attempt to locate copyright protected system fonts (e.g. Times New Roman / Arial), instead read them from the project repository
    • emptyfirstpages: true / false (default: true) clear the headers/footers for the 1st pages of text chapters
  • Extra document parameters (command: \documentclass[extra,params]{utuftlabreport})
    • paper: (default: a4paper) paper size
    • hidelinks: true / false (default: true) hide the underlining of links
    • minted: true / false (default: true) use minted instead of listings for embedded code listings. Note that minted requires the use of -shell-escape build parameter.
    • biburlbreak: ragged / split / none (default: split) how to handle long urls in the bibliography
  • Publication metadata
    • \pubyear{2000}: the year of the publication
    • \pubmonth{6}: the month of the publication
    • \publab{labname}: the name of the laboratory, e.g. tietojenkäsittely
    • \publaben{labname}: the name of the laboratory in english, e.g. computer science
    • \pubcourse{course}: the name of the course
    • \pubdescription{description}: document description (comes right after title on the title page)
    • \groupmembers{foo,bar}: comma separated list of group members (names + student ids). Appear one per line on the title page.
    • \title{titlename}: the title of the publication
    • \author{authorname}: the author of the publication
  • Title page
    • \maketitle: the standard LaTeX command for creating a title page. This template also creates the pages for abstracts.
  • TOC and lists
    • \tableofcontents: generates the table of contents
    • \listoffigures: generates the list of figures
    • \listoftables: generates the list of tables
    • \listofacronyms: generates the list of acronyms (using the nomencl package)
  • Main content
    • \begin{document}: begins the main content
    • \end{document}: ends the main content
    • \chapter{name}: generates a new chapter (1)
    • \section{name}: generates a new section (1.1)
    • \subsection{name}: generates a new section (1.1.1)
    • \printbibliography: generates the bibliography list (must be set up before the appendices!)
    • \appchapter{name}: generates a new appendix chapter (A) after the bibliography list
  • Entry environment:
    • the actual items are aligned to suit the widest label, which is given as an argument to the environment
\begin{entry}[widest label]
  \item[1st label text] ...
  \item[2nd label text] ...
\end{entry}