From 03594e02b361a170934dc224ae88f0630e8d8d7b Mon Sep 17 00:00:00 2001 From: John Hammond Date: Thu, 26 Jul 2018 18:48:11 -0500 Subject: [PATCH 1/3] Include the org-ref bibliography at the end of the slides. --- ox-reveal.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ox-reveal.el b/ox-reveal.el index b744daa..ad65c5e 100644 --- a/ox-reveal.el +++ b/ox-reveal.el @@ -962,6 +962,13 @@ Extract and set `attr_html' to plain-list tag attributes." tag ))) +(defun org-reveal--insert-bibliography (&optional ignore) + "Create a slide for the bibliography from org-ref" + (concat "
" + (funcall 'org-ref-get-html-bibliography) + "
" + )) + (defun org-reveal--build-pre/postamble (type info) "Return document preamble or postamble as a string, or nil." (let ((section (plist-get info (intern (format ":reveal-%s" type)))) @@ -1158,6 +1165,7 @@ info is a plist holding export options." (when footer (format "
%s
\n" footer)))) "\n")))) contents + (org-reveal--insert-bibliography) " \n" (org-reveal--build-pre/postamble 'postamble info) From 42bb04ed05d99ec77adde43306b23d49a84cfccc Mon Sep 17 00:00:00 2001 From: John Hammond Date: Thu, 26 Jul 2018 21:29:39 -0500 Subject: [PATCH 2/3] 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." From f9574b909390d7de4bba961a1ccecedd5c285f1f Mon Sep 17 00:00:00 2001 From: John Hammond Date: Thu, 31 Jan 2019 09:49:07 -0600 Subject: [PATCH 3/3] Fixed org-structure-template-alist for compatibility with Org 9.2. --- ox-reveal.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ox-reveal.el b/ox-reveal.el index 616981a..8b831ed 100644 --- a/ox-reveal.el +++ b/ox-reveal.el @@ -1292,7 +1292,7 @@ Return output file name." ;; Register auto-completion for speaker notes. (when org-reveal-note-key-char (add-to-list 'org-structure-template-alist - (list org-reveal-note-key-char "#+BEGIN_NOTES\n\?\n#+END_NOTES"))) + (list org-reveal-note-key-char "NOTES"))) (provide 'ox-reveal)