Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Improvements to Elsevier Harvard styles #287

Merged
merged 1 commit into from

2 participants

@karnesky

Remove disambiguate-add-names and add an explicit access date for all Elsevier Harvard Styles. Comment out non-working (CSL 1.0.1) cite-group-delimiter for now.

Per https://forums.zotero.org/discussion/26306

Richard Karnesky Remove disambiguate-add-names and add an explicit access date for all…
… Elsevier Harvard Styles. Comment out non-working (CSL 1.0.1) cite-group-delimiter for now.
fca2c28
@rmzelle
Owner

cite-group-delimiter doesn't work in Zotero 3.0.8? Can you elaborate on that?

@karnesky

It doesn't work on Linux in the Firefox plugin in or the standalone 3.0.8. It also didn't work in the trunk build of the firefox plugin. In the standalone, it emits the following errors:

[JavaScript Error: "CSL processor error, @cite-group-delimiter attribute: TypeError: CSL.Attributes[key] is undefined"]
[JavaScript Error: "uncaught exception: CSL processor error, @cite-group-delimiter attribute: TypeError: CSL.Attributes[key] is undefined"]

I haven't chased this down further. I'm happy to look, but: there were only two styles in the repository that had used it. And it isn't valid CSL-1.0, so we probably shouldn't have files claiming to be 1.0 styles that try to use it. (Sidenote: setting cs:style version to 1.0.1 caused other issues in the trunk too.)

@rmzelle
Owner

CSL 1.0.1 styles also have the "version" attribute set to "1.0". We already switched most styles over to using CSL 1.0.1 features, but apparently citeproc-js doesn't support cite-group-delimiter yet.

@rmzelle rmzelle merged commit 630f780 into citation-style-language:master
@rmzelle
Owner

@fbennett just implemented support for cite-group-delimiter in citeproc-js. Zotero 3.0.9 still uses an old version, but the next release should work with this attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 16, 2012
  1. Remove disambiguate-add-names and add an explicit access date for all…

    Richard Karnesky authored
    … Elsevier Harvard Styles. Comment out non-working (CSL 1.0.1) cite-group-delimiter for now.
This page is out of date. Refresh to see the latest.
View
26 elsevier-harvard-without-titles.csl
@@ -91,9 +91,17 @@
<macro name="access">
<choose>
<if type="webpage">
- <group>
- <text value="URL" suffix=" "/>
+ <group delimiter=" ">
+ <text value="URL"/>
<text variable="URL"/>
+ <group prefix="(" suffix=").">
+ <text term="accessed" suffix=" "/>
+ <date variable="accessed">
+ <date-part name="month" form="numeric" suffix="."/>
+ <date-part name="day" suffix="."/>
+ <date-part name="year" form="short"/>
+ </date>
+ </group>
</group>
</if>
</choose>
@@ -151,18 +159,6 @@
<date-part name="year"/>
</date>
</if>
- <else-if variable="accessed">
- <choose>
- <if type="webpage">
- <date variable="accessed">
- <date-part name="year"/>
- </date>
- </if>
- <else>
- <text term="no date" form="short"/>
- </else>
- </choose>
- </else-if>
<else>
<text term="no date" form="short"/>
</else>
@@ -209,7 +205,7 @@
</else-if>
</choose>
</macro>
- <citation et-al-min="3" et-al-use-first="1" et-al-subsequent-min="3" et-al-subsequent-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" collapse="year">
+ <citation et-al-min="3" et-al-use-first="1" et-al-subsequent-min="3" et-al-subsequent-use-first="1" disambiguate-add-year-suffix="true" collapse="year">
<sort>
<key macro="issued"/>
<key macro="author"/>
View
30 elsevier-harvard.csl
@@ -92,9 +92,17 @@
<macro name="access">
<choose>
<if type="webpage">
- <group>
- <text value="URL" suffix=" "/>
+ <group delimiter=" ">
+ <text value="URL"/>
<text variable="URL"/>
+ <group prefix="(" suffix=").">
+ <text term="accessed" suffix=" "/>
+ <date variable="accessed">
+ <date-part name="month" form="numeric" suffix="."/>
+ <date-part name="day" suffix="."/>
+ <date-part name="year" form="short"/>
+ </date>
+ </group>
</group>
</if>
</choose>
@@ -152,18 +160,6 @@
<date-part name="year"/>
</date>
</if>
- <else-if variable="accessed">
- <choose>
- <if type="webpage">
- <date variable="accessed">
- <date-part name="year"/>
- </date>
- </if>
- <else>
- <text term="no date" form="short"/>
- </else>
- </choose>
- </else-if>
<else>
<text term="no date" form="short"/>
</else>
@@ -210,7 +206,11 @@
</else-if>
</choose>
</macro>
- <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" collapse="year" cite-group-delimiter=", ">
+ <!--
+ cite-group-delimiter will be available with csl 1.0.1, but is not valid csl 1.0 & it doesn't work reliably with the released zotero version
+ <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" collapse="year" cite-group-delimiter=", ">
+ -->
+ <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" collapse="year">
<sort>
<key macro="author"/>
<key macro="issued" sort="descending"/>
View
32 elsevier-harvard2.csl
@@ -77,9 +77,17 @@
<macro name="access">
<choose>
<if type="webpage">
- <group>
- <text value="URL" suffix=" "/>
+ <group delimiter=" ">
+ <text value="URL"/>
<text variable="URL"/>
+ <group prefix="(" suffix=").">
+ <text term="accessed" suffix=" "/>
+ <date variable="accessed">
+ <date-part name="month" form="numeric" suffix="."/>
+ <date-part name="day" suffix="."/>
+ <date-part name="year" form="short"/>
+ </date>
+ </group>
</group>
</if>
</choose>
@@ -137,19 +145,7 @@
<date-part name="year"/>
</date>
</if>
- <else-if variable="accessed">
- <choose>
- <if type="webpage">
- <date variable="accessed">
- <date-part name="year"/>
- </date>
- </if>
- <else>
- <text term="no date" form="short"/>
- </else>
- </choose>
- </else-if>
- <else>
+ <else>
<text term="no date" form="short"/>
</else>
</choose>
@@ -195,7 +191,11 @@
</else-if>
</choose>
</macro>
- <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" collapse="year" cite-group-delimiter=", ">
+ <!--
+ cite-group-delimiter will be available with csl 1.0.1, but is not valid csl 1.0 & it doesn't work reliably with the released zotero version
+ <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" collapse="year" cite-group-delimiter=", ">
+ -->
+ <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" collapse="year">
<sort>
<key macro="author"/>
<key macro="issued" sort="descending"/>
Something went wrong with that request. Please try again.