Anglia Ruskin Harvard Referencing 2010
Does anyone have a citation style adapted for Anglia Ruskin University' latest Harvard Referencing requirements? They've made lots of changes and trying to include them in the default 'Harvard Reference Author-Date 1' style is a pain!
I got certain things correct at first (like italics for titles) but i broke it once i started including the medium type '[online]' and '[blog]' for instance, using 'if' functions. They keep switching between italics and non-italics for titles (Journal titles use non-italics, with the container-title using italics, while newspaper articles uses the opposite formating).
Anyhow, I'm just tired of fixing it. So thank you in advance!
BTW, the requirements are at http://libweb.anglia.ac.uk/referencing/harvard.htm
I got certain things correct at first (like italics for titles) but i broke it once i started including the medium type '[online]' and '[blog]' for instance, using 'if' functions. They keep switching between italics and non-italics for titles (Journal titles use non-italics, with the container-title using italics, while newspaper articles uses the opposite formating).
Anyhow, I'm just tired of fixing it. So thank you in advance!
BTW, the requirements are at http://libweb.anglia.ac.uk/referencing/harvard.htm
<?xml version="1.0" encoding="UTF-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" xml:lang="en" class="in-text" >
<info>
<title>Anglia Ruskin Harvard Referencing</title>
<id>http://www.zotero.org/styles/harvardARU</id>
<link href="http://www.zotero.org/styles/harvard1"/>
<author>
<name>Shaun Goh</name>
<email>uswsing@gmail.com</email>
</author>
<category term="author-date"/>
<category term="generic-base"/>
<updated>2010-10-04T23:00:58+00:00</updated>
<summary>Anglia Rusking Harvard Referencing</summary>
<link href="http://libweb.anglia.ac.uk/referencing/harvard.htm" rel="documentation"/>
<rights>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/</rights>
</info>
<macro name="editor">
<names variable="editor" delimiter=", ">
<name and="symbol" initialize-with=". " delimiter=", "/>
<label form="short" prefix=", " text-case="lowercase" suffix="."/>
</names>
</macro>
<macro name="anon">
<text term="anonymous" form="short" text-case="capitalize-first"/>
</macro>
<macro name="author">
<names variable="author">
<name name-as-sort-order="all" and="symbol" sort-separator=", " initialize-with="."
delimiter-precedes-last="never" delimiter=", "/>
<label form="short" prefix=" " suffix="." text-case="lowercase"/>
<substitute>
<names variable="editor"/>
<text macro="anon"/>
</substitute>
</names>
</macro>
<macro name="author-short">
<names variable="author">
<name form="short" and="symbol" delimiter=", " delimiter-precedes-last="never" initialize-with=". "/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<text macro="anon"/>
</substitute>
</names>
</macro>
<macro name="access">
<group>
<text value="Available at:" suffix=" <"/>
<text variable="URL" text-decoration="none"/>
<group prefix="> [" suffix="]">
<text term="accessed" text-case="capitalize-first" suffix=" "/>
<date variable="accessed">
<date-part name="day" suffix=" "/>
<date-part name="month" suffix=" "/>
<date-part name="year"/>
</date>
</group>
</group>
</macro>
<macro name="title">
<choose>
<if type="book thesis" match="any">
<text variable="title" font-style="italic"/>
</if>
<if type="webpage" match="any">
<text variable="title" font-style="italic"/>
</if>
<if type="article" match="any">
<text variable="title" font-style="italic"/>
</if>
<else>
<text variable="title"/>
</else>
</choose>
</macro>
<macro name="publisher">
<group delimiter=": ">
<text variable="publisher-place"/>
<text variable="publisher"/>
</group>
</macro>
<macro name="year-date">
<choose>
<if variable="issued">
<date variable="issued">
<date-part name="year"/>
</date>
</if>
<else>
<text term="no date"/>
</else>
</choose>
</macro>
<macro name="edition">
<choose>
<if is-numeric="edition">
<group delimiter=" ">
<number variable="edition" form="ordinal"/>
<text term="edition" form="short" suffix="."/>
</group>
</if>
<else>
<text variable="edition" suffix="."/>
</else>
</choose>
</macro>
<macro name="pages">
<group>
<label variable="page" form="short" include-period="true" suffix=" "/>
<text variable="page"/>
</group>
</macro>
<citation>
<option name="et-al-min" value="4"/>
<option name="et-al-use-first" value="1"/>
<option name="et-al-subsequent-min" value="4"/>
<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=", ">
<group delimiter=" ">
<text macro="author-short" suffix=", "/>
<text macro="year-date"/>
</group>
<group>
<label variable="locator" suffix="." form="short"/>
<text variable="locator"/>
</group>
</group>
</layout>
</citation>
<bibliography>
<option name="hanging-indent" value="true"/>
<option name="et-al-min" value="4"/>
<option name="et-al-use-first" value="1"/>
<sort>
<key macro="author"/>
<key variable="title"/>
</sort>
<layout>
<text macro="author" suffix=","/>
<date variable="issued" prefix=" " suffix=".">
<date-part name="year"/>
</date>
<choose>
<if type="book">
<group prefix=" " delimiter=" " suffix=",">
<text macro="title" suffix=". "/>
<text macro="edition"/>
<text macro="editor"/>
</group>
<text prefix=" " suffix="." macro="publisher"/>
</if>
<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" suffix="."/>
<text variable="collection-title" suffix="."/>
<text variable="event" suffix="."/>
<group suffix="." delimiter=", ">
<text macro="publisher" prefix=" "/>
<text macro="pages" />
</group>
</group>
</else-if>
<else-if type="thesis">
<group prefix=" " suffix="." delimiter=". ">
<text macro="title"/>
<text variable="genre"/>
<text macro="publisher"/>
</group>
</else-if>
<else-if type="webpage">
<group prefix=" " suffix="." delimiter=". ">
<text macro="title" font-style="italic" suffix=" [online]" />
</group>
</else-if>
<else-if type="blogPost">
<group prefix=" " suffix="." delimiter=". ">
<text macro="title" font-style="italic" suffix=" [blog]"/>
</group>
</else-if>
<else>
<group suffix=".">
<text macro="title" prefix=" " />
<text macro="editor" prefix=" "/>
</group>
<group class="container" prefix=" " suffix=".">
<text variable="container-title"/>
<group prefix=", ">
<text variable="volume" />
<text variable="issue" prefix="(" suffix=")"/>
</group>
<group prefix=", ">
<label variable="page" suffix="." form="short"/>
<text variable="page"/>
</group>
</group>
</else>
</choose>
<text prefix=" " macro="access" suffix="."/>
</layout>
</bibliography>
</style>
[Code moved to post below]
It's optimized for citing webpages and online newspaper articles, which I do alot of (e.g. it has the '[online]' thingy among other things) so its kind of incomplete and unfit for the style repository.
Anyone got ideas on how to implement the 'website type' thingy to help Zotero differentiate between blogs, websites, online articles, online publications etc.?
<macro name="editor">
<names variable="editor" delimiter=", ">
<name and="symbol" initialize-with=". " delimiter=", "/>
<label form="short" prefix=", " text-case="lowercase" suffix="."/>
</names>
</macro>
<macro name="anon">
<text term="anonymous" form="short" text-case="capitalize-first"/>
</macro>
<macro name="author">
<names variable="author">
<name name-as-sort-order="all" and="symbol" sort-separator=", " initialize-with="."
delimiter-precedes-last="never" delimiter=", "/>
<label form="short" prefix=" " suffix="." text-case="lowercase"/>
<substitute>
<names variable="editor"/>
<text macro="anon"/>
</substitute>
</names>
</macro>
<macro name="author-short">
<names variable="author">
<name form="short" and="symbol" delimiter=", " delimiter-precedes-last="never" initialize-with=". "/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<text macro="anon"/>
</substitute>
</names>
</macro>
<macro name="access">
<group>
<text value="Available at:" suffix=" <"/>
<text variable="URL" text-decoration="none"/>
<group prefix="> [" suffix="]">
<text term="accessed" text-case="capitalize-first" suffix=" "/>
<date variable="accessed">
<date-part name="day" suffix=" "/>
<date-part name="month" suffix=" "/>
<date-part name="year"/>
</date>
</group>
</group>
</macro>
<macro name="title">
<choose>
<if type="book thesis" match="any">
<text variable="title" font-style="italic"/>
</if>
<else-if type="webpage" match="any">
<text variable="title" font-style="italic"/>
</else-if>
<else-if type="article-magazine" match="any">
<text variable="title" font-style="italic"/>
</else-if>
<else>
<text variable="title"/>
</else>
</choose>
</macro>
<macro name="publisher">
<group delimiter=": ">
<text variable="publisher-place"/>
<text variable="publisher"/>
</group>
</macro>
<macro name="year-date">
<choose>
<if variable="issued">
<date variable="issued">
<date-part name="year"/>
</date>
</if>
<else>
<text term="no date"/>
</else>
</choose>
</macro>
<macro name="edition">
<choose>
<if is-numeric="edition">
<group delimiter=" ">
<number variable="edition" form="ordinal"/>
<text term="edition" form="short" suffix="."/>
</group>
</if>
<else>
<text variable="edition" suffix="."/>
</else>
</choose>
</macro>
<macro name="pages">
<group>
<label variable="page" form="short" include-period="true" suffix=" "/>
<text variable="page"/>
</group>
</macro>
<citation>
<option name="et-al-min" value="4"/>
<option name="et-al-use-first" value="1"/>
<option name="et-al-subsequent-min" value="4"/>
<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=", ">
<group delimiter=" ">
<text macro="author-short" suffix=","/>
<text macro="year-date"/>
</group>
<group>
<label variable="locator" suffix="." form="short"/>
<text variable="locator"/>
</group>
</group>
</layout>
</citation>
<bibliography>
<option name="hanging-indent" value="true"/>
<option name="et-al-min" value="4"/>
<option name="et-al-use-first" value="1"/>
<sort>
<key macro="author"/>
<key variable="title"/>
</sort>
<layout>
<text macro="author" suffix=","/>
<date variable="issued" prefix=" " suffix=".">
<date-part name="year"/>
</date>
<choose>
<if type="book">
<group prefix=" " delimiter=" " >
<text macro="title" suffix="."/>
<text macro="edition"/>
<text macro="editor" suffix=","/>
</group>
<text prefix=" " suffix="." macro="publisher"/>
</if>
<else-if type="article-journal">
<group prefix=" " delimiter=" ">
<text macro="title" suffix="."/>
<text variable="container-title" font-style="italic" suffix=","/>
</group>
<text variable="volume" prefix=" " />
<text variable="issue" prefix="(" suffix="), " />
<text macro="pages" suffix="."/>
</else-if>
<else-if type="article-newspaper">
<group prefix=" " delimiter=" ">
<text macro="title" suffix="."/>
<text variable="container-title" font-style="italic" suffix=","/>
<text value="[online]"/>
</group>
<date variable="issued">
<date-part name="day" suffix=" "/>
<date-part name="month" suffix="."/>
</date>
</else-if>
<else-if type="article-magazine">
<group prefix=" " delimiter=" ">
<text macro="title" suffix="."/>
<text variable="container-title" suffix=","/>
<text value="[online]"/>
</group>
</else-if>
<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" suffix="."/>
<text variable="collection-title" suffix="."/>
<text variable="event" suffix="."/>
<group suffix="." delimiter=", ">
<text macro="publisher" prefix=" "/>
<text macro="pages" />
</group>
</group>
</else-if>
<else-if type="thesis">
<group prefix=" " suffix="." delimiter=". ">
<text macro="title"/>
<text variable="genre"/>
<text macro="publisher"/>
</group>
</else-if>
<else-if type="webpage">
<group prefix=" " delimiter=" ">
<text macro="title" font-style="italic" suffix="." />
<text value="[online]"/>
<group prefix="(Updated " suffix=")">
<date variable="issued">
<date-part name="day" suffix=" "/>
<date-part name="month" form="short" suffix=" "/>
<date-part name="year"/>
</date>
</group>
</group>
</else-if>
<else>
<choose>
<group suffix=".">
<text macro="title" prefix=" " />
<text macro="editor" prefix=" "/>
</group>
<group class="container" prefix=" " suffix=".">
<text variable="container-title"/>
<group prefix=", ">
<text variable="volume" />
<text variable="issue" prefix="(" suffix=")"/>
</group>
<group prefix=", ">
<label variable="page" suffix="." form="short"/>
<text variable="page"/>
</group>
</group>
</choose>
</else>
</choose>
<text prefix=" " macro="access" suffix="."/>
</layout>
</bibliography>
</style>
This would solve occurrences like (Updated 10 Jan 2010a). Thanks in advance!
that shouldn't ever happen. Can you narrow down when you're seeing this? The year suffix should only apply to issue dates.
@usws: If that intuition is correct, you can remove year-suffixes by removing the following line from the style:
<option name="disambiguate-add-year-suffix" value="true"/>
(I could be wrong about your intentions, but that seems to be the gist -- although it's not a good idea, since if you remove year suffixes, it will become impossible to identify which bib items apply to ambiguous citations.)
If you're finding it hard to control the style, you might consider just starting over. That's not as drastic as it may sound. CSL is very compact and elegant, and making simple changes should be easy; but when a style grows excessively complex, fixing one thing can break others, and the project can become burdensome. By starting over, you would be able to take advantage of what you have learned about the logic of CSL. in the meantime.
Conference Papers:
Brown, J., 2005. Evaluating surveys of transparent governance. In: UNDESA (United Nations Department of Economic and Social Affairs), 6th Global forum on reinventing government: towards participatory and transparent governance. Seoul, Republic of Korea 24-27 May 2005. New York: United Nations.
Webpages:
National Electronic Library for Health, 2003. Can walking make you slimmer and healthier? (Hitting the headlines article) [online] (Updated 16 Jan 2003) Available at: <http://www.library.nhs.uk> [Accessed 10 April 2005].
I use the code below for those sections and was wondering if there is an alternative to the 'issued' date variable which doesn't include the year suffix. The problem occurs when you generate multiple references with the same author and year, with the suffix appearing on every instance of the 'year' variable.
Thank you guys for your time and help!
<date variable="issued">
<date-part name="day" suffix=" "/>
<date-part name="month" form="short" suffix=" "/>
<date-part name="year"/>
</date>
For conferences, a separate event-date is included in csl, but not yet implemented in Zotero, so that would be doable in the medium run.
For the webpage I have no suggestion and since I have never seen an "updated" date required in _any_ of the ca. 100 citation styles I've coded by now I doubt that's going to be implemented in the future.
I've just tested this out with two websites, same year and same author and I don't see the problem you report with the Staffordshire CSL. I don't know why though. I did use a macro for the second date, but notice looking back at it now that I failed to move the code for webpages over to using the macro. Might sort that out one day!
Cannell, M (2010a). A test page. [Online]. 3 June 2010. Available from: http://www.test.com. [Accessed: 1 August 2010].
Cannell, M. (2010b). Performance management: an overview. [Online]. February 2010. Available from: http://www.cipd.co.uk/subjects/perfmangmt/general/perfman.htm. [Accessed: 6 November 2010].
EDIT: Oh no, for some reason the day and month doesn't appear. So it's just (Updated 2010) instead of (Updated 1 Jan 2010). Anyone else facing this problem? I've used the same date codes for the conference paper style and it works there.
EDIT Again: Strangely, the day and month DOES appear when I use 1 May (and every other month) instead of 1 January! Is this a bug?
In that case, post it to gist.github.com
Also, you might want to consider auto-converting the style to csl 1.0
http://citationstyles.org/downloads/upgrade-notes.html#updating-csl-0-8-styles
and coding in csl 1.0 - which Zotero uses internally. Csl 1.0 takes a little getting used to, but it's overall better structured and allows you for some extra functionality, including correct display of page ranges for Harvard Anglia (i.e. 745-67 instead of 745-767)
edit: no, that's it.
http://www.zotero.org/support/dev/submitting_citation_styles
everyone seems to post the actual link.
If there's more that I'm overlooking let's move this discussion somewhere else to keep this thread on Harvard.
Anyhow this is the results of the validation. And I have no idea what they mean. Would you mind looking at it?
Error: Element group from namespace http://purl.org/net/xbiblio/csl not allowed as child of element choose from namespace http://purl.org/net/xbiblio/csl in this context. (Suppressing further errors from this subtree.)
From line 242, column 4; to line 242, column 21
<choose> ↩ <group suffix=".">↩
Error: Element group from namespace http://purl.org/net/xbiblio/csl not allowed as child of element choose from namespace http://purl.org/net/xbiblio/csl in this context. (Suppressing further errors from this subtree.)
From line 246, column 4; to line 246, column 50
</group>↩ <group class="container" prefix=" " suffix=".">↩
Error: Element choose from namespace http://purl.org/net/xbiblio/csl is missing a required instance of child element if.
From line 257, column 4; to line 257, column 12
</group>↩ </choose>
in this section
<else>
<choose>
<group suffix=".">
<text macro="title" prefix=" " />
<text macro="editor" prefix=" " />
</group>
<group class="container" prefix=" " suffix=".">
<text variable="container-title" />
<group prefix=", ">
<text variable="volume" />
<text variable="issue" prefix="(" suffix=")" />
</group>
<group prefix=", ">
<label variable="page" suffix="." form="short" />
<text variable="page" />
</group>
</group>
</choose>
</else>
you start and end a choose loop, but you don't actually use any conditionals - choose requires, at minimum, an if. This is the error that tells you:
Error: Element choose from namespace http://purl.org/net/xbiblio/csl
is missing a required instance of child element if.
Check, e.g., the code for APA or Chicago Author-Date (while I'm currently the lead author for both, the basic structure that makes them so good was coded by others) - both relatively complicated styles, that achieve to do things with very tight code.
But that's not a condition for submitting a style and (almost) everyone's first styles aren't super elegant - that's perfectly fine and the main thing is that they do what they're supposed to.
I have converted the citation style to CSL 1.0 and the resultant file validates OK (with a few warnings). I would be grateful if the citation style could be checked over by more regular forum users as is likely to be used by a significant number of students.
In order to do that, is it best to paste the file here or to github.com (or similar) provided I have some sort of access/account.