citeproc-ruby 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. data/README.md +78 -0
  2. data/lib/citeproc.rb +100 -0
  3. data/lib/citeproc/bibliography.rb +57 -0
  4. data/lib/citeproc/data.rb +149 -0
  5. data/lib/citeproc/date.rb +133 -0
  6. data/lib/citeproc/formatter.rb +38 -0
  7. data/lib/citeproc/item.rb +53 -0
  8. data/lib/citeproc/name.rb +284 -0
  9. data/lib/citeproc/processor.rb +166 -0
  10. data/lib/citeproc/selector.rb +61 -0
  11. data/lib/citeproc/variable.rb +82 -0
  12. data/lib/citeproc/version.rb +3 -0
  13. data/lib/csl/locale.rb +223 -0
  14. data/lib/csl/node.rb +72 -0
  15. data/lib/csl/nodes.rb +1364 -0
  16. data/lib/csl/renderer.rb +88 -0
  17. data/lib/csl/sort.rb +53 -0
  18. data/lib/csl/style.rb +110 -0
  19. data/lib/csl/term.rb +124 -0
  20. data/lib/extensions/core.rb +43 -0
  21. data/lib/plugins/filters/bibtex.rb +12 -0
  22. data/lib/plugins/formats/default.rb +134 -0
  23. data/lib/plugins/formats/html.rb +67 -0
  24. data/lib/support/attributes.rb +99 -0
  25. data/lib/support/tree.rb +80 -0
  26. data/resource/locale/locales-af-ZA.xml +304 -0
  27. data/resource/locale/locales-ar-AR.xml +304 -0
  28. data/resource/locale/locales-bg-BG.xml +304 -0
  29. data/resource/locale/locales-ca-AD.xml +304 -0
  30. data/resource/locale/locales-cs-CZ.xml +304 -0
  31. data/resource/locale/locales-da-DK.xml +304 -0
  32. data/resource/locale/locales-de-AT.xml +304 -0
  33. data/resource/locale/locales-de-CH.xml +304 -0
  34. data/resource/locale/locales-de-DE.xml +332 -0
  35. data/resource/locale/locales-el-GR.xml +303 -0
  36. data/resource/locale/locales-en-US.xml +313 -0
  37. data/resource/locale/locales-es-ES.xml +304 -0
  38. data/resource/locale/locales-et-EE.xml +304 -0
  39. data/resource/locale/locales-fr-FR.xml +304 -0
  40. data/resource/locale/locales-he-IL.xml +304 -0
  41. data/resource/locale/locales-hu-HU.xml +304 -0
  42. data/resource/locale/locales-is-IS.xml +304 -0
  43. data/resource/locale/locales-it-IT.xml +304 -0
  44. data/resource/locale/locales-ja-JP.xml +304 -0
  45. data/resource/locale/locales-kh-KH.xml +303 -0
  46. data/resource/locale/locales-ko-KR.xml +304 -0
  47. data/resource/locale/locales-mn-MN.xml +304 -0
  48. data/resource/locale/locales-nb-NO.xml +304 -0
  49. data/resource/locale/locales-nl-NL.xml +304 -0
  50. data/resource/locale/locales-nn-NO.xml +304 -0
  51. data/resource/locale/locales-pl-PL.xml +304 -0
  52. data/resource/locale/locales-pt-BR.xml +304 -0
  53. data/resource/locale/locales-pt-PT.xml +304 -0
  54. data/resource/locale/locales-ro-RO.xml +304 -0
  55. data/resource/locale/locales-ru-RU.xml +304 -0
  56. data/resource/locale/locales-sk-SK.xml +304 -0
  57. data/resource/locale/locales-sl-SI.xml +304 -0
  58. data/resource/locale/locales-sr-RS.xml +304 -0
  59. data/resource/locale/locales-sv-SE.xml +304 -0
  60. data/resource/locale/locales-th-TH.xml +304 -0
  61. data/resource/locale/locales-tr-TR.xml +304 -0
  62. data/resource/locale/locales-uk-UA.xml +304 -0
  63. data/resource/locale/locales-vi-VN.xml +304 -0
  64. data/resource/locale/locales-zh-CN.xml +304 -0
  65. data/resource/locale/locales-zh-TW.xml +304 -0
  66. data/resource/schema/csl-categories.rnc +39 -0
  67. data/resource/schema/csl-data.rnc +98 -0
  68. data/resource/schema/csl-terms.rnc +106 -0
  69. data/resource/schema/csl-types.rnc +39 -0
  70. data/resource/schema/csl-variables.rnc +182 -0
  71. data/resource/schema/csl.rnc +941 -0
  72. data/resource/style/acta-materialia-x.csl +128 -0
  73. data/resource/style/advanced-engineering-materials-x.csl +121 -0
  74. data/resource/style/ama.csl +185 -0
  75. data/resource/style/ama2-x.csl +179 -0
  76. data/resource/style/apa-x.csl +324 -0
  77. data/resource/style/apa.csl +254 -0
  78. data/resource/style/apsa-x.csl +163 -0
  79. data/resource/style/apsa.csl +176 -0
  80. data/resource/style/asa-x.csl +203 -0
  81. data/resource/style/asa.csl +216 -0
  82. data/resource/style/asm-journals-x.csl +131 -0
  83. data/resource/style/bibtex-x2.csl +175 -0
  84. data/resource/style/bluebook-demo-x.csl +392 -0
  85. data/resource/style/bluebook-demo.csl +942 -0
  86. data/resource/style/chicago-author-date-listing.csl +434 -0
  87. data/resource/style/chicago-author-date.csl +369 -0
  88. data/resource/style/chicago-fullnote-bibliography-bb.csl +928 -0
  89. data/resource/style/chicago-fullnote-bibliography.csl +695 -0
  90. data/resource/style/chicago-note-bibliography.csl +446 -0
  91. data/resource/style/chicago-note.csl +388 -0
  92. data/resource/style/greek-chicago-x.csl +1182 -0
  93. data/resource/style/harvard1-institution-italic.csl +190 -0
  94. data/resource/style/harvard1.csl +181 -0
  95. data/resource/style/ieee.csl +129 -0
  96. data/resource/style/mhra-x.csl +312 -0
  97. data/resource/style/mhra.csl +390 -0
  98. data/resource/style/mhra_note_without_bibliography-x.csl +330 -0
  99. data/resource/style/mhra_note_without_bibliography.csl +338 -0
  100. data/resource/style/mla-x.csl +178 -0
  101. data/resource/style/mla.csl +189 -0
  102. data/resource/style/nature-x.csl +81 -0
  103. data/resource/style/nature.csl +88 -0
  104. data/resource/style/nlm.csl +117 -0
  105. data/spec/citeproc/bibliography_spec.rb +45 -0
  106. data/spec/citeproc/citeproc_spec.rb +76 -0
  107. data/spec/citeproc/date_spec.rb +85 -0
  108. data/spec/citeproc/formatter_spec.rb +101 -0
  109. data/spec/citeproc/item_spec.rb +71 -0
  110. data/spec/citeproc/name_spec.rb +30 -0
  111. data/spec/citeproc/processor_spec.rb +61 -0
  112. data/spec/citeproc/selector_spec.rb +82 -0
  113. data/spec/citeproc/variable_spec.rb +69 -0
  114. data/spec/csl/locale_spec.rb +208 -0
  115. data/spec/csl/node_spec.rb +25 -0
  116. data/spec/csl/nodes_spec.rb +140 -0
  117. data/spec/csl/style_spec.rb +62 -0
  118. data/spec/csl/term_spec.rb +56 -0
  119. data/spec/fixtures/dates.yaml +80 -0
  120. data/spec/fixtures/names.yaml +115 -0
  121. data/spec/fixtures/nodes.yaml +245 -0
  122. data/spec/spec_helper.rb +18 -0
  123. data/spec/support/attributes_spec.rb +39 -0
  124. data/spec/support/tree_spec.rb +163 -0
  125. metadata +264 -0
@@ -0,0 +1,324 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0">
3
+ <info>
4
+ <title>American Psychological Association 6th Edition</title>
5
+ <id>http://www.zotero.org/styles/apa</id>
6
+ <link href="http://www.zotero.org/styles/apa" rel="self"/>
7
+ <link href="http://owl.english.purdue.edu/owl/resource/560/01/" rel="documentation"/>
8
+ <author>
9
+ <name>Simon Kornblith</name>
10
+ <email>simon@simonster.com</email>
11
+ </author>
12
+ <contributor>
13
+ <name>Bruce D'Arcus</name>
14
+ </contributor>
15
+ <contributor>
16
+ <name>Curtis M. Humphrey</name>
17
+ </contributor>
18
+ <contributor>
19
+ <name>Richard Karnesky</name>
20
+ <email>karnesky+zotero@gmail.com</email>
21
+ <uri>http://arc.nucapt.northwestern.edu/Richard_Karnesky</uri>
22
+ </contributor>
23
+ <contributor>
24
+ <name>Sebastian Karcher</name>
25
+ </contributor>
26
+ <category field="psychology"/>
27
+ <category field="generic-base"/>
28
+ <category citation-format="author-date"/>
29
+ <updated>2010-01-27T20:08:03+00:00</updated>
30
+ <rights>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/</rights>
31
+ </info>
32
+ <macro name="container-contributors">
33
+ <choose>
34
+ <if type="chapter paper-conference" match="any">
35
+ <text term="in" text-case="capitalize-first" suffix=" "/>
36
+ <names variable="editor translator" delimiter=", " suffix=", ">
37
+ <name and="symbol" initialize-with=". " delimiter=", "/>
38
+ <label form="short" prefix=" (" text-case="capitalize-first" suffix=".)" strip-periods="true"/>
39
+ </names>
40
+ </if>
41
+ </choose>
42
+ </macro>
43
+ <macro name="secondary-contributors">
44
+ <choose>
45
+ <if type="chapter paper-conference" match="none">
46
+ <names variable="editor translator" delimiter=", " prefix=" (" suffix=")">
47
+ <name and="symbol" initialize-with=". " delimiter=", "/>
48
+ <label form="short" prefix=", " text-case="capitalize-first" suffix="." strip-periods="true"/>
49
+ </names>
50
+ </if>
51
+ </choose>
52
+ </macro>
53
+ <macro name="author">
54
+ <names variable="author">
55
+ <name name-as-sort-order="all" and="symbol" sort-separator=", " initialize-with=". " delimiter=", " delimiter-precedes-last="always"/>
56
+ <label form="short" prefix=" (" suffix=".)" text-case="capitalize-first" strip-periods="true"/>
57
+ <substitute>
58
+ <names variable="editor"/>
59
+ <names variable="translator"/>
60
+ <text macro="title"/>
61
+ </substitute>
62
+ </names>
63
+ </macro>
64
+ <macro name="author-short">
65
+ <names variable="author">
66
+ <name form="short" and="symbol" delimiter=", " initialize-with=". "/>
67
+ <substitute>
68
+ <names variable="editor"/>
69
+ <names variable="translator"/>
70
+ <choose>
71
+ <if type="bill book graphic legal_case motion_picture report song" match="any">
72
+ <text variable="title" form="short" font-style="italic"/>
73
+ </if>
74
+ <else>
75
+ <text variable="title" form="short" quotes="true"/>
76
+ </else>
77
+ </choose>
78
+ </substitute>
79
+ </names>
80
+ </macro>
81
+ <macro name="access">
82
+ <choose>
83
+ <if type="thesis">
84
+ <choose>
85
+ <if variable="archive" match="any">
86
+ <group>
87
+ <text term="retrieved" text-case="capitalize-first" suffix=" "/>
88
+ <text term="from" suffix=" "/>
89
+ <text variable="archive" suffix="."/>
90
+ <text variable="archive_location" prefix=" (" suffix=")"/>
91
+ </group>
92
+ </if>
93
+ <else>
94
+ <group>
95
+ <text term="retrieved" text-case="capitalize-first" suffix=" "/>
96
+ <text term="from" suffix=" "/>
97
+ <text variable="URL"/>
98
+ </group>
99
+ </else>
100
+ </choose>
101
+ </if>
102
+ <else>
103
+ <choose>
104
+ <if variable="DOI">
105
+ <text variable="DOI" prefix="doi:"/>
106
+ </if>
107
+ <else>
108
+ <choose>
109
+ <if type="webpage">
110
+ <group>
111
+ <text term="retrieved" text-case="capitalize-first" suffix=" "/>
112
+ <date variable="accessed" suffix=", ">
113
+ <date-part name="month" suffix=" "/>
114
+ <date-part name="day" suffix=", "/>
115
+ <date-part name="year"/>
116
+ </date>
117
+ <group>
118
+ <text term="from" suffix=" "/>
119
+ <text variable="URL"/>
120
+ </group>
121
+ </group>
122
+ </if>
123
+ <else>
124
+ <group>
125
+ <text term="retrieved" text-case="capitalize-first" suffix=" "/>
126
+ <text term="from" suffix=" "/>
127
+ <text variable="URL"/>
128
+ </group>
129
+ </else>
130
+ </choose>
131
+ </else>
132
+ </choose>
133
+ </else>
134
+ </choose>
135
+ </macro>
136
+ <macro name="title">
137
+ <choose>
138
+ <if type="report thesis" match="any">
139
+ <text variable="title" font-style="italic"/>
140
+ <group prefix=" (" suffix=")">
141
+ <text variable="genre"/>
142
+ <text variable="number" prefix=" No. "/>
143
+ </group>
144
+ </if>
145
+ <else-if type="bill book graphic legal_case motion_picture report song manuscript speech" match="any">
146
+ <text variable="title" font-style="italic"/>
147
+ </else-if>
148
+ <else>
149
+ <text variable="title"/>
150
+ </else>
151
+ </choose>
152
+ </macro>
153
+ <macro name="publisher">
154
+ <choose>
155
+ <if type="report" match="any">
156
+ <group delimiter=": ">
157
+ <text variable="publisher-place"/>
158
+ <text variable="publisher"/>
159
+ </group>
160
+ </if>
161
+ <else-if type="thesis" match="any">
162
+ <group delimiter=", ">
163
+ <text variable="publisher"/>
164
+ <text variable="publisher-place"/>
165
+ </group>
166
+ </else-if>
167
+ <else>
168
+ <choose>
169
+ <if variable="event" match="none">
170
+ <text variable="genre" suffix=", "/>
171
+ </if>
172
+ </choose>
173
+ <group delimiter=": ">
174
+ <text variable="publisher-place"/>
175
+ <text variable="publisher"/>
176
+ </group>
177
+ </else>
178
+ </choose>
179
+ </macro>
180
+ <macro name="event">
181
+ <choose>
182
+ <if variable="event">
183
+ <choose>
184
+ <if variable="genre" match="none">
185
+ <text term="presented at" text-case="capitalize-first" suffix=" "/>
186
+ <text variable="event"/>
187
+ </if>
188
+ <else>
189
+ <group delimiter=" ">
190
+ <text variable="genre" text-case="capitalize-first"/>
191
+ <text term="presented at"/>
192
+ <text variable="event"/>
193
+ </group>
194
+ </else>
195
+ </choose>
196
+ </if>
197
+ </choose>
198
+ </macro>
199
+ <macro name="issued">
200
+ <choose>
201
+ <if variable="issued">
202
+ <group prefix=" (" suffix=").">
203
+ <date variable="issued">
204
+ <date-part name="year"/>
205
+ </date>
206
+ <choose>
207
+ <if type="bill book graphic legal_case motion_picture report song article-journal chapter paper-conference" match="none">
208
+ <date variable="issued">
209
+ <date-part prefix=", " name="month"/>
210
+ <date-part prefix=" " name="day"/>
211
+ </date>
212
+ </if>
213
+ </choose>
214
+ </group>
215
+ </if>
216
+ <else>
217
+ <text prefix=" (" term="no date" suffix=")." form="short"/>
218
+ </else>
219
+ </choose>
220
+ </macro>
221
+ <macro name="issued-year">
222
+ <choose>
223
+ <if variable="issued">
224
+ <date variable="issued">
225
+ <date-part name="year"/>
226
+ </date>
227
+ </if>
228
+ <else>
229
+ <text term="no date" form="short" strip-periods="true"/>
230
+ </else>
231
+ </choose>
232
+ </macro>
233
+ <macro name="edition">
234
+ <choose>
235
+ <if is-numeric="edition">
236
+ <group delimiter=" ">
237
+ <number variable="edition" form="ordinal"/>
238
+ <text term="edition" form="short" suffix="." strip-periods="true"/>
239
+ </group>
240
+ </if>
241
+ <else>
242
+ <text variable="edition" suffix="."/>
243
+ </else>
244
+ </choose>
245
+ </macro>
246
+ <macro name="locators">
247
+ <choose>
248
+ <if type="article-journal article-magazine article-newspaper" match="any">
249
+ <group prefix=", " delimiter=", ">
250
+ <group>
251
+ <text variable="volume" font-style="italic"/>
252
+ <text variable="issue" prefix="(" suffix=")"/>
253
+ </group>
254
+ <text variable="page"/>
255
+ </group>
256
+ </if>
257
+ <else-if type="bill book graphic legal_case motion_picture report song chapter paper-conference" match="any">
258
+ <group prefix=" (" suffix=")" delimiter=", ">
259
+ <text macro="edition"/>
260
+ <group>
261
+ <text term="volume" form="short" plural="true" text-case="capitalize-first" suffix=". " strip-periods="true"/>
262
+ <number variable="number-of-volumes" form="numeric" prefix="1-"/>
263
+ </group>
264
+ <group>
265
+ <text term="volume" form="short" text-case="capitalize-first" suffix=". " strip-periods="true"/>
266
+ <number variable="volume" form="numeric"/>
267
+ </group>
268
+ <group>
269
+ <label variable="page" form="short" suffix=" "/>
270
+ <text variable="page"/>
271
+ </group>
272
+ </group>
273
+ </else-if>
274
+ </choose>
275
+ </macro>
276
+ <macro name="citation-locator">
277
+ <group>
278
+ <label variable="locator" form="short"/>
279
+ <text variable="locator" prefix=" "/>
280
+ </group>
281
+ </macro>
282
+ <citation et-al-min="6" 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" disambiguate-add-givenname="true" collapse="year">
283
+ <sort>
284
+ <key macro="author"/>
285
+ <key macro="issued-year"/>
286
+ </sort>
287
+ <layout prefix="(" suffix=")" delimiter="; ">
288
+ <group delimiter=", ">
289
+ <text macro="author-short"/>
290
+ <text macro="issued-year"/>
291
+ <text macro="citation-locator"/>
292
+ </group>
293
+ </layout>
294
+ </citation>
295
+ <bibliography hanging-indent="true" et-al-min="8" et-al-use-first="7" entry-spacing="0" line-spacing="2">
296
+ <sort>
297
+ <key macro="author"/>
298
+ <key macro="issued-year" sort="ascending"/>
299
+ </sort>
300
+ <layout>
301
+ <group suffix=".">
302
+ <text macro="author" suffix="."/>
303
+ <text macro="issued" suffix=" "/>
304
+ <group delimiter=". ">
305
+ <text macro="title"/>
306
+ <group>
307
+ <text macro="container-contributors"/>
308
+ <text macro="secondary-contributors"/>
309
+ <group delimiter=", ">
310
+ <text variable="container-title" font-style="italic"/>
311
+ <text variable="collection-title"/>
312
+ </group>
313
+ </group>
314
+ </group>
315
+ <text macro="locators"/>
316
+ <group delimiter=", " prefix=". ">
317
+ <text macro="event"/>
318
+ <text macro="publisher"/>
319
+ </group>
320
+ </group>
321
+ <text macro="access" prefix=". "/>
322
+ </layout>
323
+ </bibliography>
324
+ </style>
@@ -0,0 +1,254 @@
1
+ <style
2
+ xmlns="http://purl.org/net/xbiblio/csl"
3
+ class="in-text"
4
+ xml:lang="en">
5
+ <info>
6
+ <title>American Psychological Association</title>
7
+ <id>http://www.zotero.org/styles/apa</id>
8
+ <link href="http://www.zotero.org/styles/apa" />
9
+ <author>
10
+ <name>Simon Kornblith</name>
11
+ <email>simon@simonster.com</email>
12
+ </author>
13
+ <contributor>
14
+ <name>Bruce D'Arcus</name>
15
+ </contributor>
16
+ <contributor>
17
+ <name>Curtis M. Humphrey</name>
18
+ </contributor>
19
+ <contributor>
20
+ <name>Richard Karnesky</name>
21
+ <email>karnesky+zotero@gmail.com</email>
22
+ <uri>http://arc.nucapt.northwestern.edu/Richard_Karnesky</uri>
23
+ </contributor>
24
+ <category term="psychology" />
25
+ <category term="generic-base" />
26
+ <category term="author-date" />
27
+ <updated />
28
+ </info>
29
+ <macro name="container-contributors">
30
+ <choose>
31
+ <if type="chapter">
32
+ <text suffix=" " term="in" text-case="capitalize-first" />
33
+ <names delimiter=", " suffix=", " variable="editor translator">
34
+ <name and="symbol" delimiter=", " initialize-with=". " />
35
+ <label form="short" prefix=" (" suffix=".)" text-case="capitalize-first" />
36
+ </names>
37
+ </if>
38
+ </choose>
39
+ </macro>
40
+ <macro name="secondary-contributors">
41
+ <choose>
42
+ <if match="none" type="chapter">
43
+ <names delimiter=", " prefix=" (" suffix=")" variable="editor translator">
44
+ <name and="symbol" delimiter=", " initialize-with=". " />
45
+ <label form="short" prefix=", " suffix="." text-case="capitalize-first" />
46
+ </names>
47
+ </if>
48
+ </choose>
49
+ </macro>
50
+ <macro name="author">
51
+ <names variable="author">
52
+ <name and="symbol" delimiter=", " delimiter-precedes-last="always" initialize-with=". " name-as-sort-order="all" sort-separator=", " />
53
+ <label form="short" prefix=" (" suffix=".)" text-case="capitalize-first" />
54
+ <substitute>
55
+ <names variable="editor" />
56
+ <names variable="translator" />
57
+ <text macro="title" />
58
+ </substitute>
59
+ </names>
60
+ </macro>
61
+ <macro name="author-short">
62
+ <names variable="author">
63
+ <name and="symbol" delimiter=", " form="short" initialize-with=". " />
64
+ <substitute>
65
+ <names variable="editor" />
66
+ <names variable="translator" />
67
+ <choose>
68
+ <if type="book">
69
+ <text font-style="italic" form="short" variable="title" />
70
+ </if>
71
+ <else>
72
+ <text form="short" quotes="true" variable="title" />
73
+ </else>
74
+ </choose>
75
+ </substitute>
76
+ </names>
77
+ </macro>
78
+ <macro name="access">
79
+ <choose>
80
+ <if variable="DOI">
81
+ <text prefix="doi: " variable="DOI" />
82
+ </if>
83
+ <else>
84
+ <group>
85
+ <text suffix=" " term="retrieved" text-case="capitalize-first" />
86
+ <date suffix=", " variable="accessed">
87
+ <date-part name="month" suffix=" " />
88
+ <date-part name="day" suffix=", " />
89
+ <date-part name="year" />
90
+ </date>
91
+ <group>
92
+ <text suffix=" " term="from" />
93
+ <text variable="URL" />
94
+ </group>
95
+ </group>
96
+ </else>
97
+ </choose>
98
+ </macro>
99
+ <macro name="title">
100
+ <choose>
101
+ <if match="any" type="book thesis">
102
+ <text font-style="italic" variable="title" />
103
+ </if>
104
+ <else>
105
+ <text variable="title" />
106
+ </else>
107
+ </choose>
108
+ </macro>
109
+ <macro name="publisher">
110
+ <text suffix=", " variable="genre" />
111
+ <group delimiter=": ">
112
+ <text variable="publisher-place" />
113
+ <text variable="publisher" />
114
+ </group>
115
+ </macro>
116
+ <macro name="event">
117
+ <text variable="event" />
118
+ <text prefix=", " variable="event-place" />
119
+ </macro>
120
+ <macro name="issued">
121
+ <choose>
122
+ <if variable="issued">
123
+ <group prefix=" (" suffix=").">
124
+ <date variable="issued">
125
+ <date-part name="year" />
126
+ </date>
127
+ <choose>
128
+ <if match="none" type="book chapter article-journal">
129
+ <date variable="issued">
130
+ <date-part name="month" prefix=", " />
131
+ <date-part name="day" prefix=" " />
132
+ </date>
133
+ </if>
134
+ </choose>
135
+ </group>
136
+ </if>
137
+ <else>
138
+ <text prefix=" (" suffix=")." term="no date" />
139
+ </else>
140
+ </choose>
141
+ </macro>
142
+ <macro name="issued-year">
143
+ <choose>
144
+ <if variable="issued">
145
+ <date variable="issued">
146
+ <date-part name="year" />
147
+ </date>
148
+ </if>
149
+ <else>
150
+ <text form="short" term="no date" />
151
+ </else>
152
+ </choose>
153
+ </macro>
154
+ <macro name="edition">
155
+ <choose>
156
+ <if is-numeric="edition">
157
+ <group delimiter=" ">
158
+ <number form="ordinal" variable="edition" />
159
+ <text form="short" suffix="." term="edition" />
160
+ </group>
161
+ </if>
162
+ <else>
163
+ <text suffix="." variable="edition" />
164
+ </else>
165
+ </choose>
166
+ </macro>
167
+ <macro name="locators">
168
+ <choose>
169
+ <if match="any" type="article-journal article-magazine article-newspaper">
170
+ <group delimiter=", " prefix=", ">
171
+ <group>
172
+ <text font-style="italic" variable="volume" />
173
+ <text prefix="(" suffix=")" variable="issue" />
174
+ </group>
175
+ <text variable="page" />
176
+ </group>
177
+ </if>
178
+ <else-if match="any" type="book chapter">
179
+ <group delimiter=", " prefix=" (" suffix=")">
180
+ <text macro="edition" />
181
+ <group>
182
+ <text form="short" plural="true" suffix=". " term="volume" text-case="capitalize-first" />
183
+ <number form="numeric" prefix="1-" variable="number-of-volumes" />
184
+ </group>
185
+ <group>
186
+ <text form="short" suffix=". " term="volume" text-case="capitalize-first" />
187
+ <number form="numeric" variable="volume" />
188
+ </group>
189
+ <group>
190
+ <label form="short" strip-periods="false" suffix=" " variable="page" />
191
+ <text variable="page" />
192
+ </group>
193
+ </group>
194
+ </else-if>
195
+ </choose>
196
+ </macro>
197
+ <macro name="citation-locator">
198
+ <group>
199
+ <label form="short" strip-periods="false" variable="locator" />
200
+ <text prefix=" " variable="locator" />
201
+ </group>
202
+ </macro>
203
+ <citation
204
+ collapse="year"
205
+ disambiguate-add-givenname="true"
206
+ disambiguate-add-names="true"
207
+ disambiguate-add-year-suffix="true"
208
+ et-al-min="6"
209
+ et-al-subsequent-min="3"
210
+ et-al-subsequent-use-first="1"
211
+ et-al-use-first="1">
212
+ <sort>
213
+ <key macro="author" />
214
+ <key variable="issued" />
215
+ </sort>
216
+ <layout delimiter="; " prefix="(" suffix=")">
217
+ <group delimiter=", ">
218
+ <text macro="author-short" />
219
+ <text macro="issued-year" />
220
+ <text macro="citation-locator" />
221
+ </group>
222
+ </layout>
223
+ </citation>
224
+ <bibliography
225
+ entry-spacing="0"
226
+ et-al-min="6"
227
+ et-al-use-first="6"
228
+ hanging-indent="true">
229
+ <sort>
230
+ <key macro="author" />
231
+ <key variable="issued" />
232
+ </sort>
233
+ <layout suffix=".">
234
+ <text macro="author" suffix="." />
235
+ <text macro="issued" suffix=" " />
236
+ <group delimiter=". ">
237
+ <text macro="title" />
238
+ <group>
239
+ <text macro="container-contributors" />
240
+ <text macro="secondary-contributors" />
241
+ <group delimiter=", ">
242
+ <text font-style="italic" variable="container-title" />
243
+ <text variable="collection-title" />
244
+ </group>
245
+ </group>
246
+ </group>
247
+ <text macro="locators" />
248
+ <group delimiter=". " prefix=". ">
249
+ <text macro="publisher" />
250
+ <text macro="access" />
251
+ </group>
252
+ </layout>
253
+ </bibliography>
254
+ </style>