Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

latex

I have a LaTeX table and would like the third column to be a different font size (smaller) than the others. 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?

like image 821
vy32 Avatar asked Feb 16 '10 01:02

vy32


1 Answers

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.

like image 73
Ramashalanka Avatar answered Nov 03 '22 23:11

Ramashalanka