Skip to content

Commit

Permalink
feat: 支持用misc/tabularRowSeparation调节longtable宏包
Browse files Browse the repository at this point in the history
  • Loading branch information
YDX-2147483647 committed May 25, 2024
1 parent 9b315ee commit 6e76ebc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bithesis-doc.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ \subsubsection{其他配置}

\end{function}

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

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

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

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

Expand Down
9 changes: 5 additions & 4 deletions bithesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -1495,6 +1495,10 @@
% preamble 中也不会有影响。
%
% 支持标准tabular、tabular*环境和宏包tabularx、longtable。
%
% 为保证各种表格效果一致,要先手动重置setspace宏包漏掉的longtable;
\AtBeginEnvironment {longtable} {\singlespacing}
% 之后再统一设置。
\clist_map_inline:nn
{tabular, tabular*, tabularx, longtable}
{
Expand All @@ -1504,10 +1508,7 @@
% 而longtable的caption虽在环境内,但caption宏包能正常处理。
\zihao{\l_@@_misc_tabular_font_size_tl}
% 各行间距只想影响表格,不想影响矩阵,因此也必须在钩子中设置。
% 另外,longtable宏包已经调节了空隙,我们就不重复调节了。
\str_if_eq:nnF {##1} {longtable} {
\cs_set:Npn \arraystretch {\l_@@_misc_tabular_row_separation_tl}
}
\cs_set:Npn \arraystretch {\l_@@_misc_tabular_row_separation_tl}
}
}
}
Expand Down

0 comments on commit 6e76ebc

Please sign in to comment.