citation style seems to be 'bugged'

edited January 29, 2021
Hello there,

I hope you can help. I am trying to create a particular style. I used 'search by example' and the closest style seemed to be 'The Open University - A251 - Arts course'.

I updated this style using the code editor, until it reached my specifications (my code is copied below). When I updated the style in my document, however, there is a problem with apparently random letters appearing after the date in some bibliography entries,

e.g. Wilson, C. A. (1991ag) Food and drink in Britain: from the Stone Age to recent times, (London: Constable).

In-text citations which refer to these references also do not work, and leave out the author/date, just including the page number e.g. (, 231)

I thought this must have been caused by a mistake in my coding, but when I changed style to match the unmodified version of 'The Open Univeristy - A251 - Arts course' these extra letters/this bug seemed to persist...

would be grateful for any assistance!

here is my code:

<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl"; class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-GB">
<info>
<title>The Open University - A251 - Arts Course - modified</title>
<id>http://www.zotero.org/styles/the-open-university-a251 - modified</id>
<link href="http://www.zotero.org/styles/the-open-university-a251"; rel="self"/>
<link href="https://forums.zotero.org/discussion/1561/harvard-style-testing/?Focus=6556#Comment_6556"; rel="documentation"/>
<author>
<name>Julian Onions</name>
<email>julian.onions@gmail.com</email>
</author>
<category citation-format="author-date"/>
<category field="history"/>
<summary>Style for The Open University Arts course A251</summary>
<updated>2021-01-29T10:33:34+00:00</updated>
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
</info>
<macro name="editor">
<names variable="editor" prefix="(" suffix=")" delimiter=", ">
<name and="text" initialize-with=". " delimiter=", "/>
<label form="short" prefix=", "/>
</names>
</macro>
<macro name="author">
<names variable="author">
<name name-as-sort-order="all" and="text" sort-separator=", " initialize-with=". " delimiter=", "/>
<label form="short" prefix=" (" suffix=")"/>
<substitute>
<names variable="editor"/>
<text macro="title"/>
</substitute>
</names>
</macro>
<macro name="author-short">
<choose>
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
<choose>
<if variable="volume" match="all">
<text variable="volume"/>
</if>
</choose>
</if>
<else>
<names variable="author">
<name form="short" and="text" delimiter=", " initialize-with=". "/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<choose>
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
<text variable="title" form="short" font-style="italic"/>
</if>
<else>
<text variable="title" form="short"/>
</else>
</choose>
</substitute>
</names>
<date variable="issued" prefix=", ">
<date-part name="year"/>
</date>
</else>
</choose>
</macro>
<macro name="access">
<choose>
<if variable="URL">
<text term="online" prefix="[" suffix="] "/>
<text variable="URL"/>
<group prefix=" (" suffix=")">
<text term="accessed" text-case="capitalize-first" suffix=" "/>
<date variable="accessed">
<date-part name="month" suffix=" "/>
<date-part name="day" suffix=", "/>
<date-part name="year"/>
</date>
</group>
</if>
</choose>
</macro>
<macro name="title">
<choose>
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
<text variable="title" font-style="italic"/>
</if>
<else>
<text variable="title"/>
</else>
</choose>
</macro>
<macro name="publisher">
<group delimiter=": " prefix="(" suffix=")">
<text variable="publisher-place"/>
<text variable="publisher"/>
</group>
</macro>
<citation et-al-min="2" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true">
<layout prefix="(" suffix=")" delimiter="; ">
<text macro="author-short"/>
<text variable="locator" prefix=", "/>
</layout>
</citation>
<bibliography hanging-indent="true" et-al-min="7" et-al-use-first="6">
<sort>
<key macro="author"/>
</sort>
<layout>
<group delimiter=" ">
<text macro="author"/>
<date variable="issued" prefix="(" suffix=")">
<date-part name="year"/>
</date>
</group>
<choose>
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
<group suffix=",">
<text macro="title" prefix=" "/>
<text macro="editor" prefix=" "/>
</group>
<text prefix=" " suffix="." macro="publisher"/>
</if>
<else-if type="chapter paper-conference" match="any">
<text macro="title" prefix=" " quotes="true"/>
<group prefix=" ">
<text term="in"/>
<names variable="editor" prefix=" " suffix="," delimiter=", ">
<name and="text" sort-separator=", " initialize-with=". "/>
<label form="short" prefix=" (" suffix=")"/>
</names>
<text variable="container-title" font-style="italic" prefix=" " suffix="."/>
<text variable="collection-title" prefix=" " suffix="."/>
<group suffix=".">
<text macro="publisher" prefix=" "/>
<group prefix=", ">
<label variable="page" form="short" suffix=" "/>
<text variable="page"/>
</group>
</group>
</group>
</else-if>
<else>
<group suffix=".">
<text macro="title" prefix=" " quotes="true"/>
<text macro="editor" prefix=" "/>
</group>
<group prefix=" " suffix=".">
<text variable="container-title" font-style="italic"/>
<group prefix=", ">
<text variable="volume"/>
<text variable="issue" prefix="/"/>
</group>
<group prefix=", ">
<label variable="page" form="short"/>
<text variable="page"/>
</group>
</group>
</else>
</choose>
<text prefix=" " macro="access" suffix="."/>
</layout>
</bibliography>
</style>
Sign In or Register to comment.