Closed YDX-2147483647 closed 4 months ago
继续 #499 和 #504。
[x] 支持用misc/tabularRowSeparation调节longtable宏包
misc/tabularRowSeparation
longtable
https://github.com/BITNP/BIThesis/issues/501#issuecomment-2130053861
[x] 去除longtable表格上框线和caption的多余间距。
https://github.com/BITNP/BIThesis/issues/501#issuecomment-2132080016
[x] 让longtable与文字的间距与其它浮动体相近,并支持用misc/floatSeparation统一调整
misc/floatSeparation
它似乎不受\textfloatsep等控制。
\textfloatsep
\BITSetup
\BITSetup{ misc/floatSeparation = -1.5, % 仅测试,随意指定的 misc/tabularRowSeparation = 1.25, % 本科表格行高 }
设置
% !TeX program = xelatex % !BIB program = biber \documentclass[type=bachelor]{bithesis} % \BITSetup{ % misc/floatSeparation = -1.5, % misc/tabularRowSeparation = 1.25, % } \usepackage{tabularx} \usepackage{longtable} \usepackage{zhlipsum} \begin{document} \frontmatter \mainmatter \zhlipsum[1][name=zhufu] \begin{table}[ht] \centering \caption{Tabular Lg} % 都含“Lg”两个伸长的字母,控制变量 \begin{tabular}{*{5}{>{\centering\arraybackslash}p{5em}}} \toprule 项目 & 产量 & 销量 & 产值 & 比重 \\ \midrule 手机 & 1000 & 10000 & 500 & 50\% \\ 计算机 & 5500 & 5000 & 220 & 22\% \\ 笔记本电脑 & 1100 & 1000 & 280 & 28\% \\ \midrule 合计 & 17600 & 16000 & 1000 & 100\% \\ \bottomrule \end{tabular} \end{table} \zhlipsum[2-3][name=zhufu] \begin{table}[ht] \centering \caption{Tabular* Lg} \begin{tabular*}{32em}{@{\extracolsep{\fill}}ccccc} \toprule 项目 & 产量 & 销量 & 产值 & 比重 \\ \midrule 手机 & 1000 & 10000 & 500 & 50\% \\ 计算机 & 5500 & 5000 & 220 & 22\% \\ 笔记本电脑 & 1100 & 1000 & 280 & 28\% \\ \midrule 合计 & 17600 & 16000 & 1000 & 100\% \\ \bottomrule \end{tabular*} \end{table} \zhlipsum[4-6][name=zhufu] \begin{table}[ht] \centering \caption{Tabularx Lg} \begin{tabularx}{32em}{*{5}{>{\centering\arraybackslash}X}} \toprule 项目 & 产量 & 销量 & 产值 & 比重 \\ \midrule 手机 & 1000 & 10000 & 500 & 50\% \\ 计算机 & 5500 & 5000 & 220 & 22\% \\ 笔记本电脑 & 1100 & 1000 & 280 & 28\% \\ \midrule 合计 & 17600 & 16000 & 1000 & 100\% \\ \bottomrule \end{tabularx} \end{table} \zhlipsum[7-9][name=zhufu] \begin{longtable}[ht]{ccccc} \caption{Long table Lg} \\ \toprule 项目 & 产量 & 销量 & 产值 & 比重 \\ \midrule \endfirsthead \multicolumn{5}{l}{续表} \\ \toprule 项目 & 产量 & 销量 & 产值 & 比重 \\ \midrule \endhead \midrule \multicolumn{5}{r}{{续下页}} \\ \endfoot \bottomrule \endlastfoot 手机 & 1000 & 10000 & 500 & 50\% \\ 计算机 & 5500 & 5000 & 220 & 22\% \\ 笔记本电脑 & 1100 & 1000 & 280 & 28\% \\ \midrule 合计 & 17600 & 16000 & 1000 & 100\% \\ \end{longtable} \zhlipsum[10-13][name=zhufu] \end{document}
牛!
继续 #499 和 #504。
[x] 支持用
misc/tabularRowSeparation
调节longtable
宏包https://github.com/BITNP/BIThesis/issues/501#issuecomment-2130053861
[x] 去除longtable表格上框线和caption的多余间距。
https://github.com/BITNP/BIThesis/issues/501#issuecomment-2132080016
[x] 让longtable与文字的间距与其它浮动体相近,并支持用
misc/floatSeparation
统一调整它似乎不受
\textfloatsep
等控制。对比
旧(左)新(右)对比:
新版
新版 +
\BITSetup
设置
测试用例