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.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.
How It Works
- Highlight or select a DOI, ISBN, or URL containing a DOI in any app.
- Trigger the workflow via Alfred’s Universal Action or the dedicated hotkey you have configured in the workflow settings.
- 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}$)
- DOI pattern:
- Metadata is fetched from an online API:
- DOI → CrossCite API at
https://doi.org/withAccept: application/vnd.citationstyles.csl+jsonheader, returning CSL-JSON - ISBN → OpenLibrary API first (
openlibrary.org/api/books); falls back to Google Books API if OpenLibrary has no data
- DOI → CrossCite API at
- A citekey is generated in
AuthorYearformat (see Citekey Generation below). - Uniqueness is enforced: if the citekey already exists in the library, a lowercase letter is appended (
a,b,c, …) until the citekey is unique. - The formatted BibTeX entry is appended to your primary library file.
Supported Input Types
| Input | Example |
|---|---|
| Bare DOI | 10.1234/example-doi |
| URL containing a DOI | https://doi.org/10.1234/example-doi |
| ISBN (with or without hyphens) | 978-3-16-148410-0 or 9783161484100 |
Citekey Generation
Citekeys are generated in the formatLastnameYear, with the following rules derived from the entry metadata:
| Authors | Format | Example |
|---|---|---|
| 1 author | LastnameYear | Grieser2023 |
| 2 authors | LastnameLastnameYear | GrieserSmith2023 |
| 3 or more authors | LastnameEtAlYear | GrieserEtAl2023 |
| No author found | NoAuthorYear | NoAuthor2023 |
- Diacritics stripped using Unicode NFD normalization (e.g.,
Müller→Muller) - Hyphens removed from last names (e.g.,
Garcia-López→GarciaLopez) - If
origyearis present in the metadata, it is preferred overyear - If no year is found,
NY(No Year) is used as a fallback
Example BibTeX Output
- A blank
keywords = {}field is always included so you can add tags immediately. - String values containing capital letters are double-braced (
{{…}}) to preserve capitalization — exceptauthoranddoi, which are intentionally left single-braced. - For journal articles,
journal,volume,number, andpagesfields are included when available. pagesvalues are normalized to use a double-dash (--) separator.- Publisher names are cleaned of common suffixes (
GmbH,Ltd,Publications,LLC).
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.