The LaTeX Thesis Template will be released soon with a new updated version with a new code using LuaLaTeX. It was already available when my first LaTeX Template was released in 2013. Since that time, a lot has happened in LaTeX and the LuaLaTeX engine so that in 2022 I would recommend using LuaLaTex.

The differences in the LaTeX Code that are required to change from pdflatex tu lualatex are described in many user forums, here is a popular example (

In this post I am going to show the current changes in the code that is under development. These are not complete but show the main differences.


% !TeX program = pdflatex


% !TeX program = lualatex

removed since fix-cm cannot be used together with luatex.

%% Bug fixes and other packages to be loaded before the class
\\RequirePackage{fix-cm} % permit Computer Modern fonts at arbitrary sizes.
removed all package for no room for new write
With lualatex the previous fixes are not needed anymore.
% packages to allow more \\write outputs

removed all packages for encoding

% automatic selection of encoding
% insert chars for umlaut a and sz
% Encoding of _files and directories_
% (ensures that any file can be loaded without problems)
   extendedchars, encoding, multidot, space,
   filenameencoding=latin1, % Windows XP, Vista, 7
   % filenameencoding=utf8,   % Linux, OS X
added comment
% lualtex expects utf8 by default
% no package or option required

Changed the order of packages loading and fonts. Previously the fonts were loaded first.

However, with lualatex packages for fonts must be loaded before the actual fonts. Therefore the fonts configuration is loaded at the end.

%% select/load fonts
%% load packages
%% apply style settings
%% new commands / definitions (required by the template!)


%% load packages
%% apply style settings
%% new commands / definitions (required by the template!)
%% select/load fonts
The file fonts/font-commercial.tex was removed from the template.


removed the code for fontenc, textcomp, cmap
% Make PDF files searchable and copyable
% load before: fontenc
% T1 Schrift Encoding
% Description: Additional Symbols (Text Companion font extension)
% Doc: encguide.pdf
all packages for fonts are now loaded in file packages
removed all font loading classes such as lmodern
and replaced the code by font loading commands, here an example for lmodern:
% Latin Modern (LaTeX Standard)
% is loaded automatically with \usepackage{unicode-math}
% Manual setting is done by 
%\setmainfont{Latin Modern Roman}
%\setsansfont{Latin Modern Sans}
%\setmonofont{Latin Modern Mono}
%\setmathfont{Latin Modern Math}
Further examples are provided in the code for typical font combinations
  • Times, Helvetica, Courier
  • Palantino, Helvetica, Courier
  • Charter, Bera Sans, Luxi Mono
  • Garamond, Fira Sans, Luxo Mono
  • MininPro/MyriadPro
  • Cambria, Calibri, Consolas


In this file all packages are loaded. Changes have been done due to font packages related to luatex and other modern packages.

removed packages that I consider to be not necessary for most users.
% Description: support automatic translations
% Doc: beameruserguide.pdf
removed package fixmath
% Description: fixes for the default Computer Modern math fonts
% Doc: fixmath.pdf
added package fontspec
%% Description: Font selection for LuaLaTeX
%% Doc: fontspec.pdf
% Allows LuaTeX to load OpenType fonts. No special font installation is necessary,
% fonts only need to be available in the operating system.
% Classic LaTeX font selection is disabled by loading this package!
added package unicode-math
% Description: implementation of Unicode maths for LATEX using LuaTEX typesetting engines
% - It should be loaded after any other maths or font-related package 
%   in case it needs to overwrite their definitions.
% -  Once the package is loaded, traditional TFM-based maths fonts are no longer
%    supported; you can only switch to a different OpenType maths font using the
%    \setmathfont command.
% - amsmath should be loaded before unicode-math to avoid conflicts

added packages tabularray and tcolorbox

% Description: Typeset Tabulars and Arrays with LATEX3
% A completely new package for tabulars  that will completely 
% separate the content and style of the table, and the style 
% of the table can be completely set in keyval way
% Description: tcolorbox provides an environment for colored 
%              and framed text boxes with a heading line.

removed package tocstyle. This package was discontinued 2020 and removed from all distributions

% Description: apply different styles for the formating of the 
%              table of contents and lists of floats.
%%% Doc: tocstyle.pdf (Koma Script)
%% Alpha package, uses koma fonts (\setkomafont{}{}) only if KOMAlike is selected
%%% toc width calculation 
  tocindentauto,     % all widths at the TOCs are calculated by tocindentauto
%  tocindentmanual,  % opposite of auto
%%% indentation of toc
  tocgraduated,      % standard
%  tocflat,          % no intendation, text aligned
%  tocfullflat,      % no intendation, no alignment
%%%  page breaking rules
  tocbreaksstrict,   % sets a lot of penalties before and after TOC entries 
                     % to avoid page break between a TOC entry and it's parent. 
%  tocbreakscareless,% allow more page breaks.  
%%%  indentation of unnumbered TOC entries
% toctextentriesindented, % unnumbered TOC entrie are indented only as wide 
%                         % as the number of numbered TOC entries of the same 
%                         % level. 
  toctextentriesleft,   % indented as if they have an empty number.
added this code to style.tex to replace tocstyle
% usage of functions from tocbasic (from koma-script)
% Is loaded by koma-script automatically.
% see: 
% Declare common style
% declare different style for everthing except chapter
% set Chapter font to bold