summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2016-08-22 12:07:34 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-08-22 12:07:34 +0200
commit908b3b05cdf2e53dda5bef72d5334686e154bb85 (patch)
treeffaa7584de45d802999434f1a83e36fc9929dae5
parent29942e6aa853b9c19c06bd7905a964217d24e059 (diff)
downloadorg-mode-908b3b05cdf2e53dda5bef72d5334686e154bb85.tar.gz
ox-latex: Fix repeated footnotes in tables
* lisp/ox-latex.el (org-latex--delayed-footnotes-definitions): Fix referencing multiple occurrences of the same footnote in a table. Reported-by: Kaushal Modi <kaushal.modi@gmail.com> <http://permalink.gmane.org/gmane.emacs.orgmode/108789>
-rw-r--r--lisp/ox-latex.el13
1 files changed, 6 insertions, 7 deletions
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 01bc8dd..0fa1ca6 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1521,17 +1521,16 @@ Footnotes definitions are returned within \"\\footnotetext{}\"
commands.
This function is used within constructs that don't support
-\"\\footnote{}\" command (i.e. an item's tag). In that case,
+\"\\footnote{}\" command (e.g, an item tag). In that case,
\"\\footnotemark\" is used within the construct and the function
just outside of it."
(mapconcat
(lambda (ref)
- (format
- "\\footnotetext[%s]{%s}"
- (org-export-get-footnote-number ref info)
- (org-trim
- (org-export-data
- (org-export-get-footnote-definition ref info) info))))
+ (let ((def (org-export-get-footnote-definition ref info)))
+ (format "\\footnotetext[%d]{%s%s}"
+ (org-export-get-footnote-number ref info)
+ (org-trim (org-latex--label def info t t))
+ (org-trim (org-export-data def info)))))
;; Find every footnote reference in ELEMENT.
(letrec ((all-refs nil)
(search-refs