Skip to content

Commit

Permalink
fix: toc entry in bookmarks should not point to the tail of toc in Ch…
Browse files Browse the repository at this point in the history
…inese bachelor thesis
  • Loading branch information
CreeperLKF authored and fky2015 committed May 28, 2024
1 parent 3f92180 commit 9e1f0e4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions bithesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_if_thesis_int_type:nTF #1#2#3 {\int_compare:nNnTF {\g_@@_thesis_type_int} = {#1} {#2} {#3}}
\cs_new:Npn \@@_if_thesis_int_type:nT #1#2 {\@@_if_thesis_int_type:nTF {#1} {#2} {}}
\cs_new:Npn \__bithesis_if_thesis_int_type:nF #1#2 {\__bithesis_if_thesis_int_type:nTF {#1} {} {#2}}
% \end{macrocode}
% \end{macro}

Expand Down Expand Up @@ -2693,15 +2694,17 @@
\vspace{-8pt}
}

% 添加目录书签
\__bithesis_if_thesis_int_type:nF {3} {
\currentpdfbookmark{\c__bithesis_label_toc_tl}{ch:toc}
}

% 制作目录
\tableofcontents

% 在本科生全英文模板中,添加「目录」本身到目录中。
\__bithesis_if_thesis_int_type:nTF {3} {
\__bithesis_if_thesis_int_type:nT {3} {
\addcontentsline{toc}{chapter}{\c__bithesis_label_toc_en_tl}
} {
% 添加目录书签
\currentpdfbookmark{\c__bithesis_label_toc_tl}{ch:toc}
}

% 单独成页
Expand Down

0 comments on commit 9e1f0e4

Please sign in to comment.