PhD_v2_alm-template
Author
Andreas Liudi Mulyo
Last Updated
3 года назад
License
Creative Commons CC BY 4.0
Abstract
A custom PhD template with the chapter, section, and subsection titles linking back to the table of content.
\documentclass[11pt,b5paper]{book}
\include{preamble}
%=======================================================================
\begin{document}
%========
% used with "Linking the section titles to the ToC, alternative 4"
\let\hypercontentsline=\contentsline
\renewcommand{\contentsline}[4]{\hypertarget{toc.#4}{}\hypercontentsline{#1}{#2}{#3}{#4}}
% used with alternative 5, since "part page" linking in that alternative works
% %%% also chapter* can't be recognized
%========
%%% Front matter
\frontmatter
\pagestyle{empty}
\pdfbookmark[1]{MBE of GaN/AlGaN Nanocolumns on Graphene}{title}% "1" = section level
\include{frontmatter/title_temp}
\include{frontmatter/dedication}
\include{frontmatter/quote}
\headerregularsection
\include{frontmatter/abstract} % finalized and formatted on 2021.03.09, checked by me on 2021.03.09
\include{frontmatter/preface}
\headerregularsection % to neutralize \thispagestyle{empty} from the quote in the last page of PREFACE
\include{frontmatter/acknowledgement}
\headerspecialsection % it appears that toc, lof and other pages (e.g. references) generated by book class have a function of "\makeuppercase" within their heading/footer. so to solve this, in practice, it is similar with reference, meaning the same way to tackle this: by issuing "\headerspecialsection"
\cleardoublepage
{
\hypersetup{linkcolor=sophia} % PREVENTING toc link being colored to "linkcolor" declared in hyperref from preamble, which in this thesis is "ntnu".
\cleardoublepage\phantomsection % to fix wrong hyperref
\pdfbookmark{\contentsname}{toc} % add TOC into the bookmark when it is exported to pdf
\tableofcontents
\label{toc} % used with "Linking the section titles to the ToC, alternative 5"
% % used with alternative 4, since "part page" linking in this alternative works
% % also chapter* can also be recognized, despite its lacking
\listoffigures
\listoftables
}
\include{frontmatter/nomenclature}
%=======================================================================
%%% Main matter
\mainmatter
\part{Background}
\include{mainmatter/ch1}
\include{mainmatter/ch2}
\include{mainmatter/ch3}
\cleardoublepage\phantomsection % to fix wrong hyperref to \part{Result}
\part{Results}
\include{mainmatter/ch4}
\include{mainmatter/ch5}
\include{mainmatter/ch6}
\cleardoublepage\phantomsection % to fix wrong hyperref to \part{Epilogue}
\part{Epilogue}
\include{mainmatter/ch7}
\clearpage\null\thispagestyle{empty}
%=======================================================================
%%% Back matter
\backmatter
\include{backmatter/appendixA}
\include{backmatter/appendixB}
\include{backmatter/appendixC}
\include{backmatter/curriculumvitae}
\include{backmatter/dissemination}
\include{backmatter/copyright}
\include{backmatter/index}
% \cleardoublepage % intentionally put Colophon in the even page -> ignore the following error
% % "Package marginnote Warning: Consecutive odd pages found. Note, it is not recommended to use consecutive odd pages in a double-ended document. The pages of your document should always be a sequence: odd-even-odd-even-... Maybe you've forgotten a \cleardoublepage before changing the page numbering on page End-1."
\include{backmatter/colophon}
\end{document}