apcshields / autocomplete-bibtex

Adds Pandoc-style BibTeX citation key autocompletion to autocomplete+ for Atom.
MIT License
44 stars 17 forks source link

Troubleshooting a .bib file [SOLVED: no curly brackets when month is the last entry in a bib reference] #120

Open tomislavmedak opened 2 years ago

tomislavmedak commented 2 years ago

It's not an issue report, but I have nowhere to ask, so I might as well try here. Recently my disk got fried, so I had to reinstall everything from scratch, including Zotero, Atom and autocomplete-bibtex. On my previous system, I had a Better Bibtex file for my entire Zotero library and it used to work like a charm. Now, with the new installation, autocomplete-bibtex just won't recognize the citations from that .bib file. At the same, when I export a collection or a subcolletion from my Zotero, it works with autocomplete-bibtex as expected. Furthermore, when I use my entire Zotero library export in Zettlr, there it works fine. Is there a way I could troubleshoot to figure out what's happening?

My Zotero library Better Bibtex export file is here: https://hostb.org/14WW

tomislavmedak commented 2 years ago

Today a Zotero reference entry broke another .bib file -- the subcollection file -- and I was able to troubleshoot. The entry that broke the bib file had the following format:

@misc{unfccc_glasgow_2021,
  title = {Glasgow {{Climate Pact}}: Advance {{Version}}},
  author = {{UNFCCC}},
  year = {2021},
  month = oct
}

the bit of code causing problems was the name of the month that is not in curly brackets being the last line of code before the closing curly bracket. If I added curly brackets, or pasted there another entry with curly brackets, autocomplete-bibtex would work.

References where there's nothing after the month entry are quite rare -- in my entire Zotero library with some 2000 references I found only three.

retorquere commented 2 years ago

this is a valid bibtex entry, oct is a pre-declared string in bibtex to allow localization of the date.

retorquere commented 2 years ago

The parser in use in autocomplete-bibtex has been deprecated. I am of course biased, but I'd recommend using the parser I created for BBT. It's easily one of the most comprehensive parsers for javascript, even if it is not the fastest.

tomislavmedak commented 2 years ago

Thank you for responding. I've left an issue report for people at autocomplete-bibtex, but the project doesn't seem to have a lot of activity going on for a while. I'm also a n00b in anything programming-related, I know how to set up my writing environment in Atom, but with parsers I'm out of my depth.

BTW, thank you for developing BBT, it's such an essential piece of infrastructure.

On Wed, Nov 17, 2021 at 10:12 PM Emiliano Heyns @.***> wrote:

The parser in use in autocomplete-bibtex has been deprecated https://www.npmjs.com/package/latex-to-unicode-converter. I am of course biased, but I'd recommend using the parser I created for BBT @.***/bibtex-parser>. It's easily one of the most comprehensive parsers https://github.com/citation-js/bibtex-parser-experiments for javascript, even if it is not the fastest.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/apcshields/autocomplete-bibtex/issues/120#issuecomment-972035325, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHGME3E6T4W5PA6BKU3HVH3UMQLC7ANCNFSM5H5X5D4Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.