Editing styles in Zotero – help needed!

I am trying to edit a style in Zotero to suit the formatting requirements of the journal Australian Archaeology, however I seem to have hit a couple of problems.

I’m subtly modifying the Harvard style #1 created by Julian Onions. It’s surprisingly easy to make slight changes, in no small part due to this great guide by the Zotero crew, however I’m having several difficulties so I am posting this here in the hope that some kind passer by or forum user may be able to help…

Problem 1

I’m not clear on how to insert parentheses around the ‘ed’ abbreviation in my stylesheet for an edited book (as opposed to a book section). I’m assuming this needs to happen in the macro editor definition and have amended it as shown below to make this work for book chapters/sections:

<macro name=”editor”>
<names variable=”editor” delimiter=”, “>
<name and=”text” initialize-with=”. ” delimiter=”, “/>
<label form=”short” prefix=”, (” text-case=”lowercase” suffix=”), “/>

While this works for book sections, this doesn’t insert (ed) behind the editors names on an edited book – just ed. I’m assuming that using the prefix/suffix formatting parameters may is how one achieves this, but I’ve tried to insert this at various points in the layout section with no success! What follows is my layout section as it presently stands:

<text macro=”author” suffix=””/>
<date variable=”issued” prefix=” ” suffix=””>
<date-part name=”year”/>
<if type=”book”>
<group prefix=” ” delimiter=” ” suffix=”.”>
<text macro=”title” />
<text macro=”edition”/>
<text macro=”editor”/>
<text prefix=” ” suffix=”.” macro=”publisher”/>
<else-if type=”chapter”>
<text macro=”title” prefix=” ” suffix=”.”/>
<group class=”container” prefix=” ” delimiter=” “>
<text term=”in” text-case=”capitalize-first”/>
<text macro=”editor”/>
<text variable=”container-title” font-style=”italic” suffix=”,”/>
<text variable=”collection-title” suffix=”.”/>
<text variable=”event” suffix=”.”/>
<group suffix=”.” delimiter=”.”>
<text macro=”pages” />
<text macro=”publisher” prefix=” “/>
<else-if type=”thesis”>
<group prefix=” ” suffix=”.” delimiter=”. “>
<text macro=”title”/>
<text variable=”genre”/>
<text macro=”publisher”/>
<group suffix=”.”>
<text macro=”title” prefix=” “/>
<text macro=”editor” prefix=” “/>
<group class=”container” prefix=” ” suffix=”.”>
<text variable=”container-title” font-style=”italic”/>
<group prefix=”, “>
<text variable=”volume” />
<text variable=”issue” prefix=”(” suffix=”)”/>
<group prefix=”, “>
<label variable=”page” suffix=”.” form=”short”/>
<text variable=”page”/>
<text prefix=” ” macro=”access” suffix=”.”/>

If anyone knows if the prefix/suffix formatting fields will work and if so, where to insert them I’d be most appreciative! I’ve tried inserting them in a few locations with no luck.

Problem 2:

This problem relates to the locator variable in the citation section. I need my citations to look like (Johnson 1989:98). The citation layout is as follows:

<label variable=”locator” suffix=”:” form=”short“/>
<text variable=”locator”/>

This outputs a citation as (Johnson 1989 p.98). It’s easy to remove the period, what I’m not clear on is removing the ‘p’: altering “short” to “long” just outputs page instead of ‘p.’; removing the field ‘form’ or deleting the text highlighted in blue sees this default back to ‘page’. Is there a term that I can insert in place of ‘short’ to suppress the page output entirely? I’ve tried ‘false’ ‘null’ and even deleted the ‘form=”short”‘ section entirely but the result is the same.

Any thoughts or ideas appreciated, either here, by email or over twitter!

You can download the full CSL file here with my alterations to the standard Harvard 1 style: Harvard – Australian Archaeology

(edit) Solutions!

Re issue 1, Avram Lyon (see comments) suggests the following ammendement to the citations section of the layout. Ammendments highlighted in blue:

<option name=”et-al-min” value=”3″/>
<option name=”et-al-use-first” value=”1″/>
<option name=”et-al-subsequent-min” value=”3″/>
<option name=”et-al-subsequent-use-first” value=”1″/>
<option name=”disambiguate-add-year-suffix” value=”true”/>
<option name=”disambiguate-add-names” value=”true”/>
<option name=”disambiguate-add-givenname” value=”true”/>
<layout prefix=”(” suffix=”)” delimiter=”; “>
<group delimiter=” “>
<text macro=”author-short”/>
<group delimiter=”:”>
<text macro=”year-date”/>
<text variable=”locator”/>


Another solution was posted on the Zotero forums, however I’m yet to make this work but will update here if/when it does.

Issue 2 was solved on the forums with the code below, which is inserted into the author macro:

<macro name=”author”>
<names variable=”author”>
<name name-as-sort-order=”all” and=”text” sort-separator=”, ” initialize-with=”.”
delimiter-precedes-last=”never” delimiter=”, “/>
<label form=”short” prefix=” (” suffix=”).” text-case=”lowercase”/>
<names variable=”editor”/>
<text macro=”anon”/>

Related posts

Creative Commons License
Michael Morrison’s Blog by Michael Morrison is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Australia License.

Post Footer automatically generated by Add Post Footer Plugin for wordpress.


  1. Thanks Avram, much appreciated. I shall give that a try and report back. I haven’t had a need to post code here before, and frankly wouldn’t know how to show code in comments anyway!

Comments are closed.