Only compile necessary frontmatter/backmatter additions (e.g., bib) for single subfiles

This commit is contained in:
2026-07-03 00:43:14 +02:00
parent b2e2c67b4c
commit aad8942361
+39 -34
View File
@@ -166,26 +166,28 @@
pdfcreator={LuaLaTeX}
}
% Starting pages
\pagestyle{empty}
\pagenumbering{gobble}
\input{titlepage}
\cleardoublepage%
% Only compile title/glossaries/toc with the main document
\ifSubfilesClassLoaded{}{%
\pagestyle{empty}
\pagenumbering{gobble}
\input{titlepage}
\cleardoublepage%
\frontmatter%
\pagestyle{plain}
\pagenumbering{Roman}
\tableofcontents%
\cleardoublepage%
\frontmatter%
\pagestyle{plain}
\pagenumbering{Roman}
\tableofcontents%
\cleardoublepage%
\todototoc\listoftodos%
\cleardoublepage%
\todototoc\listoftodos%
\cleardoublepage%
\setacronymstyle{long-short}
\printacronyms%
\cleardoublepage%
\printglossary%
\cleardoublepage%
\setacronymstyle{long-short}
\printacronyms%
\cleardoublepage%
\printglossary%
\cleardoublepage%
}
\mainmatter%
\pagestyle{headings}
@@ -205,28 +207,31 @@
% \printbibliography%
\cleardoublepage%
\phantomsection%
\addcontentsline{toc}{chapter}{Lists}
% Only compile lists/declaration with the main document
\ifSubfilesClassLoaded{}{%
\phantomsection%
\addcontentsline{toc}{chapter}{Lists}
\listoffigures%
\addcontentsline{toc}{section}{List of Figures}
\cleardoublepage%
\listoffigures%
\addcontentsline{toc}{section}{List of Figures}
\cleardoublepage%
\listofalgorithms%
\addcontentsline{toc}{section}{List of Algorithms}
\cleardoublepage%
\listofalgorithms%
\addcontentsline{toc}{section}{List of Algorithms}
\cleardoublepage%
\tcblistof[\chapter*]{listings}{List of Listings}
\addcontentsline{toc}{section}{List of Listings}
\cleardoublepage%
\tcblistof[\chapter*]{listings}{List of Listings}
\addcontentsline{toc}{section}{List of Listings}
\cleardoublepage%
\listoftables%
\addcontentsline{toc}{section}{List of Tables}
\cleardoublepage%
\listoftables%
\addcontentsline{toc}{section}{List of Tables}
\cleardoublepage%
\phantomsection%
\addcontentsline{toc}{chapter}{Statutory Declaration}
\includepdf[pages=-]{declaration_signed.pdf}
\phantomsection%
\addcontentsline{toc}{chapter}{Statutory Declaration}
\includepdf[pages=-]{declaration_signed.pdf}
}
}
% Colors