Skip to content

Commit 9e58b8b

Browse files
committed
fix: set zihao to 5 in tabular by default.
1 parent 234de53 commit 9e58b8b

File tree

5 files changed

+106
-2
lines changed

5 files changed

+106
-2
lines changed

bithesis.dtx

+50-2
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,40 @@
11631163
% (Windows 和 MacOS 自带,Linux 需要用户自行安装)
11641164
% \end{function}
11651165
%
1166+
% \begin{function}[added=2023-04-22]{misc/tabularFontSize}
1167+
% \begin{bitsyntax}[emph={[1]tabularFontSize}]
1168+
% tabularFontSize = (*(\marg{5})|其他字号*)
1169+
% \end{bitsyntax}
1170+
%
1171+
% \textit{此选项一般不需要用户自行修改。}
1172+
%
1173+
% 此选项用于调整表格中的字号。默认值为 5 号字。
1174+
%
1175+
% 如果你需要临时调整表格中的字号,可以使用 |\BITSetup| 命令
1176+
% 在局部范围内覆盖此选项(注意使用大括号)。
1177+
%
1178+
% \begin{latex}
1179+
% {
1180+
% \BITSetup{ misc / tabularFontSize = -4}
1181+
%
1182+
% \begin{table}[hbt]
1183+
% \centering
1184+
% \caption{水系聚氨酯分类} \label{tab:category}
1185+
% \begin{tabular*}{0.9\textwidth}{@{\extracolsep{\fill}}cccc}
1186+
% \toprule
1187+
% 类别 &水溶型 &胶体分散型 &乳液型 \\
1188+
% \midrule
1189+
% 状态 &溶解$\sim$胶束 &分散 &白浊 \\
1190+
% 外观 &水溶型 &胶体分散型 &乳液型 \\
1191+
% 粒径$/\mu m$ &$<0.001$ &$0.001-0.1$ &$>0.1$ \\
1192+
% 重均分子量 &$1000\sim 10000$ &数千$\sim 20$万 &$>5000$ \\
1193+
% \bottomrule
1194+
% \end{tabular*}
1195+
% \end{table}
1196+
% }
1197+
% \end{latex}
1198+
% \end{function}
1199+
%
11661200
% \section{正文编写}
11671201
%
11681202
% 请注意,请在\env{document} 之内使用以下命令 。
@@ -2358,6 +2392,9 @@
23582392
% \begin{macrocode}
23592393
\keys_define:nn { bithesis / misc }
23602394
{
2395+
% 表格字体大小,默认为 5 号字体。
2396+
tabularFontSize .tl_set:N = \l_@@_misc_tabular_font_size_tl,
2397+
tabularFontSize .initial:n = {5},
23612398
arialFont .tl_set:N = \l_@@_misc_arial_font_path_tl,
23622399
}
23632400

@@ -2981,6 +3018,17 @@
29813018
}
29823019
\setstretch{1.53}
29833020
\pagestyle{BIThesis}
3021+
3022+
% 表格内容默认使用五号字。
3023+
%
3024+
% 由于这种方式会影响所有的表格,
3025+
% 所以我们尽可能延迟这种影响。
3026+
%
3027+
% 不过,在目前的代码实现中没有在封面
3028+
% 之类的地方使用表格,所以目前即使放在
3029+
% preamble 中也不会有影响。
3030+
\AtBeginEnvironment{tabular}{\zihao{\l_@@_misc_tabular_font_size_tl}}
3031+
\AtBeginEnvironment{tabular*}{\zihao{\l_@@_misc_tabular_font_size_tl}}
29843032
}
29853033
% \end{macrocode}
29863034
% \end{macro}
@@ -3065,11 +3113,11 @@
30653113
% \begin{macro}{\thefigure,\thetable,\theequation,\thelstlisting,\lstlistingname}
30663114
% 定义各种计数器的格式。
30673115
% \begin{macrocode}
3068-
% figure
3116+
% 图片:五号字。
30693117
\cs_set:Npn \thefigure {\thechapter\g_@@_label_divide_char_tl\arabic{figure}}
30703118
\captionsetup[figure]{font=small,labelsep=space}
30713119

3072-
% table
3120+
% 表格:五号字。
30733121
\cs_set:Npn \thetable {\thechapter\g_@@_label_divide_char_tl\arabic{table}}
30743122
\captionsetup[table]{font=small,labelsep=space}
30753123

templates/graduate-thesis/bithesis.cls

+14
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,9 @@
365365
}
366366
\keys_define:nn { bithesis / misc }
367367
{
368+
% 表格字体大小,默认为 5 号字体。
369+
tabularFontSize .tl_set:N = \l__bithesis_misc_tabular_font_size_tl,
370+
tabularFontSize .initial:n = {5},
368371
arialFont .tl_set:N = \l__bithesis_misc_arial_font_path_tl,
369372
}
370373

@@ -820,6 +823,17 @@
820823
}
821824
\setstretch{1.53}
822825
\pagestyle{BIThesis}
826+
827+
% 表格内容默认使用五号字。
828+
%
829+
% 由于这种方式会影响所有的表格,
830+
% 所以我们尽可能延迟这种影响。
831+
%
832+
% 不过,在目前的代码实现中没有在封面
833+
% 之类的地方使用表格,所以目前即使放在
834+
% preamble 中也不会有影响。
835+
\AtBeginEnvironment{tabular}{\zihao{\l__bithesis_misc_tabular_font_size_tl}}
836+
\AtBeginEnvironment{tabular*}{\zihao{\l__bithesis_misc_tabular_font_size_tl}}
823837
}
824838
\RenewDocumentCommand \mainmatter {} {
825839
% 另起一个空页,以便于后续的章节标题编号。

templates/paper-translation/bithesis.cls

+14
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,9 @@
365365
}
366366
\keys_define:nn { bithesis / misc }
367367
{
368+
% 表格字体大小,默认为 5 号字体。
369+
tabularFontSize .tl_set:N = \l__bithesis_misc_tabular_font_size_tl,
370+
tabularFontSize .initial:n = {5},
368371
arialFont .tl_set:N = \l__bithesis_misc_arial_font_path_tl,
369372
}
370373

@@ -820,6 +823,17 @@
820823
}
821824
\setstretch{1.53}
822825
\pagestyle{BIThesis}
826+
827+
% 表格内容默认使用五号字。
828+
%
829+
% 由于这种方式会影响所有的表格,
830+
% 所以我们尽可能延迟这种影响。
831+
%
832+
% 不过,在目前的代码实现中没有在封面
833+
% 之类的地方使用表格,所以目前即使放在
834+
% preamble 中也不会有影响。
835+
\AtBeginEnvironment{tabular}{\zihao{\l__bithesis_misc_tabular_font_size_tl}}
836+
\AtBeginEnvironment{tabular*}{\zihao{\l__bithesis_misc_tabular_font_size_tl}}
823837
}
824838
\RenewDocumentCommand \mainmatter {} {
825839
% 另起一个空页,以便于后续的章节标题编号。

templates/undergraduate-thesis-en/bithesis.cls

+14
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,9 @@
365365
}
366366
\keys_define:nn { bithesis / misc }
367367
{
368+
% 表格字体大小,默认为 5 号字体。
369+
tabularFontSize .tl_set:N = \l__bithesis_misc_tabular_font_size_tl,
370+
tabularFontSize .initial:n = {5},
368371
arialFont .tl_set:N = \l__bithesis_misc_arial_font_path_tl,
369372
}
370373

@@ -820,6 +823,17 @@
820823
}
821824
\setstretch{1.53}
822825
\pagestyle{BIThesis}
826+
827+
% 表格内容默认使用五号字。
828+
%
829+
% 由于这种方式会影响所有的表格,
830+
% 所以我们尽可能延迟这种影响。
831+
%
832+
% 不过,在目前的代码实现中没有在封面
833+
% 之类的地方使用表格,所以目前即使放在
834+
% preamble 中也不会有影响。
835+
\AtBeginEnvironment{tabular}{\zihao{\l__bithesis_misc_tabular_font_size_tl}}
836+
\AtBeginEnvironment{tabular*}{\zihao{\l__bithesis_misc_tabular_font_size_tl}}
823837
}
824838
\RenewDocumentCommand \mainmatter {} {
825839
% 另起一个空页,以便于后续的章节标题编号。

templates/undergraduate-thesis/bithesis.cls

+14
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,9 @@
365365
}
366366
\keys_define:nn { bithesis / misc }
367367
{
368+
% 表格字体大小,默认为 5 号字体。
369+
tabularFontSize .tl_set:N = \l__bithesis_misc_tabular_font_size_tl,
370+
tabularFontSize .initial:n = {5},
368371
arialFont .tl_set:N = \l__bithesis_misc_arial_font_path_tl,
369372
}
370373

@@ -820,6 +823,17 @@
820823
}
821824
\setstretch{1.53}
822825
\pagestyle{BIThesis}
826+
827+
% 表格内容默认使用五号字。
828+
%
829+
% 由于这种方式会影响所有的表格,
830+
% 所以我们尽可能延迟这种影响。
831+
%
832+
% 不过,在目前的代码实现中没有在封面
833+
% 之类的地方使用表格,所以目前即使放在
834+
% preamble 中也不会有影响。
835+
\AtBeginEnvironment{tabular}{\zihao{\l__bithesis_misc_tabular_font_size_tl}}
836+
\AtBeginEnvironment{tabular*}{\zihao{\l__bithesis_misc_tabular_font_size_tl}}
823837
}
824838
\RenewDocumentCommand \mainmatter {} {
825839
% 另起一个空页,以便于后续的章节标题编号。

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy