[OS X TeX] column width in tables

Scott Cunningham scunning at gmail.com
Thu Apr 27 15:48:39 EDT 2006


Dear Morten,

Thank you for pointing that out, as that typo had crept in without my  
knowledge.  I still have, after correcting the errors you noted, the  
original problem that my first column is far too wide.  I want the  
first column to be as large as the string in the cell in that column,  
and no larger.  Is there a mistake in \multicolumn, similar to what  
you noted, that could be causing an excessively wide first column  
somehow?

sc
On Apr 27, 2006, at 3:37 PM, Morten Høgholm wrote:

> 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/
>

------------------------- 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/




More information about the MacOSX-TeX mailing list