[texhax] Longtable width and parbox

Ian Watson i.watson at econ.usyd.edu.au
Thu Aug 25 13:40:48 CEST 2005


Dear listers,

I am using the longtable environment followed by a parbox in order to
get uniformity in the width of my output. I would appreciate any
advice on how I can automate the setting of the width of the parbox.

In particularl, is there anyway to return the table width value which longtable
calculates as it fits a table on the page. I'd like to get my \source
command to make use of this value so that the text at the bottom of
the table automatically matches the table width. At present, I measure
the final table and input this measurement manually.


Code for table:

\begin{longtable}[l]{@{} l  r@{}l    r       r@{}l   r   @{}}
\caption{Wages models: estimation by OLS and fixed effects} \label{tab:pool}  \\
\toprule
& \multicolumn{3}{c}{\textbf{OLS}}
& \multicolumn{3}{c}{\textbf{Fixed Effects}} \\
\textbf{Variables}   & \multicolumn{2}{c}{$\beta$}
& SE & \multicolumn{2}{c}{$\beta$}
& SE \\
\endfirsthead
\midrule
& \multicolumn{3}{l}{\textbf{OLS}}
& \multicolumn{3}{c}{\textbf{Fixed Effects}} \\
\midrule
\addlinespace[0.2cm]
\endhead
\toprule
\input{pool}
\bottomrule
\end{longtable}

\source{13cm}{\emph{Note:} Robust standard errors in brackets.
Significance levels: * p$<0.05$, ** p$<0.01$, *** p$<0.001$. For OLS
estimation uses Stata's survey regression command (standard errors
take account of the design effect). \emph{Population:} Adult female
part-time employees (excluding those on fixed-term contracts).}


Code for source command (in my preamble):

\newcommand{\source}[2]
  {\vspace{0.5ex}
   \footnotesize
   \begin{spacing}{0.9}
   \parbox{#1} {#2}
   \end{spacing}



Any help would be most appreciated.

   
-- 
Kind regards, 
Ian

-------------------------------
Ian Watson
Senior Researcher
acirrt, University of Sydney
NSW, 2006, Australia

phone: 02 9351 5622
email:i.watson at econ.usyd.edu.au
www.acirrt.com
-------------------------------



More information about the texhax mailing list