Zotero-better-bibtex: BibLaTeX always exports title case

Created on 16 Mar 2017  ·  7Comments  ·  Source: retorquere/zotero-better-bibtex

If I generate a .bib file with BetterBibLaTeX, I always get title casing, whereas using the native BibTeX exporter, text is formatted correctly.

With BetterBibLaTeX:

@article{wright_genetics_1946,
title = {Genetics of Natural Populations. {{XII}}. Experimental Reproduction of Some of the Changes Caused by Natural Selection in Certain Populations of {{{\emph{Drosophila}}}}{\emph{ Pseudoobscura}}},
volume = {31},
issn = {0016-6731},
url = {http://www.ncbi.nlm.nih.gov/pmc/articles/PMC1209320/},
timestamp = {2017-03-16T11:03:56Z},
number = {2},
journaltitle = {Genetics},
shortjournal = {Genetics},
author = {Wright, Sewall and Dobzhansky, Theodosius},
urldate = {2017-02-15},
date = {1946-03},
pages = {125--156},
file = {...},
eprinttype = {pmid},
eprint = {21021044},
pmcid = {PMC1209320}
}

With BibTeX:

@article{wright_genetics_1946,
title = {Genetics of natural populations. {XII}. experimental reproduction of some of the changes caused by natural selection in certain populations of \textit{{Drosophila} pseudoobscura}},
volume = {31},
issn = {0016-6731},
url = {http://www.ncbi.nlm.nih.gov/pmc/articles/PMC1209320/},
number = {2},
urldate = {2017-02-15},
journal = {Genetics},
author = {Wright, Sewall and Dobzhansky, Theodosius},
month = mar,
year = {1946},
pmid = {21021044},
pmcid = {PMC1209320},
pages = {125--156},
file = {PubMed Central Full Text PDF:/Users/Mark/Library/Application Support/Zotero/Profiles/h74ggxun.default/zotero/storage/2GJX2NSH/Wright and Dobzhansky - 1946 - Genetics of Natural Populations. Xii. Experimental.pdf:application/pdf}
}

The title is formatted in Zotero as Genetics of natural populations. XII. experimental reproduction of some of the changes caused by natural selection in certain populations of <i>Drosophila melanogaster</i>

I will feel silly if this is just an option somewhere, but I couldn't find anything.

PCJ3BWK9

Steps to reproduce:
export using BibTeX
export using BetterBibLaTeX
compare

Thanks!

question

Most helpful comment

Not meaning to be pedantic about it, but it is BetterBibLaTeX which exports correctly, not the standard BibLaTeX export. Citeproc (which Zotero uses to format references) expects titles to be in sentence case, but biblatex processors expect titles of English (or language-unspecified) references to be in Title Case, so in order to preserve intent, BBT title-cases those references. You can go off-spec by setting the hidden preference (they talk about macs but the instruction works on all platforms) extensions.zotero.translators.better-bibtex.suppressTitleCase to true, but then references may render wrong; I don't know how biblatex behaves on sentence-cased references.

All 7 comments

Not meaning to be pedantic about it, but it is BetterBibLaTeX which exports correctly, not the standard BibLaTeX export. Citeproc (which Zotero uses to format references) expects titles to be in sentence case, but biblatex processors expect titles of English (or language-unspecified) references to be in Title Case, so in order to preserve intent, BBT title-cases those references. You can go off-spec by setting the hidden preference (they talk about macs but the instruction works on all platforms) extensions.zotero.translators.better-bibtex.suppressTitleCase to true, but then references may render wrong; I don't know how biblatex behaves on sentence-cased references.

The life sciences are a tough place to be for bibliographies, I guess. It seems to work alright with the vanilla BibTeX file.

I'm guessing this trick won't work for standalone Zotero?
I figured it out. Thanks.

Again, no intention to lecture you on your field, which I know nothing about, or about the pragmatics of getting your references out, which must trump any ivory tower discussion about this, but if your references work in sentence case, that is likely just a coincidence of the bibliography style in use.

Fortunately, the case suppression works exactly the same in standalone. But are you sure the title cased references render incorrectly?

I haven't seen any issues so far. I would have been happy to leave them in title case for this project, but for those pesky species names. For future reference, is there a way to suppress casing on individual words/characters without changing that option?

Ah, I see. Uh, yes, there is, but you may not like it: you can surround any part of the reference in <span class="nocase">...</span> and anything between those will not be case-meddled with by either Zotero or BBT.

This is, of course, hideous, and not listed on the Zotero page that details their "rich" markup, but it is supported by virtue of the fact that they use citeproc to produce bibliographies, and citeproc supports it; as a matter of fact, if you want to have references that work both in things like the Word/LibreOffice plugins and BibTeX (and render to the same output), the nocase spans are the only way which will get that done.

The references you have now will not render correctly in some styles available in Zotero itself, and BBT aims to produce BibTeX that respects the specced intent of the references... and that means BBT must do titlecasing by default. But if you're just using Zotero as a fancy BibTeX manager, suppressTitleCase will do the job in the majority of cases.

That's good to know, even if it is a bit of a pain. Thanks.

My pleasure. For completeness: the nocase stuff isn't my design, I'm just implementing a counterpart to zotero functionality. I wouldn't half mind seeing a more elegant solution.

Was this page helpful?
0 / 5 - 0 ratings