Help needed to finish new style
I have been working on an edit of Harvard1 to comply with the Australian government style guide Snooks & Co. 2002, Style manual for authors, editors and printers, 6th edn, John Wiley & Sons, Milton, Qld.
I have made a fair bit of progress, but as this is my first time working with CSL, I would really appreciate assistance with a few issues and completing submission to the repository.
Issues to resolve:
Change edition short form to "edn"
Change URL text term to 'viewed' rather than 'retrieved
Change double quotation marks to single quotation marks
Below is the draft code. Thanks in advance for your assistance.
<?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">
<info>
<title> Snooks Australia Harvard (author-date)</title>
<id>http://www.zotero.org/styles/harvard1</id>
<link href="http://www.zotero.org/styles/SnooksHarvard" rel="self"/>
<link href="http://libweb.anglia.ac.uk/referencing/harvard.htm" rel="documentation"/>
<author>
<name>example</name>
<email>example@gmail.com</email>
</author>
<category citation-format="author-date"/>
<category field="generic-base"/>
<summary>Snooks style manual Australia Harvard author-date style</summary>
<updated>2014-09-10T06:18:55+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" delimiter=" ">
<name and="symbol" initialize-with="" delimiter=" "/>
<label form="short" prefix=" " text-case="lowercase"/>
</names>
</macro>
<macro name="anon">
<text macro="title"/>
</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"/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<text macro="anon"/>
</substitute>
</names>
</macro>
<macro name="access">
<choose>
<if variable="URL">
<text term="retrieved" text-case="lowercase" suffix=" "/>
<group prefix=" " suffix="">
<date variable="accessed">
<date-part name="month" suffix=" "/>
<date-part name="day" suffix=" "/>
<date-part name="year"/>
</date>
</group>
<text variable="URL" prefix=" <" suffix="> "/>
</if>
</choose>
</macro>
<macro name="title">
<choose>
<if type="bill book graphic legal_case legislation motion_picture report song thesis" match="any">
<text variable="title" font-style="italic" suffix=","/>
</if>
<else>
<text variable= "title" text-case="title" quotes="true"/>
</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" form="short"/>
</else>
</choose>
</macro>
<macro name="edition">
<choose>
<if is-numeric="edition">
<group delimiter=" ">
<number variable="edition" form="ordinal"/>
<text term="edition" form="short"/>
</group>
</if>
<else>
<text variable="edition" suffix=""/>
</else>
</choose>
</macro>
<macro name="pages">
<group>
<label variable="page" form="short" suffix=" "/>
<text variable="page"/>
</group>
</macro>
<citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true">
<layout prefix="(" suffix=")" delimiter=", ">
<group delimiter=", ">
<group delimiter=" ">
<text macro="author-short"/>
<text macro="year-date"/>
</group>
<group>
<label variable="locator" form="short"/>
<text variable="locator"/>
</group>
</group>
</layout>
</citation>
<bibliography hanging-indent="false" et-al-min="4" et-al-use-first="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="bill book graphic legal_case legislation motion_picture report song" match="any">
<group prefix=" " delimiter=" " suffix=",">
<text macro="title"/>
<text macro="edition"/>
<text macro="editor"/>
</group>
<text prefix=" " suffix="." macro="publisher"/>
</if>
<else-if type="chapter paper-conference" match="any">
<text macro="title" prefix=" " suffix=","/>
<group 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="publisher" prefix=" "/>
<text macro="pages"/>
</group>
</group>
</else-if>
<else-if type="thesis">
<group prefix=" " suffix="," delimiter=", ">
<text macro="title" quotes="true"/>
<text variable="genre"/>
<text macro="publisher"/>
</group>
</else-if>
<else>
<group suffix=",">
<text macro="title" prefix=" "/>
<text macro="editor" prefix=" "/>
</group>
<group prefix=" " suffix=",">
<text variable="container-title" font-style="italic"/>
<group prefix=", ">
<text variable="volume" prefix="vol. " suffix=""/>
<text variable="issue" prefix=", no. " suffix=""/>
</group>
<group prefix=", ">
<label variable="page" form="short"/>
<text variable="page"/>
</group>
</group>
</else>
</choose>
<text prefix=" " macro="access" suffix="."/>
</layout>
</bibliography>
</style>
I have made a fair bit of progress, but as this is my first time working with CSL, I would really appreciate assistance with a few issues and completing submission to the repository.
Issues to resolve:
Change edition short form to "edn"
Change URL text term to 'viewed' rather than 'retrieved
Change double quotation marks to single quotation marks
Below is the draft code. Thanks in advance for your assistance.
<?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">
<info>
<title> Snooks Australia Harvard (author-date)</title>
<id>http://www.zotero.org/styles/harvard1</id>
<link href="http://www.zotero.org/styles/SnooksHarvard" rel="self"/>
<link href="http://libweb.anglia.ac.uk/referencing/harvard.htm" rel="documentation"/>
<author>
<name>example</name>
<email>example@gmail.com</email>
</author>
<category citation-format="author-date"/>
<category field="generic-base"/>
<summary>Snooks style manual Australia Harvard author-date style</summary>
<updated>2014-09-10T06:18:55+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" delimiter=" ">
<name and="symbol" initialize-with="" delimiter=" "/>
<label form="short" prefix=" " text-case="lowercase"/>
</names>
</macro>
<macro name="anon">
<text macro="title"/>
</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"/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<text macro="anon"/>
</substitute>
</names>
</macro>
<macro name="access">
<choose>
<if variable="URL">
<text term="retrieved" text-case="lowercase" suffix=" "/>
<group prefix=" " suffix="">
<date variable="accessed">
<date-part name="month" suffix=" "/>
<date-part name="day" suffix=" "/>
<date-part name="year"/>
</date>
</group>
<text variable="URL" prefix=" <" suffix="> "/>
</if>
</choose>
</macro>
<macro name="title">
<choose>
<if type="bill book graphic legal_case legislation motion_picture report song thesis" match="any">
<text variable="title" font-style="italic" suffix=","/>
</if>
<else>
<text variable= "title" text-case="title" quotes="true"/>
</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" form="short"/>
</else>
</choose>
</macro>
<macro name="edition">
<choose>
<if is-numeric="edition">
<group delimiter=" ">
<number variable="edition" form="ordinal"/>
<text term="edition" form="short"/>
</group>
</if>
<else>
<text variable="edition" suffix=""/>
</else>
</choose>
</macro>
<macro name="pages">
<group>
<label variable="page" form="short" suffix=" "/>
<text variable="page"/>
</group>
</macro>
<citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true">
<layout prefix="(" suffix=")" delimiter=", ">
<group delimiter=", ">
<group delimiter=" ">
<text macro="author-short"/>
<text macro="year-date"/>
</group>
<group>
<label variable="locator" form="short"/>
<text variable="locator"/>
</group>
</group>
</layout>
</citation>
<bibliography hanging-indent="false" et-al-min="4" et-al-use-first="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="bill book graphic legal_case legislation motion_picture report song" match="any">
<group prefix=" " delimiter=" " suffix=",">
<text macro="title"/>
<text macro="edition"/>
<text macro="editor"/>
</group>
<text prefix=" " suffix="." macro="publisher"/>
</if>
<else-if type="chapter paper-conference" match="any">
<text macro="title" prefix=" " suffix=","/>
<group 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="publisher" prefix=" "/>
<text macro="pages"/>
</group>
</group>
</else-if>
<else-if type="thesis">
<group prefix=" " suffix="," delimiter=", ">
<text macro="title" quotes="true"/>
<text variable="genre"/>
<text macro="publisher"/>
</group>
</else-if>
<else>
<group suffix=",">
<text macro="title" prefix=" "/>
<text macro="editor" prefix=" "/>
</group>
<group prefix=" " suffix=",">
<text variable="container-title" font-style="italic"/>
<group prefix=", ">
<text variable="volume" prefix="vol. " suffix=""/>
<text variable="issue" prefix=", no. " suffix=""/>
</group>
<group prefix=", ">
<label variable="page" form="short"/>
<text variable="page"/>
</group>
</group>
</else>
</choose>
<text prefix=" " macro="access" suffix="."/>
</layout>
</bibliography>
</style>
<locale xml:lang="en">
<terms>
<term name="accessed">viewed</term>
</terms>
<term name="edition">
<single>edn</single>
<multiple>edns</multiple>
</term>
<term name="open-quote">„</term>
<term name="close-quote">“</term>
</locale>
You will find other terms in the specification.
add default-locale="en-GB" to the style element so that it reads:
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text"
version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-GB">
Element “terms” from namespace “http://purl.org/net/xbiblio/csl” not allowed as child of element “style” from namespace “http://purl.org/net/xbiblio/csl” in this context. (Suppressing further errors from this subtree.)
So I still need a way to put the "edn" abbreviation in. Does anyone know another way around this?
Also, is there a way to use a comma suffix after Pubisher IF applying the access macro (adding the URL).
My code currently looks like this:
<?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">
<info>
<title> Snooks Australia Harvard (author-date)</title>
<id>http://www.zotero.org/styles/snooksharvard</id>
<link href="http://www.zotero.org/styles/snooksharvard" rel="self"/>
<link href="http://www.australia.gov.au/publications/style-manual" rel="documentation"/>
<author>
<name></name>
<email>example@gmail.com</email>
</author>
<category citation-format="author-date"/>
<category field="generic-base"/>
<summary>Snooks style manual Australia Harvard author-date style</summary>
<updated>2014-09-10T06:18:55+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>
<terms>
<locale xml:lang="en">
<term name="edition" form="short">edn</term>
</locale>
</terms>
<macro name="editor">
<names variable="editor" delimiter=" " prefix="in ">
<name and="symbol" initialize-with="" delimiter=", "/>
<label form="short" prefix=" (" suffix=")" text-case="lowercase"/>
</names>
</macro>
<macro name="anon">
<text macro="title"/>
</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"/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<text macro="anon"/>
</substitute>
</names>
</macro>
<macro name="access">
<choose>
<if variable="URL">
<text value="viewed" text-case="lowercase" suffix=" "/>
<group prefix=" " suffix="">
<date variable="accessed">
<date-part name="month" suffix=" "/>
<date-part name="day" suffix=" "/>
<date-part name="year"/>
</date>
</group>
<text variable="URL" prefix=" <" suffix="> "/>
</if>
</choose>
</macro>
<macro name="title">
<choose>
<if type="bill book graphic legal_case legislation motion_picture report song thesis" match="any">
<text variable="title" font-style="italic" suffix=","/>
</if>
<else>
<text variable= "title" text-case="title" prefix="'" suffix="'"/>
</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" form="short"/>
</else>
</choose>
</macro>
<macro name="edition">
<choose>
<if is-numeric="edition">
<group delimiter=" ">
<number variable="edition" form="ordinal"/>
<text term="edition" form="short"/>
</group>
</if>
<else>
<text variable="edition" suffix=""/>
</else>
</choose>
</macro>
<macro name="pages">
<group>
<label variable="page" form="short" suffix=" "/>
<text variable="page"/>
</group>
</macro>
<citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true">
<layout prefix="(" suffix=")" delimiter=", ">
<group delimiter=", ">
<group delimiter=" ">
<text macro="author-short"/>
<text macro="year-date"/>
</group>
<group>
<label variable="locator" form="short"/>
<text variable="locator"/>
</group>
</group>
</layout>
</citation>
<bibliography hanging-indent="false" et-al-min="4" et-al-use-first="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="bill book graphic legal_case legislation motion_picture report song" match="any">
<group prefix=" " delimiter=" " suffix=",">
<text macro="title"/>
<text macro="edition"/>
<text macro="editor"/>
</group>
<text prefix=" " suffix="." macro="publisher"/>
</if>
<else-if type="chapter paper-conference" match="any">
<text macro="title" prefix=" " suffix=","/>
<group 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="publisher" prefix=" "/>
<text macro="pages"/>
</group>
</group>
</else-if>
<else-if type="thesis">
<group prefix=" " suffix="," delimiter=", ">
<text macro="title" prefix="'" suffix="'"/>
<text variable="genre"/>
<text macro="publisher"/>
</group>
</else-if>
<else>
<group suffix=",">
<text macro="title" prefix=" "/>
<text macro="editor" prefix=" "/>
</group>
<group prefix=" " suffix=",">
<text variable="container-title" font-style="italic"/>
<group prefix=", ">
<text variable="volume" prefix="vol. " suffix=""/>
<text variable="issue" prefix=", no. " suffix=""/>
</group>
<group prefix=", ">
<label variable="page" form="short"/>
<text variable="page"/>
</group>
</group>
</else>
</choose>
<text prefix=" " macro="access" suffix="."/>
</layout>
</bibliography>
</style>
https://github.com/citation-style-language/styles/blob/master/CONTRIBUTING.md
We'd love to have the final version.
If you have further questions, please put your current version of the style on gist.github.com instead of pasting it here - much easier to read. You won't need to register (though you might as well, since you _will_ need to register to contribute your style).
At the moment I get:
Example, EG & Such, A 2015, TITLE, 4th edn, Place, Publisher. viewed February 23 2015 <http://utas.libguides.com/content.php?pid=27520&sid=219177> .
I want:
Example, EG & Such, A 2015, TITLE, 4th edn, Place, Publisher, viewed February 23 2015 <http://utas.libguides.com/content.php?pid=27520&sid=219177> .
I need the style to detect that there is a URL coming and replace the period after Publisher with a comma.
add suffix="." to the <layout> of the bibliography section.
change prefix=" " to prefix=", " in
<text prefix=" " macro="access" suffix="."/>
(and also remove the suffix=".")
Journal:
'How Much Sugar Is in Soft Drinks?' , viewed February 16 2015 <http://www.choice.com.au/media-and-news/consumer-news/news/sugar-in-drinks-120215.aspx> .
Legal case:
Johnson v Brown, 2012, , viewed January 5 2015 <http://www.austlii.edu.au/cgi-bin/sinodisp/au/cases/vic/VSC/2012/282.html?stem=0&synonyms=0&query=smith> .
https://gist.github.com/s002610/80d85e40b4641cc39340
https://zoteromusings.wordpress.com/2013/10/28/writing-csl-features-and-best-practices/ (the part on groups at the top)
Any ideas why the 'no date' abbreviation is not appearing in the bibliography?
https://gist.github.com/s002610/80d85e40b4641cc39340
I made a pull request for the completed file, but I'm not sure if I've put it in the right place. Can you find Snooksharvard.csl?
Tell me how can I change Available at: to Available From: ?
If I change the 'at' then the notation in the reference disappear.
<text term="available at" suffix=": " text-case="capitalize-first"/>
Some times I wonder why have a Harvard citing standard if there are 1000nds of subspecies.
You can use something like
<locale>
<terms>
<term name="available at">available from</term>
</terms>
</locale>
to redefine terms at the beginning of the style, right below the info section, i.e. below </info>
This is what I am looking for, the italics are gone now.
Al-Madhoun, M. & Analoui, F. (2004) 'Developing SME managers under fire: negotiating obstacles and weaknesses in Palestine', Journal of Management Development, 23 (5), pp.479-495, IngentaConnect [Online]. DOI: 10.1108/02621710410537083 (Accessed: 9 June 2011).
Al-Madhoun, M. & Analoui, F. (2004) 'Developing SME managers under fire: negotiating obstacles and weaknesses in Palestine', Journal of Management Development, 23 (5), pp.479-495, IngentaConnect [Online]. Available from: http://www.ingentaconnect.com (Accessed: 9 June 2011).
This is what the Harvard 9th.csl does
Al-Madhoun, M. & Analoui, F. (2004) 'Developing SME managers under fire: negotiating obstacles and weaknesses in Palestine', Journal of Management Development, 23 (5), pp.479-495, IngentaConnect. DOI: 10.1108/02621710410537083 (Accessed: 9 June 2011).
Al-Madhoun, M. & Analoui, F. (2004) 'Developing SME managers under fire: negotiating obstacles and weaknesses in Palestine', Journal of Management Development, 23 (5), pp.479-495, IngentaConnect. Available from: http://www.ingentaconnect.com (Accessed: 9 June 2011).
I am not sure if this file will do the trick
https://github.com/search?utf8=&q=UoL+CSL&type=Repositories&ref=searchresults
but I can not get tat file saved on my PC in a CSL format. I run MAC and does not have firefox installed. How can I get that file saved?
Thanks for your support.
https://raw.githubusercontent.com/bartpaeleman/CSL_UoL/master/harvard-university-of-liverpool.csl (right-click --> Save link as). But note it's several years old and was never vetted by us, so no idea how well it corresponds to the citation style.