citeproc-ruby 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
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,330 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0">
3
+ <info>
4
+ <title>Modern Humanities Research Association (Note without Bibliography)</title>
5
+ <id>http://www.zotero.org/styles/mhra_note_without_bibliography</id>
6
+ <link href="http://www.zotero.org/styles/mhra_note_without_bibliography" rel="self"/>
7
+ <link href="http://www.mhra.org.uk/Publications/Books/StyleGuide/download.shtml" rel="documentation"/>
8
+ <author>
9
+ <name>Rintze Zelle</name>
10
+ <uri>http://forums.zotero.org/account/831/</uri>
11
+ </author>
12
+ <summary>MHRA format with full notes and no bibliography</summary>
13
+ <category field="generic-base"/>
14
+ <category citation-format="note"/>
15
+ <updated>2008-10-28T21:36:13+00:00</updated>
16
+ </info>
17
+ <locale xml:lang="en">
18
+ <terms>
19
+ <term name="et-al">and others</term>
20
+ <term name="editor" form="verb-short">ed. by</term>
21
+ <term name="edition" form="short">edn</term>
22
+ <term name="translator" form="verb-short">trans. by</term>
23
+ </terms>
24
+ </locale>
25
+ <macro name="contributors-note">
26
+ <names variable="author">
27
+ <name and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="never"/>
28
+ </names>
29
+ <text macro="recipient-note"/>
30
+ </macro>
31
+ <macro name="title-note">
32
+ <choose>
33
+ <if type="bill book graphic legal_case motion_picture report song" match="any">
34
+ <text variable="title" font-style="italic"/>
35
+ </if>
36
+ <else>
37
+ <text variable="title" prefix="‘" suffix="’"/>
38
+ </else>
39
+ </choose>
40
+ </macro>
41
+ <macro name="editor-translator">
42
+ <group delimiter=", ">
43
+ <names variable="editor" delimiter=", ">
44
+ <label form="verb-short" text-case="lowercase" suffix=" " strip-periods="true"/>
45
+ <name and="text" delimiter=", " delimiter-precedes-last="never"/>
46
+ </names>
47
+ <choose>
48
+ <if variable="author editor" match="any">
49
+ <names variable="translator" delimiter=", ">
50
+ <label form="verb-short" text-case="lowercase" suffix=" " strip-periods="true"/>
51
+ <name and="text" delimiter=", " delimiter-precedes-last="never"/>
52
+ </names>
53
+ </if>
54
+ </choose>
55
+ </group>
56
+ </macro>
57
+ <macro name="collection-title">
58
+ <text variable="collection-title"/>
59
+ <text variable="collection-number" prefix=", "/>
60
+ </macro>
61
+ <macro name="locators-note">
62
+ <choose>
63
+ <if type="article-journal">
64
+ <text variable="volume"/>
65
+ </if>
66
+ <else-if type="bill book graphic legal_case motion_picture report song chapter paper-conference" match="any">
67
+ <group delimiter=", ">
68
+ <text macro="edition-note"/>
69
+ <choose>
70
+ <if variable="locator" match="none">
71
+ <group>
72
+ <number variable="number-of-volumes" form="numeric"/>
73
+ <text term="volume" form="short" prefix=" " plural="true" strip-periods="true"/>
74
+ </group>
75
+ </if>
76
+ </choose>
77
+ </group>
78
+ </else-if>
79
+ </choose>
80
+ </macro>
81
+ <macro name="issue-note">
82
+ <choose>
83
+ <if type="article-journal">
84
+ <choose>
85
+ <if variable="volume">
86
+ <text macro="issued" prefix=" (" suffix=")"/>
87
+ </if>
88
+ <else>
89
+ <text macro="issued" prefix=", "/>
90
+ </else>
91
+ </choose>
92
+ </if>
93
+ <else-if variable="publisher-place publisher" match="any">
94
+ <group prefix=" (" suffix=")" delimiter=", ">
95
+ <group delimiter=" ">
96
+ <choose>
97
+ <if variable="title" match="none"/>
98
+ <else-if type="thesis speech" match="any">
99
+ <text variable="genre" prefix="unpublished "/>
100
+ </else-if>
101
+ </choose>
102
+ <text macro="event"/>
103
+ </group>
104
+ <text macro="publisher"/>
105
+ <text macro="issued"/>
106
+ </group>
107
+ </else-if>
108
+ <else>
109
+ <text macro="issued" prefix=", "/>
110
+ </else>
111
+ </choose>
112
+ </macro>
113
+ <macro name="locators-specific-note">
114
+ <choose>
115
+ <if type="bill book graphic legal_case motion_picture report song chapter paper-conference" match="any">
116
+ <choose>
117
+ <if is-numeric="volume">
118
+ <number variable="volume" form="roman" font-variant="small-caps"/>
119
+ </if>
120
+ </choose>
121
+ </if>
122
+ </choose>
123
+ </macro>
124
+ <macro name="container-title-note">
125
+ <choose>
126
+ <if type="chapter paper-conference" match="any">
127
+ <text term="in" text-case="lowercase" suffix=" "/>
128
+ </if>
129
+ </choose>
130
+ <text variable="container-title" font-style="italic"/>
131
+ </macro>
132
+ <macro name="edition-note">
133
+ <choose>
134
+ <if type="bill book graphic legal_case motion_picture report song chapter paper-conference" match="any">
135
+ <choose>
136
+ <if is-numeric="edition">
137
+ <group delimiter=" ">
138
+ <number variable="edition" form="ordinal"/>
139
+ <text term="edition" form="short" strip-periods="true"/>
140
+ </group>
141
+ </if>
142
+ <else>
143
+ <text variable="edition"/>
144
+ </else>
145
+ </choose>
146
+ </if>
147
+ </choose>
148
+ </macro>
149
+ <macro name="editor-note">
150
+ <names variable="editor">
151
+ <name and="text" sort-separator=", " delimiter=", "/>
152
+ <label form="short" prefix=", " suffix="." strip-periods="true"/>
153
+ </names>
154
+ </macro>
155
+ <macro name="translator-note">
156
+ <names variable="translator">
157
+ <name and="text" sort-separator=", " delimiter=", "/>
158
+ <label form="verb-short" prefix=", " suffix="." strip-periods="true"/>
159
+ </names>
160
+ </macro>
161
+ <macro name="recipient-note">
162
+ <names variable="recipient" delimiter=", ">
163
+ <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
164
+ <name and="text" delimiter=", "/>
165
+ </names>
166
+ </macro>
167
+ <macro name="recipient-short">
168
+ <names variable="recipient">
169
+ <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
170
+ <name form="short" and="text" delimiter=", "/>
171
+ </names>
172
+ </macro>
173
+ <macro name="contributors-short">
174
+ <names variable="author">
175
+ <name form="short" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="never"/>
176
+ <substitute>
177
+ <names variable="editor"/>
178
+ <names variable="translator"/>
179
+ </substitute>
180
+ </names>
181
+ <text macro="recipient-short"/>
182
+ </macro>
183
+ <macro name="interviewer-note">
184
+ <names variable="interviewer" delimiter=", ">
185
+ <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
186
+ <name and="text" delimiter=", "/>
187
+ </names>
188
+ </macro>
189
+ <macro name="locators-newspaper">
190
+ <choose>
191
+ <if type="article-newspaper">
192
+ <group delimiter=", ">
193
+ <group>
194
+ <text variable="edition" suffix=" "/>
195
+ <text term="edition" prefix=" "/>
196
+ </group>
197
+ <group>
198
+ <text term="section" suffix=" "/>
199
+ <text variable="section"/>
200
+ </group>
201
+ </group>
202
+ </if>
203
+ </choose>
204
+ </macro>
205
+ <macro name="event">
206
+ <group>
207
+ <text term="presented at" suffix=" "/>
208
+ <text variable="event"/>
209
+ </group>
210
+ </macro>
211
+ <macro name="publisher">
212
+ <group delimiter=": ">
213
+ <text variable="publisher-place"/>
214
+ <text variable="publisher"/>
215
+ </group>
216
+ </macro>
217
+ <macro name="issued">
218
+ <choose>
219
+ <if type="graphic report article-newspaper" match="any">
220
+ <date variable="issued">
221
+ <date-part name="day" suffix=" "/>
222
+ <date-part name="month" suffix=" "/>
223
+ <date-part name="year"/>
224
+ </date>
225
+ </if>
226
+ <else-if type="bill book graphic legal_case motion_picture report song thesis chapter paper-conference" match="any">
227
+ <date variable="issued">
228
+ <date-part name="year"/>
229
+ </date>
230
+ </else-if>
231
+ <else>
232
+ <date variable="issued">
233
+ <date-part name="year"/>
234
+ </date>
235
+ </else>
236
+ </choose>
237
+ </macro>
238
+ <macro name="pages">
239
+ <choose>
240
+ <if type="article-journal">
241
+ <text variable="page" prefix=", "/>
242
+ </if>
243
+ <else-if type="bill book graphic legal_case motion_picture report song article-newspaper thesis chapter paper-conference" match="any">
244
+ <label variable="page" form="short" prefix=", " suffix=" "/>
245
+ <text variable="page"/>
246
+ </else-if>
247
+ </choose>
248
+ </macro>
249
+ <macro name="point-locators">
250
+ <choose>
251
+ <if variable="locator" match="none">
252
+ <text macro="pages"/>
253
+ </if>
254
+ <else-if type="article-journal">
255
+ <text variable="locator" prefix=": "/>
256
+ </else-if>
257
+ <else>
258
+ <group prefix=", ">
259
+ <choose>
260
+ <if locator="page" match="none">
261
+ <label variable="locator" form="short" suffix=" "/>
262
+ </if>
263
+ </choose>
264
+ <text variable="locator"/>
265
+ </group>
266
+ </else>
267
+ </choose>
268
+ </macro>
269
+ <macro name="archive-note">
270
+ <group delimiter=", ">
271
+ <text variable="archive_location"/>
272
+ <text variable="archive"/>
273
+ <text variable="archive-place"/>
274
+ </group>
275
+ </macro>
276
+ <macro name="access-note">
277
+ <group delimiter=", ">
278
+ <choose>
279
+ <if type="graphic report" match="any">
280
+ <text macro="archive-note" prefix=", "/>
281
+ </if>
282
+ <else-if type="bill book graphic legal_case motion_picture report song article-journal article-magazine article-newspaper thesis chapter paper-conference" match="none">
283
+ <text macro="archive-note" prefix=", "/>
284
+ </else-if>
285
+ </choose>
286
+ </group>
287
+ <choose>
288
+ <if variable="DOI">
289
+ <text variable="DOI" prefix=" &lt;doi:" suffix="&gt;"/>
290
+ </if>
291
+ <else>
292
+ <text variable="URL" prefix=" &lt;" suffix="&gt;"/>
293
+ <group prefix=" [" suffix="]">
294
+ <text term="accessed" text-case="lowercase"/>
295
+ <date variable="accessed">
296
+ <date-part name="day" prefix=" "/>
297
+ <date-part name="month" prefix=" "/>
298
+ <date-part name="year" prefix=" "/>
299
+ </date>
300
+ </group>
301
+ </else>
302
+ </choose>
303
+ </macro>
304
+ <citation et-al-min="4" et-al-use-first="1" et-al-subsequent-min="4" et-al-subsequent-use-first="1" disambiguate-add-names="true" disambiguate-add-givenname="true">
305
+ <layout prefix="" suffix="." delimiter="; ">
306
+ <choose>
307
+ <if position="subsequent">
308
+ <text macro="contributors-short"/>
309
+ <text macro="locators-specific-note" prefix=", "/>
310
+ <text macro="point-locators"/>
311
+ </if>
312
+ <else>
313
+ <group delimiter=", ">
314
+ <text macro="contributors-note"/>
315
+ <text macro="title-note"/>
316
+ <text macro="container-title-note"/>
317
+ <text macro="editor-translator"/>
318
+ <text macro="collection-title"/>
319
+ <text macro="locators-note"/>
320
+ </group>
321
+ <text macro="issue-note"/>
322
+ <text macro="locators-specific-note" prefix=", "/>
323
+ <text macro="locators-newspaper" prefix=", "/>
324
+ <text macro="point-locators"/>
325
+ <text macro="access-note"/>
326
+ </else>
327
+ </choose>
328
+ </layout>
329
+ </citation>
330
+ </style>
@@ -0,0 +1,338 @@
1
+ <style
2
+ xmlns="http://purl.org/net/xbiblio/csl"
3
+ class="note"
4
+ xml:lang="en">
5
+ <info>
6
+ <title>Modern Humanities Research Association (Note without Bibliography)</title>
7
+ <id>http://www.zotero.org/styles/mhra_note_without_bibliography</id>
8
+ <link href="http://www.zotero.org/styles/mhra_note_without_bibliography" />
9
+ <link href="http://www.mhra.org.uk/Publications/Books/StyleGuide/download.shtml" rel="documentation" />
10
+ <author>
11
+ <name>Rintze Zelle</name>
12
+ <uri>http://forums.zotero.org/account/831/</uri>
13
+ </author>
14
+ <summary>MHRA format with full notes and no bibliography</summary>
15
+ <category term="generic-base" />
16
+ <category term="note" />
17
+ <updated>2008-05-13T12:42:52+00:00</updated>
18
+ </info>
19
+ <terms>
20
+ <locale xml:lang="en">
21
+ <term name="et-al">and others</term>
22
+ <term form="verb-short" name="editor">ed. by</term>
23
+ <term form="short" name="edition">edn</term>
24
+ <term form="verb-short" name="translator">trans. by</term>
25
+ </locale>
26
+ </terms>
27
+ <macro name="contributors-note">
28
+ <names variable="author">
29
+ <name and="text" delimiter=", " delimiter-precedes-last="never" sort-separator=", " />
30
+ </names>
31
+ <text macro="recipient-note" />
32
+ </macro>
33
+ <macro name="title-note">
34
+ <choose>
35
+ <if type="book">
36
+ <text font-style="italic" variable="title" />
37
+ </if>
38
+ <else>
39
+ <text prefix="&#8216;" suffix="&#8217;" variable="title" />
40
+ </else>
41
+ </choose>
42
+ </macro>
43
+ <macro name="editor-translator">
44
+ <group delimiter=", ">
45
+ <names delimiter=", " variable="editor">
46
+ <label form="verb-short" suffix=" " text-case="lowercase" />
47
+ <name and="text" delimiter=", " delimiter-precedes-last="never" />
48
+ </names>
49
+ <choose>
50
+ <if match="any" variable="author editor">
51
+ <names delimiter=", " variable="translator">
52
+ <label form="verb-short" suffix=" " text-case="lowercase" />
53
+ <name and="text" delimiter=", " delimiter-precedes-last="never" />
54
+ </names>
55
+ </if>
56
+ </choose>
57
+ </group>
58
+ </macro>
59
+ <macro name="collection-title">
60
+ <text variable="collection-title" />
61
+ <text prefix=", " variable="collection-number" />
62
+ </macro>
63
+ <macro name="locators-note">
64
+ <choose>
65
+ <if type="article-journal">
66
+ <text variable="volume" />
67
+ </if>
68
+ <else-if match="any" type="book chapter">
69
+ <group delimiter=", ">
70
+ <text macro="edition-note" />
71
+ <choose>
72
+ <if match="none" variable="locator">
73
+ <group>
74
+ <number form="numeric" variable="number-of-volumes" />
75
+ <text form="short" plural="true" prefix=" " term="volume" />
76
+ </group>
77
+ </if>
78
+ </choose>
79
+ </group>
80
+ </else-if>
81
+ </choose>
82
+ </macro>
83
+ <macro name="issue-note">
84
+ <choose>
85
+ <if type="article-journal">
86
+ <choose>
87
+ <if variable="volume">
88
+ <text macro="issued" prefix=" (" suffix=")" />
89
+ </if>
90
+ <else>
91
+ <text macro="issued" prefix=", " />
92
+ </else>
93
+ </choose>
94
+ </if>
95
+ <else-if match="any" variable="publisher-place publisher">
96
+ <group delimiter=", " prefix=" (" suffix=")">
97
+ <group delimiter=" ">
98
+ <choose>
99
+ <if match="none" variable="title"> </if>
100
+ <else-if match="any" type="thesis speech">
101
+ <text prefix="unpublished " variable="genre" />
102
+ </else-if>
103
+ </choose>
104
+ <text macro="event" />
105
+ </group>
106
+ <text macro="publisher" />
107
+ <text macro="issued" />
108
+ </group>
109
+ </else-if>
110
+ <else>
111
+ <text macro="issued" prefix=", " />
112
+ </else>
113
+ </choose>
114
+ </macro>
115
+ <macro name="locators-specific-note">
116
+ <choose>
117
+ <if match="any" type="book chapter">
118
+ <choose>
119
+ <if is-numeric="volume">
120
+ <number font-variant="small-caps" form="roman" variable="volume" />
121
+ </if>
122
+ </choose>
123
+ </if>
124
+ </choose>
125
+ </macro>
126
+ <macro name="container-title-note">
127
+ <choose>
128
+ <if type="chapter">
129
+ <text suffix=" " term="in" text-case="lowercase" />
130
+ </if>
131
+ </choose>
132
+ <text font-style="italic" variable="container-title" />
133
+ </macro>
134
+ <macro name="edition-note">
135
+ <choose>
136
+ <if match="any" type="book chapter">
137
+ <choose>
138
+ <if is-numeric="edition">
139
+ <group delimiter=" ">
140
+ <number form="ordinal" variable="edition" />
141
+ <text form="short" term="edition" />
142
+ </group>
143
+ </if>
144
+ <else>
145
+ <text variable="edition" />
146
+ </else>
147
+ </choose>
148
+ </if>
149
+ </choose>
150
+ </macro>
151
+ <macro name="editor-note">
152
+ <names variable="editor">
153
+ <name and="text" delimiter=", " sort-separator=", " />
154
+ <label form="short" prefix=", " suffix="." />
155
+ </names>
156
+ </macro>
157
+ <macro name="translator-note">
158
+ <names variable="translator">
159
+ <name and="text" delimiter=", " sort-separator=", " />
160
+ <label form="verb-short" prefix=", " suffix="." />
161
+ </names>
162
+ </macro>
163
+ <macro name="recipient-note">
164
+ <names delimiter=", " variable="recipient">
165
+ <label form="verb" prefix=" " suffix=" " text-case="lowercase" />
166
+ <name and="text" delimiter=", " />
167
+ </names>
168
+ </macro>
169
+ <macro name="recipient-short">
170
+ <names variable="recipient">
171
+ <label form="verb" prefix=" " suffix=" " text-case="lowercase" />
172
+ <name and="text" delimiter=", " form="short" />
173
+ </names>
174
+ </macro>
175
+ <macro name="contributors-short">
176
+ <names variable="author">
177
+ <name and="text" delimiter=", " delimiter-precedes-last="never" form="short" sort-separator=", " />
178
+ <substitute>
179
+ <names variable="editor" />
180
+ <names variable="translator" />
181
+ </substitute>
182
+ </names>
183
+ <text macro="recipient-short" />
184
+ </macro>
185
+ <macro name="interviewer-note">
186
+ <names delimiter=", " variable="interviewer">
187
+ <label form="verb" prefix=" " suffix=" " text-case="lowercase" />
188
+ <name and="text" delimiter=", " />
189
+ </names>
190
+ </macro>
191
+ <macro name="locators-newspaper">
192
+ <choose>
193
+ <if type="article-newspaper">
194
+ <group delimiter=", ">
195
+ <group>
196
+ <text suffix=" " variable="edition" />
197
+ <text prefix=" " term="edition" />
198
+ </group>
199
+ <group>
200
+ <text suffix=" " term="section" />
201
+ <text variable="section" />
202
+ </group>
203
+ </group>
204
+ </if>
205
+ </choose>
206
+ </macro>
207
+ <macro name="event">
208
+ <group>
209
+ <text suffix=" " term="presented at" />
210
+ <text variable="event" />
211
+ </group>
212
+ </macro>
213
+ <macro name="publisher">
214
+ <group delimiter=": ">
215
+ <text variable="publisher-place" />
216
+ <text variable="publisher" />
217
+ </group>
218
+ </macro>
219
+ <macro name="issued">
220
+ <choose>
221
+ <if match="any" type="graphic report article-newspaper">
222
+ <date variable="issued">
223
+ <date-part name="day" suffix=" " />
224
+ <date-part name="month" suffix=" " />
225
+ <date-part name="year" />
226
+ </date>
227
+ </if>
228
+ <else-if match="any" type="book chapter thesis">
229
+ <date variable="issued">
230
+ <date-part name="year" />
231
+ </date>
232
+ </else-if>
233
+ <else>
234
+ <date variable="issued">
235
+ <date-part name="year" />
236
+ </date>
237
+ </else>
238
+ </choose>
239
+ </macro>
240
+ <macro name="pages">
241
+ <choose>
242
+ <if type="article-journal">
243
+ <text prefix=", " variable="page" />
244
+ </if>
245
+ <else-if match="any" type="chapter book article-newspaper thesis">
246
+ <label form="short" prefix=", " strip-periods="false" suffix=" " variable="page" />
247
+ <text variable="page" />
248
+ </else-if>
249
+ </choose>
250
+ </macro>
251
+ <macro name="point-locators">
252
+ <choose>
253
+ <if match="none" variable="locator">
254
+ <text macro="pages" />
255
+ </if>
256
+ <else-if type="article-journal">
257
+ <text prefix=": " variable="locator" />
258
+ </else-if>
259
+ <else>
260
+ <group prefix=", ">
261
+ <choose>
262
+ <if locator="page" match="none">
263
+ <label form="short" strip-periods="false" suffix=" " variable="locator" />
264
+ </if>
265
+ </choose>
266
+ <text variable="locator" />
267
+ </group>
268
+ </else>
269
+ </choose>
270
+ </macro>
271
+ <macro name="archive-note">
272
+ <group delimiter=", ">
273
+ <text variable="archive_location" />
274
+ <text variable="archive" />
275
+ <text variable="archive-place" />
276
+ </group>
277
+ </macro>
278
+ <macro name="access-note">
279
+ <group delimiter=", ">
280
+ <choose>
281
+ <if match="any" type="graphic report">
282
+ <text macro="archive-note" prefix=", " />
283
+ </if>
284
+ <else-if match="none" type="book thesis chapter article-journal article-newspaper article-magazine">
285
+ <text macro="archive-note" prefix=", " />
286
+ </else-if>
287
+ </choose>
288
+ </group>
289
+ <choose>
290
+ <if variable="DOI">
291
+ <text prefix=" &lt;doi:" suffix="&gt;" variable="DOI" />
292
+ </if>
293
+ <else>
294
+ <text prefix=" &lt;" suffix="&gt;" variable="URL" />
295
+ <group prefix=" [" suffix="]">
296
+ <text term="accessed" text-case="lowercase" />
297
+ <date variable="accessed">
298
+ <date-part name="day" prefix=" " />
299
+ <date-part name="month" prefix=" " />
300
+ <date-part name="year" prefix=" " />
301
+ </date>
302
+ </group>
303
+ </else>
304
+ </choose>
305
+ </macro>
306
+ <citation
307
+ disambiguate-add-givenname="true"
308
+ disambiguate-add-names="true"
309
+ et-al-min="4"
310
+ et-al-subsequent-min="4"
311
+ et-al-subsequent-use-first="1"
312
+ et-al-use-first="1">
313
+ <layout delimiter="; " prefix="" suffix=".">
314
+ <choose>
315
+ <if position="subsequent">
316
+ <text macro="contributors-short" />
317
+ <text macro="locators-specific-note" prefix=", " />
318
+ <text macro="point-locators" />
319
+ </if>
320
+ <else>
321
+ <group delimiter=", ">
322
+ <text macro="contributors-note" />
323
+ <text macro="title-note" />
324
+ <text macro="container-title-note" />
325
+ <text macro="editor-translator" />
326
+ <text macro="collection-title" />
327
+ <text macro="locators-note" />
328
+ </group>
329
+ <text macro="issue-note" />
330
+ <text macro="locators-specific-note" prefix=", " />
331
+ <text macro="locators-newspaper" prefix=", " />
332
+ <text macro="point-locators" />
333
+ <text macro="access-note" />
334
+ </else>
335
+ </choose>
336
+ </layout>
337
+ </citation>
338
+ </style>