[OS X TeX] column width in tables

Scott Cunningham scunning at gmail.com
Thu Apr 27 21:27:48 CEST 2006


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{1}{c}[3]&\multicolumn{1}{c}[4]&\multicolumn{1}{c}{\textbf 
{[5]}}\\
\toprule
SexRatio$^{-1}$&         .018&         .021&         .037&         . 
071&         .062\\
         &       (.011)&       (.011)&       (.018)&       (.027) 
&       (.026)\\
Age     &        3.979&        3.182&        3.215&         
3.698&         .991\\
         &       (.829)&       (.885)&       (.925)&      (1.008) 
&      (1.204)\\
Age$^2  &       --.101&       --.074&       --.076&       --. 
091&       --.036\\
         &       (.024)&       (.025)&       (.025)&       (.028) 
&       (.032)\\
Edu     &       --.153&       --.067&       --.026&       --. 
028&         .378\\
         &       (.138)&       (.146)&       (.165)&       (.170) 
&       (.264)\\
Parents Married&       --.812&       --.902&       --.957&       --. 
983&       --.668\\
         &       (.316)&       (.358)&       (.387)&       (.393) 
&       (.727)\\
\hline
R$^2$   &         .017&             &             &              
&         .091\\
N. of individuals&     2277.000&     2277.000&     2277.000&      
2277.000&     2277.000\\
\midrule
\midrule
$SexRatio$^{-1}$&         .000&       --.000&       --.004&       --. 
016&       --.015\\
         &       (.010)&       (.010)&       (.013)&       (.020) 
&       (.021)\\
Age     &        2.358&        2.115&        2.078&         
1.924&         .621\\
         &       (.406)&       (.422)&       (.434)&       (.432) 
&       (.551)\\
Age$^2  &       --.055&       --.047&       --.047&       --. 
042&       --.014\\
         &       (.011)&       (.011)&       (.012)&       (.012) 
&       (.013)\\
Edu     &       --.299&       --.242&       --.229&       --. 
224&         .102\\
         &       (.083)&       (.090)&       (.096)&       (.097) 
&       (.132)\\
Parents Married&       --.711&       --.648&       --.644&       --. 
645&         .213\\
         &       (.131)&       (.149)&       (.149)&       (.149) 
&       (.348)\\
\hline
R$^2$   &         .032&             &             &              
&         .046\\
N. of individuals&     5499.000&     5499.000&     5499.000&      
5499.000&     5499.000\\
\bottomrule
\small\textit{Source: } NLSY97 and 2000 Census Longform Survey
\end{tabular}
\end{center}
\end{table}

**********************

****** ERROR MESSAGE *******

LaTeX Warning: Float too large for page by 53.26924pt on input line 342.

(./OLS.tex

! 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...

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.4 ...multicolumn{1}{c}[2]&\multicolumn{1}{c}[3]&
                                                   \multicolumn{1}{c} 
[4]&\mul...

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.6 ...&         .018&         .021&         .037&
                                                            . 
071&         .062\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.7 ...&       (.011)&       (.011)&       (.018)&
                                                          (.027) 
&       (.026)\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.8 ...&        3.979&        3.182&        3.215&
                                                            
3.698&         .991\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.9 ...&       (.829)&       (.885)&       (.925)&
                                                         (1.008) 
&      (1.204)\\

?
! Missing $ inserted.
<inserted text>
                 $
l.10 Age$^2  &
                      --.101&       --.074&       --.076&       --. 
091&      ...

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.10 ...       --.101&       --.074&       --.076&
                                                          --. 
091&       --.036\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.11 ...       (.024)&       (.025)&       (.025)&
                                                          (.028) 
&       (.032)\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.12 ...       --.153&       --.067&       --.026&
                                                          --. 
028&         .378\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.13 ...       (.138)&       (.146)&       (.165)&
                                                          (.170) 
&       (.264)\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.14 ...       --.812&       --.902&       --.957&
                                                          --. 
983&       --.668\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.15 ...       (.316)&       (.358)&       (.387)&
                                                          (.393) 
&       (.727)\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.17 ...         .017&             &             &
                                                                 
&         .091\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.18 ...     2277.000&     2277.000&     2277.000&
                                                        2277.000&      
2277.000\\

?
! Missing $ inserted.
<inserted text>
                 $
l.21 $SexRatio$^
                 {-1}$&         .000&       --.000&       --. 
004&       --.01...

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.21 ...         .000&       --.000&       --.004&
                                                          --. 
016&       --.015\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.22 ...       (.010)&       (.010)&       (.013)&
                                                          (.020) 
&       (.021)\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.23 ...        2.358&        2.115&        2.078&
                                                            
1.924&         .621\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.24 ...       (.406)&       (.422)&       (.434)&
                                                          (.432) 
&       (.551)\\

?
! Missing $ inserted.
<inserted text>
                 $
l.25 Age$^2  &
                      --.055&       --.047&       --.047&       --. 
042&      ...

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.25 ...       --.055&       --.047&       --.047&
                                                          --. 
042&       --.014\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.26 ...       (.011)&       (.011)&       (.012)&
                                                          (.012) 
&       (.013)\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.27 ...       --.299&       --.242&       --.229&
                                                          --. 
224&         .102\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.28 ...       (.083)&       (.090)&       (.096)&
                                                          (.097) 
&       (.132)\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.29 ...       --.711&       --.648&       --.644&
                                                          --. 
645&         .213\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.30 ...       (.131)&       (.149)&       (.149)&
                                                          (.149) 
&       (.348)\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.32 ...         .032&             &             &
                                                                 
&         .046\\

?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.33 ...     5499.000&     5499.000&     5499.000&
                                                        5499.000&      
5499.000\\

?
*********************
------------------------- 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 macostex-archives mailing list