Failed to update arxiv items in existing bib files
syrte opened this issue · 6 comments
When I run
adstex main.tex -o main.bib -r mylib.bib --merge-other --force-regenerate
It failed to update the following items from the existing mylib.bib file (which is exported from zotero)
@article{Simon2019,
title = {The {{Faintest Dwarf Galaxies}}},
language = {en},
journal = {arXiv e-prints},
url = {https://ui.adsabs.harvard.edu/abs/2019arXiv190105465S/abstract},
author = {Simon, Joshua D.},
month = jan,
pages = {arXiv:1901.05465},
year = {2019}
}
@article{Richings2018,
title = {Subhalo Destruction in the {{Apostle}} and {{Auriga}} Simulations},
language = {en},
journal = {ArXiv e-prints},
url = {https://ui.adsabs.harvard.edu/\#abs/arXiv:1811.12437},
author = {Richings, Jack and Frenk, Carlos and Jenkins, Adrian and Robertson, Andrew},
month = nov,
pages = {arXiv:1811.12437},
year = {2018}
}
Usually, the arxiv number should be given as eprint
for ads entries. Not sure why these items are not in the standard format. I can fix it by adding the following block at the end of the function entry2bibcode
.
if "pages" in entry and entry['pages'].lower().startswith('arxiv:'):
s = fixedAdsSearchQuery(arxiv=entry["pages"].split(':')[1], fl=["bibcode"])
try:
return next(s).bibcode
except StopIteration:
pass
I'm satisfied with my solution for now. If you feel it could be a general problem for others, you can take it into your code. Thanks.
Thanks for the update, it's nice to have such extensibility.
Hmm, the page
here
Line 256 in f19cbcc
should be
pages
. Then it works in my case.BTW, a space is needed in "FOUND IN SECONDARY BIB SOURCES,"
-> " FOUND IN SECONDARY BIB SOURCES,"
Lines 406 to 410 in f19cbcc
And I have another question, the bib file generated by adstex always starts with
@string{june = {June}}
Is this necessary? Or just to test the bparser
?
Ah, this is another hack for some specific bibtex generator (but I forget which). The correct way to specify the month June in bibtex should be
month={June},
or
month=jun,
But some bibtex sources use
month=june
which is not standard bibtex. This prefix fixes this.