v4.0.3 Citation Keys Standardization
enhancement
bibliography
automation
Automated fix for 95+ citation key mismatches across bibliography files
Issue
Widespread citation key mismatches existed between .qmd files and .bib files, causing citations to display as “?” instead of proper references. The root cause was inconsistent naming conventions:
- Text files used lowercase:
@sleeboomfaulkner2007 - Bibliography used uppercase:
SLEEBOOM-FAULKNER2007 - Inconsistent handling of hyphens and numeric suffixes
Scale of Problem
- 95+ citation keys required standardization
- Affected multiple bibliography files across function chapters
- Manual fixing would have been error-prone and time-consuming
Solution: Automated Tooling
Created two-phase automated solution:
Phase 1: Basic Case Matching (fix_citation_keys.py)
- Fixed simple case mismatches
- Standardized 67 keys in first pass
- Examples:
CIA1975→cia1975,HUANG2019→huang2019
Phase 2: Advanced Matching (fix_citation_keys_v2.py)
- Handled compound names with hyphens
- Processed numeric suffixes correctly
- Fixed additional 28 complex keys
- Examples:
SLEEBOOM-FAULKNER2007→sleeboomfaulkner2007CHEN20211→chen2021Alexiev19852properly matched
Files Modified
function/legitimation.bib- 30+ keys standardizedfunction/Exported-Items-FIXED.bib- 26 keys standardizedfunction/projection-abroad.bib- 7 keys standardizedfunction/command-and-control.bib- 3 keys standardizedfunction/obfuscation.bib- 1 key standardized
Impact
- ✅ 95+ citations now resolve correctly
- ✅ Consistent lowercase naming convention established
- ✅ Reduced “?” placeholders throughout site
- ✅ Improved scholarly credibility of references
Tools Created
Both scripts are available for future use:
# Basic case matching
python fix_citation_keys.py
# Advanced matching with hyphens/suffixes
python fix_citation_keys_v2.pyThese tools can be reused whenever new bibliography entries are added or citation mismatches occur.
Verification
quarto render
# Significant reduction in citation warnings
# Most citations now display proper referencesThis automation saved hours of manual work and established a reproducible process for citation maintenance.
FIMI Taxonomy by Information Epidemiology Lab.
Citation
BibTeX citation:
@article{li2026,
author = {Li, E. Rosalie},
title = {V4.0.3 {Citation} {Keys} {Standardization}},
date = {2026-02-14},
url = {https://fimi.infoepi.org/notes/v4.0.3-citation-keys-standardization.html},
langid = {en}
}
For attribution, please cite this work as:
Li, E. Rosalie. 2026. “V4.0.3 Citation Keys
Standardization,” February. https://fimi.infoepi.org/notes/v4.0.3-citation-keys-standardization.html.