summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2010-08-11 01:48:52 +0000
committerCarsten Dominik <carsten.dominik@gmail.com>2010-08-11 09:50:04 +0200
commitda656ba48d75ebe9eeb9dd28faa1c900357b8700 (patch)
treeab6fa8d9667b23182dd1c9014ec5b8d9d7005abc
parent6a5d28bce7d65859eb5485bf3e9ab83c09c4eab9 (diff)
downloadorg-mode-da656ba48d75ebe9eeb9dd28faa1c900357b8700.tar.gz
Table caption produces trailing "nil" in pdf export
Hello, >>>>> John Hendy writes: > Suddenly I'm getting a line with nothing but "nil" between the caption and > the table when exporting from org-mode to LaTeX. I swear this not happening. > I believe I did a git pull on Friday or some time last week. The only reason > I noticed is that I just set up emacs, org, and LaTeX on a new computer and > tested an old file to make sure the export was working. I then checked my > other computer with what I thought was a fine install and it's doing it now, > too. I originally thought I missed something on the new computer, but now > I'm wondering if it's from the fresh pull. This patch (needed by my own mistake) should correct the problem. Regards, -- Nicolas >From 38a3ae8cf8716af0db87a47a421b6d5af654d045 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou <n.goaziou@gmail.com> Date: Tue, 10 Aug 2010 22:43:35 +0200 Subject: [PATCH] Fix empty label bug * org-latex.el (org-export-latex-tables): Return "" instead of nil when no label is attached.
-rw-r--r--lisp/org-latex.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index 056f1b3..b0ba939 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -1683,7 +1683,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
"\\caption%s{%s} %s"
(if shortn (concat "[" shortn "]") "")
(or caption "")
- (when label (format "\\label{%s}" label))))
+ (if label (format "\\label{%s}" label) "")))
(if (and longtblp caption) "\\\\\n" "\n")
(if (and org-export-latex-tables-centered (not longtblp))
"\\begin{center}\n")