ox-bibtex: Allow nil style
* contrib/lisp/ox-bibtex.el (org-bibtex-process-bib-files, org-latex-keyword): Allow nil style.
This commit is contained in:
parent
f8e1745440
commit
677b228104
|
@ -42,6 +42,8 @@
|
||||||
;;
|
;;
|
||||||
;; #+BIBLIOGRAPHY: foo plain option:-d
|
;; #+BIBLIOGRAPHY: foo plain option:-d
|
||||||
;;
|
;;
|
||||||
|
;; "stylename" can also be "nil", in which case no style will be used.
|
||||||
|
;;
|
||||||
;; Optional options are of the form:
|
;; Optional options are of the form:
|
||||||
;;
|
;;
|
||||||
;; option:-foobar pass '-foobar' to bibtex2html
|
;; option:-foobar pass '-foobar' to bibtex2html
|
||||||
|
@ -184,13 +186,16 @@ Return new parse tree."
|
||||||
(append (plist-get arguments :options)
|
(append (plist-get arguments :options)
|
||||||
(list "-citefile" temp-file))))))
|
(list "-citefile" temp-file))))))
|
||||||
;; Call "bibtex2html" on specified file.
|
;; Call "bibtex2html" on specified file.
|
||||||
(unless (eq 0 (apply 'call-process
|
(unless (eq 0 (apply
|
||||||
(append '("bibtex2html" nil nil nil)
|
'call-process
|
||||||
'("-a" "-nodoc" "-noheader" "-nofooter")
|
(append '("bibtex2html" nil nil nil)
|
||||||
(list "--style"
|
'("-a" "-nodoc" "-noheader" "-nofooter")
|
||||||
(org-bibtex-get-style keyword))
|
(let ((style
|
||||||
(plist-get arguments :options)
|
(org-not-nil
|
||||||
(list (concat file ".bib")))))
|
(org-bibtex-get-style keyword))))
|
||||||
|
(and style (list "--style" style)))
|
||||||
|
(plist-get arguments :options)
|
||||||
|
(list (concat file ".bib")))))
|
||||||
(error "Executing bibtex2html failed"))
|
(error "Executing bibtex2html failed"))
|
||||||
(and temp-file (delete-file temp-file))
|
(and temp-file (delete-file temp-file))
|
||||||
;; Open produced HTML file, and collect Bibtex key names
|
;; 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"))
|
(if (not (equal (org-element-property :key keyword) "BIBLIOGRAPHY"))
|
||||||
ad-do-it
|
ad-do-it
|
||||||
(let ((file (org-bibtex-get-file keyword))
|
(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
|
(setq ad-return-value
|
||||||
(when file
|
(when file
|
||||||
(concat (and style (format "\\bibliographystyle{%s}\n" style))
|
(concat (and style (format "\\bibliographystyle{%s}\n" style))
|
||||||
|
|
Loading…
Reference in New Issue