diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 498a850b7..bb13620a5 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,7 @@ * org-exp.el (org-export-as-html): Add a "content" div around the entire content of the body tag. + (org-export-html-get-bibliography): New function. * org.el (org-match-sparse-tree): Renamed from `org-tags-sparse-tree'. diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 80e96dfeb..f3b5054c1 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -4047,9 +4047,12 @@ lang=\"%s\" xml:lang=\"%s\"> (or (nth 4 lang-words) "Footnotes") (mapconcat 'identity (nreverse footnotes) "\n")) "\n")) + (let ((bib (org-export-html-get-bibliography))) + (when bib + (insert "\n" bib "\n"))) (unless body-only (when (plist-get opt-plist :auto-postamble) - (insert "
" caption "
") "") (if org-par-open "\n" "")))))) +(defun org-export-html-get-bibliography () + "Find bibliography, cut it out and return it." + (catch 'exit + (let (beg end (cnt 1)) + (save-excursion + (goto-char (point-min)) + (when (re-search-forward "^[ \t]*