# [OS X TeX] column width in tables

Morten Høgholm morten.hoegholm at gmail.com
Thu Apr 27 15:37:52 EDT 2006

On Thu, 27 Apr 2006 21:27:48 +0200, Scott Cunningham <scunning at gmail.com>
wrote:

>
> When I use the following code, the first column which reports the names
> of variables ends up being far wider than any other column.  Why is this
> happening?  How do I specify that I want the first column to be as large
> as the longest string in one of the cells in that column, and no wider?
> I will report both the code I'm using, and then following that, some of
> the errors I received when it was compiling.
>
> ****** CODE ********
> \begin{table}[!tbp] \caption{Estimated Effect of Relationship Markets on
> Male's Recent Sex Partners (Robust Standard Errors in Parenthesis)}
> \begin{center}
> \begin{tabular}{ld..} \toprule
> \multicolumn{1}{1}{} &\multicolumn{1}{c}[1]&\multicolumn{1}{c}[2]&

\multicolumn takes three mandatory arguments: #1 is how many columns to
span, #2 is the column specification for this column (often just "c"), and
#3 is the text to be put into it.

Hence the error...

> ! Package array Error:  Illegal pream-token (1): c' used.
>
> See the array package documentation for explanation.
> Type  H <return>  for immediate help.
> ...
>
> l.4 \multicolumn{1}{1}{}
>                           &\multicolumn{1}{c}[1]&\multicolumn{1}{c}[2]
> &\multi...

... makes perfect sense because there are no column specifications by the
name "1".
--
Morten
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/

`