This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+lang/bibtex
syl20bnr ebe4c60264 Revert "Defer packages by default using use-package-always-defer"
This reverts commit 29c78ce841 and all other fixes
that have been made afterwards.

The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.
2018-03-03 23:40:10 -05:00
..
img
packages.el Revert "Defer packages by default using use-package-always-defer" 2018-03-03 23:40:10 -05:00
README.org Fix doc for common-lisp, bibtex, cfengine and gnus layer 2018-01-12 00:37:15 -05:00

BibTeX layer

/TakeV/spacemacs/media/commit/e0b751bee3250066959dc2cf2dbae3d0aed0d953/layers/+lang/bibtex/img/logo.png

Description

BibTeX and BibLaTeX files are a common way to manage bibliographies. The format was original designed to work with LaTeX files and subsequently has been adopted by other markup formats such as MarkDown and Org mode.

This layer adds support to manipulate BibTeX and BibLaTeX files in Spacemacs.

Features:

  • Syntax highlighting for BibTeX and BibLaTeX files.
  • Utilities for automatically adding entries from different data sources.
  • Support for inserting citations in various other modes.

Install

To use this configuration layer, add it to your ~/.spacemacs. You will need to add bibtex to the existing dotspacemacs-configuration-layers list in this file.

Configuration

This layer also supports having a global BibTeX file. For a basic configuration, add this to your ~/.spacemacs inside dotspacemacs/user-config:

  (setq org-ref-default-bibliography '("~/Papers/references.bib")
        org-ref-pdf-directory "~/Papers/"
        org-ref-bibliography-notes "~/Papers/notes.org")

Certain modes, such as latex-mode with AucTeX, will automatically lookup references in a document if any of the recognized bibliography commands are used. Other modes may have a similar feature, or one could always set file-local variables (through SPC f v f).

You can also customize which program is used to display the PDFs. For example, to use Zathura:

  (setq org-ref-open-pdf-function
    (lambda (fpath)
      (start-process "zathura" "*helm-bibtex-zathura*" "/usr/bin/zathura" fpath)))

More configuration options are available and are detailed in the org-ref and helm-bibtex package documentations.

Key bindings

In a Bib(La)TeX file, the following key bindings are added:

Key Binding Description
SPC m j / g j / C-j Next entry
SPC m k / g k / C-k Previous entry
SPC m p Open PDF
SPC m n Open notes
SPC m b Open browser
SPC m i Insert new entry
SPC m s Sort entry
SPC m h Various actions on entry
SPC m l a Lookup and add arXiv paper (don't get PDF)
SPC m l A Lookup and add arXiv paper (download PDF)
SPC m l d Lookup and add paper by DOI
SPC m l i Lookup and add book by ISBN
SPC m l p Lookup and add paper by PMID

In addition, org-mode, latex-mode and markdown-mode all have the following key binding added:

Key Binding Description
SPC m i c Insert citation