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
«134
  • This is what I have at the moment. Probably lots of mistakes.

    <?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>
  • Nevermind, I've solved it. Just got to make some changes manually cause Zotero can't tell the difference between blogs and webpages etc. etc.
  • I think the problem is more that the zotero fields forum post, blog post and webpage all map to the same CSL type, webpage. How about just sticking with web page, but using the field "Website type", which maps to "genre" in the CSL.
  • Hmmm, I'm not actually sure how to use/code it to function that way, back to documentation i guess. Thanks for the feedback Chris!
  • acutally Zotero's Harvard 1 style should follow AngliaRuskin - so I'm happy to help if there are remaining issues and we can then feed the finished style back into Zotero.
  • edited March 30, 2011
    There are quite a lot of missing things in the Harvard 1 style unfortunately and I have been making do with this:

    [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.?
  • I'm afraid I may have sent you on a wild goose chase. I looked more at the idea in a slightly different context and realised that, as far as I can tell, it isn't possible to test for the value of a variable, only for its existence.
  • correct - it's not possible to distinguish easily between these different categories - one option is often to use item types different than website for online publications - for most online articles and publications, e.g., I would not recommend using the website type.
  • [31/3/2011]

    <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>
  • By the way, is it possible to call for the year variable <date-part name="year"/> without the letter at the back when multiple references have the same author and date. Eg. Shell, 2010a and Shell, 2010b.

    This would solve occurrences like (Updated 10 Jan 2010a). Thanks in advance!
  • "This would solve occurrences like (Updated 10 Jan 2010a)."
    that shouldn't ever happen. Can you narrow down when you're seeing this? The year suffix should only apply to issue dates.
  • I think what usws is saying is that the year-suffix is simply unwanted. It looks like maybe "Updated" is intentional, and expresses something meaningful in the context of this particular style.

    @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.
  • edited March 31, 2011
    I apologize for not being clear about where the problem occurs. The Anglia Ruskin Harvard referencing requires 'year' to appear more than once for certain reference types. The '24-27 May 2005' for conference papers and the '(Updated 16 Jan 2005)' for webpages in the examples below.

    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>
  • Nothing right now.
    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.
  • The processor could be taught to add a year suffix only to the first date that it encounters. That has been suggested before, I think, and it doesn't seem like a particularly risky modification. I'll take a look when I get a chance.
  • The Staffordshire University style requires the year to appear twice for websites, although not wrapped in (Updated...)

    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].
  • Aha, looks like I'd already done this, then. There is a lot of detail inside the processor, and things do slip from (my) memory. I'll keep an eye out for failure of year suffix quashing, though, since usws' report suggests it may flake out on occasion.
  • edited March 31, 2011
    Ah, it seems that it does indeed get 'quashed' on the second instance! My bad, the last time it occurred was actually before I updated Zotero to the latest version. I apologize for another wild goose chase! And thanks for the fix to the problem!!

    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?
  • do you have the newest 2.1.2 version of Zoter out since yesterday?
  • The "problem of the missing January" should certainly be fixed in 2.1.2.
  • Firefox just updated Zotero! And it works fine now! Thank you again!
  • @usws - let me know once you have a copy of the style that you'd consider sufficient better than the current Harvard1 to upload it.
    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)
  • edited March 31, 2011
    @adamsmith: I'm wondering if gist.github.com is the best pastebin available (the most common issue with gist is that people report git cloning URLs). Perhaps http://www.pastie.org/ would be easier to use?

    edit: no, that's it.
  • I like gist - one advantage over pastie is that it allows people to specify a file-name, which saves me an extra step of work. And I don't mind the git clone addresses that much, I just copy and paste the relevant part - also, since we've posted the instructions here:
    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.
  • @adamsmith I'm validating, upgrading and all that now but I'm not sure if anyone has found problems with it (some of which are 'intended', for my own use). Also, I was wondering if redundant code (and thus, size of the CSL file) is an issue if I were to submit it?

    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>
  • this all would seem to be one error
    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.
  • Redundant code - well, it's not an issue for functionality, but since many styles are collaborative products, it's nice to keep them as tight and elegant as possible - future developers will thank you.

    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.
  • hey usws - what's the status of this, any news? The style seems to be in high demand, I'm sure people would appreciate improvements?
  • I have been working on this citation style (based on the work done by usws), updating for the Anglia Ruskin 2010 conventions (http://libweb.anglia.ac.uk/referencing/harvard.htm).
    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.
  • gist.github.com and you don't need an account to post a public gist there. Don't forget to post a link here, though.
Sign In or Register to comment.