Skip to content

Commit 9e1f0e4

Browse files
CreeperLKFfky2015
authored andcommitted
fix: toc entry in bookmarks should not point to the tail of toc in Chinese bachelor thesis
1 parent 3f92180 commit 9e1f0e4

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

bithesis.dtx

+7-4
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@
216216
% \begin{macrocode}
217217
\cs_new:Npn \@@_if_thesis_int_type:nTF #1#2#3 {\int_compare:nNnTF {\g_@@_thesis_type_int} = {#1} {#2} {#3}}
218218
\cs_new:Npn \@@_if_thesis_int_type:nT #1#2 {\@@_if_thesis_int_type:nTF {#1} {#2} {}}
219+
\cs_new:Npn \__bithesis_if_thesis_int_type:nF #1#2 {\__bithesis_if_thesis_int_type:nTF {#1} {} {#2}}
219220
% \end{macrocode}
220221
% \end{macro}
221222

@@ -2693,15 +2694,17 @@
26932694
\vspace{-8pt}
26942695
}
26952696

2697+
% 添加目录书签
2698+
\__bithesis_if_thesis_int_type:nF {3} {
2699+
\currentpdfbookmark{\c__bithesis_label_toc_tl}{ch:toc}
2700+
}
2701+
26962702
% 制作目录
26972703
\tableofcontents
26982704

26992705
% 在本科生全英文模板中,添加「目录」本身到目录中。
2700-
\__bithesis_if_thesis_int_type:nTF {3} {
2706+
\__bithesis_if_thesis_int_type:nT {3} {
27012707
\addcontentsline{toc}{chapter}{\c__bithesis_label_toc_en_tl}
2702-
} {
2703-
% 添加目录书签
2704-
\currentpdfbookmark{\c__bithesis_label_toc_tl}{ch:toc}
27052708
}
27062709

27072710
% 单独成页

0 commit comments

Comments
 (0)