Text in edition field
Hi,
while working/fiddling with the style I am slowly developing, I noticed a strange behavior regarding the way the text in edition fields is displayed.
The code is a follows:
The output for numeric edition entries is fine, but for non-numeric entries, other words also get capitalized:
Zotero UI Field entry: second enlarged and revised edition
Output: Second enlarged and Revised edition
After playing around for some time, I realized that commas, semicolons and the word "and" apparently all mark the "end of an entry" and thus the next word is regarded as a "new first word".
This also happens in CMOS 16th edition note, on which I'm basing the style I'm working on (for reproducing the effect).
Now my questions:
(1) did I figure out the reason correctly? If not - why do I get the output I am getting,
(2) how do I get the "correct" output, namely "Second enlarged and revised edition"?
Any while I am at it, is there a way to exclude certain numeric values, i.e. "1" for first edition? Or is the only way around to simply leave the field empty?
Many thanks in advance and best wishes,
Daniel
while working/fiddling with the style I am slowly developing, I noticed a strange behavior regarding the way the text in edition fields is displayed.
The code is a follows:
<if is-numeric="edition">
<group delimiter=" ">
<number variable="edition" form="ordinal"/>
<text term="edition" form="short"/>
</group>
</if>
<else>
<text variable="edition" text-case="capitalize-first" suffix="."/>
</else>
The output for numeric edition entries is fine, but for non-numeric entries, other words also get capitalized:
Zotero UI Field entry: second enlarged and revised edition
Output: Second enlarged and Revised edition
After playing around for some time, I realized that commas, semicolons and the word "and" apparently all mark the "end of an entry" and thus the next word is regarded as a "new first word".
This also happens in CMOS 16th edition note, on which I'm basing the style I'm working on (for reproducing the effect).
Now my questions:
(1) did I figure out the reason correctly? If not - why do I get the output I am getting,
(2) how do I get the "correct" output, namely "Second enlarged and revised edition"?
Any while I am at it, is there a way to exclude certain numeric values, i.e. "1" for first edition? Or is the only way around to simply leave the field empty?
Many thanks in advance and best wishes,
Daniel
If @fbennett could take a look, that'd be great. No -- you typically wouldn't want 1 in the edition field unless it's a useful distinction.
I mean that the Zotero UI Field entry "second enlarged and revised edition" becomes "Second enlarged and Revised edition"?
I tried to work around it with placing the text in quotation marks and also using richt text formatting. Neither works.
Any suggestions?
Many thanks,
Daniel
@fbennett -- for some reason citeproc-js capitalizes the word "Revised" in the string "second enlarged and revised edition" in the edition variable when text-case="capitalize-first" or "sentence" is applied -- could you take a look?
For the time being, I have removed the text-case code. Now it just has to be entered with the first letter set manually as uppercase.
Best wishes,
Daniel