I'm producing a document using org-mode
which has quite a few tables in it, constructed using the built in table functionality. I've added captions to the tables, but when I export them to LaTeX
, rather than the caption appearing below the table, it appears above it. In the manual section on tables and the latex export documentation, there is no mention of any method of changing this, other than fiddling with the LaTeX
code manually. As an illustration, the following code snippets show what is generated by the export on an example table with a caption.
#+CAPTION: Results using two methods with different parameter settings.
#+LABEL: tbl:rescomp
| Parameter | Result 1 | Result 2 |
|-----------+----------+----------|
| 0.5 | 0.1 | 0.8 |
| 1 | 0.8 | 0.1 |
Exported:
\begin{table}[htb]
\caption{Results using two methods with different parameter settings.}
\label{tbl:rescomp}
\begin{center}
\begin{tabular}{rrr}
Parameter & Result 1 & Result 2 \\
\hline
0.5 & 0.1 & 0.8 \\
1 & 0.8 & 0.1 \\
\end{tabular}
\end{center}
\end{table}
The problem could be fixed very simply. The caption appears above the table in the document because it is above the table in the code. Moving the caption definition below the tabular section fixes the issue:
\begin{table}[htb]
\begin{center}
\begin{tabular}{rrr}
Parameter & Result 1 & Result 2 \\
\hline
0.5 & 0.1 & 0.8 \\
1 & 0.8 & 0.1 \\
\end{tabular}
\end{center}
\caption{Results using two methods with different parameter settings.}
\label{tbl:rescomp}
\end{table}
Placing the caption definition below the table in the org file is not possible, as it defines the caption for the next table, as described in the manual. Is there any way that I can get org-mode
to export the caption below the table produced?