Skip to content

Fix TOC/bookmark hyperlink anchors for abstract and A1/A2/A4 pages#58

Draft
Copilot wants to merge 2 commits into
masterfrom
copilot/fix-directory-bookmark-links
Draft

Fix TOC/bookmark hyperlink anchors for abstract and A1/A2/A4 pages#58
Copilot wants to merge 2 commits into
masterfrom
copilot/fix-directory-bookmark-links

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 27, 2026

TOC entries and PDF bookmarks for the abstract (摘要/Abstract) and the unnumbered chapters in A1 (references), A2 (acknowledgements) and A4 (resume) jumped to the wrong page, because each \addcontentsline / \chapter* was preceded by a \clearpage with no \phantomsection, so hyperref recorded the anchor on the previous page.

Changes

  • NKThesis.cfg — insert \phantomsection after \clearpage inside \zhaiyao and \abstract.
  • tex/A1_references.tex\cleardoublepage\phantomsection before \printbibliography.
  • tex/A2_acknowledgements.tex\cleardoublepage\phantomsection before \chapter*{致谢}.
  • tex/A4_resume.tex\cleardoublepage\phantomsection before \chapter*{个人简历…}.
  • tex/A3_appendices.tex left untouched (empty template, no heading to anchor).

hyperref is already loaded by NKThesis.sty, so \phantomsection is available.

Example

\def\zhaiyao{
  \clearpage
  \phantomsection            % <-- anchor lands on the new page
  \vspace*{24pt}
  \centerline{\zihaoxiaoer\rmfamily\bfseries\jiacu 摘要}
  \addcontentsline{toc}{chapter}{\protect\numberline{摘要}{}}
  ...
}

Copilot AI linked an issue Apr 27, 2026 that may be closed by this pull request
Add \phantomsection after \clearpage in \zhaiyao and \abstract so the
TOC/bookmark links to the abstract pages land on the correct page.
Add \cleardoublepage\phantomsection before \printbibliography (A1),
\chapter*{致谢} (A2), and \chapter*{个人简历...} (A4) so the
auto-generated TOC entries for those unnumbered chapters point to the
right pages instead of the previous chapter.

Agent-Logs-Url: https://github.com/NewFuture/NKThesis/sessions/8e9be925-c4b2-4a16-9c43-53e559ac53ce

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix directory and bookmark hyperlink issue Fix TOC/bookmark hyperlink anchors for abstract and A1/A2/A4 pages Apr 27, 2026
Copilot AI requested a review from NewFuture April 27, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

目录和书签超链接问题

2 participants