Merge branch 'latex/57-feat-add-dynamic-page-style-for-chapter-page' into latex/initial-template

This commit is contained in:
nuluh
2025-05-12 00:36:34 +07:00
2 changed files with 20 additions and 9 deletions

View File

@@ -18,11 +18,14 @@
\begin{document} \begin{document}
\maketitle \maketitle
\frontmatter
\setcounter{page}{1}
\theendorsementpage{toc} \theendorsementpage{toc}
\originalitystatement{toc} \originalitystatement{toc}
\tableofcontents \tableofcontents
\clearpage \clearpage
\mainmatter
\pagestyle{fancyplain}
% Include content % Include content
\include{content/abstract} \include{content/abstract}
\include{content/introduction} \include{content/introduction}

View File

@@ -56,11 +56,21 @@
} }
% Header and footer % Header and footer
\pagestyle{fancy} \fancypagestyle{fancy}{%
\fancyhf{} \fancyhf{}
\fancyhead[R]{\nouppercase{\rightmark}} \fancyhead[R]{\nouppercase{\rightmark}}
\fancyhead[L]{\nouppercase{\leftmark}} \fancyhead[L]{\nouppercase{\leftmark}}
\fancyfoot[C]{\thepage} \fancyfoot[C]{\thepage}
}
\fancypagestyle{fancyplainfrontmatter}{%
\renewcommand{\headrulewidth}{0pt}
\fancyfoot[C]{\thepage}
}
\fancypagestyle{fancyplain}{%
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\fancyhead[R]{\thepage}
}
% Chapter formatting % Chapter formatting
\titleformat{\chapter}[display] \titleformat{\chapter}[display]
@@ -112,11 +122,9 @@
% Frontmatter Macro (Toggle TOC Inclusion) % Frontmatter Macro (Toggle TOC Inclusion)
\newcommand{\frontmattersection}[3]{% \newcommand{\frontmattersection}[3]{%
\begin{titlepage}
\centering \centering
\ifstrequal{#1}{toc}{\addcontentsline{toc}{chapter}{#2}}{\chapter*{#2}}% \ifstrequal{#1}{toc}{\thispagestyle{fancyplainfrontmatter}\addcontentsline{toc}{chapter}{#2}}{\chapter*{#2}}%
\input{frontmatter/#3} \input{frontmatter/#3}
\end{titlepage}
\clearpage \clearpage
} }