\documentclass[12pt, openany]{book}
%--------------------------------------------------------------------------------------------------
% preamble: packages used and format settings
%--------------------------------------------------------------------------------------------------
\input{src/contents/latex_doc_preamble/preamble.tex}
%**************************************************************************************************
% Begin the document
%**************************************************************************************************
\begin{document}
% set font of every title to sans-serif
\allsectionsfont{\sffamily}
%**********************************************************************************************
% frontmatter
%**********************************************************************************************
\frontmatter
% Add the title page
\import{src/contents/frontmatter/title_page/}{title_page.tex}
% Dedication
\chapter{Dedication}
\import{src/contents/frontmatter/dedication/}{dedication.tex}
% Declaration
\chapter{Declaration}
\import{src/contents/frontmatter/declaration/}{declaration.tex}
% Acknowledgement
\chapter{Acknowledgement}
\import{src/contents/frontmatter/acknowledgement/}{acknowledgement.tex}
% Abstract
\chapter{Abstract}
\import{src/contents/frontmatter/abstract/}{abstract.tex}
% Table of Contents
\tableofcontents
% List of Figures
\listoffigures
% List of Tables
\listoftables
% List of Listings
\lstlistoflistings
\addcontentsline{toc}{chapter}{List of Code Snippets}
% List of Acronyms
\chapter{List of Acronyms}
\import{src/contents/frontmatter/glossary/}{acronyms.tex}
% List of Symbols
\chapter{List of Symbols}
\import{src/contents/frontmatter/glossary/}{symbols.tex}
% Note: In book design, it is common practice for the main matter of the document to start on an odd-numbered (right-hand) page.
% If the last item in the front matter (e.g., preface, table of contents) ends on an odd-numbered page, LaTeX will automatically insert a blank page to ensure this convention is followed.
% This is done to improve the readability and presentation of the document, particularly in printed books.
%**********************************************************************************************
% main matter
%**********************************************************************************************
\mainmatter
%----------------------------------------------------------------------------------------------
% Part 1
%----------------------------------------------------------------------------------------------
\part{Part 1}
% Chapter 01
\chapter{Chapter 01}
\import{src/contents/mainmatter/part1/chapter01/}{chapter01.tex}
% Chapter 02
\chapter{Chapter 02}
\import{src/contents/mainmatter/part1/chapter02/}{chapter02.tex}
%----------------------------------------------------------------------------------------------
% Part 2
%----------------------------------------------------------------------------------------------
\part{Part 2}
% Chapter 03
\chapter{Chapter 03}
\import{src/contents/mainmatter/part2/chapter03/}{chapter03.tex}
%**********************************************************************************************
% backmatter
% don't use \backmatter. Look up the correct use of backmatter
%**********************************************************************************************
\bookmarksetup{startatroot}
%----------------------------------------------------------------------------------------------
% References
%----------------------------------------------------------------------------------------------
% \bibliographystyle{plain}
% \bibliography{src/contents/backmatter/references/references.bib}
\printbibliography[heading=bibintoc]
%----------------------------------------------------------------------------------------------
% Appendix
%----------------------------------------------------------------------------------------------
\appendix
% Appendix numbering
\renewcommand{\thechapter}{\Alph{chapter}}
% \renewcommand{\thesection}{\Roman{section}}
% \renewcommand{\thesubsection}{\fnsymbol{subsection}}
\chapter{Appendix title}
\import{src/contents/backmatter/appendix/}{appendix_chapterA.tex}
% Index
\clearpage
\phantomsection % To correct the anchor toc index to the index page. Otherwise, the toc index takes user to the last section of the appendix chapter before this.
\printindex % Print the index
\end{document}
%**************************************************************************************************
% End of the document
%**************************************************************************************************
PDF Preview
Create an account to compile and preview