#+Title: An Example Demonstrating ox-bibtex Usage #+Author: Eric Schulte #+Options: toc:nil ^:{} An example document demonstrating generation of bibliographies for LaTeX, HTML and ASCII export using Org-mode cite:dominik2010org with the =ox-bibtex= contributed package. Included code blocks are executable for reproducibility cite:schulte2012multi. (taken from the comments at the top of =ox-bibtex.el=) * Introduction and Requirements Use =cite= syntax for Org links (e.g., =cite:bibtexid=). For HTML and ascii it uses the bibtex2html software from http://www.lri.fr/~filliatr/bibtex2html/, and for ascii it uses the pandoc software from http://johnmacfarlane.net/pandoc/. * Usage The usage is as follows: : #+BIBLIOGRAPHY: bibfilebasename stylename optional-options e.g. given =foo.bib= and using style "plain": : #+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 e.g., | =option:-d= | sort by date | | =option:-a= | sort as BibTeX (usually by author) *default* | | =option:-u= | unsorted i.e. same order as in .bib file | | =option:-r= | reverse the sort | See the bibtex2html man page for more. Multiple options can be combined like: : option:-d option:-r Limiting to only the entries cited in the document: : limit:t For LaTeX export this simply inserts the lines : \bibliographystyle{plain} : \bibliography{foo} into the TeX file when exporting. For HTML export it: 1) converts all =\cite{foo}= and =[[cite:foo=]] to links to the bibliography, 2) creates a =foo.html= and =foo_bib.html=, 3) includes the contents of =foo.html= in the exported HTML file. For ascii export it: 1) converts all =\cite{foo}= and =[[cite:foo=]] to links to the bibliography, 2) creates a =foo.txt= and =foo_bib.html=, 3) includes the contents of foo.txt in the exported ascii file. For LaTeX export it: 1) converts all =[[cite:foo=]] to =\cite{foo}=. * Emacs Configuration The =.emacs= configuration is simple. With path to Org-mode's =contrib/= repository in your load path, require =ox-bibtex= as in the following example. #+begin_src emacs-lisp (add-to-list 'load-path "~/.emacs.d/src/org-mode/contrib/lisp/") (require 'ox-bibtex) #+end_src #+BIBLIOGRAPHY: ox-bibtex-example plain