Help with updating a citation style

edited December 1, 2023
Hello, I have been asked to update the "edition" field in this citation style https://github.com/citation-style-language/styles/blob/master/harvard-limerick.csl, currently it is showing as...
<macro name="edition">
<group delimiter=" ">
<choose>
<if is-numeric="edition">
<number variable="edition" form="ordinal"/>
</if>
<else>
<text variable="edition" suffix="."/>
</else>
</choose>
<text value="ed"/>
</group>
</macro>


However this generates citations which look like this , the edition is appearing twice as edition and ed.

Curran, T. (Thomas A. and Ladd, A. (1999) SAP Business Blueprint : Understanding Enterprise Supply Chain Management, Second edition. ed, Upper Saddle River, N.J: Prentice Hall PTR.

I need it to look like this...

Curran, T. A. and Ladd, A. (1999) SAP Business Blueprint : Understanding Enterprise Supply Chain Management, 2nd ed., Upper Saddle River: Prentice Hall PTR.

However I am unsure how to edit the script to reflect the edition in the latter citation, I know I then have to submit this github for approval.

Apologies I know this is probably a very basic question but I am lost.
Thanks
Anne

  • edited December 1, 2023
    Mainly this is a data entry issue: the item has "Second edition" instead of "2" in the edition field. With "2", you'd get "2nd ed" already.

    You could consider a more commonly used edition macro that looks like this:
    <choose>
    <if is-numeric="edition">
    <group delimiter=" ">
    <number variable="edition" form="ordinal"/>
    <text term="edition" form="short"/>
    </group>
    </if>
    <else>
    <text variable="edition"/>
    </else>
    </choose>


    That would leave the content of the field alone if it's not entered as a number (so you'd just get "Second edition" in the above example).
  • Thank you for this, I never thought of that if the word second is in the catalogue record rather than the numeric value 2 obviously it would use the word second, sorry I never considered that, I got so lost in trying to figure out how to update the script
  • Is there a macro that would translate the data from "second edition" to "2nd ed." if it was entered non-numerically?
Sign In or Register to comment.