From 471eccb12c942ae5acac8f47298aa0c8cb238500 Mon Sep 17 00:00:00 2001 From: nuluh Date: Wed, 14 May 2025 17:58:06 +0700 Subject: [PATCH] fix(latex): remove new macro `\frontmattersection` to manually add `\addcontentsline` into each frontmatter to make hyperlink ToC jumpt into correct page. Closes #65 --- latex/main.tex | 6 +++--- latex/thesis.cls | 15 --------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/latex/main.tex b/latex/main.tex index 03ef04b..35b5cb1 100644 --- a/latex/main.tex +++ b/latex/main.tex @@ -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 diff --git a/latex/thesis.cls b/latex/thesis.cls index 59df127..2690e56 100644 --- a/latex/thesis.cls +++ b/latex/thesis.cls @@ -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}{%