[OS X TeX] table in math mode
Alan Munn
amunn at msu.edu
Tue Jan 6 18:56:21 CET 2009
At 12:38 PM -0500 1/6/09, Alain Schremmer wrote:
>Is there a way to have an entire table in math mode?
>
>In other words, is there a way to avoid having to put the content of
>each and every cell in math mode? (Say when all the entries are
>negative.)
>
>There's got to be a way but, so far, I haven't found it.
Use the array package and define a columntype for math:
\documentclass{article}
\usepackage{array}
\usepackage{amsmath}
\begin{document}
\newcolumntype{M}{>{$}c<{$}}
\begin{tabular}{MMM}
\text{Heading} & \text{Heading} & \text{Heading}\\
\alpha & \sigma^{2} & a^{2} + b^{2}\\
\end{tabular}
\end{document}
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 macostex-archives
mailing list