org-e-latex: Fix error in documents with empty footnote definitions

* contrib/lisp/org-e-latex.el (org-e-latex-footnote-reference):
  Provide a fallback definition when none is available.
This commit is contained in:
Nicolas Goaziou 2013-01-29 23:19:58 +01:00
parent 005917702a
commit 30ef385ee0
1 changed files with 4 additions and 2 deletions

View File

@ -1371,9 +1371,11 @@ CONTENTS is nil. INFO is a plist holding contextual information."
thereis (memq (org-element-type parent) thereis (memq (org-element-type parent)
'(footnote-reference footnote-definition table-cell))) '(footnote-reference footnote-definition table-cell)))
"\\footnotemark") "\\footnotemark")
;; Otherwise, define it with \footnote command. ;; Otherwise, define it with \footnote command. If no definition
;; is available, notify it with an intrusive fallback one.
(t (t
(let ((def (org-export-get-footnote-definition footnote-reference info))) (let ((def (or (org-export-get-footnote-definition footnote-reference info)
'("FOOTNOTE DEFINITION NOT FOUND."))))
(unless (eq (org-element-type def) 'org-data) (unless (eq (org-element-type def) 'org-data)
(setq def (cons 'org-data (cons nil def)))) (setq def (cons 'org-data (cons nil def))))
(concat (concat