LaTeX Bibliography Notes

Practical notes drawn from questions and discussions in the TeX community.

BIBTEX MAINTENANCE

Cleaning a bibliography is really two different jobs

A large bibliography may contain records that the current document never cites, as well as duplicate or inconsistent records that still need editorial attention. Those problems should not be confused. A citation-aware tool can make a project-specific bibliography by following the document, while duplicate detection and field normalization require decisions about which record and metadata are authoritative.

The answers in the TeX Stack Exchange discussion “Cleaning up a .bib file” present several approaches rather than one universal cleanup command. The useful lesson is to choose a tool according to the intended result: pruning unused entries is different from repairing the master database.

bibopt deliberately handles the first job. It reads citation keys in document order, keeps matching entries, and writes a smaller bibliography. Keep the original master file and inspect the generated file rather than treating automation as a substitute for bibliographic review.

COMMUNITY WORKFLOWS

Keep a master library, but export a focused project file

LaTeX users regularly compare one large personal bibliography with smaller bibliographies exported for individual projects. The recurring trade-off is convenience versus reviewability: a master library avoids re-entering sources, while a focused file is easier to share, archive, and inspect alongside a manuscript.

Reddit's LaTeX discussions about cleaning BibTeX files and its AcademicBibTeX discussions about duplicate entries show why workflows vary. Some writers rely on reference-manager exports; others edit BibTeX directly or use command-line utilities. The common practical principle is to preserve the source library and make cleanup reproducible.

A sensible workflow is therefore: maintain stable citation keys in a backed-up master library, generate a project bibliography, review its fields, and commit that reviewed result with the manuscript.

MULTI-FILE DOCUMENTS

Document order includes input and include files

A root document may contain few citations itself because chapters are loaded with \input or \include. A cleanup based only on the root file would then omit valid references. Uploading the dependent .tex files allows bibopt to encounter those citations at the point where each child document is called.

This is another reason to review generated data: missing source files, misspelled citation keys, and dynamically constructed project layouts cannot be repaired merely by trimming the bibliography.

Sources and further discussion