Skip to content

Commit 6e32fd3

Browse files
fix: 目录包含「目录」本身时,页码应为目录的首页而非末页
Relates-to: #480 Relates-to: #496 Relates-to: ba4cf36 in #522
1 parent e524e6b commit 6e32fd3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: bithesis.dtx

+7-7
Original file line numberDiff line numberDiff line change
@@ -2713,19 +2713,19 @@
27132713
\vspace{-8pt}
27142714
}
27152715

2716-
% 添加目录书签
2717-
\@@_if_thesis_int_type:nF {3} {
2716+
\@@_if_thesis_int_type:nTF {3} {
2717+
% 添加「目录」本身到目录中,同时自动添加书签
2718+
% 此处必须有`\phantomsection`,不然 hyperref 会把链接指向之前摘要的标题。
2719+
\phantomsection
2720+
\addcontentsline{toc}{chapter}{\c_@@_label_toc_en_tl}
2721+
} {
2722+
% 手动添加目录书签
27182723
\currentpdfbookmark{\c_@@_label_toc_tl}{ch:toc}
27192724
}
27202725

27212726
% 制作目录
27222727
\tableofcontents
27232728

2724-
% 在本科生全英文模板中,添加「目录」本身到目录中。
2725-
\@@_if_thesis_int_type:nT {3} {
2726-
\addcontentsline{toc}{chapter}{\c_@@_label_toc_en_tl}
2727-
}
2728-
27292729
% 单独成页
27302730
\clearpage
27312731
}

0 commit comments

Comments
 (0)