diff options
author | Rasmus <rasmus@gmx.us> | 2016-05-25 19:48:51 +0200 |
---|---|---|
committer | Rasmus <rasmus@gmx.us> | 2016-05-25 19:48:51 +0200 |
commit | 9dbeaa278d3581d03dba177eb79a3ad43b600fa5 (patch) | |
tree | 1ef11d68fe4b1edfe107705d4866152db8d2a088 | |
parent | 888ebfdeaf373012c7e7975aa05ef95f1892dd57 (diff) | |
download | org-mode-9dbeaa278d3581d03dba177eb79a3ad43b600fa5.tar.gz |
ox-latex: Fix bug introduced in 888ebfdeaf373012c7
* lisp/ox-latex.el (org-latex-footnote-reference): Handle anonymous
footnotes.
Reported-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/107381>
-rw-r--r-- | lisp/ox-latex.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 2c1163b..4a08e9f 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1841,13 +1841,14 @@ CONTENTS is nil. INFO is a plist holding contextual information." (format "\\footnote{%s%s}" (org-trim (org-export-data def info)) ;; Only insert a \label if there exist another ;; reference to def. - (or (org-element-map (plist-get info :parse-tree) 'footnote-reference - (lambda (f) - (and (not (eq f footnote-reference)) - (equal (org-element-property :label f) label) - (org-trim (org-latex--label def info t t)))) - info t) - "")) + (cond ((not label) "") + ((org-element-map (plist-get info :parse-tree) 'footnote-reference + (lambda (f) + (and (not (eq f footnote-reference)) + (equal (org-element-property :label f) label) + (org-trim (org-latex--label def info t t)))) + info t)) + (t ""))) ;; Retrieve all footnote references within the footnote and ;; add their definition after it, since LaTeX doesn't support ;; them inside. |