Skip to content

Instantly share code, notes, and snippets.

@lorenzhs
Last active July 9, 2018 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lorenzhs/0a0ae9c782db19b9e230bcf869548e84 to your computer and use it in GitHub Desktop.
Save lorenzhs/0a0ae9c782db19b9e230bcf869548e84 to your computer and use it in GitHub Desktop.
Example of using ox-bib
#+TITLE: Org Bibtex Example
#+AUTHOR: Lorenz Hübschle-Schneider
#+OPTIONS: toc:nil
#+OPTIONS: ':t
* Introduction
Citing is as easy as inserting a reference: [[cite:BoundedDiff1989]]
Using =ox-extra='s =:ignore:= property allows using an unnumbered bibliography
section, =* Bibliography :ignore:=. Load it like this, e.g. in your
=org-mode-hook=:
#+BEGIN_EXAMPLE
(require 'ox-bibtex)
(require 'ox-extra)
(ox-extras-activate '(ignore-headlines))
#+END_EXAMPLE
Then add =#+BIBLIOGRAPHY: references plain limit:t= where you want the
bibliography. The =limit:t= option ensures that only references that are used
are included in the output.
The default build process doesn't run =bibtex=, so add the following to your =init.el=:
#+BEGIN_EXAMPLE
(setq org-latex-pdf-process (list "latexmk -f -pdf %f"))
#+END_EXAMPLE
* Bibliography :ignore:
#+BIBLIOGRAPHY: references plain limit:t
@lorenzhs
Copy link
Author

lorenzhs commented Jul 9, 2018

org_bib_example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment