ox-latex: Fix bug introduced in 888ebfdeaf

* 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>
This commit is contained in:
Rasmus 2016-05-25 19:48:51 +02:00
parent 888ebfdeaf
commit 9dbeaa278d
1 changed files with 8 additions and 7 deletions

View File

@ -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.