\usepackage{array}
\newcolumntype{b}{>{\global\let\currentrowstyle\relax}}
\newcolumntype{t}{>{\currentrowstyle}}
\newcommand{\rowstyle}[1]{%
\gdef\currentrowstyle{#1}%
#1\ignorespaces
}
%具体使用
\begin{tabular}{|bc|tc|tc|}
\hline
\rowstyle{\bfseries}
A & B & C\\
simple & ... & ...\\
\end{tabular}
通过修饰各个具体表列,达到修饰整个row的目的。
主要是为了减少依赖和代码。
本文介绍了一种简化LaTeX表格样式的方法,通过定义新的列类型和命令,可以轻松地为表格行应用统一的样式,如加粗文字等,从而提高文档排版效率。
3404

被折叠的 条评论
为什么被折叠?



