BibTeX Completions

about | blog | config | notes | github

1. Search and Manage Bibliographies in Emacs

bibtex-completions is the package for interfacing with your BibTeX references on your filesystem. It is used my many other packages.

2. Configuration

2.1. Package Install

Install the bibtex-completion package. Note, that on its own, this package is useless and it will need a supplementary package to interface with it.

(use-package bibtex-completion)

2.2. Library Paths

Set the paths to my papers and docs. These don't need to be a list of directories with their full paths, but Org-ref for some reasons wants to use these variables even though they have their own defined. So strange.

(setq bibtex-completion-bibliography `(,(file-truename "~/org/papers/references.bib")))
(setq bibtex-completion-library-path `(,(file-truename "~/org/papers/docs/")))
(setq bibtex-completion-notes-path "~/org/papers/")

2.3. Note Template

We should create a note template here that works alongside Org-roam.

(setq bibtex-completion-notes-template-multiple-files
      (concat "#+TITLE: ${title}\n"
              "#+AUTHOR: %n (%(user-login-name))\n"
              "#+ROAM_TAGS: LITERATURE_REVIEW\n"
              "#+ROAM_KEY: cite:${=key=}\n"
              "#+CREATED: %U\n"
              "#+LAST_MODIFIED: %U\n"
              "#+STARTUP: content\n"))

2.4. Non-Standard Parameters

We make use of tags fields withn BibTeX but since that's non-standard, we need to let bibtex-actions know that we are using these.

(setq bibtex-completion-additional-search-fields '(tags))

2.5. Feature Provide

(provide 'init-bibtex-completions)

Created: 2021-11-13

Emacs 26.1 (Org mode 9.5)