summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2013-12-21 16:13:56 +0100
committerNicolas Goaziou <n.goaziou@gmail.com>2014-01-07 17:23:27 +0100
commit677b228104e19e5d6b4dc2a7596c336b0efa4b9c (patch)
tree43b439210f04ae995a6912ae8911a7d315715e4c
parentf8e17454407e52a8d87fbafc32985693478be536 (diff)
downloadorg-mode-677b228104e19e5d6b4dc2a7596c336b0efa4b9c.tar.gz
ox-bibtex: Allow nil style
* contrib/lisp/ox-bibtex.el (org-bibtex-process-bib-files, org-latex-keyword): Allow nil style.
-rw-r--r--contrib/lisp/ox-bibtex.el21
1 files changed, 13 insertions, 8 deletions
diff --git a/contrib/lisp/ox-bibtex.el b/contrib/lisp/ox-bibtex.el
index 6ac4a38..d92a1e4 100644
--- a/contrib/lisp/ox-bibtex.el
+++ b/contrib/lisp/ox-bibtex.el
@@ -42,6 +42,8 @@
;;
;; #+BIBLIOGRAPHY: foo plain option:-d
;;
+;; "stylename" can also be "nil", in which case no style will be used.
+;;
;; Optional options are of the form:
;;
;; option:-foobar pass '-foobar' to bibtex2html
@@ -184,13 +186,16 @@ Return new parse tree."
(append (plist-get arguments :options)
(list "-citefile" temp-file))))))
;; Call "bibtex2html" on specified file.
- (unless (eq 0 (apply 'call-process
- (append '("bibtex2html" nil nil nil)
- '("-a" "-nodoc" "-noheader" "-nofooter")
- (list "--style"
- (org-bibtex-get-style keyword))
- (plist-get arguments :options)
- (list (concat file ".bib")))))
+ (unless (eq 0 (apply
+ 'call-process
+ (append '("bibtex2html" nil nil nil)
+ '("-a" "-nodoc" "-noheader" "-nofooter")
+ (let ((style
+ (org-not-nil
+ (org-bibtex-get-style keyword))))
+ (and style (list "--style" style)))
+ (plist-get arguments :options)
+ (list (concat file ".bib")))))
(error "Executing bibtex2html failed"))
(and temp-file (delete-file temp-file))
;; Open produced HTML file, and collect Bibtex key names
@@ -291,7 +296,7 @@ Fallback to `latex' back-end for other keywords."
(if (not (equal (org-element-property :key keyword) "BIBLIOGRAPHY"))
ad-do-it
(let ((file (org-bibtex-get-file keyword))
- (style (org-bibtex-get-style keyword)))
+ (style (org-not-nil (org-bibtex-get-style keyword))))
(setq ad-return-value
(when file
(concat (and style (format "\\bibliographystyle{%s}\n" style))