Skip to content

Latest commit

 

History

History
49 lines (42 loc) · 1.64 KB

README.org

File metadata and controls

49 lines (42 loc) · 1.64 KB

bibtex-capf provides a backend using Emacs’s native completion-at-point function for the completion of bibtex keys in modes used for prose writing. This backend activates for citation styles used by pandoc-mode (@), latex-mode (\cite{}), and org-mode (cite:@). This package is largely a port of company-bibtex to Emacs’s native completion framework. It works particularly well with corfu, which enhances completion at point with a small completion popup.

screenshots/img.png

Initialization

Load the package and add bibtex-capf to capf-backends (there is a minor mode – bibtex-capf-mode – for easy activation and deactivation of the capf) using use-package and straight:
(use-package bibtex-capf
  :straight (:type git :host github :repo "mclear-tools/bibtex-capf")
  :hook ((org-mode markdown-mode tex-mode latex-mode reftex-mode) . bibtex-capf-mode)
  :custom
  (bibtex-capf-bibliography
   '("path/to/bib/file.bib")))

Customization

bibtex-capf reads from a bibliography file or files specified in bibtex-capf-bibliography:
(setq bibtex-capf-bibliography
    '("/home/cooluser/thesis/thesis1.bib"
      "/home/cooluser/thesis/thesi2.bib"))

Alternative Packages

Since this is Emacs, there are other ways to satisfy the user’s need for citation completion at point. Here are two notable ones: