Export references used in LaTeX file to bib file
Is it possible to export the used references to bib file?
As I have hundreds of references, the bib file is too large ...
As I have hundreds of references, the bib file is too large ...
```
As trace gases stay for more than one week in the UT, they are distributed by the upper level winds around the globe \cite{Ridley.2004}.
```
I'm using the Sublime Text.
Here's the workflow:
1. Export all references in Zotero to one bib file called references.bib
2. Cite the bib file in the journal template (tex file):
\bibliography{references}
and cite it by typing \cite{} as I use better BibTeX.
3. Compile the PDF file.
I want to export only the references used in the tex file to the bib file.
In this case, it is {Ridley.2004}.
It could decrease the bib filesize a lot.
Let's assume I have 300 references in "My Library" and export all of them into one bib file.
I cite 50 of them in the Tex file using BetterBib Tex successfully.
But, I want the bib file only has the 50 reference information.
https://forums.zotero.org/discussion/77365/create-bib-file-only-from-papers-cited-in-a-tex-file
https://retorque.re/zotero-better-bibtex/citing/aux-scanner/
AUX files are generated when compiling LaTeX documents, see here. Your BibTeX tool might be able to use them for creating .bib files with your cited entries.
If you have further questions specifically on LaTeX/BibTeX, consider asking for help here: https://tex.stackexchange.com/
Finally, I use the aux scanner and follow the tutorial below to export the subcollection as bib file successfully ;)
https://forums.zotero.org/discussion/28227/how-do-i-export-a-subset-of-my-library-to-bibtex