Skip to content

Completion at point for bibtex bibliographies in prose writing

License

Notifications You must be signed in to change notification settings

mclear-tools/bibtex-capf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

Completion at point for bibtex bibliographies in prose writing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published