Text in edition field

edited June 11, 2020
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:


<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
  • Yeah, that's not right; also happens for text-case="sentence".
    If @fbennett could take a look, that'd be great.
    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?
    No -- you typically wouldn't want 1 in the edition field unless it's a useful distinction.
  • Thanks a lot!
  • Has this problem been solved?
    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
  • Nothing new
    @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?
  • Many thanks.
    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
Sign In or Register to comment.