Conditional bibliography

Conditionally include a bibliography from org-ref, if it exists. Do nothing if
it does not.
This commit is contained in:
John Hammond 2018-07-26 21:29:39 -05:00
parent 03594e02b3
commit 42bb04ed05
1 changed files with 9 additions and 5 deletions

View File

@ -963,11 +963,15 @@ Extract and set `attr_html' to plain-list tag attributes."
)))
(defun org-reveal--insert-bibliography (&optional ignore)
"Create a slide for the bibliography from org-ref"
(concat "<section>"
(funcall 'org-ref-get-html-bibliography)
"</section>"
))
"Create a slide for the bibliography from org-ref, if it exists"
(if (fboundp 'org-ref-get-html-bibliography)
(progn
;; here we could employ other bibliographic engines
(fset 'bibliography 'org-ref-get-html-bibliography)
(when (funcall 'bibliography)
(concat "<section>"
(funcall 'bibliography)
"</section>")))))
(defun org-reveal--build-pre/postamble (type info)
"Return document preamble or postamble as a string, or nil."