How to recreate a bib file with only the references that were used?
Usage
- Check
.aux
file contains \citation
commands instead of \abx@aux@cite
. If it is the later case, simple replace all \abx@aux@cite
with \citation
using your favorite text editor.
- Note that one can download the .aux files from
Overleaf > Logs and output files > Other logs & files.
- Setup the bib tool configuration throught the resource file (
bibtool-cfg.txt).
- If you want the key to preserve case, add
preserve.key.case = on
- Run
bibtool
from terminal
bibtool -x <aux file> -r <bibtool config> <source bib> -o <output bib>
bibtool -x output.aux -r bibtool-cfg.txt main-full.bib -o main.bib
Post bibtool hints
- To remove unnecessary entries, one may use notepad++ to delete the lines using the appropriate regex string.
- URL entry:
url.*},\n
- Arxiv entry:
archiveprefix.*},\n.*},\n
- JabRef
- Emaxs + Reftex
Reference