Change in the way Zotero handles short titles

Hi there,

I use the short title field to write the name of the attached file of the references, so that I can easily export and use them in Obsidian following this: https://obrl-soil.github.io/posts/2023-03-28_obsidian-setup-2023/

However, I believe Zotero has changed the way it exports to bibtex. So, if I have this short title:

blust_2004_t_to_k

The reference in the exported .bib file shows this:

blust\_2004\_t\_to\_k

There are escaping backslashes (with Better Bibtex the initial letter also gets capitalised). I don't know if this behaviour is intended, but only happens when exporting to .bib. The rest of the formats (yaml, csl, ris) are fine. I checked this behaviour in all three Mac, Windows, and Linux. However, .bib is the only one that provides file information, so that I can export libraries and share them across computers.

I don't really know if this behaviour is intended (though I don't think so, because the behaviour only applies to .bib), or how can I disable / work around it.

Thank you very much in advance
  • It's intended (_ is a special character in bibtex so it gets escaped. It's not a special character in any of the other formats, which is why they don't escape it). It's possible BBT has a setting to disable it, I don't recall precisely, and you can definitely fix it with a post-processing hook there.
  • Hi Adam,

    Sure, that was my guess...

    I think the hook will be the easiest fix when exporting the library, and I can use yaml in Obsidian, so probably it's not that a big deal.

    Thank you very much :)
  • It's possible BBT has a setting to disable it
    If you tag an item with the tag "#LaTeX", no escaping will be performed, but you may end up with invalid (unparsable) BibTeX.
    with Better Bibtex the initial letter also gets capitalised
    you can turn this off separately, but at this point you're actively fighting the exporters to get invalid output. If you're looking for data export for post processing, and you're using BBT, you might be interested in the "BetterBibTeX JSON" format.
  • Hi!

    Thank you very much :)

    Yeah, I switched to "BetterBibTex JSON". It solves the problems in Obsidian (I would even say it's read faster?).

    I keep the bibtex export for making copies of the library. I do some regex before importing it, and it's all fine.

    Thanks :)
Sign In or Register to comment.