Switch to scrbook class for sans-serif headings

This commit is contained in:
2026-06-30 15:09:14 +02:00
parent 1f4249b7e9
commit 8e5b1697ad
10 changed files with 108 additions and 81 deletions
+70 -57
View File
@@ -6,18 +6,22 @@
% Layout
\usepackage[left=3.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm]{geometry} % Typical margin
\usepackage{titling}
\usepackage{fancyhdr}
\usepackage{setspace} % Line stretch
% Bibliography
\usepackage[backend=biber,urldate=iso,date=iso,seconds=true]{biblatex}
\bibliography{references}
\usepackage[nottoc,notlof,notlot]{tocbibind} % Include bibliography in ToC, nottoc disables the "Contents" entry for the ToC itself
% Figures
\usepackage{graphicx} % Required for inserting images
\usepackage{subcaption} % Mehrere Figuren in einer
\usepackage{float} % [H] floating/positioning von Figuren
\usepackage[bottom]{footmisc} % Bottom not below footnote
\usepackage[font=small,labelfont=bf,labelsep=endash,margin=1cm,hypcap]{caption}
\usepackage[margin=1cm,hypcap]{subcaption} % Mehrere Figuren in einer
% \usepackage{float} % [H] floating/positioning von Figuren
\usepackage{floatbytocbasic} % float for komascript
% \usepackage[bottom,multiple]{footmisc} % Bottom not below footnote
\usepackage{flafter}
\usepackage{placeins} % \FloatBarrier to flush floats
% Math
\usepackage{amsmath,amsthm} % Don't load amssymb with concmath-otf
@@ -27,7 +31,8 @@
\usepackage{lualatex-math}
% Tables
\usepackage{tabularx}
\usepackage{booktabs}
% \usepackage{tabularx}
% \usepackage{tablefootnote}
% \usepackage{makecell}
% \usepackage{color,colortbl}
@@ -37,30 +42,44 @@
\usepackage{algpseudocode}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{listings} % For lstinputlisting ChkTeX
\usetikzlibrary{shadings, backgrounds}
\usepackage[minted]{tcolorbox}
\tcbuselibrary{skins} % breakable
% Typography
\usepackage[babel,final,protrusion=true,expansion=true,tracking=false,kerning=false,spacing=false]{microtype}
\usepackage{fontspec}
% \usepackage{fontspec}
\usepackage{concmath-otf}
\usepackage[babel,final,protrusion=true,expansion=true,tracking=false,kerning=false,spacing=false]{microtype}
\setmonofont{MonoLisa Alt}[Scale=MatchLowercase]
% Pagestyle
\KOMAoptions{%
chapterprefix,
appendixprefix,
headsepline,
% footsepline,
% cleardoublepage=current,
method=right, % start chapters on the right
cleardoublepage=plain, % linenumbers on interleaf pages
footnotes=multiple, % TODO: Doesn't work, maybe because of hyperref?
}
% Various stuff
\usepackage[page]{appendix} % [toc]
\usepackage{lipsum}
\usepackage[inkscapelatex=false]{svg} % Don't touch fonts
\usepackage{comment}
% \usepackage{comment}
\usepackage{pdfpages}
\usepackage{luatodonotes}
\usepackage{siunitx}
\sisetup{detect-all}
\usepackage[l2tabu,orthodox]{nag}
\usepackage{etoolbox} % For \ifstrequal
% \usepackage{etoolbox} % For \ifstrequal
\usepackage[autostyle]{csquotes} % Correct quotation marks with \textquote{}
\usepackage{silence} % Silence warnings
\usepackage[intoc]{nomencl} % Nomenclature
% \usepackage[intoc]{nomencl} % Nomenclature
\usepackage[luatex,hidelinks]{hyperref} % Load late
\usepackage[acronym,automake,nonumberlist,nogroupskip]{glossaries} % Load after hyperref, toc
\usepackage[acronym,automake,nonumberlist,nogroupskip,toc]{glossaries} % Load after hyperref, toc
\usepackage{xurl} % xurl does url-line-breaks in contrast to url
% Multi-file
@@ -68,16 +87,18 @@
% Settings
\setstretch{1.25}
\bibliography{references}
\clubpenalty=10000
\widowpenalty=10000
\displaywidowpenalty=10000
% \floatstyle{boxed}
% \restylefloat{figure}
\sisetup{detect-all}
\tcbuselibrary{skins} % breakable
\usetikzlibrary{shadings, backgrounds}
\setlength{\headheight}{14pt}
% Allow more (and larger) floats on text pages
\renewcommand{\topfraction}{0.9} % use up to ..% of space on top
\renewcommand{\bottomfraction}{0.8} % use up to ..% of space on bottom
\setcounter{topnumber}{4} % place up to .. on top
\setcounter{bottomnumber}{1} % place up to .. on bottom
\setcounter{totalnumber}{4} % place up to .. total
\renewcommand{\textfraction}{0.07} % allow down to ..% of text
\renewcommand{\floatpagefraction}{0.7} % fill at least ..% of float pages (must be less than \topfraction)
\mathtoolsset{showonlyrefs}
\usepackage{xpatch}
@@ -93,24 +114,21 @@
% \WarningFilter{latexfont}{Font shape `TS1/zi4/m/it' undefined}
% \WarningFilter{latexfont}{Some font shapes were not available}
\fancypagestyle{plain}{%
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\fancyfoot[RO,LE]{\thepage}
}
\fancypagestyle{report}{%
\fancyhf{}
\renewcommand{\headrulewidth}{0.4pt}
\fancyfoot[RO,LE]{\thepage}
\fancyhead[LO,RE]{\slshape \leftmark\/}
}
% Macros
\let\oldurl\url%
\let\url\undefined%
\newcommand{\url}[2][\PackageError{Thesis}{URL requires 2 arguments: \url[date]{address}, e.g.\ \url[07/27/2024]{https://github.com}}{}]{\oldurl{#2} (visited on #1)}
\let\oldref\ref%
\let\ref\undefined%
\newcommand{\ref}[1]{\PackageError{Thesis}{REF:\ Use \autoref{label} instead}{}}
\let\oldcite\cite%
\let\cite\undefined%
\newcommand{\cite}[1]{\PackageError{Thesis}{CITE:\ Use \autocite{ref} instead}{}}
\newcommand{\sansbf}[1]{{\usekomafont{disposition}#1}}
\renewcommand{\author}[1]{\gdef\theauthor{#1}}
\renewcommand{\title}[1]{\gdef\thetitle{#1}}
\newcommand{\germantitle}[1]{\gdef\thegermantitle{#1}}
@@ -124,6 +142,9 @@
\newcommand{\advisors}[1]{\gdef\theadvisors{#1}}
\newcommand{\dean}[1]{\gdef\thedean{#1}}
% Hyphenation
\hyphenation{Web-Assembly}
% Default start and end for each subfile (the main.tex is also a subfile!)
\AtBeginDocument{%
% Capitalize all the section names (has to be placed after \begin{document})
@@ -148,47 +169,31 @@
pdfcreator={LuaLaTeX}
}
% Macros
% \renewcommand{\ref}[1]{\autoref{#1}}
\let\oldref\ref%
\let\ref\undefined%
\newcommand{\ref}[1]{\PackageError{Thesis}{REF:\ Use \autoref{label} instead}{}}
\let\oldcite\cite%
\let\cite\undefined%
\newcommand{\cite}[1][\PackageError{Thesis}{CITE:\ Use \autocite{ref} instead}{}]
% Visualize "overfull-hbox"
\overfullrule=2cm
% \pagestyle{empty}
% \pagenumbering{gobble}
% Starting pages
\frontmatter%
\pagestyle{empty}
\pagenumbering{gobble}
\input{titlepage}
\cleardoublepage%
% \pagestyle{plain}
\frontmatter%
\pagestyle{plain}
% \pagenumbering{Roman}
% \tableofcontents{\thispagestyle{plain}}
\tableofcontents%
\cleardoublepage%
% \pagestyle{report}
\setacronymstyle{short-long}
\printglossary[type=\acronymtype]
\cleardoublepage%
\printglossary%
\mainmatter%
\pagestyle{headings}
% \pagenumbering{arabic}
}
\AtEndDocument{
% \pagestyle{empty}
% \pagenumbering{gobble}
\backmatter%
\pagestyle{plain}
\let\url\undefined%
\let\url\oldurl%
@@ -196,22 +201,30 @@
\let\cite\oldcite%
\printbibliography[heading=bibintoc]
% \printbibliography%
\cleardoublepage%
\phantomsection%
\addcontentsline{toc}{chapter}{Lists}
\listoffigures%
\addcontentsline{toc}{section}{List of Figures}
\cleardoublepage%
\listofalgorithms%
% \addcontentsline{toc}{chapter}{List of Algorithms}
\addcontentsline{toc}{section}{List of Algorithms}
\cleardoublepage%
\tcblistof[\chapter*]{listings}{List of Listings}
% \addcontentsline{toc}{chapter}{List of Listings}
\addcontentsline{toc}{section}{List of Listings}
\cleardoublepage%
\listoftables%
\addcontentsline{toc}{section}{List of Tables}
\cleardoublepage%
\phantomsection%
\addcontentsline{toc}{chapter}{Statutory Declaration}
\includepdf[pages=-]{declaration.pdf}
}