[BUG] Frontmatter Doesn't Hyperlink Correctly in ToC #65

Closed
opened 2025-05-14 10:50:48 +00:00 by nuluh · 0 comments
nuluh commented 2025-05-14 10:50:48 +00:00 (Migrated from github.com)

Bug Description

When one of frontmatter page entry in the ToC is clicked, it jump to wrong or not really correct page. More like jump into the where new macro \frontmattersection is written which is in the main.tex next to each other, this leads the hyperlink to jump into same page for all frontmatter entry.

% main.tex
\theendorsementpage{toc} % <-- this treated as same page with next page of frontmatter page
\originalitystatement{toc}
% thesis.cls
\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}}

Steps to Reproduce

  1. Compile the pdf
  2. Click some of the frontmatter entries in the ToC, this will jump into same page.

Expected Behavior

The PDF ToC entries should jump into correct page.

Actual Behavior

The PDF jump into same page as other frontmatter page

Error Logs


Component

LaTeX Document

Version/Commit

49adb273d8

Environment

No response

Additional Context

No response

### Bug Description When one of frontmatter page entry in the ToC is clicked, it jump to wrong or not really correct page. More like jump into the where new macro `\frontmattersection` is written which is in the `main.tex` next to each other, this leads the hyperlink to jump into same page for all frontmatter entry. ```tex % main.tex \theendorsementpage{toc} % <-- this treated as same page with next page of frontmatter page \originalitystatement{toc} ``` ```tex % thesis.cls \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}} ``` ### Steps to Reproduce 1. Compile the pdf 2. Click some of the frontmatter entries in the ToC, this will jump into same page. ### Expected Behavior The PDF ToC entries should jump into correct page. ### Actual Behavior The PDF jump into same page as other frontmatter page ### Error Logs ```shell ``` ### Component LaTeX Document ### Version/Commit 49adb273d8d347550d4730de9f7939c552a4843e ### Environment _No response_ ### Additional Context _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nuluh/thesis#65