summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/bithesis/bithesis.pdfbin752015 -> 753733 bytes
-rw-r--r--Master/texmf-dist/source/latex/bithesis/bithesis.dtx96
-rw-r--r--Master/texmf-dist/tex/latex/bithesis/bitbeamer.cls2
-rw-r--r--Master/texmf-dist/tex/latex/bithesis/bithesis.cls92
-rw-r--r--Master/texmf-dist/tex/latex/bithesis/bitreport.cls2
5 files changed, 143 insertions, 49 deletions
diff --git a/Master/texmf-dist/doc/latex/bithesis/bithesis.pdf b/Master/texmf-dist/doc/latex/bithesis/bithesis.pdf
index 42618f69db6..18d91aa9f7f 100644
--- a/Master/texmf-dist/doc/latex/bithesis/bithesis.pdf
+++ b/Master/texmf-dist/doc/latex/bithesis/bithesis.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/bithesis/bithesis.dtx b/Master/texmf-dist/source/latex/bithesis/bithesis.dtx
index 17114c06dd3..d510b85b789 100644
--- a/Master/texmf-dist/source/latex/bithesis/bithesis.dtx
+++ b/Master/texmf-dist/source/latex/bithesis/bithesis.dtx
@@ -21,10 +21,10 @@
%<thesis>\ProvidesExplClass{bithesis}
%<report>\ProvidesExplClass{bitreport}
%<beamer>\ProvidesExplClass{bitbeamer}
-%<cls>{2024-05-04}{3.7.7}{BIT Thesis Templates}
+%<cls>{2024-05-27}{3.7.8}{BIT Thesis Templates}
%
%<*driver>
-\ProvidesFile{bithesis.dtx}[2024/05/04 3.7.7 BIT Thesis Templates]
+\ProvidesFile{bithesis.dtx}[2024/05/27 3.7.8 BIT Thesis Templates]
\documentclass[letterpaper]{l3doc}
\usepackage{dtx-style}
@@ -736,6 +736,8 @@
% 浮动体相关的各种间距
floatSeparation .tl_set:N = \l_@@_misc_float_separation_tl,
floatSeparation .initial:n = {0},
+ algorithmSeparation .tl_set:N = \l_@@_misc_algorithm_separation_tl,
+ algorithmSeparation .initial:n = {12pt plus 4pt minus 4pt},
tabularRowSeparation .tl_set:N = \l_@@_misc_tabular_row_separation_tl,
tabularRowSeparation .initial:n = {1},
}
@@ -1026,6 +1028,13 @@
\setlength{\intextsep}{1.80\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip}
% 浮动体位于页面顶部或底部时,调整浮动体与正文之间的距离,后或前加上一行空白
\setlength{\textfloatsep}{1.80\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip}
+ \AtBeginDocument {
+ % longtable 宏包有另外的机制,需专门调整
+ \@ifpackageloaded{longtable}{
+ \setlength{\LTpre}{0.60\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip}
+ \setlength{\LTpost}{1.60\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip}
+ }{}
+ }
}
% \end{macrocode}
%
@@ -1461,6 +1470,8 @@
{\hspace{.5em}\titlerule*{.}\contentspage}
% \end{macrocode}
%
+% \subsubsection{定义样式相关函数}
+%
% \begin{macro}{\frontmatter}
% 定义前置内容的页面样式。
% \begin{macrocode}
@@ -1481,7 +1492,7 @@
\linespread{1.53}\selectfont
\pagestyle{BIThesis}
- % 表格内容默认使用五号字。
+ % 调整表格内容字号(默认五号)和各行之间的距离。
%
% 由于这种方式会影响所有的表格,
% 所以我们尽可能延迟这种影响。
@@ -1489,9 +1500,24 @@
% 不过,在目前的代码实现中没有在封面
% 之类的地方使用表格,所以目前即使放在
% preamble 中也不会有影响。
- \AtBeginEnvironment{tabular}{\zihao{\l_@@_misc_tabular_font_size_tl}}
- \AtBeginEnvironment{tabular*}{\zihao{\l_@@_misc_tabular_font_size_tl}}
- \AtBeginEnvironment{tabularx}{\zihao{\l_@@_misc_tabular_font_size_tl}}
+ %
+ % 支持标准tabular、tabular*环境和宏包tabularx、longtable。
+ %
+ % 为保证各种表格效果一致,要先手动重置setspace宏包漏掉的longtable;
+ \AtBeginEnvironment {longtable} {\singlespacing}
+ % 之后再统一设置。
+ \clist_map_inline:nn
+ {tabular, tabular*, tabularx, longtable}
+ {
+ \AtBeginEnvironment {##1} {
+ % 字号只想设置表格内容,不想影响caption。
+ % 一般caption在环境之外,自然不受影响;
+ % 而longtable的caption虽在环境内,但caption宏包能正常处理。
+ \zihao{\l_@@_misc_tabular_font_size_tl}
+ % 各行间距只想影响表格,不想影响矩阵,因此也必须在钩子中设置。
+ \cs_set:Npn \arraystretch {\l_@@_misc_tabular_row_separation_tl}
+ }
+ }
}
% \end{macrocode}
% \end{macro}
@@ -1561,6 +1587,9 @@
% 至于表格,虽然其caption位置在上方(而图片是在下方),
% 但 `caption` 宏包已考虑这种区别,统一设置 `belowskip` 即可。
\captionsetup{belowskip=-5pt}
+ % 不过 longtable 宏包有另外的机制,不设置 belowskip 时间距已可较小,
+ % 设置成负数还导致 caption 和表格本体的距离变大。因此我们撤销更改。
+ \captionsetup[longtable]{belowskip=0pt}
% 此外在浮动体内部,调整表格 caption 和表格本体间的距离。
% 本来默认有一定空隙,现改为紧贴,这样更接近Word模板实作。
@@ -1632,8 +1661,17 @@
% 调整浮动体与文字之间的距离
\addtolength{\intextsep}{\l_@@_misc_float_separation_tl\baselineskip}
\addtolength{\textfloatsep}{\l_@@_misc_float_separation_tl\baselineskip}
- % 调整表格各行之间的距离
- \cs_set:Npn \arraystretch {\l_@@_misc_tabular_row_separation_tl}
+ % longtable 宏包有另外的机制,需专门调整
+ \@ifpackageloaded{longtable}{
+ \addtolength{\LTpre}{\l_@@_misc_float_separation_tl\baselineskip}
+ \addtolength{\LTpost}{\l_@@_misc_float_separation_tl\baselineskip}
+ }{}
+ % 调整算法与文字之间的距离
+ % 针对 algorithm2e 宏包
+ \@ifpackageloaded{algorithm2e}{
+ % 宏包手册介绍可自定义宏,再`\SetAlgoSkip`;我们为简洁,直接覆写。
+ \renewcommand{\@algoskip}{\vspace{\l_@@_misc_algorithm_separation_tl}}
+ }{}
}
% \end{macrocode}
% \end{macro}
@@ -1902,24 +1940,23 @@
\cleardoublepage
\currentpdfbookmark{书脊}{frontmatter:paperback}
\begin{titlepage}
- \vskip 5cm
- \begin{center}
+ \centering
+ % 实现竖排——将水平宽度设得很窄,让文字自动换行,并改小行距
\linespread{1.1}\selectfont
- \begin{minipage}[t][19.7cm]{2em}
- \begin{center}
- {
- \heiti\zihao{3}
- \tl_if_blank:VTF \l_@@_value_vertical_title_tl
- {\l_@@_value_title_tl}{\l_@@_value_vertical_title_tl}
- }
- \vfill
- {\heiti\zihao{3}\@@_secret_info:nn{\l_@@_value_author_tl}{\g_@@_const_substitute_symbol_tl\quad\g_@@_const_substitute_symbol_tl\quad\g_@@_const_substitute_symbol_tl}}
- \vfill
- {\heiti\zihao{3}\c_@@_label_university_tl}
- \end{center}
+ \begin{minipage}[c][19.7cm]{2em}
+ \centering
+ {
+ \heiti\zihao{3}
+ \tl_if_blank:VTF \l_@@_value_vertical_title_tl
+ {\l_@@_value_title_tl}{\l_@@_value_vertical_title_tl}
+ }
+ \par
+ \vspace{1em plus 1fill}
+ {\heiti\zihao{3}\@@_secret_info:nn{\l_@@_value_author_tl}{\g_@@_const_substitute_symbol_tl\quad\g_@@_const_substitute_symbol_tl\quad\g_@@_const_substitute_symbol_tl}}
+ \par
+ \vspace{1em plus 1fill}
+ {\heiti\zihao{3}\c_@@_label_university_tl}
\end{minipage}
- \end{center}
- % \vskip 5cm
\end{titlepage}
}
% \end{macrocode}
@@ -2598,9 +2635,20 @@
% \begin{macrocode}
\NewDocumentCommand \MakePaperBack {}
{
+ % 上下各留出规定的边距,到下一页再恢复。
+ % 若标题超长,自然会向上下溢出。
+ %
+ % 必须在顶层操作,不然影响不确定。
+ % https://tex.stackexchange.com/q/718581
+ %
+ % 单纯`\newgeometry`再`\restoregeometry`相当于仅仅`\clearpage`,也无问题。
+ \newgeometry{
+ vmargin = 5cm,
+ }
\begin{blindPeerReview}[\l_@@_cover_hide_cover_in_peer_review_bool]
\make_paper_back:
\end{blindPeerReview}
+ \restoregeometry
}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/tex/latex/bithesis/bitbeamer.cls b/Master/texmf-dist/tex/latex/bithesis/bitbeamer.cls
index 5a7bc884adb..c4b56c3889f 100644
--- a/Master/texmf-dist/tex/latex/bithesis/bitbeamer.cls
+++ b/Master/texmf-dist/tex/latex/bithesis/bitbeamer.cls
@@ -27,7 +27,7 @@
%%
\RequirePackage{expl3,l3keys2e}
\ProvidesExplClass{bitbeamer}
-{2024-05-04}{3.7.7}{BIT Thesis Templates}
+{2024-05-27}{3.7.8}{BIT Thesis Templates}
\keys_define:nn { bitbeamer }
{
titlegraphic .tl_set:N = \l_bit_titlegraphic_tl,
diff --git a/Master/texmf-dist/tex/latex/bithesis/bithesis.cls b/Master/texmf-dist/tex/latex/bithesis/bithesis.cls
index 373034e9c7a..25ed8777c9b 100644
--- a/Master/texmf-dist/tex/latex/bithesis/bithesis.cls
+++ b/Master/texmf-dist/tex/latex/bithesis/bithesis.cls
@@ -27,7 +27,7 @@
%%
\RequirePackage{expl3,l3keys2e}
\ProvidesExplClass{bithesis}
-{2024-05-04}{3.7.7}{BIT Thesis Templates}
+{2024-05-27}{3.7.8}{BIT Thesis Templates}
\int_new:N \g__bithesis_thesis_type_int
\int_new:N \g__bithesis_head_zihao_int
\bool_new:N \g__bithesis_twoside_bool
@@ -480,6 +480,8 @@
% 浮动体相关的各种间距
floatSeparation .tl_set:N = \l__bithesis_misc_float_separation_tl,
floatSeparation .initial:n = {0},
+ algorithmSeparation .tl_set:N = \l__bithesis_misc_algorithm_separation_tl,
+ algorithmSeparation .initial:n = {12pt plus 4pt minus 4pt},
tabularRowSeparation .tl_set:N = \l__bithesis_misc_tabular_row_separation_tl,
tabularRowSeparation .initial:n = {1},
}
@@ -693,6 +695,13 @@
\setlength{\intextsep}{1.80\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip}
% 浮动体位于页面顶部或底部时,调整浮动体与正文之间的距离,后或前加上一行空白
\setlength{\textfloatsep}{1.80\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip}
+ \AtBeginDocument {
+ % longtable 宏包有另外的机制,需专门调整
+ \@ifpackageloaded{longtable}{
+ \setlength{\LTpre}{0.60\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip}
+ \setlength{\LTpost}{1.60\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip}
+ }{}
+ }
}
\ctex_at_end_preamble:n {
\bool_if:NTF \l__bithesis_style_better_new_roman_bool {
@@ -1052,7 +1061,7 @@
\linespread{1.53}\selectfont
\pagestyle{BIThesis}
- % 表格内容默认使用五号字。
+ % 调整表格内容字号(默认五号)和各行之间的距离。
%
% 由于这种方式会影响所有的表格,
% 所以我们尽可能延迟这种影响。
@@ -1060,9 +1069,24 @@
% 不过,在目前的代码实现中没有在封面
% 之类的地方使用表格,所以目前即使放在
% preamble 中也不会有影响。
- \AtBeginEnvironment{tabular}{\zihao{\l__bithesis_misc_tabular_font_size_tl}}
- \AtBeginEnvironment{tabular*}{\zihao{\l__bithesis_misc_tabular_font_size_tl}}
- \AtBeginEnvironment{tabularx}{\zihao{\l__bithesis_misc_tabular_font_size_tl}}
+ %
+ % 支持标准tabular、tabular*环境和宏包tabularx、longtable。
+ %
+ % 为保证各种表格效果一致,要先手动重置setspace宏包漏掉的longtable;
+ \AtBeginEnvironment {longtable} {\singlespacing}
+ % 之后再统一设置。
+ \clist_map_inline:nn
+ {tabular, tabular*, tabularx, longtable}
+ {
+ \AtBeginEnvironment {##1} {
+ % 字号只想设置表格内容,不想影响caption。
+ % 一般caption在环境之外,自然不受影响;
+ % 而longtable的caption虽在环境内,但caption宏包能正常处理。
+ \zihao{\l__bithesis_misc_tabular_font_size_tl}
+ % 各行间距只想影响表格,不想影响矩阵,因此也必须在钩子中设置。
+ \cs_set:Npn \arraystretch {\l__bithesis_misc_tabular_row_separation_tl}
+ }
+ }
}
\RenewDocumentCommand \mainmatter {} {
% 另起一个空页,以便于后续的章节标题编号。
@@ -1115,6 +1139,9 @@
% 至于表格,虽然其caption位置在上方(而图片是在下方),
% 但 `caption` 宏包已考虑这种区别,统一设置 `belowskip` 即可。
\captionsetup{belowskip=-5pt}
+ % 不过 longtable 宏包有另外的机制,不设置 belowskip 时间距已可较小,
+ % 设置成负数还导致 caption 和表格本体的距离变大。因此我们撤销更改。
+ \captionsetup[longtable]{belowskip=0pt}
% 此外在浮动体内部,调整表格 caption 和表格本体间的距离。
% 本来默认有一定空隙,现改为紧贴,这样更接近Word模板实作。
@@ -1173,8 +1200,17 @@
% 调整浮动体与文字之间的距离
\addtolength{\intextsep}{\l__bithesis_misc_float_separation_tl\baselineskip}
\addtolength{\textfloatsep}{\l__bithesis_misc_float_separation_tl\baselineskip}
- % 调整表格各行之间的距离
- \cs_set:Npn \arraystretch {\l__bithesis_misc_tabular_row_separation_tl}
+ % longtable 宏包有另外的机制,需专门调整
+ \@ifpackageloaded{longtable}{
+ \addtolength{\LTpre}{\l__bithesis_misc_float_separation_tl\baselineskip}
+ \addtolength{\LTpost}{\l__bithesis_misc_float_separation_tl\baselineskip}
+ }{}
+ % 调整算法与文字之间的距离
+ % 针对 algorithm2e 宏包
+ \@ifpackageloaded{algorithm2e}{
+ % 宏包手册介绍可自定义宏,再`\SetAlgoSkip`;我们为简洁,直接覆写。
+ \renewcommand{\@algoskip}{\vspace{\l__bithesis_misc_algorithm_separation_tl}}
+ }{}
}
\bool_if:NF \l__bithesis_style_hyphen_bool {
\hbadness=10000
@@ -1338,24 +1374,23 @@
\cleardoublepage
\currentpdfbookmark{书脊}{frontmatter:paperback}
\begin{titlepage}
- \vskip 5cm
- \begin{center}
+ \centering
+ % 实现竖排——将水平宽度设得很窄,让文字自动换行,并改小行距
\linespread{1.1}\selectfont
- \begin{minipage}[t][19.7cm]{2em}
- \begin{center}
- {
- \heiti\zihao{3}
- \tl_if_blank:VTF \l__bithesis_value_vertical_title_tl
- {\l__bithesis_value_title_tl}{\l__bithesis_value_vertical_title_tl}
- }
- \vfill
- {\heiti\zihao{3}\__bithesis_secret_info:nn{\l__bithesis_value_author_tl}{\g__bithesis_const_substitute_symbol_tl\quad\g__bithesis_const_substitute_symbol_tl\quad\g__bithesis_const_substitute_symbol_tl}}
- \vfill
- {\heiti\zihao{3}\c__bithesis_label_university_tl}
- \end{center}
+ \begin{minipage}[c][19.7cm]{2em}
+ \centering
+ {
+ \heiti\zihao{3}
+ \tl_if_blank:VTF \l__bithesis_value_vertical_title_tl
+ {\l__bithesis_value_title_tl}{\l__bithesis_value_vertical_title_tl}
+ }
+ \par
+ \vspace{1em plus 1fill}
+ {\heiti\zihao{3}\__bithesis_secret_info:nn{\l__bithesis_value_author_tl}{\g__bithesis_const_substitute_symbol_tl\quad\g__bithesis_const_substitute_symbol_tl\quad\g__bithesis_const_substitute_symbol_tl}}
+ \par
+ \vspace{1em plus 1fill}
+ {\heiti\zihao{3}\c__bithesis_label_university_tl}
\end{minipage}
- \end{center}
- % \vskip 5cm
\end{titlepage}
}
\cs_new:Npn \__bithesis_make_chinese_title_page: {
@@ -1950,9 +1985,20 @@
}
\NewDocumentCommand \MakePaperBack {}
{
+ % 上下各留出规定的边距,到下一页再恢复。
+ % 若标题超长,自然会向上下溢出。
+ %
+ % 必须在顶层操作,不然影响不确定。
+ % https://tex.stackexchange.com/q/718581
+ %
+ % 单纯`\newgeometry`再`\restoregeometry`相当于仅仅`\clearpage`,也无问题。
+ \newgeometry{
+ vmargin = 5cm,
+ }
\begin{blindPeerReview}[\l__bithesis_cover_hide_cover_in_peer_review_bool]
\make_paper_back:
\end{blindPeerReview}
+ \restoregeometry
}
\NewDocumentCommand \MakeTitle {}
{
diff --git a/Master/texmf-dist/tex/latex/bithesis/bitreport.cls b/Master/texmf-dist/tex/latex/bithesis/bitreport.cls
index fa2a111f205..8e5184dd519 100644
--- a/Master/texmf-dist/tex/latex/bithesis/bitreport.cls
+++ b/Master/texmf-dist/tex/latex/bithesis/bitreport.cls
@@ -27,7 +27,7 @@
%%
\RequirePackage{expl3,l3keys2e}
\ProvidesExplClass{bitreport}
-{2024-05-04}{3.7.7}{BIT Thesis Templates}
+{2024-05-27}{3.7.8}{BIT Thesis Templates}
\int_new:N \g__bithesis_report_type_int
\clist_const:Nn \c__bithesis_report_type_clist
{ common, undergraduate_proposal}