Skip to content
This repository

Improvements to Elsevier Harvard styles #287

Merged
merged 1 commit into from over 1 year ago

2 participants

Richard Karnesky Rintze M. Zelle
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.

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
Rintze M. Zelle
Owner

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

Richard 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.)

Rintze M. Zelle
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.

Rintze M. Zelle rmzelle merged commit 630f780 into from
Rintze M. Zelle
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

Showing 1 unique commit by 1 author.

Nov 16, 2012
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
This page is out of date. Refresh to see the latest.
26 elsevier-harvard-without-titles.csl
@@ -91,9 +91,17 @@
91 91 <macro name="access">
92 92 <choose>
93 93 <if type="webpage">
94   - <group>
95   - <text value="URL" suffix=" "/>
  94 + <group delimiter=" ">
  95 + <text value="URL"/>
96 96 <text variable="URL"/>
  97 + <group prefix="(" suffix=").">
  98 + <text term="accessed" suffix=" "/>
  99 + <date variable="accessed">
  100 + <date-part name="month" form="numeric" suffix="."/>
  101 + <date-part name="day" suffix="."/>
  102 + <date-part name="year" form="short"/>
  103 + </date>
  104 + </group>
97 105 </group>
98 106 </if>
99 107 </choose>
@@ -151,18 +159,6 @@
151 159 <date-part name="year"/>
152 160 </date>
153 161 </if>
154   - <else-if variable="accessed">
155   - <choose>
156   - <if type="webpage">
157   - <date variable="accessed">
158   - <date-part name="year"/>
159   - </date>
160   - </if>
161   - <else>
162   - <text term="no date" form="short"/>
163   - </else>
164   - </choose>
165   - </else-if>
166 162 <else>
167 163 <text term="no date" form="short"/>
168 164 </else>
@@ -209,7 +205,7 @@
209 205 </else-if>
210 206 </choose>
211 207 </macro>
212   - <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">
  208 + <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">
213 209 <sort>
214 210 <key macro="issued"/>
215 211 <key macro="author"/>
30 elsevier-harvard.csl
@@ -92,9 +92,17 @@
92 92 <macro name="access">
93 93 <choose>
94 94 <if type="webpage">
95   - <group>
96   - <text value="URL" suffix=" "/>
  95 + <group delimiter=" ">
  96 + <text value="URL"/>
97 97 <text variable="URL"/>
  98 + <group prefix="(" suffix=").">
  99 + <text term="accessed" suffix=" "/>
  100 + <date variable="accessed">
  101 + <date-part name="month" form="numeric" suffix="."/>
  102 + <date-part name="day" suffix="."/>
  103 + <date-part name="year" form="short"/>
  104 + </date>
  105 + </group>
98 106 </group>
99 107 </if>
100 108 </choose>
@@ -152,18 +160,6 @@
152 160 <date-part name="year"/>
153 161 </date>
154 162 </if>
155   - <else-if variable="accessed">
156   - <choose>
157   - <if type="webpage">
158   - <date variable="accessed">
159   - <date-part name="year"/>
160   - </date>
161   - </if>
162   - <else>
163   - <text term="no date" form="short"/>
164   - </else>
165   - </choose>
166   - </else-if>
167 163 <else>
168 164 <text term="no date" form="short"/>
169 165 </else>
@@ -210,7 +206,11 @@
210 206 </else-if>
211 207 </choose>
212 208 </macro>
213   - <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" collapse="year" cite-group-delimiter=", ">
  209 + <!--
  210 + 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
  211 + <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" collapse="year" cite-group-delimiter=", ">
  212 + -->
  213 + <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" collapse="year">
214 214 <sort>
215 215 <key macro="author"/>
216 216 <key macro="issued" sort="descending"/>
32 elsevier-harvard2.csl
@@ -77,9 +77,17 @@
77 77 <macro name="access">
78 78 <choose>
79 79 <if type="webpage">
80   - <group>
81   - <text value="URL" suffix=" "/>
  80 + <group delimiter=" ">
  81 + <text value="URL"/>
82 82 <text variable="URL"/>
  83 + <group prefix="(" suffix=").">
  84 + <text term="accessed" suffix=" "/>
  85 + <date variable="accessed">
  86 + <date-part name="month" form="numeric" suffix="."/>
  87 + <date-part name="day" suffix="."/>
  88 + <date-part name="year" form="short"/>
  89 + </date>
  90 + </group>
83 91 </group>
84 92 </if>
85 93 </choose>
@@ -137,19 +145,7 @@
137 145 <date-part name="year"/>
138 146 </date>
139 147 </if>
140   - <else-if variable="accessed">
141   - <choose>
142   - <if type="webpage">
143   - <date variable="accessed">
144   - <date-part name="year"/>
145   - </date>
146   - </if>
147   - <else>
148   - <text term="no date" form="short"/>
149   - </else>
150   - </choose>
151   - </else-if>
152   - <else>
  148 + <else>
153 149 <text term="no date" form="short"/>
154 150 </else>
155 151 </choose>
@@ -195,7 +191,11 @@
195 191 </else-if>
196 192 </choose>
197 193 </macro>
198   - <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" collapse="year" cite-group-delimiter=", ">
  194 + <!--
  195 + 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
  196 + <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" collapse="year" cite-group-delimiter=", ">
  197 + -->
  198 + <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" collapse="year">
199 199 <sort>
200 200 <key macro="author"/>
201 201 <key macro="issued" sort="descending"/>

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.