Actually, I do have a followup on this. I usually have a footnote at the end of the table, with the sources of the data etc etc. One of my previous headaches was how to format the note so that it had the same width as the table itself. The way I found was to use a lrbox:
Code: Select all
\documentclass[letterpaper,12pt]{article}
\usepackage[left=5cm]{geometry}
\usepackage{lipsum}
\begin{document}
\newsavebox{\tablebox}
\newlength{\tableboxwidth}
\lipsum[1]
\begin{table}[h]
\caption{Summary statistics}
\begin{lrbox}{\tablebox}
\begin{tabular}{rrrrrrr}
\hline
Variable & N.\ Obs. & Mean & Std.dev. & Treatment & Control & Difference \\ \hline\hline
Outcome 1 & 80 & 8400 & 8577 & 11579 & 7410 & 4169 \\
Outcome 2 & 126 & 6984 & 7183 & 8960 & 6495 & 2465 \\ \hline
\end{tabular}
\end{lrbox}
\usebox{\tablebox}
\settowidth{\tableboxwidth}
{\usebox{\tablebox}}
\parbox{\tableboxwidth}{\textbf{Note:} \lipsum[1]}
\end{table}
\lipsum[1-3]
\end{document}
Now, however, I do not know how to combine this with the makebox command suggested by gmedina in his post on texblog. I tried different combinations (putting everything into a makebox, putting the main body of the table and the notes into two separate makeboxes), but none seems to deliver the right results. Any suggestions?