If the first letter of the first word of a title is lowercase, it is probably reasonable to assume that this was intentional and that the word should not be uppercase under any circumstances. In such cases, I think that BBT should escape the first word or letter to prevent case changes.
For example, currently BBT exports this title:
psychmeta: an R package for psychometric meta-analysis
using Better BibLaTeX as:
@article{Dahlkepsychmetapackagepsychometric,
langid = {english},
title = {Psychmeta: An {{R}} Package for Psychometric Meta-Analysis},
shorttitle = {Psychmeta},
journaltitle = {Applied Psychological Measurement},
shortjournal = {Appl. Psychol. Meas.},
author = {Dahlke, Jeffrey A. and Wiernik, Brenton M.},
pubstate = {in press}
}
rather than:
@article{Dahlkepsychmetapackagepsychometric,
langid = {english},
title = {{psychmeta}: An {{R}} Package for Psychometric Meta-Analysis},
shorttitle = {{psychmeta}},
journaltitle = {Applied Psychological Measurement},
shortjournal = {Appl. Psychol. Meas.},
author = {Dahlke, Jeffrey A. and Wiernik, Brenton M.},
pubstate = {in press}
}
@fbennett, I use the citeproc titlecaser to do this. Is this something you're interested in as a behavior? If not, I can work around it (I already mess around with the titlecaser results).
@njbart, general comments?
It looks reasonable to me, to except the first word from uppercasing if its first letter is lowercase in the source. @njbart?
Reasonable as in "I'll change the citeproc-js title caser"?
Yes, but only if it won't trigger an uprising. :-)
On Tue, Apr 17, 2018, 17:56 Emiliano Heyns notifications@github.com wrote:
Reasonable as in "I'll change the citeproc-js title caser"?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/retorquere/zotero-better-bibtex/issues/952#issuecomment-381907984,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAEmSqMMVoX_Ui94v4AK4fWSRXiUvn3_ks5tpa5VgaJpZM4TXT6M
.
I promise I won't rise up. I can vouch for my teenager son that he won't rise up either (not before noon at least).
I’d agree this might make sense, but I’m afraid it wouldn’t be in accordance with the CSL specs:
Title Case Conversion
Title case conversion (with text-case set to “title”) for English-language items is performed by:
1. For [all-]uppercase strings, the first character of each word remains capitalized. All other letters are lowercased.
2. For lower or mixed case strings, the first character of each lowercase word is capitalized. The case of words in mixed or uppercase stays the same.
In both cases, stop words are lowercased, unless they are the first or last word in the string, or follow a colon. (http://docs.citationstyles.org/en/1.0.1/specification.html#title-case-conversion)
I’ve been using the – admittedly ugly, but established – <span class="nocase">…</span> syntax in such cases, which does get properly escaped upon export by BBT.
Uh-oh, the uprising is here :worried: .
(JK, @njbart makes a good point, we don't want to violate spec here)
Still, the point here is about preserving intent. If the first letter of a sentence is lowercased, in a sentence-cased field (as the Zotero fields are), then it makes sense for BBT to not uppercase this first letter. And possibly protect the first word, but that is going to be tricky.
It would certainly help me with citing R packages 😀
Can you get me a sample reference by way of right-click / BBT / error report?
ID YTT6483J
@njbart the current fallout from this is here.
So I've run some tests, and MLA for example capitalizes Psychmeta in that reference unless you add nocase. That means that the intent in Zotero/citeproc is that all-lowercase is non-protected.
I guess I'm maybe not understanding the BibTeX convention of storing titles in Title Case? If I use citeproc-js with Zotero natively with a sentence case style (i.e., no case is specified) such as APA, the test reference I submitted is rendered correctly as psychmeta: psychometric meta-analysis toolkit. But if I try to use the same style with, for example pandoc, it outputs incorrectly as Psychmeta: psychometric meta-analysis toolkit, because BBT converted the title to Title Case in the interim.
According to Chicago and MLA styles, Psychmeta should be capitalized in this reference, but not in APA or other sentence case styles. Zotero/citeproc handles this by assuming that all titles are stored in sentence case, but BBT breaks this assumption by storing them all in Title Case.
Okay, looking at https://github.com/retorquere/zotero-better-bibtex/issues/383, apparently this is a (to me, completely bizarre) convention of bib(la)tex. Rather than this complicated workaround I suggested, could you just make the title-casing an optional preference so that BBT can be used with pandoc, which follows the CSL conventions?
shrug bib(la)tex is pretty bizarre (this is one of the more mundane points really), but it predates citeproc by a wide margin. I assume there were good reasons to go with title-case as the base. I'm not sure why citeproc chose to go differently other than that sentence case appeals do a different aesthetic.
You can set the hidden preference suppressTitleCase to true, and BBT will back off.
BTW, pandoc is just wrong on how they interpret Bib(La)TeX, and not trivially wrong either: they're going against behavior confirmed by the biblatex authors. People who want CSL semantics should use Better CSL JSON or Better CSL YAML, which avoids the problem of the (by necessity) imperfect translation of Zotero references to BibTeX, followed by the broken parsing of these references of pandoc. This has come up time and again. This is a clear pandoc bug that in my opinion they should fix, or tell people about the pitfalls of using the broken BibTeX interpreter in pandoc.
Actually, the more that I think about it this is an issue even for BibTeX. If a person has stored the first letter of a title in lowercase, that is only because they are expecting Zotero to leave it like that; so, to achieve consistent formatting with BibTeX, which would otherwise leave the first letter Captitalized when converting to sentence case, this first word should be escaped (and in lowercase) when exporting to Better BibTeX.
That may or may not be their expectation but that's just not how it works. The sample reference you gave me capitalizes the first word under MLA8.
I can do non-capitalizing of the first letter, that sounds reasonable (I'd have to do tests, and I'd need @njbart to chime in). But brace-protecting doesn't seem to be a good idea. Clearly in Zotero/citeproc it's not protected (given the MLA behavior).
I'm still pretty ambivalent about this. Clearly the best (if least convenient) way is to add nocase around this word. This is the supported behavior that will do what everyone expects.
To clarify, nocase is not what would work universally. Chicago and MLA would want this capitalized, but sentence case styles wouldn’t. not uppercasing the first letter (no braces, sorry for the confusion) would yield correct results across the board and consistent behavior with Zotero.
:robot: this is your friendly neighborhood build bot announcing test build 5.0.151.7189 ("adjust tests for #952").
I would say rather that Chicago and MLA do capitalize this -- in Zotero. Whether it should be capitalized is a different matter (or we wouldn't need nocase at all).
The MWE below for example does not capitalize. So the behavior between Zotero and BibTeX is not cleanly mappable; psychmeta cannot be protected at time of export because that prevents case-meddling as citeproc clearly does with MLA, but at the same time Bib(La)TeX does no case-meddling here. Whereas <span class="nocase">psychmeta</span>: Psychometric Meta-Analysis Toolkit deterministically gets you a lowercase psychmeta everywhere, regardless of style, both in Zotero and in Bib(La)TeX.
\documentclass{article}
\usepackage[american]{babel}
\usepackage[style=mla]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{test.bib}
@unpublished{Dahlkepsychmetapsychometricmetaanalysis2018,
author = {Dahlke, Jeffrey A. and Wiernik, Brenton M.},
shorttitle = {psychmeta},
title = {psychmeta: Psychometric Meta-Analysis Toolkit},
date = {2018-06}
}
\end{filecontents*}
\addbibresource{test.bib}
\begin{document}
From \cite{Dahlkepsychmetapsychometricmetaanalysis2018}
\printbibliography
\end{document}
7189 does not titlecase the first letter if it is lowercase. I'm still not sure whether this is the right thing to do, but you can test to see if it it least does what you want.
@bwiernik I could really use feedback on 7189
Sorry. Had a major deadline. Will try to test today.
No, I'm not able to get consistent results that yield the correct formatting across styles, so let's just leave the behavior as it is current. Sorry for the hassle.
OK, thanks for the confirmation.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.