biblatex.js and uppercase
Hy!
I'm using biblatex.js
My problem is:
in Zotero, title field:
becomes in my file.bib:
Why does the parenthese appear after '{' ??
Thanks
C
I'm using biblatex.js
My problem is:
in Zotero, title field:
My title (XX-XXI century)
becomes in my file.bib:
title = {My title {(XX-XXI} century)}
Why does the parenthese appear after '{' ??
var protectCaps = new ZU.XRegExp("\\b\\p{Letter}+\\p{Uppercase_Letter}\\p{Letter}*", 'g')
Thanks
C
Second point: That isn't the code used by default. By default, case is preserved with:
protectCapsRE = new ZU.XRegExp(
"(.)\\b(\\p{Letter}*\\p{Uppercase_Letter}\\p{Letter}*)" // Non-initial words with capital letter anywhere
+ "|^(\\p{Letter}+\\p{Uppercase_Letter}\\p{Letter}*)" // Initial word with capital in non-initial position
, 'g');
This captures the parenthesis.
You can add the hidden bool extensions.zotero.translators.BibTeX.export.dontProtectInitialCase and set it to true in about:config. This would use the regex you gave and the parenthesis wouldn't be put in the preserving brackets. But this would impact other capitalization on export too.
title = {My title ({XX}-{XXI} century)},
which also corresponds to the XRegex you helpfully posted.
Are you using the better bibtex add-on? The developer, I believe, has a custom version on the biblatex translator.
Edit: I'm pretty sure I'm right here for biblatex. noksagt's answer is correct for regular bibtex.
extensions.zotero.translators.BibTeX.export.dontProtectInitialCase does not appear in my about:config
@adamsmith: I'm using BibLaTeX.js 2014-08-25 06:43:15. What's your codeline?