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,392 @@
1
+ <style
2
+ xmlns="http://purl.org/net/xbiblio/csl"
3
+ class="note"
4
+ version="1.0"
5
+ page-range-format="chicago"
6
+ default-locale="en-US-x-sort-alalc97-x-sec-alalc97-x-name-alalc97">
7
+ <info>
8
+ <title>Bluebook (demo-x)</title>
9
+ <id>http://gsl-nagoya-u.net/http/pub/bluebook-demo-x</id>
10
+ <link rel="self" href="http://gsl-nagoya-u.net/http/pub/bluebook-demo-x.csl" />
11
+ <link href="http://www.legalbluebook.com/" rel="documentation" />
12
+ <author>
13
+ <name>Frank Bennett</name>
14
+ <email>biercenator@gmail.com</email>
15
+ </author>
16
+ <summary>Bluebook Style for legal materials (CSL 1.0 experimental)</summary>
17
+ <category field="generic-base" />
18
+ <category citation-format="note" />
19
+ <updated>2010-04-24T04:49:00+09:00</updated>
20
+ </info>
21
+ <locale>
22
+ <terms>
23
+ <term name="ibid">id.</term>
24
+ <term name="rule"></term>
25
+ </terms>
26
+ </locale>
27
+
28
+ <!-- ### BLUEBOOK AUTHOR ### -->
29
+ <macro name="bb-author">
30
+ <names variable="author">
31
+ <name/>
32
+ </names>
33
+ </macro>
34
+ <macro name="bb-author-short">
35
+ <names variable="author">
36
+ <name form="short"/>
37
+ </names>
38
+ </macro>
39
+
40
+ <!-- ### BLUEBOOK ISSUED ### -->
41
+ <macro name="bb-issued">
42
+ <group prefix="(" suffix=")">
43
+ <date variable="issued" form="text" date-parts="year"/>
44
+ </group>
45
+ </macro>
46
+
47
+ <!-- ### ID BACKREFERENCES ### -->
48
+ <macro name="bb-ibid">
49
+ <choose>
50
+ <if position="ibid-with-locator">
51
+ <text term="ibid" font-style="italic"/>
52
+ <group delimiter=" ">
53
+ <choose>
54
+ <if locator="page">
55
+ <text value=" at"/>
56
+ </if>
57
+ <else>
58
+ <text value=", "/>
59
+ <label form="short" variable="locator"/>
60
+ </else>
61
+ </choose>
62
+ <text variable="locator"/>
63
+ </group>
64
+ </if>
65
+ <else-if position="ibid">
66
+ <text term="ibid" font-style="italic"/>
67
+ </else-if>
68
+ </choose>
69
+ </macro>
70
+
71
+ <!-- ### POINT LOCATORS -->
72
+ <macro name="bb-point-locator-comma">
73
+ <group delimiter=" ">
74
+ <choose>
75
+ <if variable="number page" position="ibid" match="any">
76
+ <text value=","/>
77
+ </if>
78
+ </choose>
79
+ <choose>
80
+ <if locator="page" match="none">
81
+ <label form="symbol" variable="locator" suffix=" "/>
82
+ </if>
83
+ </choose>
84
+ <text variable="locator"/>
85
+ </group>
86
+ </macro>
87
+ <macro name="bb-point-locator-base">
88
+ <choose>
89
+ <if locator="page" match="none">
90
+ <label form="symbol" variable="locator" suffix=" "/>
91
+ </if>
92
+ </choose>
93
+ <text variable="locator"/>
94
+ </macro>
95
+
96
+ <!-- ### LEGAL CASE ### -->
97
+ <macro name="bb-legal-case">
98
+ <choose>
99
+ <if position="first">
100
+ <text macro="bb-legal-case-first"/>
101
+ </if>
102
+ <else-if position="ibid">
103
+ <text macro="bb-ibid"/>
104
+ </else-if>
105
+ <else-if position="near-note">
106
+ <text macro="bb-legal-case-subsequent"/>
107
+ </else-if>
108
+ <else>
109
+ <text macro="bb-legal-case-first"/>
110
+ </else>
111
+ </choose>
112
+ </macro>
113
+ <macro name="bb-legal-case-first">
114
+ <choose>
115
+ <if variable="title">
116
+ <!-- Common law cases -->
117
+ <group delimiter=", ">
118
+ <text variable="title"/>
119
+ <group delimiter=" ">
120
+ <choose>
121
+ <if variable="issue">
122
+ <text variable="volume" prefix="[" suffix="]"/>
123
+ <text variable="issue"/>
124
+ </if>
125
+ <else>
126
+ <text variable="volume"/>
127
+ </else>
128
+ </choose>
129
+ <text variable="container-title" form="short"/>
130
+ <group>
131
+ <text variable="page"/>
132
+ <text macro="bb-point-locator-comma"/>
133
+ </group>
134
+ <group prefix="(" suffix=")" delimiter=" ">
135
+ <text variable="authority" form="short"/>
136
+ <date variable="issued">
137
+ <date-part name="year"/>
138
+ </date>
139
+ </group>
140
+ </group>
141
+ </group>
142
+ </if>
143
+ <else>
144
+ <!-- Civil law cases -->
145
+ <group delimiter=", ">
146
+ <text variable="authority"/>
147
+ <text variable="title" form="short"/>
148
+ <date variable="issued" form="text"/>
149
+ <text variable="container-title" font-style="italic" strip-periods="true"/>
150
+ <text variable="volume"/>
151
+ <group delimiter=" ">
152
+ <text variable="section"/>
153
+ <label variable="page" form="short"/>
154
+ <text variable="page"/>
155
+ </group>
156
+ <text variable="number"/>
157
+ <group delimiter=" ">
158
+ <text variable="genre"/>
159
+ <names variable="author">
160
+ <name initialize-with="." font-variant="small-caps"/>
161
+ </names>
162
+ </group>
163
+ </group>
164
+ </else>
165
+ </choose>
166
+ </macro>
167
+ <macro name="bb-legal-case-subsequent">
168
+ <group delimiter=", ">
169
+ <text variable="title" form="short"/>
170
+ <group delimiter=" ">
171
+ <choose>
172
+ <if variable="issue">
173
+ <text variable="volume" prefix="[" suffix="]"/>
174
+ <text variable="issue"/>
175
+ </if>
176
+ <else>
177
+ <text variable="volume"/>
178
+ </else>
179
+ </choose>
180
+ <text variable="container-title" form="short"/>
181
+ <choose>
182
+ <if variable="locator">
183
+ <text macro="bb-point-locator-base"/>
184
+ </if>
185
+ <else>
186
+ <text variable="page"/>
187
+ </else>
188
+ </choose>
189
+ </group>
190
+ </group>
191
+ </macro>
192
+
193
+ <!-- ### LEGISLATION ### -->
194
+ <macro name="bb-legislation">
195
+ <choose>
196
+ <if position="first">
197
+ <text macro="bb-legislation-first"/>
198
+ </if>
199
+ <else-if position="near-note">
200
+ <text macro="bb-legislation-subsequent"/>
201
+ </else-if>
202
+ <else>
203
+ <text macro="bb-legislation-first"/>
204
+ </else>
205
+ </choose>
206
+ </macro>
207
+ <macro name="bb-legislation-first">
208
+ <choose>
209
+ <if variable="container-title">
210
+ <text macro="bb-statute-first"/>
211
+ </if>
212
+ <else>
213
+ <text macro="bb-code-first"/>
214
+ </else>
215
+ </choose>
216
+ </macro>
217
+ <macro name="bb-legislation-subsequent">
218
+ <choose>
219
+ <if variable="container-title">
220
+ <text macro="bb-statute-subsequent"/>
221
+ </if>
222
+ <else>
223
+ <text macro="bb-code-subsequent"/>
224
+ </else>
225
+ </choose>
226
+ </macro>
227
+ <macro name="bb-statute-first">
228
+ <group delimiter=", ">
229
+ <text variable="title"/>
230
+ <text macro="bb-statute-subsequent"/>
231
+ </group>
232
+ </macro>
233
+ <macro name="bb-statute-subsequent">
234
+ <group delimiter="">
235
+ <group delimiter=" ">
236
+ <text variable="volume"/>
237
+ <text variable="container-title"/>
238
+ <text variable="number"/>
239
+ <text variable="page"/>
240
+ <choose>
241
+ <if is-numeric="section">
242
+ <text term="section" form="symbol"/>
243
+ <text variable="section"/>
244
+ </if>
245
+ </choose>
246
+ </group>
247
+ <text macro="bb-point-locator-comma"/>
248
+ <date prefix=" (" variable="issued" date-parts="year" form="text" suffix=")"/>
249
+ </group>
250
+ </macro>
251
+ <macro name="bb-code-first">
252
+ <group delimiter=" ">
253
+ <text variable="title" font-variant="small-caps"/>
254
+ <group delimiter=" ">
255
+ <label variable="locator" form="symbol"/>
256
+ <text variable="locator"/>
257
+ </group>
258
+ </group>
259
+ </macro>
260
+ <macro name="bb-code-subsequent">
261
+ <group delimiter=" ">
262
+ <text variable="title" form="short" font-variant="small-caps"/>
263
+ <group delimiter=" ">
264
+ <label variable="locator" form="symbol"/>
265
+ <text variable="locator"/>
266
+ </group>
267
+ </group>
268
+ </macro>
269
+
270
+ <!-- ### BOOK ### -->
271
+ <macro name="bb-book">
272
+ <choose>
273
+ <if position="first">
274
+ <text macro="bb-book-first"/>
275
+ </if>
276
+ <else-if position="ibid">
277
+ <text macro="bb-ibid"/>
278
+ </else-if>
279
+ <else-if position="subsequent">
280
+ <text macro="bb-book-subsequent"/>
281
+ </else-if>
282
+ </choose>
283
+ </macro>
284
+ <macro name="bb-book-first">
285
+ <group delimiter=", ">
286
+ <text macro="bb-author" font-variant="small-caps"/>
287
+ <group delimiter=" ">
288
+ <text variable="title" font-variant="small-caps"/>
289
+ <group delimiter=" ">
290
+ <choose>
291
+ <if locator="page" match="none">
292
+ <label variable="locator" form="symbol"/>
293
+ </if>
294
+ </choose>
295
+ <text variable="locator"/>
296
+ </group>
297
+ <text macro="bb-issued"/>
298
+ </group>
299
+ </group>
300
+ <text variable="references" prefix=" [" suffix="]"/>
301
+ </macro>
302
+ <macro name="bb-book-subsequent">
303
+ <group delimiter=", ">
304
+ <text macro="bb-author-short" font-variant="small-caps"/>
305
+ <choose>
306
+ <if disambiguate="true">
307
+ <text variable="title" font-variant="small-caps"/>
308
+ </if>
309
+ </choose>
310
+ <group delimiter="">
311
+ <group delimiter=" ">
312
+ <text value="supra" font-style="italic"/>
313
+ <choose>
314
+ <if variable="first-reference-note-number">
315
+ <text value="note"/>
316
+ <text variable="first-reference-note-number"/>
317
+ </if>
318
+ </choose>
319
+ </group>
320
+ <group delimiter=" ">
321
+ <choose>
322
+ <if locator="page">
323
+ <text value=","/>
324
+ <text value="at"/>
325
+ </if>
326
+ <else>
327
+ <label variable="locator"/>
328
+ </else>
329
+ </choose>
330
+ <text variable="locator"/>
331
+ </group>
332
+ </group>
333
+ </group>
334
+ </macro>
335
+
336
+ <!-- ### PERIODICAL ### -->
337
+ <macro name="bb-periodical">
338
+ <choose>
339
+ <if position="first">
340
+ <text macro="bb-periodical-first"/>
341
+ </if>
342
+ <else-if position="ibid">
343
+ <text term="ibid" font-style="italic"/>
344
+ </else-if>
345
+ <else-if position="subsequent">
346
+ <text macro="bb-periodical-subsequent"/>
347
+ </else-if>
348
+ </choose>
349
+ </macro>
350
+ <macro name="bb-periodical-first">
351
+ <group delimiter=" ">
352
+ <group delimiter=", ">
353
+ <names variable="author">
354
+ <name/>
355
+ </names>
356
+ <text variable="title" font-style="italic"/>
357
+ <group delimiter=" ">
358
+ <text variable="volume"/>
359
+ <text variable="container-title" form="short" font-variant="small-caps"/>
360
+ <text variable="page-first"/>
361
+ </group>
362
+ </group>
363
+ <text macro="bb-issued"/>
364
+ </group>
365
+ </macro>
366
+ <macro name="bb-periodical-subsequent">
367
+ <text value="bb-periodical-subsequent"/>
368
+ </macro>
369
+ <citation
370
+ near-note-distance="5"
371
+ et-al-min="2"
372
+ et-al-subsequent-min="4"
373
+ et-al-subsequent-use-first="2"
374
+ et-al-use-first="1">
375
+ <layout delimiter="; " suffix=".">
376
+ <choose>
377
+ <if type="legal_case">
378
+ <text macro="bb-legal-case"/>
379
+ </if>
380
+ <else-if type="legislation">
381
+ <text macro="bb-legislation"/>
382
+ </else-if>
383
+ <else-if type="book" match="any">
384
+ <text macro="bb-book"/>
385
+ </else-if>
386
+ <else>
387
+ <text macro="bb-periodical"/>
388
+ </else>
389
+ </choose>
390
+ </layout>
391
+ </citation>
392
+ </style>
@@ -0,0 +1,942 @@
1
+ <style
2
+ xmlns="http://purl.org/net/xbiblio/csl"
3
+ class="note"
4
+ version="1.0"
5
+ page-range-format="chicago"
6
+ default-locale="en-US-x-sort-ja-alalc97-x-sec-en-x-name-ja-alalc97-x-pri-ja-alalc97">
7
+ <info>
8
+ <title>Bluebook (demo)</title>
9
+ <id>http://www.zotero.org/styles/bluebook-demo</id>
10
+ <link rel="self" href="http://www.zotero.org/styles/bluebook-demo" />
11
+ <link href="http://www.legalbluebook.com/" rel="documentation" />
12
+ <author>
13
+ <name>Frank Bennett</name>
14
+ <email>biercenator@gmail.com</email>
15
+ </author>
16
+ <summary>Bluebook Style for legal materials</summary>
17
+ <category field="generic-base" />
18
+ <category citation-format="numeric" />
19
+ <updated>2010-04-24T04:49:00+09:00</updated>
20
+ </info>
21
+ <locale>
22
+ <terms>
23
+ <term name="ibid">id.</term>
24
+ <term name="rule"></term>
25
+ </terms>
26
+ </locale>
27
+
28
+ <!-- ### CHICAGO FULLNOTE WITH BIBLIOGRAPHY (mainstream) ### -->
29
+ <macro name="editor-translator">
30
+ <group delimiter=", ">
31
+ <choose>
32
+ <if variable="author">
33
+ <names delimiter=", " variable="editor">
34
+ <label form="verb-short" suffix=". " text-case="lowercase" />
35
+ <name and="text" delimiter=", " />
36
+ </names>
37
+ </if>
38
+ </choose>
39
+ <choose>
40
+ <if match="any" variable="author editor">
41
+ <names delimiter=", " variable="translator">
42
+ <label form="verb-short" suffix=". " text-case="lowercase" />
43
+ <name and="text" delimiter=", " />
44
+ </names>
45
+ </if>
46
+ </choose>
47
+ </group>
48
+ </macro>
49
+ <macro name="secondary-contributors-note">
50
+ <choose>
51
+ <if match="none" type="chapter">
52
+ <text macro="editor-translator" />
53
+ </if>
54
+ </choose>
55
+ </macro>
56
+ <macro name="container-contributors-note">
57
+ <choose>
58
+ <if type="chapter">
59
+ <text macro="editor-translator" />
60
+ </if>
61
+ </choose>
62
+ </macro>
63
+ <macro name="secondary-contributors">
64
+ <choose>
65
+ <if match="none" type="chapter">
66
+ <group delimiter=". ">
67
+ <choose>
68
+ <if variable="author">
69
+ <names delimiter=". " variable="editor">
70
+ <label form="verb" prefix=" " suffix=" " text-case="capitalize-first" />
71
+ <name and="text" delimiter=", " />
72
+ </names>
73
+ </if>
74
+ </choose>
75
+ <choose>
76
+ <if match="any" variable="author editor">
77
+ <names delimiter=". " variable="translator">
78
+ <label form="verb" prefix=" " suffix=" " text-case="capitalize-first" />
79
+ <name and="text" delimiter=", " />
80
+ </names>
81
+ </if>
82
+ </choose>
83
+ </group>
84
+ </if>
85
+ </choose>
86
+ </macro>
87
+ <macro name="container-contributors">
88
+ <choose>
89
+ <if type="chapter">
90
+ <group delimiter=", ">
91
+ <choose>
92
+ <if variable="author">
93
+ <names delimiter=", " variable="editor">
94
+ <label form="verb" suffix=" " text-case="lowercase" />
95
+ <name and="text" delimiter=", " />
96
+ </names>
97
+ </if>
98
+ </choose>
99
+ <choose>
100
+ <if match="any" variable="author editor">
101
+ <names delimiter=", " variable="translator">
102
+ <label form="verb" suffix=" " text-case="lowercase" />
103
+ <name and="text" delimiter=", " />
104
+ </names>
105
+ </if>
106
+ </choose>
107
+ </group>
108
+ </if>
109
+ </choose>
110
+ </macro>
111
+ <macro name="editor-note">
112
+ <names variable="editor">
113
+ <name and="text" delimiter=", " sort-separator=", " />
114
+ <label form="short" prefix=", " suffix="." />
115
+ </names>
116
+ </macro>
117
+ <macro name="translator-note">
118
+ <names variable="translator">
119
+ <name and="text" delimiter=", " sort-separator=", " />
120
+ <label form="verb-short" prefix=", " suffix="." />
121
+ </names>
122
+ </macro>
123
+ <macro name="recipient-note">
124
+ <names delimiter=", " variable="recipient">
125
+ <label form="verb" prefix=" " suffix=" " text-case="lowercase" />
126
+ <name and="text" delimiter=", " />
127
+ </names>
128
+ </macro>
129
+ <macro name="contributors-note">
130
+ <names variable="author">
131
+ <name and="text" delimiter=", " sort-separator=", " />
132
+ <substitute>
133
+ <text macro="editor-note" />
134
+ <text macro="translator-note" />
135
+ </substitute>
136
+ </names>
137
+ <text macro="recipient-note" />
138
+ </macro>
139
+ <macro name="editor">
140
+ <names variable="editor">
141
+ <name and="text" delimiter=", " delimiter-precedes-last="always" name-as-sort-order="first" sort-separator=", " />
142
+ <label form="short" prefix=", " suffix="." />
143
+ </names>
144
+ </macro>
145
+ <macro name="translator">
146
+ <names variable="translator">
147
+ <name and="text" delimiter=", " delimiter-precedes-last="always" name-as-sort-order="first" sort-separator=", " />
148
+ <label form="verb-short" prefix=", " suffix="." />
149
+ </names>
150
+ </macro>
151
+ <macro name="recipient">
152
+ <choose>
153
+ <if type="personal_communication">
154
+ <choose>
155
+ <if variable="genre">
156
+ <text text-case="capitalize-first" variable="genre" />
157
+ </if>
158
+ <else>
159
+ <text term="letter" text-case="capitalize-first" />
160
+ </else>
161
+ </choose>
162
+ </if>
163
+ </choose>
164
+ <text macro="recipient-note" prefix=" " />
165
+ </macro>
166
+ <macro name="contributors">
167
+ <names variable="author">
168
+ <name and="text" delimiter=", " delimiter-precedes-last="always" name-as-sort-order="first" sort-separator=", " />
169
+ <substitute>
170
+ <text macro="editor" />
171
+ <text macro="translator" />
172
+ </substitute>
173
+ </names>
174
+ <text macro="recipient" prefix=". " />
175
+ </macro>
176
+ <macro name="recipient-short">
177
+ <names variable="recipient">
178
+ <label form="verb" prefix=" " suffix=" " text-case="lowercase" />
179
+ <name and="text" delimiter=", " form="short" />
180
+ </names>
181
+ </macro>
182
+ <macro name="contributors-short">
183
+ <names variable="author">
184
+ <name and="text" delimiter=", " form="short" />
185
+ <substitute>
186
+ <names variable="editor" />
187
+ <names variable="translator" />
188
+ </substitute>
189
+ </names>
190
+ <text macro="recipient-short" />
191
+ </macro>
192
+ <macro name="contributors-sort">
193
+ <names variable="author">
194
+ <name and="text" delimiter=", " delimiter-precedes-last="always" name-as-sort-order="all" sort-separator=", " />
195
+ <label form="verb-short" prefix=", " suffix="." />
196
+ <substitute>
197
+ <names variable="editor" />
198
+ <names variable="translator" />
199
+ </substitute>
200
+ </names>
201
+ </macro>
202
+ <macro name="interviewer-note">
203
+ <names delimiter=", " variable="interviewer">
204
+ <label form="verb" prefix=" " suffix=" " text-case="lowercase" />
205
+ <name and="text" delimiter=", " />
206
+ </names>
207
+ </macro>
208
+ <macro name="interviewer">
209
+ <names delimiter=", " variable="interviewer">
210
+ <label form="verb" prefix=" " suffix=" " text-case="capitalize-first" />
211
+ <name and="text" delimiter=", " />
212
+ </names>
213
+ </macro>
214
+ <macro name="title-note">
215
+ <choose>
216
+ <if match="none" variable="title">
217
+ <text variable="genre" />
218
+ </if>
219
+ <else-if type="book">
220
+ <text font-style="italic" variable="title" />
221
+ </else-if>
222
+ <else>
223
+ <text quotes="true" variable="title" />
224
+ </else>
225
+ </choose>
226
+ </macro>
227
+ <macro name="title">
228
+ <choose>
229
+ <if match="none" variable="title">
230
+ <choose>
231
+ <if match="none" type="personal_communication">
232
+ <text text-case="capitalize-first" variable="genre" />
233
+ </if>
234
+ </choose>
235
+ </if>
236
+ <else-if type="book">
237
+ <text font-style="italic" variable="title" />
238
+ </else-if>
239
+ <else>
240
+ <text quotes="true" variable="title" />
241
+ </else>
242
+ </choose>
243
+ </macro>
244
+ <macro name="title-short">
245
+ <choose>
246
+ <if match="none" variable="title">
247
+ <choose>
248
+ <if type="interview">
249
+ <text term="interview" text-case="lowercase" />
250
+ </if>
251
+ <else-if match="any" type="manuscript speech">
252
+ <text form="short" variable="genre" />
253
+ </else-if>
254
+ <else-if type="personal_communication">
255
+ <text macro="issued" />
256
+ </else-if>
257
+ </choose>
258
+ </if>
259
+ <else-if type="book">
260
+ <text font-style="italic" form="short" variable="title" />
261
+ </else-if>
262
+ <else>
263
+ <text form="short" quotes="true" variable="title" />
264
+ </else>
265
+ </choose>
266
+ </macro>
267
+ <macro name="description-note">
268
+ <group delimiter=", ">
269
+ <text macro="interviewer-note" />
270
+ <text variable="medium" />
271
+ <choose>
272
+ <if match="none" variable="title"> </if>
273
+ <else-if match="any" type="thesis speech"> </else-if>
274
+ <else>
275
+ <text variable="genre" />
276
+ </else>
277
+ </choose>
278
+ </group>
279
+ </macro>
280
+ <macro name="description">
281
+ <group delimiter=", ">
282
+ <group delimiter=". ">
283
+ <text macro="interviewer" />
284
+ <text text-case="capitalize-first" variable="medium" />
285
+ </group>
286
+ <choose>
287
+ <if match="none" variable="title"> </if>
288
+ <else-if match="any" type="thesis speech"> </else-if>
289
+ <else>
290
+ <text text-case="capitalize-first" variable="genre" />
291
+ </else>
292
+ </choose>
293
+ </group>
294
+ </macro>
295
+ <macro name="container-title-note">
296
+ <choose>
297
+ <if type="chapter">
298
+ <text suffix=" " term="in" text-case="lowercase" />
299
+ </if>
300
+ </choose>
301
+ <text font-style="italic" variable="container-title" />
302
+ </macro>
303
+ <macro name="container-title">
304
+ <choose>
305
+ <if type="chapter">
306
+ <text suffix=" " term="in" text-case="capitalize-first" />
307
+ </if>
308
+ </choose>
309
+ <text font-style="italic" variable="container-title" />
310
+ </macro>
311
+ <macro name="collection-title">
312
+ <text variable="collection-title" />
313
+ <text prefix=" " variable="collection-number" />
314
+ </macro>
315
+ <macro name="edition-note">
316
+ <choose>
317
+ <if match="any" type="book chapter">
318
+ <choose>
319
+ <if is-numeric="edition">
320
+ <group delimiter=" ">
321
+ <number form="ordinal" variable="edition" />
322
+ <text form="short" suffix="." term="edition" />
323
+ </group>
324
+ </if>
325
+ <else>
326
+ <text suffix="." variable="edition" />
327
+ </else>
328
+ </choose>
329
+ </if>
330
+ </choose>
331
+ </macro>
332
+ <macro name="edition">
333
+ <choose>
334
+ <if match="any" type="book chapter">
335
+ <choose>
336
+ <if is-numeric="edition">
337
+ <group delimiter=" ">
338
+ <number form="ordinal" variable="edition" />
339
+ <text form="short" suffix="." term="edition" />
340
+ </group>
341
+ </if>
342
+ <else>
343
+ <text suffix="." text-case="capitalize-first" variable="edition" />
344
+ </else>
345
+ </choose>
346
+ </if>
347
+ </choose>
348
+ </macro>
349
+ <macro name="locators-note">
350
+ <choose>
351
+ <if type="article-journal">
352
+ <text prefix=" " variable="volume" />
353
+ <text prefix=", no. " variable="issue" />
354
+ </if>
355
+ <else-if match="any" type="book chapter">
356
+ <group delimiter=", " prefix=", ">
357
+ <group>
358
+ <text form="short" suffix=". " term="volume" />
359
+ <number form="numeric" variable="volume" />
360
+ </group>
361
+ <choose>
362
+ <if match="none" variable="locator">
363
+ <group>
364
+ <number form="numeric" variable="number-of-volumes" />
365
+ <text form="short" plural="true" prefix=" " suffix="." term="volume" />
366
+ </group>
367
+ </if>
368
+ </choose>
369
+ <text macro="edition-note" />
370
+ </group>
371
+ </else-if>
372
+ </choose>
373
+ </macro>
374
+ <macro name="locators">
375
+ <choose>
376
+ <if type="article-journal">
377
+ <text prefix=" " variable="volume" />
378
+ <text prefix=", no. " variable="issue" />
379
+ </if>
380
+ <else-if match="any" type="book">
381
+ <group delimiter=". " prefix=". ">
382
+ <group>
383
+ <text form="short" suffix=". " term="volume" text-case="capitalize-first" />
384
+ <number form="numeric" variable="volume" />
385
+ </group>
386
+ <group>
387
+ <number form="numeric" variable="number-of-volumes" />
388
+ <text form="short" plural="true" prefix=" " suffix="." term="volume" />
389
+ </group>
390
+ <text macro="edition" />
391
+ </group>
392
+ </else-if>
393
+ </choose>
394
+ </macro>
395
+ <macro name="locators-newspaper">
396
+ <choose>
397
+ <if type="article-newspaper">
398
+ <group delimiter=", ">
399
+ <group>
400
+ <text suffix=" " variable="edition" />
401
+ <text prefix=" " term="edition" />
402
+ </group>
403
+ <group>
404
+ <text form="short" suffix=". " term="section" />
405
+ <text variable="section" />
406
+ </group>
407
+ </group>
408
+ </if>
409
+ </choose>
410
+ </macro>
411
+ <macro name="event">
412
+ <group>
413
+ <text suffix=" " term="presented at" />
414
+ <text variable="event" />
415
+ </group>
416
+ </macro>
417
+ <macro name="publisher">
418
+ <group delimiter=": ">
419
+ <text variable="publisher-place" />
420
+ <text variable="publisher" />
421
+ </group>
422
+ </macro>
423
+ <macro name="issued">
424
+ <choose>
425
+ <if match="any" type="graphic report">
426
+ <date variable="issued">
427
+ <date-part name="month" suffix=" " />
428
+ <date-part name="day" suffix=", " />
429
+ <date-part name="year" />
430
+ </date>
431
+ </if>
432
+ <else-if match="any" type="book chapter thesis">
433
+ <date variable="issued">
434
+ <date-part name="year" />
435
+ </date>
436
+ </else-if>
437
+ <else>
438
+ <date variable="issued">
439
+ <date-part name="month" suffix=" " />
440
+ <date-part name="day" suffix=", " />
441
+ <date-part name="year" />
442
+ </date>
443
+ </else>
444
+ </choose>
445
+ </macro>
446
+ <macro name="point-locators-subsequent">
447
+ <group>
448
+ <choose>
449
+ <if locator="page" match="none">
450
+ <label form="short" strip-periods="false" suffix=" " variable="locator" />
451
+ </if>
452
+ </choose>
453
+ <text variable="locator" />
454
+ </group>
455
+ </macro>
456
+ <macro name="point-locators">
457
+ <choose>
458
+ <if match="none" variable="locator">
459
+ <text macro="pages" />
460
+ </if>
461
+ <else-if type="article-journal">
462
+ <text prefix=": " variable="locator" />
463
+ </else-if>
464
+ <else>
465
+ <text macro="point-locators-subsequent" prefix=", " />
466
+ </else>
467
+ </choose>
468
+ </macro>
469
+ <macro name="pages">
470
+ <choose>
471
+ <if type="article-journal">
472
+ <text prefix=": " variable="page" />
473
+ </if>
474
+ <else-if type="chapter">
475
+ <text prefix=", " variable="page" />
476
+ </else-if>
477
+ </choose>
478
+ </macro>
479
+ <macro name="locators-chapter">
480
+ <choose>
481
+ <if type="chapter">
482
+ <text suffix=":" variable="volume" />
483
+ <text variable="page" />
484
+ </if>
485
+ </choose>
486
+ </macro>
487
+ <macro name="locators-journal">
488
+ <choose>
489
+ <if type="article-journal">
490
+ <text prefix=": " variable="page" />
491
+ </if>
492
+ </choose>
493
+ </macro>
494
+ <macro name="archive-note">
495
+ <group delimiter=", ">
496
+ <text variable="archive_location" />
497
+ <text variable="archive" />
498
+ <text variable="archive-place" />
499
+ </group>
500
+ </macro>
501
+ <macro name="archive">
502
+ <group delimiter=". ">
503
+ <text text-case="capitalize-first" variable="archive_location" />
504
+ <text variable="archive" />
505
+ <text variable="archive-place" />
506
+ </group>
507
+ </macro>
508
+ <macro name="issue-note">
509
+ <choose>
510
+ <if type="article-journal">
511
+ <text macro="issued" prefix=" (" suffix=")" />
512
+ </if>
513
+ <else-if match="any" variable="publisher-place publisher">
514
+ <group delimiter=", " prefix=" (" suffix=")">
515
+ <group delimiter=" ">
516
+ <choose>
517
+ <if match="none" variable="title"> </if>
518
+ <else-if match="any" type="thesis speech">
519
+ <text variable="genre" />
520
+ </else-if>
521
+ </choose>
522
+ <text macro="event" />
523
+ </group>
524
+ <text macro="publisher" />
525
+ <text macro="issued" />
526
+ </group>
527
+ </else-if>
528
+ <else>
529
+ <text macro="issued" prefix=", " />
530
+ </else>
531
+ </choose>
532
+ </macro>
533
+ <macro name="issue">
534
+ <choose>
535
+ <if type="article-journal">
536
+ <text macro="issued" prefix=" (" suffix=")" />
537
+ </if>
538
+ <else-if type="speech">
539
+ <choose>
540
+ <if match="none" variable="title"> </if>
541
+ <else>
542
+ <text prefix=". " text-case="capitalize-first" variable="genre" />
543
+ </else>
544
+ </choose>
545
+ <text macro="event" prefix=" " />
546
+ <text prefix=", " variable="event-place" />
547
+ <text macro="issued" prefix=", " />
548
+ </else-if>
549
+ <else-if match="any" variable="publisher-place publisher">
550
+ <group delimiter=", " prefix=". ">
551
+ <choose>
552
+ <if type="thesis">
553
+ <text text-case="capitalize-first" variable="genre" />
554
+ </if>
555
+ </choose>
556
+ <text macro="publisher" />
557
+ <text macro="issued" />
558
+ </group>
559
+ </else-if>
560
+ <else>
561
+ <text macro="issued" prefix=", " />
562
+ </else>
563
+ </choose>
564
+ </macro>
565
+ <macro name="access-note">
566
+ <group delimiter=", ">
567
+ <choose>
568
+ <if match="any" type="graphic report">
569
+ <text macro="archive-note" />
570
+ </if>
571
+ <else-if match="none" type="book thesis chapter article-journal article-newspaper article-magazine">
572
+ <text macro="archive-note" />
573
+ </else-if>
574
+ </choose>
575
+ <text prefix="doi:" variable="DOI" />
576
+ <text variable="URL" />
577
+ </group>
578
+ </macro>
579
+ <macro name="access">
580
+ <group delimiter=". ">
581
+ <choose>
582
+ <if match="any" type="graphic report">
583
+ <text macro="archive" />
584
+ </if>
585
+ <else-if match="none" type="book thesis chapter article-journal article-newspaper article-magazine">
586
+ <text macro="archive" />
587
+ </else-if>
588
+ </choose>
589
+ <text variable="URL" />
590
+ </group>
591
+ </macro>
592
+ <macro name="sort-key">
593
+ <text macro="contributors-sort" suffix=" " />
594
+ <text suffix=" " variable="title" />
595
+ <text variable="genre" />
596
+ </macro>
597
+
598
+ <!-- ### BLUEBOOK AUTHOR ### -->
599
+ <macro name="bb-author">
600
+ <names variable="author">
601
+ <name/>
602
+ </names>
603
+ </macro>
604
+ <macro name="bb-author-short">
605
+ <names variable="author">
606
+ <name form="short"/>
607
+ </names>
608
+ </macro>
609
+
610
+ <!-- ### BLUEBOOK ISSUED ### -->
611
+ <macro name="bb-issued">
612
+ <group prefix="(" suffix=")">
613
+ <date variable="issued" form="text" date-parts="year"/>
614
+ </group>
615
+ </macro>
616
+
617
+ <!-- ### ID BACKREFERENCES ### -->
618
+ <macro name="bb-ibid">
619
+ <choose>
620
+ <if position="ibid-with-locator">
621
+ <text term="ibid" font-style="italic"/>
622
+ <group delimiter=" ">
623
+ <choose>
624
+ <if locator="page">
625
+ <text value=" at"/>
626
+ </if>
627
+ <else>
628
+ <text value=", "/>
629
+ <label form="short" variable="locator"/>
630
+ </else>
631
+ </choose>
632
+ <text variable="locator"/>
633
+ </group>
634
+ </if>
635
+ <else-if position="ibid">
636
+ <text term="ibid" font-style="italic"/>
637
+ </else-if>
638
+ </choose>
639
+ </macro>
640
+
641
+ <!-- ### POINT LOCATORS -->
642
+ <macro name="bb-point-locator">
643
+ <group delimiter=" ">
644
+ <choose>
645
+ <if variable="number page" position="ibid" match="any">
646
+ <text value=","/>
647
+ </if>
648
+ </choose>
649
+ <choose>
650
+ <if locator="page" match="none">
651
+ <label form="symbol" variable="locator"/>
652
+ </if>
653
+ </choose>
654
+ <text variable="locator"/>
655
+ </group>
656
+ </macro>
657
+
658
+ <!-- ### LEGAL CASE ### -->
659
+ <macro name="bb-legal-case">
660
+ <choose>
661
+ <if position="first">
662
+ <text macro="bb-legal-case-first"/>
663
+ </if>
664
+ <else-if position="ibid">
665
+ <text macro="bb-ibid"/>
666
+ </else-if>
667
+ <else-if position="subsequent">
668
+
669
+ </else-if>
670
+ </choose>
671
+ </macro>
672
+ <macro name="bb-legal-case-first">
673
+ <group delimiter=", ">
674
+ <text variable="title"/>
675
+ <group delimiter=" ">
676
+ <choose>
677
+ <if variable="issue">
678
+ <text variable="volume" prefix="[" suffix="]"/>
679
+ <text variable="issue"/>
680
+ </if>
681
+ <else>
682
+ <text variable="volume"/>
683
+ </else>
684
+ </choose>
685
+ <text variable="container-title"/>
686
+ <group>
687
+ <text variable="page"/>
688
+ <text macro="bb-point-locator"/>
689
+ </group>
690
+ <group prefix="(" suffix=")" delimiter=" ">
691
+ <text variable="authority" form="short"/>
692
+ <date variable="issued">
693
+ <date-part name="year"/>
694
+ </date>
695
+ </group>
696
+ </group>
697
+ </group>
698
+ </macro>
699
+
700
+ <!-- ### LEGISLATION ### -->
701
+ <macro name="bb-legislation">
702
+ <choose>
703
+ <if position="first">
704
+ <text macro="bb-legislation-first"/>
705
+ </if>
706
+ <else-if position="near-note">
707
+ <text macro="bb-legislation-subsequent"/>
708
+ </else-if>
709
+ <else>
710
+ <text macro="bb-legislation-first"/>
711
+ </else>
712
+ </choose>
713
+ </macro>
714
+ <macro name="bb-legislation-first">
715
+ <choose>
716
+ <if variable="container-title">
717
+ <text macro="bb-statute-first"/>
718
+ </if>
719
+ <else>
720
+ <text macro="bb-code-first"/>
721
+ </else>
722
+ </choose>
723
+ </macro>
724
+ <macro name="bb-legislation-subsequent">
725
+ <choose>
726
+ <if variable="container-title">
727
+ <text macro="bb-statute-subsequent"/>
728
+ </if>
729
+ <else>
730
+ <text macro="bb-code-subsequent"/>
731
+ </else>
732
+ </choose>
733
+ </macro>
734
+ <macro name="bb-statute-first">
735
+ <group delimiter=", ">
736
+ <text variable="title"/>
737
+ <text macro="bb-statute-subsequent"/>
738
+ </group>
739
+ </macro>
740
+ <macro name="bb-statute-subsequent">
741
+ <group delimiter="">
742
+ <group delimiter=" ">
743
+ <text variable="volume"/>
744
+ <text variable="container-title"/>
745
+ <text variable="number"/>
746
+ <text variable="page"/>
747
+ <choose>
748
+ <if is-numeric="section">
749
+ <text term="section" form="symbol"/>
750
+ <text variable="section"/>
751
+ </if>
752
+ </choose>
753
+ </group>
754
+ <text macro="bb-point-locator"/>
755
+ <date prefix=" (" variable="issued" date-parts="year" form="text" suffix=")"/>
756
+ </group>
757
+ </macro>
758
+ <macro name="bb-code-first">
759
+ <group delimiter=" ">
760
+ <text variable="title" font-variant="small-caps"/>
761
+ <group delimiter=" ">
762
+ <label variable="locator" form="symbol"/>
763
+ <text variable="locator"/>
764
+ </group>
765
+ </group>
766
+ </macro>
767
+ <macro name="bb-code-subsequent">
768
+ <group delimiter=" ">
769
+ <text variable="title" form="short" font-variant="small-caps"/>
770
+ <group delimiter=" ">
771
+ <label variable="locator" form="symbol"/>
772
+ <text variable="locator"/>
773
+ </group>
774
+ </group>
775
+ </macro>
776
+
777
+ <!-- ### BOOK ### -->
778
+ <macro name="bb-book">
779
+ <choose>
780
+ <if position="first">
781
+ <text macro="bb-book-first"/>
782
+ </if>
783
+ <else-if position="ibid">
784
+ <text macro="bb-ibid"/>
785
+ </else-if>
786
+ <else-if position="subsequent">
787
+ <text macro="bb-book-subsequent"/>
788
+ </else-if>
789
+ </choose>
790
+ </macro>
791
+ <macro name="bb-book-first">
792
+ <group delimiter=", ">
793
+ <text macro="bb-author" font-variant="small-caps"/>
794
+ <group delimiter=" ">
795
+ <text variable="title" font-variant="small-caps" text-case="title"/>
796
+ <group delimiter=" ">
797
+ <choose>
798
+ <if locator="page" match="none">
799
+ <label variable="locator" form="symbol"/>
800
+ </if>
801
+ </choose>
802
+ <text variable="locator"/>
803
+ </group>
804
+ <text macro="bb-issued"/>
805
+ </group>
806
+ </group>
807
+ </macro>
808
+ <macro name="bb-book-subsequent">
809
+ <group delimiter=", ">
810
+ <text macro="bb-author-short" font-variant="small-caps"/>
811
+ <choose>
812
+ <if disambiguate="true">
813
+ <text variable="title" font-variant="small-caps" text-case="title"/>
814
+ </if>
815
+ </choose>
816
+ <group delimiter="">
817
+ <group delimiter=" ">
818
+ <text value="supra" font-style="italic"/>
819
+ <choose>
820
+ <if variable="first-reference-note-number">
821
+ <text value="note"/>
822
+ <text variable="first-reference-note-number"/>
823
+ </if>
824
+ </choose>
825
+ </group>
826
+ <group delimiter=" ">
827
+ <choose>
828
+ <if locator="page">
829
+ <text value=","/>
830
+ <text value="at"/>
831
+ </if>
832
+ <else>
833
+ <label variable="locator"/>
834
+ </else>
835
+ </choose>
836
+ <text variable="locator"/>
837
+ </group>
838
+ </group>
839
+ </group>
840
+ </macro>
841
+
842
+ <!-- ### PERIODICAL ### -->
843
+ <macro name="bb-periodical">
844
+ <choose>
845
+ <if position="first">
846
+ <text macro="bb-periodical-first"/>
847
+ </if>
848
+ <else-if position="ibid">
849
+ <text term="ibid" font-style="italic"/>
850
+ </else-if>
851
+ <else-if position="subsequent">
852
+ <text macro="bb-periodical-subsequent"/>
853
+ </else-if>
854
+ </choose>
855
+ </macro>
856
+ <macro name="bb-periodical-first">
857
+ <group delimiter=" ">
858
+ <group delimiter=", ">
859
+ <names variable="author">
860
+ <name/>
861
+ </names>
862
+ <text variable="title" font-style="italic"/>
863
+ <group delimiter=" ">
864
+ <text variable="volume"/>
865
+ <text variable="container-title" form="short" font-variant="small-caps"/>
866
+ <text variable="page-first"/>
867
+ </group>
868
+ </group>
869
+ <text macro="bb-issued"/>
870
+ </group>
871
+ </macro>
872
+ <macro name="bb-periodical-subsequent">
873
+ <text value="bb-periodical-subsequent"/>
874
+ </macro>
875
+
876
+ <!-- ### CITATIONS ARE BLUEBOOK (demo version) ### -->
877
+ <citation
878
+ near-note-distance="5"
879
+ et-al-min="2"
880
+ et-al-subsequent-min="4"
881
+ et-al-subsequent-use-first="2"
882
+ et-al-use-first="1">
883
+ <layout delimiter="; " suffix=".">
884
+ <choose>
885
+ <if type="legal_case">
886
+ <text macro="bb-legal-case"/>
887
+ </if>
888
+ <else-if type="legislation">
889
+ <text macro="bb-legislation"/>
890
+ </else-if>
891
+ <else-if type="book">
892
+ <text macro="bb-book"/>
893
+ </else-if>
894
+ <else>
895
+ <text macro="bb-periodical"/>
896
+ </else>
897
+ </choose>
898
+ </layout>
899
+ </citation>
900
+
901
+ <!-- BIBLIOGRAPHY IS CHICAGO FULLNOTE (mainstream) ### -->
902
+ <bibliography
903
+ entry-spacing="0"
904
+ et-al-min="11"
905
+ et-al-use-first="7"
906
+ hanging-indent="true"
907
+ subsequent-author-substitute="---">
908
+ <sort>
909
+ <key macro="sort-key" />
910
+ <key variable="issued" />
911
+ </sort>
912
+ <layout suffix=".">
913
+ <choose>
914
+ <if type="legal_case">
915
+ <text macro="bb-legal-case"/>
916
+ </if>
917
+ <else-if type="legislation">
918
+ <text macro="bb-legislation"/>
919
+ </else-if>
920
+ <else>
921
+ <group delimiter=". ">
922
+ <text macro="contributors" />
923
+ <text macro="title" />
924
+ <text macro="description" />
925
+ <text macro="secondary-contributors" />
926
+ <group delimiter=", ">
927
+ <text macro="container-title" />
928
+ <text macro="container-contributors" />
929
+ <text macro="locators-chapter" />
930
+ </group>
931
+ </group>
932
+ <text macro="locators" />
933
+ <text macro="collection-title" prefix=". " />
934
+ <text macro="issue" />
935
+ <text macro="locators-newspaper" prefix=", " />
936
+ <text macro="locators-journal" />
937
+ <text macro="access" prefix=". " />
938
+ </else>
939
+ </choose>
940
+ </layout>
941
+ </bibliography>
942
+ </style>