[OS X TeX] Tables in different typeface

Alan Munn amunn at msu.edu
Thu Mar 12 17:53:06 CET 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
-------------- next part --------------
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
List Archive: http://tug.org/pipermail/macostex-archives/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex



More information about the macostex-archives mailing list