UP | HOME

Date: <2024-12-09 Mon>

Citations in Org Mode

If you are writing a document in org mode and want to cite some papers or articles as in a research paper you can use the built in citation handling features of org-mode.

Imagine you have a references.bib file with some BiBTeX entries as follows:

< Collapse code block> Expand code block
@article{photon,
  title={Photon mapping on programmable graphics hardware},
  author={Purcell, Timothy J and Donner, Craig and Cammarano, Mike and Jensen, Henrik Wann and Hanrahan, Pat},
  booktitle={ACM SIGGRAPH 2005 Courses},
  pages={258--es},
  year={2005}
}

Then you cand add a org mode keyword/directive called `#+bibliography` near the head of the document to point to the bib file.

< Collapse code block> Expand code block
#+bibliography: references.bib

After this is done you can add reference the paper in your org document:

< Collapse code block> Expand code block
Grid construction can be done by using parallel sorting algorithm [cite:@photon], or by using ... .

Finally at the place where you want you bibliography write:

< Collapse code block> Expand code block
#+print_bibliography:

Now when you export the document, the citations and bibliography will be generated as per you formatting config.

I prefer the following config. The first one for LaTeX export and second one for html export. (So use only one of these at a time):

< Collapse code block> Expand code block
#+cite_export: biblatex numeric,backend=bibtex
#+cite_export: basic numeric numeric

Or you can add a file local variable as such:

< Collapse code block> Expand code block
# Local Variables:
# org-cite-export-processors: ((latex biblatex "numeric,backend=bibtex") (html basic "numeric" "numeric"))
# End:

Backlinks


You can send your feedback, queries here