[英]Make org-mode table caption appear below table when exported to LaTeX
我正在使用org-mode
生成一個文檔,其中包含很多表,使用內置表功能構建。 我已經為表格添加了標題,但是當我將它們導出到LaTeX
,而不是表格下方出現的標題,它出現在它上面。 在表格和乳膠出口文檔的手冊部分中 ,除了手動擺弄LaTeX
代碼之外,沒有提及任何更改此方法的方法。 作為示例,以下代碼片段顯示了帶有標題的示例表上的導出生成的內容。
#+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 |
出口:
\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}
問題可以很簡單地解決。 標題出現在文檔中的表格上方,因為它位於代碼中的表格之上。 將標題定義移動到表格部分下方可以解決問題:
\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}
將標題定義放在組織文件中的表下面是不可能的,因為它定義了下一個表的標題,如手冊中所述。 有沒有辦法讓org-mode
導出產生的表格下方的標題?
只是更新Org-mode version 8.3.2
的答案,因為將org-export-latex-table-caption-above
為nil
現在什么都不做。
我在.emacs
或init.el
文件中添加了下一行:
(setq org-latex-caption-above nil)
正如旁注所示,該變量默認包含值(table)
,這是我們將覆蓋為nil
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.