开发者

How do I change the font size of a table column?

开发者 https://www.devze.com 2022-12-20 01:47 出处:网络
I have a LaTeX table and would like the third column to be a different font size (smaller) than the othe开发者_如何学Gors. I\'ve always done this with a special-purpose macro that takes a parameter fo

I have a LaTeX table and would like the third column to be a different font size (smaller) than the othe开发者_如何学Gors. I've always done this with a special-purpose macro that takes a parameter for each column and executes a font change for one of the columns. Is there an easier way to do this?


Use the package array and specify the font just after the \begin{tabular}, e.g.:

\usepackage{array}
...
\begin{tabular}{|>{\small}c|>{\Huge}c}
a & b \\
c & d 
\end{tabular}

this makes the first column font small and the second Huge. >{decl} is used before l, r, c, p, m, or b and inserts decl directly in from of each entry of the column.

You can find further details of this package (e.g. the >{decl} to put decl after each entry) here.

0

精彩评论

暂无评论...
验证码 换一张
取 消