diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-08-13 15:11:48 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-08-13 15:11:48 +0200 |
commit | 5bf7730674b33aad81b834298c2ea68750e41cc5 (patch) | |
tree | 1a8c504dbf2aab6dcccca457c429d89bf911a2c9 | |
parent | bff63cbeb3309f296a886f7aa61265e3163f49a3 (diff) | |
download | org-mode-5bf7730674b33aad81b834298c2ea68750e41cc5.tar.gz |
Fix exporting LaTeX fragments within inline footnotes
* lisp/ox.el (org-export--prune-tree): Do not change parent by side
effect. It affects footnote references already in the tree.
Reported-by: Paul Stansell <paulstansell@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-08/msg00302.html>
-rw-r--r-- | lisp/ox.el | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -2712,14 +2712,11 @@ from tree." (org-element-map data '(footnote-definition footnote-reference) (lambda (f) (cond - ((eq (org-element-type f) 'footnote-definition) f) - ((eq (org-element-property :type f) 'standard) nil) - (t (let ((label (org-element-property :label f))) - (when label ;Skip anonymous references. - (apply - #'org-element-create - 'footnote-definition `(:label ,label :post-blank 1) - (org-element-contents f)))))))))) + ((eq 'footnote-definition (org-element-type f)) f) + ((and (eq 'inline (org-element-property :type f)) + (org-element-property :label f)) + f) + (t nil)))))) ;; If a select tag is active, also ignore the section before the ;; first headline, if any. (when selected |