From 42bb04ed05d99ec77adde43306b23d49a84cfccc Mon Sep 17 00:00:00 2001 From: John Hammond Date: Thu, 26 Jul 2018 21:29:39 -0500 Subject: [PATCH] Conditional bibliography Conditionally include a bibliography from org-ref, if it exists. Do nothing if it does not. --- ox-reveal.el | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ox-reveal.el b/ox-reveal.el index ad65c5e..616981a 100644 --- a/ox-reveal.el +++ b/ox-reveal.el @@ -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 "
" - (funcall 'org-ref-get-html-bibliography) - "
" - )) + "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 "
" + (funcall 'bibliography) + "
"))))) (defun org-reveal--build-pre/postamble (type info) "Return document preamble or postamble as a string, or nil."