# [OS X TeX] Re: table in math mode

Alan Munn amunn at msu.edu
Wed Jan 7 08:41:12 EST 2009

At 10:16 PM -0800 1/6/09, John B. Thoo wrote:
>On Jan 6, 2009, at 12:00 PM, in macosx-tex-request at email.esm.psu.edu
>Alain Schremmer <schremmer.alain at gmail.com>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.)
>
>I've have good luck with something like this:
>
>\documentclass{article}
>\usepackage{amsmath,amssymb}
>\usepackage{array}
>\begin{document}
>
>\begin{tabular}{|>{$}l<{$}|l|} \hline
>   \int_0^1 f(x) \;dx & a definite integral  \\\hline
>\end{tabular}
>
>\end{document}
>
>have not had any luck with something like this, for example:
>
>\begin{tabular}{|>{$\displaystyle{}l<{}$}|l|} \hline
>   \int_0^1 f(x) \;dx & a definite integral  \\\hline
>\end{tabular}
>
>trying to enclose all input in the first column within
>
>   \displaystyle{...}

That's just ill-formed syntactically.  The following works:

\begin{tabular}{|>{$\displaystyle}l<{$}|l|} \hline
\int_0^1 f(x) \;dx & a definite integral  \\\hline
\end{tabular}

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