Sunday, January 09, 2011

Booktabs with longtable

I finally figured out how to use "booktabs" with "longtable". The "esttab" can be used to produce preliminary output, but the output needs to be manually tuned to get the desired look. Here are come tips., and here is a helpful example. Below is the preamble:


{
\begin{center}
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\begin{longtable}{l*{4}{c}}
\caption{Something}\\
\toprule
                    &\multicolumn{1}{c}{Model 1}    &\multicolumn{1}{c}{Model 2}    &\multicolumn{1}{c}{Model 3}    &\multicolumn{1}{c}{Model 4}    \\
\endfirsthead
\caption[]{(Continued)} \\
                \toprule
                    &\multicolumn{1}{c}{Model 1}    &\multicolumn{1}{c}{Model 2}    &\multicolumn{1}{c}{Model 3}    &\multicolumn{1}{c}{Model 4}    \\
                \midrule
\endhead
                \midrule \multicolumn{5}{r}{\emph{Continued on next page}}
\endfoot
\endlastfoot
\midrule
...
\end{center}
\end{longtable}
}


No comments:

Counter