Extract references from a PDF
Turn the "References" section of a PDF paper into BibTeX entries — one entry per cited work — using jabkit pdf extract-references.
This skill is about the works a paper cites. For a BibTeX entry describing the paper itself (its own title, authors, year), use the pdf-to-bibtex skill instead.
Setup
jabkit runs via JBang — no JDK setup needed. Install JBang if missing:
curl -Ls https://sh.jbang.dev | bash -s - app setup # Linux/macOS
iex "& { $(iwr -useb https://ps.jbang.dev) } app setup" # Windows
Then install jabkit on the PATH (the same command also updates it):
jbang app install --fresh --force jabkit@jabref
Basic usage
jabkit -p pdf extract-references paper.pdf # single PDF → BibTeX on stdout
jabkit pdf extract-references paper.pdf --output refs.bib # single PDF → file
jabkit pdf extract-references a.pdf b.pdf --output-dir refs/ # one .bib per PDF into refs/
jabkit pdf extract-references a.pdf b.pdf # writes a.bib, b.bib next to each PDF
jabkit -p pdf extract-references https://example.org/paper.pdf # each input may also be a URL
-p/--porcelain suppresses progress messages — use it whenever parsing the output. --output is only valid with a single input file; use --output-dir for several.
Inside --output-dir each .bib is named after its PDF. Inputs from different directories that share a file name do not overwrite each other: the second paper.pdf of a run is written as paper-2.bib, the third as paper-3.bib. Re-running the same batch replaces its own previous output instead of adding more numbered copies.
Every positional input may be a local path or an http(s)/ftp URL; URLs are downloaded to a temporary file first. For a URL input without --output/--output-dir, the default "next to the source PDF" target becomes the current working directory.
Extraction modes
Select with --mode (case-insensitive):
| Mode | Strategy |
|---|---|
RULE_BASED |
Offline parsing of numbered [1] ... references (IEEE-style two-column papers). Default when no GROBID is configured. |
GROBID |
Sends the PDF to a GROBID service. Default if GROBID is enabled in preferences; --grobid-url <url> overrides the server for this call. |
LLM |
Experimental — uses the AI provider configured in preferences. |
In RULE_BASED mode each entry keeps the original reference string in its comment field, so the parse can be double-checked against the source.
Notes
- The exit code is non-zero if any input PDF was missing, could not be downloaded, or failed to parse; remaining files are still processed.
- Reference parsing is heuristic. Entries with a
doifield can be cross-checked by fetching clean metadata:jabkit doi-to-bibtex <doi>.
Related
- BibTeX entry for the paper itself: the
pdf-to-bibtexskill (jabkit convert --input paper.pdf --input-format pdfMerged). - Cited works looked up online by DOI instead of PDF parsing:
jabkit get-cited-works <doi>. - Full CLI reference: the
jabkitskill in this repository.