MacTex and KULEMT

2 minute read

For my master thesis, I needed to get the KUL Engineering Master Thesis Class working with MacTex. This page describes this process. It is based on the information provided by the README file, included in the distribution.

Because I work on my beloved Mac and use TextMate to edit LaTeX files, I wanted to work with these tools. To have a working LaTeX environment, the MacTex distribution is the right way to go. But these aren’t mentioned in the KULEMT distribution documentation. This page was written to confirm that everything works perfectly and shows how it is done.

Disclaimer: All credits for this work go of course to the people mentioned in all documents.


Download and install the latest version of MacTex from Mind that it’s a big download

  • 2.4G at the time of writing.

LiveTex Utility

Run the LiveTex Utility and update all packages.

KUL Engineering Master Thesis Class

Download the KULEMT class distribution from You can log in as a guest user.

Next follow the instructions in the README file.


The KULEMT template requires the memoir class. The README provides a command for this, but you can do this from the LiveTex utility.

Installing the KULEMT class

The README provides steps to do this. I here follow the instruction to do a system-wide installation. Adapting these to the instructions in the README for an installation only for the current user is straightforward.

NOTE: Older installers (version 2011) did not correctly change the PATH variable. The kpsewhich and other commands were not found.

$ ROOT=`kpsewhich -expand-var='$TEXMFHOME'`
-bash: kpsewhich: command not found

To fix this, edit your ~/.profile and add the following line:

export PATH=$PATH:/usr/texbin

Now reload your shell or re-source ~/.profile:

$ cd
$ . .profile

Now you’re ready to go …

$ ROOT=`kpsewhich -expand-var='$TEXMFHOME'`
$ mkdir -p "$ROOT"
$ unzip -qd "$ROOT" report/template/ 
$ mktexlsr "$ROOT"
mktexlsr: Updating /Users/xtof/Library/texmf/ls-R... 
mktexlsr: Done.

Using the Provided Template

After installing the KULEMT class, we can use the provided template to kick-start our own work.

$ cd thesis
$ cp "$ROOT/doc/latex/kulemt/sjabloon/"* .
$ ls -l
total 616
-rw-r--r--@ 1 xtof  staff     653 Sep  3 12:37 app-A.tex
-rw-r--r--@ 1 xtof  staff     463 Sep  3 12:37 app-n.tex
-rw-r--r--@ 1 xtof  staff     366 Sep  3 12:37 besluit.tex
-rw-r--r--@ 1 xtof  staff    1594 Sep  3 12:37 hfdst-1.tex
-rw-r--r--@ 1 xtof  staff    7893 Sep  3 12:37 hfdst-2.tex
-rw-r--r--@ 1 xtof  staff    1132 Sep  3 12:37 hfdst-n.tex
-rw-r--r--@ 1 xtof  staff     446 Sep  3 12:37 inleiding.tex
-rwx------@ 1 xtof  staff  272481 Sep  3 12:37 masterproef.pdf
-rw-r--r--@ 1 xtof  staff    3600 Sep  3 12:37 masterproef.tex
-rw-r--r--@ 1 xtof  staff     678 Sep  3 12:37 referenties.bib


Now open masterproef.tex in TexShop and typeset it. This will result in an almost exact copy of the provided example masterproef.pdf. Two things are still not okay:

  • the table of contents and other lists (of figures, tables,…)
  • the bibliography is missing (page 19)

The former is easily fixed by typesetting the document again. LaTeX requires multiple passes to generate these.

The latter, requires first processing of the BibTeX sources. To do this, select BibTeX from the drop down next to the Typeset button - it will normally show LaTeX. Now typeset again, switch back to LaTeX and typeset again. Et voila, the bibliography is also rendered.

Compare it to the provided masterproef.pdf and then start customizing the template.


Opening a LaTeX file in TextMate and issuing a run command will nicely build the document. No hassle ;-)