From 4afad0121c7fbd7233f6a694d59815e7dfd9e846 Mon Sep 17 00:00:00 2001 From: LinearKF Date: Tue, 28 May 2024 14:23:46 +0800 Subject: [PATCH 1/3] fix: remove redundant `currentpdfbookmark` for English bachelor thesis --- bithesis.dtx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bithesis.dtx b/bithesis.dtx index d510b85b..a7dffda3 100644 --- a/bithesis.dtx +++ b/bithesis.dtx @@ -2693,14 +2693,15 @@ \vspace{-8pt} } - % 添加目录书签 - \currentpdfbookmark{\c__bithesis_label_toc_tl}{ch:toc} % 制作目录 \tableofcontents % 在本科生全英文模板中,添加「目录」本身到目录中。 - \@@_if_thesis_int_type:nT {3} { - \addcontentsline{toc}{chapter}{\c_@@_label_toc_en_tl} + \__bithesis_if_thesis_int_type:nTF {3} { + \addcontentsline{toc}{chapter}{\c__bithesis_label_toc_en_tl} + } { + % 添加目录书签 + \currentpdfbookmark{\c__bithesis_label_toc_tl}{ch:toc} } % 单独成页 From 3d08f6eb50bd7ffefbceb58fe30b1889bc9c0dfd Mon Sep 17 00:00:00 2001 From: LinearKF Date: Tue, 28 May 2024 14:43:53 +0800 Subject: [PATCH 2/3] doc: add title property in `BITSetup.info` for undergraduate-thesis-en --- templates/undergraduate-thesis-en/main.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/undergraduate-thesis-en/main.tex b/templates/undergraduate-thesis-en/main.tex index 43d43419..04865622 100644 --- a/templates/undergraduate-thesis-en/main.tex +++ b/templates/undergraduate-thesis-en/main.tex @@ -44,9 +44,10 @@ % 想要删除某项封面信息,直接删除该项即可。 % 想要让某项封面信息留空(但是保留下划线),请传入空白符组成的字符串,如"{~}"。 % 如需要换行,则用 “\\” 符号分割。 + title = 你的论文标题(中文), titleEn = Your Thesis Title, school = School of Mechanical Engineering, - major = Bechelor of Science in Mechanical Engineering, + major = Bachelor of Science in Mechanical Engineering, author = Feng Kaiyu, studentId = 11xxxxxxxx, supervisor = Alex Zhang, From ba4cf365e85bfbd4dd960cc244a59d135835ec90 Mon Sep 17 00:00:00 2001 From: LinearKF Date: Tue, 28 May 2024 21:09:35 +0800 Subject: [PATCH 3/3] fix: toc entry in bookmarks should not point to the tail of toc in Chinese bachelor thesis --- bithesis.dtx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bithesis.dtx b/bithesis.dtx index a7dffda3..1625e698 100644 --- a/bithesis.dtx +++ b/bithesis.dtx @@ -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} @@ -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} } % 单独成页