The workflow manages PDFs located in a configured folder, matching them to BibTeX entries by citekey. You can open PDFs directly from Alfred and use the auto-file feature to rename and organize new PDFs in one step.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.
Setup
Set thepdf_folder workflow variable to the absolute path of the directory where your PDFs are stored (e.g., ~/Documents/Papers).
PDFs are matched to entries by filename. The filename must:
- Start with the citekey (without
@) - Optionally be followed by an underscore
_and any additional text (typically the title) - Have a
.pdfextension
Grieser2020:
Grieser2020.pdfGrieser2020_A Study of Examples.pdf
Visual Indicator
Entries that have a matching PDF inpdf_folder display a 📕 emoji in the citation picker list.
Open PDF
Keyboard shortcut:Hyper↵ (= ⌘⌥⌃⇧↵)
Opens the matched PDF with your default PDF reader. The workflow searches pdf_folder recursively for any file matching {citekey}*.pdf (case-insensitive) and opens the first result.
The
Hyper key is an artificial “fifth” modifier key equivalent to pressing ⌘⌥⌃⇧ simultaneously. You can create it using Karabiner Elements, BetterTouchTool, or the Hyperkey app.Auto-File PDF
The auto-file feature renames and moves a PDF you have selected in Finder to the correct location withinpdf_folder, named after the citekey and title.
Trigger options:
- Via
scpin Alfred → select Auto-file PDF with the target entry chosen - Via Alfred Universal Action when a PDF file is selected in Finder
- Reads the target citekey from the selected picker entry.
- Extracts the author prefix from the citekey (everything before the year digits) and the first letter of the citekey for subfolder organization.
- Reads the title from the matching entry in the
.bibfile. - Constructs the destination path:
{pdf_folder}/{first_letter}/{author_prefix}/{citekey}_{safe_truncated_title}.pdf- The title is truncated to 50 characters and sanitized (special characters replaced or removed).
- Moves the Finder-selected PDF to the computed path, creating subdirectories as needed.
- Opens the destination folder in Finder so you can verify the result.
Grieser2023 with title “A Study of Examples”, the PDF is filed at:
Filter by PDF
Addpdf to any search query to show only entries that have a PDF filed via the auto-file feature. This filter can be combined with other search terms.
Examples:
| Query | Result |
|---|---|
pdf | All entries with an auto-filed PDF |
pdf grieser | Entries by Grieser with a PDF |
pdf 2020 #sociology | 2020 sociology entries with a PDF |
Attachment Field (📎)
The 📎 indicator is distinct from 📕. It appears when a BibTeX entry has a file, local-url, or attachment field pointing to a file path — regardless of whether the PDF is in pdf_folder.
Use ⌃⌥⌘↵ to open the attachment directly. See Bibliography Actions for full details on how attachment paths are resolved.