Browse Source

ox-bibtex handle missing ebib or bibtex2html

  If ebib is missing then the jump function from org-bibtex-extras.el
  will be used if defined, else no jump function will be used.

  Only call `org-bibtex-process-bib-files' on html export so that
  ox-bibtex may be used for latex export without bibtex2html being
  installed.
Eric Schulte 6 years ago
parent
commit
336430f6e8
1 changed files with 4 additions and 3 deletions
  1. 4 3
      contrib/lisp/ox-bibtex.el

+ 4 - 3
contrib/lisp/ox-bibtex.el

@@ -77,8 +77,8 @@
 ;; Initialization
 
 (eval-when-compile (require 'cl))
-(org-add-link-type "cite" 'ebib)
-
+(let ((jump-fn (car (org-remove-if-not #'fboundp '(ebib obe-goto-citation)))))
+  (org-add-link-type "cite" jump-fn))
 
 ;;; Internal Functions
 
@@ -284,7 +284,8 @@ Return new parse tree.  This function assumes current back-end is HTML."
 
 (eval-after-load 'ox
   '(add-to-list 'org-export-filter-parse-tree-functions
-                'org-bibtex-process-bib-files))
+                (lambda (e b i) (when (eql b 'html)
+			     (org-bibtex-process-bib-files e b i)))))