bibsync¶
bibsync synchronizes BibTeX files from citation keys in LaTeX sources. It is
designed for papers where the citation key can be a stable scholarly identifier,
especially an arXiv ID:
After scanning the TeX source, bibsync resolves missing entries through NASA
ADS or InspireHEP, rewrites the provider's BibTeX entry so the citekey stays the
same as the TeX citekey, and checks whether the target .bib file is current.
Add --fix to write the merged bibliography:
What It Does¶
bibsync handles the repetitive part of bibliography maintenance:
- Finds citekeys in common LaTeX citation commands such as
\cite,\citet,\citep, and related variants. - Resolves identifier-like citekeys through NASA ADS and InspireHEP.
- Preserves arXiv IDs, DOIs, and ADS bibcodes as citekeys when writing BibTeX.
- Merges generated entries with an existing bibliography instead of replacing
the whole file blindly when
--fixis provided. - Checks whether a bibliography is up to date by default, which makes it suitable for safe pre-commit hooks.
Supported Identifiers¶
NASA ADS can resolve:
- arXiv IDs, for example
1602.03837 - DOIs, for example
10.1103/PhysRevLett.116.061102 - ADS bibcodes, for example
2016PhRvL.116f1102A
InspireHEP can resolve:
- arXiv IDs
- DOIs
Author-year interactive lookup, as provided by adstex, is intentionally not
part of the initial bibsync workflow. The current implementation focuses on
deterministic identifier-based synchronization.
Quick Start¶
Install bibsync, then choose a provider:
or:
Then run:
If you use NASA ADS, set an API token first:
The default provider mode is auto. In that mode, bibsync uses NASA ADS when
ADS_API_TOKEN is available and then falls back to InspireHEP.
Where To Go Next¶
- Read the installation guide for Cargo, PyPI, pre-built binaries, and source builds.
- Read the usage guide for command-line workflows.
- Read the provider guide to choose between NASA ADS,
InspireHEP, and
auto. - Read the pre-commit guide to enforce synchronized bibliographies in a repository.
- See the examples guide for tested example files.