浏览代码

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>
Nicolas Goaziou 8 年之前
父节点
当前提交
908b3b05cd
共有 1 个文件被更改,包括 6 次插入7 次删除
  1. 6 7
      lisp/ox-latex.el

+ 6 - 7
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