New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export article title capitalisation: 'P-Type vs 'n-type' #1913
Comments
Zotero recognizes some markup for this: https://www.zotero.org/support/kb/rich_text_bibliography So what you'd want is to have in Zotero
This will work in both BBT exports and in the Zotero Word functionality. |
Thanks for the swift response, but I think you swapped expected and actual behaviour. Starting from 'p-type' and 'n-type' in Zotero's The markup with |
Oh, sorry, I did swap them. I'll have a look. |
The issue is labelled with awaiting-user-feedback, but I don't think there is anything for me to add right now. Or is there? |
Nope, it's on me now, just haven't had time yet. |
It's an error in Zotero more broadly: https://groups.google.com/g/zotero-dev/c/Kx5saARqP3w . I'll see if I can find a better title-caser, but chances are not great, and the CSL processor that Zotero uses moves a little slow sometimes. |
Okay, understood. Thanks for looking into this. |
You're very welcome. @njbart, what is the proper titlecasing for something like
and
Should |
It depends. APA would capitalize these two words, CMOS would not. On the rules behind these and other capitalization styles, see https://titlecaseconverter.com/. If bibtex or biblatex are the target formats, I’d probably capitalize wherever the requirements of the various styles differ (remember that bibtex and biblatex have a sentence-caser, but not a title-caser, so anything that is already in sentence case doesn’t even get a chance to become title-cased), and hope that the bibtex or biblatex styles used are smart enough to sentence-case whatever they see fit. |
That is indeed what I'm trying to target. I had hoped that there was a set title-case format for bib(la)tex in the same way there is one for CMOS or APA. I'm trying different javascript title-casers and they all fail in different ways in my test suite, but if I knew what to aim for, I could pick the best of the lot and try to fix it. In the end there's no escaping that sometimes |
So given that, would I have |
Wait - APA is not a good example: It does have title-casing rules, but title-case is actually used only in chapter/section headings, not in bibliographies (except for journal titles, but these should be entered as-is anyway). So APA sentence-cases titles, and anything title-cased by BBT according to the CMOS rules can be expected to come out correctly as well if biblatex-apa is used. The problem is that there are other styles that call for title-casing titles in bibliographies, with slightly different rules: I’m aware of at least AMA and MLA (not sure whether there are others). I tend to think that CMOS is somewhat more popular that the others, so I would go with their rules as a default, but of course this would require some kind of BBT postscript or biblatex sourcemap trickery to get things 100% right in other styles. And I was too optimistic about biblatex styles being smart WRT title-casing. At least biblatex-chicago (the only one I checked) outputs titles capitalized exactly as they are provided in the biblatex file. |
I was afraid that would be the case. I'll start off with CMOS, and I'll likely add preferences for stable alternate title-casings. |
I've tested the 8 libraries from npmjs that had updates in the last year; the library that gets the best (that is, acceptable) results is title but that has long-standing bugs that are deal-breakers but that seem to get no attention. I've posted on zotero-dev about the CSL title-caser error but that also seems to get no traction. Currently seems like 6 of the one, half a dozen of the other between them. |
What would you make of |
With |
Zotero version: 5.0.96.3
BBT version: 5.4.29
Support log ID: XVZG6T98-refs-euc
Exporter used: Better BibTeX
Expected behavior:
That the Zotero title entry "Design parameters for optimizing the efficiency of thermoelectric generators utilizing p-type and n-type lead telluride" of a journal article gets exported with title case applied as
title = {Design Parameters for Optimizing the Efficiency of Thermoelectric Generators Utilizing P-Type and N-Type Lead Telluride}
.Actual behavior:
Unlike the 'p' in 'p-type', the 'n' in 'n-type' remains in lower case and the exported title is
title = {Design Parameters for Optimizing the Efficiency of Thermoelectric Generators Utilizing P-Type and n-Type Lead Telluride}
.The text was updated successfully, but these errors were encountered: