Skip to content

Commit ecf5af8

Browse files
feat: 支持用misc/tabularRowSeparation调节longtable宏包
Relates-to: #501
1 parent 9ac93e5 commit ecf5af8

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

bithesis-doc.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ \subsubsection{其他配置}
13511351

13521352
\end{function}
13531353

1354-
\begin{function}[added=2024-04-30, updated=2024-05-13]{misc/tabularRowSeparation}
1354+
\begin{function}[added=2024-04-30, updated=2024-05-25]{misc/tabularRowSeparation}
13551355
\begin{bitsyntax}[emph={[1]tabularRowSeparation}]
13561356
tabularRowSeparation = (*(1)|\marg{正实数}*)
13571357
\end{bitsyntax}
@@ -1362,7 +1362,7 @@ \subsubsection{其他配置}
13621362

13631363
学校没有明文规定,不过设为1.25更接近本科Word模板实作,设为1.6更接近硕博Word模板实作。
13641364

1365-
此选项影响的“表格”具体包括标准 |tabular|、|tabular*| 环境,以及 |tabularx| 宏包提供的环境。并不影响 |longtable| 宏包提供的环境,因为宏包已经调节了
1365+
此选项影响的“表格”具体包括标准 |tabular|、|tabular*| 环境,以及 |tabularx| |longtable| 宏包提供的环境。
13661366

13671367
\textit{请在导言区使用此选项。}
13681368

bithesis.dtx

+5-4
Original file line numberDiff line numberDiff line change
@@ -1495,6 +1495,10 @@
14951495
% preamble 中也不会有影响。
14961496
%
14971497
% 支持标准tabular、tabular*环境和宏包tabularx、longtable。
1498+
%
1499+
% 为保证各种表格效果一致,要先手动重置setspace宏包漏掉的longtable;
1500+
\AtBeginEnvironment {longtable} {\singlespacing}
1501+
% 之后再统一设置。
14981502
\clist_map_inline:nn
14991503
{tabular, tabular*, tabularx, longtable}
15001504
{
@@ -1504,10 +1508,7 @@
15041508
% 而longtable的caption虽在环境内,但caption宏包能正常处理。
15051509
\zihao{\l_@@_misc_tabular_font_size_tl}
15061510
% 各行间距只想影响表格,不想影响矩阵,因此也必须在钩子中设置。
1507-
% 另外,longtable宏包已经调节了空隙,我们就不重复调节了。
1508-
\str_if_eq:nnF {##1} {longtable} {
1509-
\cs_set:Npn \arraystretch {\l_@@_misc_tabular_row_separation_tl}
1510-
}
1511+
\cs_set:Npn \arraystretch {\l_@@_misc_tabular_row_separation_tl}
15111512
}
15121513
}
15131514
}

0 commit comments

Comments
 (0)