fix(latex): remove new macro \frontmattersection to manually add \addcontentsline into each frontmatter to make hyperlink ToC jumpt into correct page.

Closes #65
This commit is contained in:
nuluh
2025-05-14 17:58:06 +07:00
parent 74ea4d412c
commit 471eccb12c
2 changed files with 3 additions and 18 deletions

View File

@@ -19,9 +19,9 @@
\maketitle
\frontmatter
\setcounter{page}{1}
\theendorsementpage{toc}
\originalitystatement{toc}
\input{frontmatter/approval}\clearpage
\input{frontmatter/originality}\clearpage
\input{frontmatter/acknowledgement}\clearpage
\tableofcontents
\clearpage
\mainmatter

View File

@@ -143,21 +143,6 @@
% \renewcommand{\cfttoctitlefont}{\bfseries\MakeUppercase}
% \renewcommand{\cftaftertoctitle}{\vskip 2em}
% Frontmatter Macro (Toggle TOC Inclusion)
\newcommand{\frontmattersection}[3]{%
% \begin{titlepage}
\ifstrequal{#1}{toc}{\thispagestyle{fancyplainfrontmatter}\addcontentsline{toc}{chapter}{#2}}{\chapter*{#2}}%
\input{frontmatter/#3}
% \end{titlepage}
\clearpage
}
% Wrapper Command for Each Page
\newcommand{\theacknowledgementpage}[1]{\frontmattersection{#1}{LEMBAR PERNYATAAN}{acknowledgement}}
\newcommand{\theapprovalpage}[1]{\frontmattersection{#1}{LEMBAR PERSETUJUAN}{approval}}
\newcommand{\theendorsementpage}[1]{\frontmattersection{#1}{LEMBAR PENGESAHAN}{endorsement}}
\newcommand{\originalitystatement}[1]{\frontmattersection{#1}{PERNYATAAN KEASLIAN}{originality}}
% % Apply a custom fancyhdr layout only on the first page of each \chapter, and use no header/footer elsewhere
% % \let\oldchapter\chapter
% % \renewcommand{\chapter}{%