Skip to content

Commit

Permalink
fix: better bookmark
Browse files Browse the repository at this point in the history
  • Loading branch information
fky2015 committed May 2, 2024
1 parent 3fd7b22 commit c64a1ad
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions bithesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -1668,8 +1668,8 @@
%
% 调整插图目录与表格目录的标题。
% \begin{macrocode}
\cs_set:Npn \listfigurename {\@@_get_const:N {figure}}
\cs_set:Npn \listtablename {\@@_get_const:N {table}}
\cs_set:Npn \listfigurename {\currentpdfbookmark{\c__bithesis_label_figure_tl}{ch:figures}\@@_get_const:N {figure}}
\cs_set:Npn \listtablename {\currentpdfbookmark{\c__bithesis_label_table_tl}{ch:tables}\@@_get_const:N {table}}
% \end{macrocode}
%
% 预定义用户常用的证明环境。
Expand Down Expand Up @@ -1860,6 +1860,7 @@
% \begin{macrocode}
\cs_new:Npn \make_graduate_cover: {
\cleardoublepage
\currentpdfbookmark{封面}{beforematter:cover1}
\begin{titlepage}
{
\heiti\zihao{5}
Expand Down Expand Up @@ -1888,6 +1889,7 @@
% \begin{macrocode}
\cs_new:Npn \make_paper_back: {
\cleardoublepage
\currentpdfbookmark{书脊}{beforematter:paperback}
\begin{titlepage}
\vskip 5cm
\begin{center}
Expand Down Expand Up @@ -1917,6 +1919,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_make_chinese_title_page: {
\cleardoublepage
\currentpdfbookmark{中文题名页}{beforematter:titlepage}
\begin{titlepage}
\begin{minipage}[t]{0.48\textwidth}
% 密级、分类号
Expand Down Expand Up @@ -2014,6 +2017,7 @@
% 制作英文封面页。
% \begin{macrocode}
\cs_new:Npn \@@_make_english_title_page: {
\currentpdfbookmark{英文题名页}{beforematter:titlepageen}
\begin{titlepage}
\begin{center}

Expand Down Expand Up @@ -2097,8 +2101,13 @@
% 原创性声明部分
\begin{center}
\@@_same_page:
\ctexset{
chapter = {
titleformat = {\heiti\zihao{-2}},
}
}
\currentpdfbookmark{\c_@@_graduate_label_originality_tl}{beforematter:originality}
\chapter*{
\heiti\zihao{-2}
\c_@@_graduate_label_originality_tl
}
\end{center}
Expand All @@ -2117,8 +2126,13 @@
% 使用授权声明部分。
\begin{center}
\@@_same_page:
\ctexset{
chapter = {
titleformat = {\heiti\zihao{-2}},
}
}
\currentpdfbookmark{\c_@@_graduate_label_authorization_tl}{beforematter:originality1}
\chapter*{
\heiti\zihao{-2}
\c_@@_graduate_label_authorization_tl
}
\end{center}
Expand Down Expand Up @@ -2220,6 +2234,7 @@
{
{1}
{
\currentpdfbookmark{封面}{beforematter:cover}
\begin{titlepage}
\vspace*{16mm}

Expand Down Expand Up @@ -2468,6 +2483,7 @@
{
{1}
{
\currentpdfbookmark{声明}{beforematter:originality}
\pagestyle{BIThesis}
\pagenumbering{gobble}

Expand Down Expand Up @@ -2618,6 +2634,8 @@
\vspace{-8pt}
}

% 添加目录书签
\currentpdfbookmark{\c__bithesis_label_toc_tl}{ch:toc}
% 制作目录
\tableofcontents

Expand Down Expand Up @@ -2681,8 +2699,8 @@
\bool_if:NTF \l_@@_add_abstract_to_toc_bool {
\chapter{\c_@@_label_abstract_tl}
} {
\chapter*{\c_@@_label_abstract_tl}
\currentpdfbookmark{\c_@@_label_abstract_tl}{ch:abstract}
\chapter*{\c_@@_label_abstract_tl}
}
}
\vspace*{1mm}
Expand Down Expand Up @@ -2758,8 +2776,8 @@
\bool_if:nTF {\l_@@_add_abstract_en_to_toc_bool} {
\chapter{\c_@@_label_abstract_en_tl}
} {
\chapter*{\c_@@_label_abstract_en_tl}
\currentpdfbookmark{\c_@@_label_abstract_en_tl}{ch:abstract:en}
\chapter*{\c_@@_label_abstract_en_tl}
}
}
}
Expand Down

0 comments on commit c64a1ad

Please sign in to comment.