I’ve posted before about problems with line widths when exporting tables from Stata. Here is one trick to solve having an excessively wide addnote at the bottom of the table.

Ensuring you have pre-loaded the booktabs package, add the following line to the header of your LaTeX file:

\newcommand{\tabnotes}[2]{\bottomrule \multicolumn{#1}{@{}p{0.70\linewidth}@{}}{\footnotesize #2 }\end{tabular}\end{table}}

This creates a new command (called tabnotes) that takes two arguments: a number of columns, and text. An example is \tabnotes{3}{Hi there} — this will add a note at the bottom of your table, spread over 3 columns of your table, and it will say “Hi there”. If your table has seven columns, change the first argument to 7 instead of 3. You can obviously change what the text says, too. The important thing is that the text will automatically wrap if it is wider than 70% of the width of your text. You can change to any percent you wish by altering the 0.7\linewidth portion of the code above.

An important fact is that you must include \tabnotes inside esttab’s postfoot() option. For example, your might use:

esttab myresult using tab.tex, booktabs replace postfoot("\tabnotes{3}{Hello there, I hope this helps you.}")

Please note that is all one line, your browser likely splits it over several lines.

//
Scroll to Top