feat(latex): modify \backmatter to change page numbering to roman while preserving frontmatter page count
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
\include{chapters/id/03_methodology/index}
|
||||
% \include{chapters/04_results}
|
||||
% \include{content/conclusion}
|
||||
|
||||
\backmatter
|
||||
% Bibliography
|
||||
\printbibliography[heading=bibintoc]
|
||||
% \bibliographystyle{IEEEtran}
|
||||
|
||||
@@ -131,6 +131,25 @@
|
||||
\fancyhead[R]{\thepage}
|
||||
}
|
||||
|
||||
% change the behaviour of \backmatter to change page number into roman by continue frontmatter page counter (modified from original book.cls)
|
||||
\newcounter{savepagenumber}
|
||||
\renewcommand\mainmatter{%
|
||||
\cleardoublepage
|
||||
\setcounter{savepagenumber}{\value{page}}
|
||||
\@mainmattertrue
|
||||
\pagenumbering{arabic}%
|
||||
}
|
||||
\renewcommand\backmatter{%
|
||||
\if@openright
|
||||
\cleardoublepage
|
||||
\else
|
||||
\clearpage
|
||||
\fi
|
||||
\pagenumbering{roman}%
|
||||
\setcounter{page}{\value{savepagenumber}}%
|
||||
\@mainmatterfalse
|
||||
}
|
||||
|
||||
% Chapter formatting
|
||||
\titlespacing{\chapter}{0pt}{0cm}{*1.5}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user