# include notes in table environment below tabular when exporting from org-mode [duplicate]

Is there a way to put notes below a table in org-mode that are exported into the table environment but are not part of tabular when exporting to LaTeX?

E.g., I export a lot of regression tables and need to export some table explanations below the table body. If those are not included in between \begin{table} ... \end{table} they are not part of the float environment and end up somewhere in the text, not below the table.

#+NAME: tab:direct_xtivreg_de
#+CAPTION: Contribution explained by lagged received punishment (Panel *unclustered Std.Err.*)
|                   | (1)       | (2)             | (3)       |
| VARIABLES         | contrib   | L.realPunRecSum | contrib   |
|-------------------+-----------+-----------------+-----------|
| L.realPunRecSum   | -0.216*** |                 | -1.150*** |
|                   | (0.0433)  |                 | (0.0894)  |
| L.predPunRecSum31 |           | 1.084***        |           |
|                   |           | (0.0395)        |           |
| Constant          | 12.46***  | 0.414***        |           |
|                   | (0.115)   | (0.0592)        |           |
|-------------------+-----------+-----------------+-----------|
| Observations      | 2,016     | 2,016           | 2,016     |
| R-squared         | 0.014     | 0.296           | -0.242    |
| Number of subj.   | 224       | 224             | 224       |
| F test model      |           |                 | 165.3     |
|-------------------+-----------+-----------------+-----------|
\parbox{.8\textwidth}{\footnotesize Standard errors in parentheses, *** p<0.01, ** p<0.05, * p<0.1}


Update: I added a code example. I would like the parboxpart to be within the table environment as well.

## marked as duplicate by Drew, erikstokes, Community♦Aug 11 '16 at 9:01

• orgmode.org/manual/LaTeX-specific-attributes.html You definitely can add a caption, but I'm not sure about the placement (I only tried to add one above the table). – wvxvw Jan 18 '16 at 15:44
• @wvxvw There is an option org-latex-table-caption-above. – Tobias Jan 18 '16 at 18:39
• @Tobias: Now the option is org-latex-caption-above. – Nikana Reklawyks Mar 14 '18 at 14:31

You can use the LaTeX attribute :caption. There you can give raw LaTeX code (including the \caption{...} macro).

To get this below the table set the option org-latex-table-caption-above to nil. You can do that by the following steps:

1. exporting any org file to latex (this ensures that the package ox-latex is loaded)
2. M-x customize-option org-latex-table-caption-above
3. Set the option to Off
4. Apply this option or even save it for later use.

#+NAME: tab:direct_xtivreg_de
#+ATTR_LATEX: :caption \\\parbox{.8\textwidth}{\footnotesize Standard errors in parentheses, *** p<0.01, ** p<0.05, * p<0.1} \caption{Contribution explained by lagged received punishment (Panel *unclustered Std.Err.*)}
|                   | (1)       | (2)             | (3)       |
| VARIABLES         | contrib   | L.realPunRecSum | contrib   |
|-------------------+-----------+-----------------+-----------|
| L.realPunRecSum   | -0.216*** |                 | -1.150*** |
|                   | (0.0433)  |                 | (0.0894)  |
| L.predPunRecSum31 |           | 1.084***        |           |
|                   |           | (0.0395)        |           |
| Constant          | 12.46***  | 0.414***        |           |
|                   | (0.115)   | (0.0592)        |           |
|-------------------+-----------+-----------------+-----------|
| Observations      | 2,016     | 2,016           | 2,016     |
| R-squared         | 0.014     | 0.296           | -0.242    |
| Number of subj.   | 224       | 224             | 224       |
| F test model      |           |                 | 165.3     |
|-------------------+-----------+-----------------+-----------|


It works with Emacs 24.5.1 (Org mode 8.2.10) and also with Emacs 24.5.1 (Org mode 8.2.10).

The generated LaTeX-text is:

\begin{table}[htb]
\centering
\begin{tabular}{llll}
& (1) & (2) & (3)\\
VARIABLES & contrib & L.realPunRecSum & contrib\\
\hline
L.realPunRecSum & -0.216*** &  & -1.150***\\
& (0.0433) &  & (0.0894)\\
L.predPunRecSum31 &  & 1.084*** & \\
&  & (0.0395) & \\
Constant & 12.46*** & 0.414*** & \\
& (0.115) & (0.0592) & \\
\hline
Observations & 2,016 & 2,016 & 2,016\\
R-squared & 0.014 & 0.296 & -0.242\\
Number of subj. & 224 & 224 & 224\\
F test model &  &  & 165.3\\
\hline
\end{tabular}\\\parbox{.8\textwidth}{\footnotesize Standard errors in parentheses, *** p<0.01, ** p<0.05, * p<0.1} \caption{Contribution explained by lagged received punishment (Panel *unclustered Std.Err.*)}

\end{table}


The produced pdf displays as follows:

• Going to check that. – cataclysmic Jan 19 '16 at 12:56
• No doesn't work. – cataclysmic Jan 20 '16 at 6:34
• @cataclysmic What goes wrong? Did you set org-latex-table-caption-above to nil? Did you inspect the generated LaTeX-code? Please, be more elaborate. – Tobias Jan 20 '16 at 7:55
• Sorry, my reply was very unprofessional. Got it working thanx to your help. Had to update Org-Mode (now 20160118). But the #+ATTR_LATEX: options overrules all the others. Have to place the label there as well, as #+NAME: does not get exported anymore. Maybe I'll post it as a feature request to org-mode. Something like #+FLOAT_NOTES:  would be great. I still would like the table title above and the notes below. Thank you. – cataclysmic Jan 20 '16 at 9:17