bug in org-mode-export-as-latex
Hello, >>>>> Neil Hepburn writes: > The latest version (7.01g) seems to have a bug when exporting to PDF > (and LaTeX) with tables with labels. The export does not label the > table in the LaTeX file although it is labeled in the .org file. Curiously, it looks like \label code was removed at some time. This quick fix should put labels back. Regards, -- Nicolas >From 64855c52b20766db9898ce82316fac11d51de72d Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou <n.goaziou@gmail.com> Date: Wed, 28 Jul 2010 20:54:40 +0200 Subject: [PATCH] Add labels to tables. * org-latex.el (org-export-latex-tables): add label if any * org-latex.el (org-export-latex-convert-table.el-table): fix little mistake when inserting label
This commit is contained in:
parent
d035222ce5
commit
caa5da1efd
|
@ -1680,9 +1680,10 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
|
||||||
(if floatp (format "\\begin{table}%s\n" placement)))
|
(if floatp (format "\\begin{table}%s\n" placement)))
|
||||||
(if floatp
|
(if floatp
|
||||||
(format
|
(format
|
||||||
"\\caption%s{%s}"
|
"\\caption%s{%s} %s"
|
||||||
(if shortn (concat "[" shortn "]") "")
|
(if shortn (concat "[" shortn "]") "")
|
||||||
(or caption "")))
|
(or caption "")
|
||||||
|
(when label (format "\\label{%s}" label))))
|
||||||
(if (and longtblp caption) "\\\\\n" "\n")
|
(if (and longtblp caption) "\\\\\n" "\n")
|
||||||
(if (and org-export-latex-tables-centered (not longtblp))
|
(if (and org-export-latex-tables-centered (not longtblp))
|
||||||
"\\begin{center}\n")
|
"\\begin{center}\n")
|
||||||
|
@ -1754,7 +1755,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
|
||||||
(setq tbl (concat "\\begin{center}\n" tbl "\\end{center}")))
|
(setq tbl (concat "\\begin{center}\n" tbl "\\end{center}")))
|
||||||
(when floatp
|
(when floatp
|
||||||
(setq tbl (concat "\\begin{table}\n"
|
(setq tbl (concat "\\begin{table}\n"
|
||||||
(format "\\caption%s{%s%s}\n"
|
(format "\\caption%s{%s}%s\n"
|
||||||
(if shortn (format "[%s]" shortn) "")
|
(if shortn (format "[%s]" shortn) "")
|
||||||
(if label (format "\\label{%s}" label) "")
|
(if label (format "\\label{%s}" label) "")
|
||||||
(or caption ""))
|
(or caption ""))
|
||||||
|
|
Loading…
Reference in New Issue