BibTeX and Emacs’org-mode

BibTeX is an excellent reference management system, mostly used for LaTeX. Emacs is, of course, one of the best editors in the world, for one reason which is its extensibility. Org-mode is an extension to Emacs which helps you keep notes, write structured text, maintain to-do lists and calendars, plus other features. I usually use org-mode for taking research notes. One task I often have to deal with is to insert references into my notes (for example, I may want to write in a note that its content is taken from a paper or a book). This can be done very easily, following the below steps:

  • Open both your org file and the BibTeX file which contains your references.
  • Go to the BibTeX file and search for the entry, then press C-c l (Control-c, then release and press l) to insert the link to the current entry to a temporary storage space.
  • Go to the org file and press C-c C-l, then choose the last link in the temporary buffer to insert it to the org buffer.

Actually you can do the above steps to insert links to any object into an org buffer.

A very good BibTeX software is JabRef.

This entry was posted in Computer, LaTeX and tagged , , , , . Bookmark the permalink.

7 Responses to BibTeX and Emacs’org-mode

    • Seems a very nice set-up, especially if you put all your notes in one file. I use a different set-up, in which I have a separate org file containing notes for each paper, then I use JabRef to manage both the notes and the papers.

  1. plgx says:

    Thanks Truong. Your solution is simple and functional.

    One day I might try the setup that Piotr’s pointing to. I imagine that having all your reading notes in a single file could be quite useful. But Lagarde’s description of his setup is a bit to complex for me to tackle right now.

  2. Martin Steffen says:

    Thanks. I had used it, and it worked. However, in the meantime, it does no longer work; potentially due to newer versions of org and/or emacs (emacs-version 24-2, org-version 7.9.3).

    If I type C-c l in the bib-file (over an bibentry), the response is

    file-name-directory: Wrong type argument: stringp, nil

    (the C-c l is bound to “org-store-link”).

    Any idea? Thanks, Martin

    • Usually it’s because of orgmode. Could you update your orgmode to the latest version (or even the development version) and try again? For me, almost all issues with orgmode were fixed by an orgmode upgrade.

      • Martin Steffen says:

        I tried, but the problem (“wrong type of argument”) persists. I got the very latest org-mode directly from the git-hub.

        However, I could narrow it down to one particular package (so it’s not org in general, but probably I “require” to many subpackages of org. The one that breaks the C-c l – functionality is

        (require ‘org-git-link)

        If I remove that line, it works again.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s