Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/chrisgrieser/alfred-bibtex-citation-picker/llms.txt

Use this file to discover all available pages before exploring further.

Select a DOI, ISBN, or URL that contains a DOI anywhere on your Mac, trigger the workflow, and a fully formatted BibTeX entry is fetched and appended to your library automatically — no copy-pasting into reference managers required.

How It Works

  1. Highlight or select a DOI, ISBN, or URL containing a DOI in any app.
  2. Trigger the workflow via Alfred’s Universal Action or the dedicated hotkey you have configured in the workflow settings.
  3. The workflow detects the input type using regular expressions:
    • DOI pattern: \b10.\d{4,9}/[-._;()/:A-Z0-9]+ (per CrossRef spec)
    • ISBN pattern: a string of 9–40 digits optionally separated by hyphens (^[\d-]{9,40}$)
  4. Metadata is fetched from an online API:
    • DOICrossCite API at https://doi.org/ with Accept: application/vnd.citationstyles.csl+json header, returning CSL-JSON
    • ISBNOpenLibrary API first (openlibrary.org/api/books); falls back to Google Books API if OpenLibrary has no data
  5. A citekey is generated in AuthorYear format (see Citekey Generation below).
  6. Uniqueness is enforced: if the citekey already exists in the library, a lowercase letter is appended (a, b, c, …) until the citekey is unique.
  7. The formatted BibTeX entry is appended to your primary library file.

Supported Input Types

InputExample
Bare DOI10.1234/example-doi
URL containing a DOIhttps://doi.org/10.1234/example-doi
ISBN (with or without hyphens)978-3-16-148410-0 or 9783161484100
Any URL from a publisher page that embeds a DOI in its path works as well, since the DOI regex matches within longer strings.

Citekey Generation

Citekeys are generated in the format LastnameYear, with the following rules derived from the entry metadata:
AuthorsFormatExample
1 authorLastnameYearGrieser2023
2 authorsLastnameLastnameYearGrieserSmith2023
3 or more authorsLastnameEtAlYearGrieserEtAl2023
No author foundNoAuthorYearNoAuthor2023
Additional transformations applied to the author string:
  • Diacritics stripped using Unicode NFD normalization (e.g., MüllerMuller)
  • Hyphens removed from last names (e.g., Garcia-LópezGarciaLopez)
  • If origyear is present in the metadata, it is preferred over year
  • If no year is found, NY (No Year) is used as a fallback

Example BibTeX Output

@article{Grieser2023,
	keywords = {},
	author = {Christopher Grieser},
	doi = {10.1234/example},
	journal = {{Journal of Example Studies}},
	title = {{A Study of Examples}},
	year = 2023,
}
Notes on the output format:
  • A blank keywords = {} field is always included so you can add tags immediately.
  • String values containing capital letters are double-braced ({{…}}) to preserve capitalization — except author and doi, which are intentionally left single-braced.
  • For journal articles, journal, volume, number, and pages fields are included when available.
  • pages values are normalized to use a double-dash (--) separator.
  • Publisher names are cleaned of common suffixes (GmbH, Ltd, Publications, LLC).
Adding or removing entries does not work with the BetterBibTeX Zotero Plugin. BetterBibTeX performs a one-way sync from Zotero → .bib file only, so any entry you append directly to the .bib file will be overwritten or ignored the next time Zotero syncs. Use Zotero’s own import features instead when working with BetterBibTeX.
Entries are always appended to the primary library specified by bibtex_library_path. The secondary library (if configured) is never written to by this feature. See Dual Library for more on working with two libraries simultaneously.

Build docs developers (and LLMs) love