Adding italics in CSL introduces a random comma?

edited February 23, 2017
I'm editing the "report" type for AMA style. This is what I have so far:

<else-if type="report" match="any">
<group prefix=" " delimiter=" ">
<text macro="editor"/>
<text variable="container-title" text-case="title" font-style="italic" suffix=","/>
<text variable="collection-title" font-style="italic" suffix=","/>
<group>
<text macro="publisher"/>
<group prefix=", ">
<date variable="issued">
<date-part name="year" suffix=","/>
</date>
<text variable="genre" font-style="italic" prefix=", "/>
<text variable="number" prefix=", No. "/>


It works fine, and gives me this:

Bongaarts J, Completing the fertility transition in the developing world: the role of educational differences and fertility preferences, New York: Population Council, 2003, Policy Research Division Working Papers, No. 177.

However, I would like "Policy Research Division Working Papers" (in the genre field) to be italicized, so I do this:

<else-if type="report" match="any">
<group prefix=" " delimiter=" ">
<text macro="editor"/>
<text variable="container-title" text-case="title" font-style="italic" suffix=","/>
<text variable="collection-title" font-style="italic" suffix=","/>
<group>
<text macro="publisher"/>
<group prefix=", ">
<date variable="issued">
<date-part name="year" suffix=","/>
</date>
<text variable="genre" font-style="italic" prefix=", "/>
<text variable="number" prefix=", No. "/>


Now the genre is italicized BUT there is a weird new comma in front of it, so it looks like this:

Bongaarts J, Completing the fertility transition in the developing world: the role of educational differences and fertility preferences, New York: Population Council, 2003,, Policy Research Division Working Papers, No. 177.

What am I doing wrong? Thanks in advance for any suggestions!
Sign In or Register to comment.