[OS X TeX] Tables in different typeface

Alan Munn amunn at msu.edu
Thu Mar 12 12:53:06 EDT 2009


At 12:34 PM -0400 3/12/09, Nathan Paxton wrote:
>	Hi all,
>
>	Is there a way to change the default typeface of a table? In 
>my document, I generally set the main text as roman, but I prefer to 
>have the tables in sans-serif. I know I can set each table 
>individually, with a \textsf{} block, but is there a way to redefine 
>things in the preamble or somewhere so that tables set in sans-serif 
>automatically?

Yes, use the array package, and define new column types:

\documentclass{article}
\usepackage{array}
\begin{document}
\newcolumntype{C}{>{\sffamily}c}
\newcolumntype{L}{>{\sffamily}l}
\newcolumntype{R}{>{\sffamily}r}
\newcolumntype{P}{>{\sffamily}p}

\begin{tabular}{CLP{1in}R}
foo & bar & a much longer sentence & foobar \\
\end{tabular}
\end{document}

(You'd have to change your existing tables to reflect this, though.)

Alan

-- 
Alan Munn						amunn at msu.edu
Department of Linguistics
and Germanic, Slavic, Asian and African Languages		Tel. 
	517-355-7491
Michigan State University, East Lansing MI 48824 USA	Fax	517-432-2736



More information about the MacOSX-TeX mailing list