mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-24 07:20:29 +00:00
ox-org: Correctly export footnote references in headlines
* lisp/ox-org.el (org-org-section): Also include references found in headlines when inserting footnote definitions at the end of a section. Reported-by: WY H <jcjuly@outlook.com> <http://permalink.gmane.org/gmane.emacs.orgmode/112678>
This commit is contained in:
parent
6cd42b08f9
commit
0fd2256eba
@ -193,16 +193,18 @@ a communication channel."
|
||||
(concat
|
||||
(org-element-normalize-string contents)
|
||||
;; Insert footnote definitions appearing for the first time in this
|
||||
;; section. Indeed, some of them may not be available to narrowing
|
||||
;; so we make sure all of them are included in the result.
|
||||
;; section, or in the relative headline title. Indeed, some of
|
||||
;; them may not be available to narrowing so we make sure all of
|
||||
;; them are included in the result.
|
||||
(let ((footnotes-alist
|
||||
(org-element-map section 'footnote-reference
|
||||
(org-element-map (list (org-element-property :parent section) section)
|
||||
'footnote-reference
|
||||
(lambda (fn)
|
||||
(and (eq (org-element-property :type fn) 'standard)
|
||||
(org-export-footnote-first-reference-p fn info)
|
||||
(cons (org-element-property :label fn)
|
||||
(org-export-get-footnote-definition fn info))))
|
||||
info)))
|
||||
info nil 'headline t)))
|
||||
(and footnotes-alist
|
||||
(concat "\n"
|
||||
(mapconcat
|
||||
|
Loading…
Reference in New Issue
Block a user