A few months ago, I published a small but comprehensive boilerplate for writing LaTex documents. While writing some papers in the last weeks, I fiddled around with a few changes and decided to integrate them into the boilerplate.

Migration to scrbook

The first - and probably biggest - change is the document class: instead of scrartcl, the boilerplate is now based on scrbook.

The reason for this is quite simple. scrartcl knows three main layers of document structure - \section, \subsection and \subsubsection. Especially when you collaborate on a paper with other people, it might be useful, to divide the document up into more autonomous parts. scrbook herefor provides \part and \chapter as additional outline elements.

Migration to XeLaTex

The second change concerns the TeX machine used to compile the document. When I talked with some collegues about how they wrote their B. Sc., I was recommended to take a look at other LaTex compilers. XeLaTex for me has two main advantages compared to PDFLaTex (which I used before):

  1. It supports unicode characters natively - without the need to include extra packages. Yay!
  2. The typesetting for special characters like german umlauts is more precise, for some technical reasons. (I though have to admit, that I couldn’t really see any huge difference.)

Spellchecking with hunspell

The last change is more kind of a “special feature”. From the Continuous Integration point of view it seems reasonable to add some kind of testing to your build process. In terms of LaTex documents that is - spellchecking of course!

The new GitLab CI pipeline now comprises two jobs:

GitLab CI pipeline with spellchecking

Spellchecking is done using hunspell, which is also used by larger applications like OpenOffice. The program outputs a simple list of found spelling mistakes (if any), that may be reviewed.

As the dictionaries provided for hunspell may not be sufficcient for all kinds of papers, custom words can be added to an individual wort list so that they’re ignored during spellcheck.

You can find the updated boilerplate on GitLab.

Cover Image: Nick Morrison on Unsplash