citeproc-ruby 0.0.6 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.document +4 -0
  4. data/.gitignore +10 -0
  5. data/.rspec +3 -0
  6. data/.simplecov +4 -0
  7. data/.travis.yml +17 -0
  8. data/.yardopts +2 -0
  9. data/AGPL +662 -0
  10. data/BSDL +29 -0
  11. data/Gemfile +42 -0
  12. data/Guardfile +14 -0
  13. data/README.md +32 -76
  14. data/Rakefile +60 -0
  15. data/citeproc-ruby.gemspec +46 -0
  16. data/cucumber.yml +1 -0
  17. data/features/bibliography.feature +25 -0
  18. data/features/name_options.feature +37 -0
  19. data/features/names.feature +192 -0
  20. data/features/renderer.feature +74 -0
  21. data/features/sort.feature +50 -0
  22. data/features/step_definitions/renderer.rb +80 -0
  23. data/features/support/env.rb +33 -0
  24. data/features/support/hooks.rb +10 -0
  25. data/lib/citeproc/ruby.rb +32 -0
  26. data/lib/citeproc/ruby/engine.rb +122 -0
  27. data/lib/citeproc/ruby/format.rb +303 -0
  28. data/lib/citeproc/ruby/formats/default.rb +25 -0
  29. data/lib/citeproc/ruby/formats/html.rb +221 -0
  30. data/lib/citeproc/ruby/renderer.rb +140 -0
  31. data/lib/citeproc/ruby/renderer/choose.rb +106 -0
  32. data/lib/citeproc/ruby/renderer/date.rb +90 -0
  33. data/lib/citeproc/ruby/renderer/format.rb +129 -0
  34. data/lib/citeproc/ruby/renderer/group.rb +34 -0
  35. data/lib/citeproc/ruby/renderer/history.rb +40 -0
  36. data/lib/citeproc/ruby/renderer/label.rb +66 -0
  37. data/lib/citeproc/ruby/renderer/layout.rb +20 -0
  38. data/lib/citeproc/ruby/renderer/locale.rb +26 -0
  39. data/lib/citeproc/ruby/renderer/macro.rb +20 -0
  40. data/lib/citeproc/ruby/renderer/names.rb +401 -0
  41. data/lib/citeproc/ruby/renderer/number.rb +41 -0
  42. data/lib/citeproc/ruby/renderer/observer.rb +44 -0
  43. data/lib/citeproc/ruby/renderer/state.rb +96 -0
  44. data/lib/citeproc/ruby/renderer/text.rb +62 -0
  45. data/lib/citeproc/ruby/sort.rb +82 -0
  46. data/lib/citeproc/ruby/version.rb +5 -0
  47. data/spec/citeproc/ruby/engine_spec.rb +94 -0
  48. data/spec/citeproc/ruby/formats/default_spec.rb +159 -0
  49. data/spec/citeproc/ruby/formats/html_spec.rb +162 -0
  50. data/spec/citeproc/ruby/renderer/choose_spec.rb +293 -0
  51. data/spec/citeproc/ruby/renderer/date_spec.rb +173 -0
  52. data/spec/citeproc/ruby/renderer/group_spec.rb +88 -0
  53. data/spec/citeproc/ruby/renderer/history_spec.rb +38 -0
  54. data/spec/citeproc/ruby/renderer/label_spec.rb +225 -0
  55. data/spec/citeproc/ruby/renderer/layout_spec.rb +41 -0
  56. data/spec/citeproc/ruby/renderer/macro_spec.rb +31 -0
  57. data/spec/citeproc/ruby/renderer/names_spec.rb +396 -0
  58. data/spec/citeproc/ruby/renderer/number_spec.rb +120 -0
  59. data/spec/citeproc/ruby/renderer/text_spec.rb +120 -0
  60. data/spec/citeproc/ruby/renderer_spec.rb +65 -0
  61. data/spec/fixtures/items.rb +80 -0
  62. data/{resource/locale → spec/fixtures/locales}/locales-en-US.xml +2 -11
  63. data/{resource/locale → spec/fixtures/locales}/locales-fr-FR.xml +77 -66
  64. data/{resource/style → spec/fixtures/styles}/apa.csl +5 -5
  65. data/spec/spec_helper.rb +67 -14
  66. metadata +121 -211
  67. data/lib/citeproc.rb +0 -100
  68. data/lib/citeproc/bibliography.rb +0 -57
  69. data/lib/citeproc/data.rb +0 -149
  70. data/lib/citeproc/date.rb +0 -133
  71. data/lib/citeproc/formatter.rb +0 -38
  72. data/lib/citeproc/item.rb +0 -53
  73. data/lib/citeproc/name.rb +0 -284
  74. data/lib/citeproc/processor.rb +0 -166
  75. data/lib/citeproc/selector.rb +0 -61
  76. data/lib/citeproc/variable.rb +0 -82
  77. data/lib/citeproc/version.rb +0 -3
  78. data/lib/csl/locale.rb +0 -223
  79. data/lib/csl/node.rb +0 -72
  80. data/lib/csl/nodes.rb +0 -1418
  81. data/lib/csl/renderer.rb +0 -88
  82. data/lib/csl/sort.rb +0 -61
  83. data/lib/csl/style.rb +0 -110
  84. data/lib/csl/term.rb +0 -124
  85. data/lib/extensions/core.rb +0 -43
  86. data/lib/plugins/filters/bibtex.rb +0 -12
  87. data/lib/plugins/formats/default.rb +0 -134
  88. data/lib/plugins/formats/html.rb +0 -67
  89. data/lib/support/attributes.rb +0 -99
  90. data/lib/support/compatibility.rb +0 -83
  91. data/lib/support/tree.rb +0 -80
  92. data/resource/locale/locales-af-ZA.xml +0 -305
  93. data/resource/locale/locales-ar-AR.xml +0 -306
  94. data/resource/locale/locales-bg-BG.xml +0 -305
  95. data/resource/locale/locales-ca-AD.xml +0 -305
  96. data/resource/locale/locales-cs-CZ.xml +0 -305
  97. data/resource/locale/locales-da-DK.xml +0 -305
  98. data/resource/locale/locales-de-AT.xml +0 -304
  99. data/resource/locale/locales-de-CH.xml +0 -304
  100. data/resource/locale/locales-de-DE.xml +0 -332
  101. data/resource/locale/locales-el-GR.xml +0 -305
  102. data/resource/locale/locales-en-GB.xml +0 -304
  103. data/resource/locale/locales-es-ES.xml +0 -305
  104. data/resource/locale/locales-et-EE.xml +0 -304
  105. data/resource/locale/locales-eu.xml +0 -305
  106. data/resource/locale/locales-fa-IR.xml +0 -304
  107. data/resource/locale/locales-fi-FI.xml +0 -304
  108. data/resource/locale/locales-fr-CA.xml +0 -306
  109. data/resource/locale/locales-he-IL.xml +0 -304
  110. data/resource/locale/locales-hu-HU.xml +0 -305
  111. data/resource/locale/locales-is-IS.xml +0 -304
  112. data/resource/locale/locales-it-IT.xml +0 -305
  113. data/resource/locale/locales-ja-JP.xml +0 -305
  114. data/resource/locale/locales-kh-KH.xml +0 -303
  115. data/resource/locale/locales-km-KH.xml +0 -304
  116. data/resource/locale/locales-ko-KR.xml +0 -305
  117. data/resource/locale/locales-mn-MN.xml +0 -306
  118. data/resource/locale/locales-nb-NO.xml +0 -304
  119. data/resource/locale/locales-nl-NL.xml +0 -304
  120. data/resource/locale/locales-nn-NO.xml +0 -304
  121. data/resource/locale/locales-pl-PL.xml +0 -305
  122. data/resource/locale/locales-pt-BR.xml +0 -304
  123. data/resource/locale/locales-pt-PT.xml +0 -305
  124. data/resource/locale/locales-ro-RO.xml +0 -305
  125. data/resource/locale/locales-ru-RU.xml +0 -306
  126. data/resource/locale/locales-sk-SK.xml +0 -304
  127. data/resource/locale/locales-sl-SI.xml +0 -305
  128. data/resource/locale/locales-sr-RS.xml +0 -305
  129. data/resource/locale/locales-sv-SE.xml +0 -305
  130. data/resource/locale/locales-th-TH.xml +0 -304
  131. data/resource/locale/locales-tr-TR.xml +0 -305
  132. data/resource/locale/locales-uk-UA.xml +0 -306
  133. data/resource/locale/locales-vi-VN.xml +0 -305
  134. data/resource/locale/locales-zh-CN.xml +0 -304
  135. data/resource/locale/locales-zh-TW.xml +0 -305
  136. data/resource/schema/csl-categories.rnc +0 -39
  137. data/resource/schema/csl-data.rnc +0 -98
  138. data/resource/schema/csl-terms.rnc +0 -106
  139. data/resource/schema/csl-types.rnc +0 -39
  140. data/resource/schema/csl-variables.rnc +0 -182
  141. data/resource/schema/csl.rnc +0 -941
  142. data/resource/style/bibtex.csl +0 -177
  143. data/resource/style/chicago-annotated-bibliography.csl +0 -513
  144. data/resource/style/chicago-author-date-basque.csl +0 -707
  145. data/resource/style/chicago-author-date-de.csl +0 -394
  146. data/resource/style/chicago-author-date-listing.csl +0 -434
  147. data/resource/style/chicago-author-date.csl +0 -425
  148. data/resource/style/chicago-dated-note-biblio-no-ibid.csl +0 -472
  149. data/resource/style/chicago-fullnote-bibliography-bb.csl +0 -928
  150. data/resource/style/chicago-fullnote-bibliography-delimiter-fixes.csl +0 -972
  151. data/resource/style/chicago-fullnote-bibliography-no-ibid-delimiter-fixes.csl +0 -963
  152. data/resource/style/chicago-fullnote-bibliography-no-ibid.csl +0 -785
  153. data/resource/style/chicago-fullnote-bibliography.csl +0 -803
  154. data/resource/style/chicago-library-list.csl +0 -511
  155. data/resource/style/chicago-note-biblio-no-ibid.csl +0 -514
  156. data/resource/style/chicago-note-bibliography.csl +0 -530
  157. data/resource/style/chicago-note.csl +0 -388
  158. data/resource/style/chicago-quick-copy.csl +0 -685
  159. data/resource/style/ieee.csl +0 -299
  160. data/resource/style/mla-notes.csl +0 -796
  161. data/resource/style/mla-underline.csl +0 -175
  162. data/resource/style/mla-url.csl +0 -214
  163. data/resource/style/mla.csl +0 -394
  164. data/resource/style/vancouver-brackets.csl +0 -256
  165. data/resource/style/vancouver-superscript-bracket-only-year.csl +0 -165
  166. data/resource/style/vancouver-superscript.csl +0 -256
  167. data/resource/style/vancouver.csl +0 -256
  168. data/spec/citeproc/bibliography_spec.rb +0 -45
  169. data/spec/citeproc/citeproc_spec.rb +0 -80
  170. data/spec/citeproc/date_spec.rb +0 -89
  171. data/spec/citeproc/formatter_spec.rb +0 -101
  172. data/spec/citeproc/item_spec.rb +0 -71
  173. data/spec/citeproc/name_spec.rb +0 -30
  174. data/spec/citeproc/processor_spec.rb +0 -61
  175. data/spec/citeproc/selector_spec.rb +0 -82
  176. data/spec/citeproc/variable_spec.rb +0 -69
  177. data/spec/csl/locale_spec.rb +0 -208
  178. data/spec/csl/node_spec.rb +0 -25
  179. data/spec/csl/nodes_spec.rb +0 -145
  180. data/spec/csl/style_spec.rb +0 -62
  181. data/spec/csl/term_spec.rb +0 -56
  182. data/spec/fixtures/dates.yaml +0 -80
  183. data/spec/fixtures/names.yaml +0 -115
  184. data/spec/fixtures/nodes.yaml +0 -245
  185. data/spec/support/attributes_spec.rb +0 -39
  186. data/spec/support/tree_spec.rb +0 -163
@@ -1,388 +0,0 @@
1
- <style
2
- xmlns="http://purl.org/net/xbiblio/csl"
3
- class="note"
4
- xml:lang="en">
5
- <info>
6
- <title>Chicago Manual of Style (Note without Bibliography)</title>
7
- <id>http://www.zotero.org/styles/chicago-note</id>
8
- <link href="http://www.zotero.org/styles/chicago-note" />
9
- <link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation" />
10
- <author>
11
- <name>Julian Onions</name>
12
- <email>julian.onions@gmail.com</email>
13
- </author>
14
- <contributor>
15
- <name>Simon Kornblith</name>
16
- <email>simon@simonster.com</email>
17
- </contributor>
18
- <contributor>
19
- <name>Elena Razlogova</name>
20
- <email>elena.razlogova@gmail.com</email>
21
- </contributor>
22
- <summary>Chicago format with full notes and no bibliography</summary>
23
- <category term="generic-base" />
24
- <category term="note" />
25
- <updated />
26
- </info>
27
- <macro name="editor-translator">
28
- <group delimiter=", ">
29
- <choose>
30
- <if variable="author">
31
- <names delimiter=", " variable="editor">
32
- <label form="verb-short" suffix=". " text-case="lowercase" />
33
- <name and="text" delimiter=", " />
34
- </names>
35
- </if>
36
- </choose>
37
- <choose>
38
- <if match="any" variable="author editor">
39
- <names delimiter=", " variable="translator">
40
- <label form="verb-short" suffix=". " text-case="lowercase" />
41
- <name and="text" delimiter=", " />
42
- </names>
43
- </if>
44
- </choose>
45
- </group>
46
- </macro>
47
- <macro name="secondary-contributors-note">
48
- <choose>
49
- <if match="none" type="chapter">
50
- <text macro="editor-translator" />
51
- </if>
52
- </choose>
53
- </macro>
54
- <macro name="container-contributors-note">
55
- <choose>
56
- <if type="chapter">
57
- <text macro="editor-translator" />
58
- </if>
59
- </choose>
60
- </macro>
61
- <macro name="editor-note">
62
- <names variable="editor">
63
- <name and="text" delimiter=", " sort-separator=", " />
64
- <label form="short" prefix=", " suffix="." />
65
- </names>
66
- </macro>
67
- <macro name="translator-note">
68
- <names variable="translator">
69
- <name and="text" delimiter=", " sort-separator=", " />
70
- <label form="verb-short" prefix=", " suffix="." />
71
- </names>
72
- </macro>
73
- <macro name="recipient-note">
74
- <names delimiter=", " variable="recipient">
75
- <label form="verb" prefix=" " suffix=" " text-case="lowercase" />
76
- <name and="text" delimiter=", " />
77
- </names>
78
- </macro>
79
- <macro name="contributors-note">
80
- <names variable="author">
81
- <name and="text" delimiter=", " sort-separator=", " />
82
- <substitute>
83
- <text macro="editor-note" />
84
- <text macro="translator-note" />
85
- </substitute>
86
- </names>
87
- <text macro="recipient-note" />
88
- </macro>
89
- <macro name="recipient-short">
90
- <names variable="recipient">
91
- <label form="verb" prefix=" " suffix=" " text-case="lowercase" />
92
- <name and="text" delimiter=", " form="short" />
93
- </names>
94
- </macro>
95
- <macro name="contributors-short">
96
- <names variable="author">
97
- <name and="text" delimiter=", " form="short" />
98
- <substitute>
99
- <names variable="editor" />
100
- <names variable="translator" />
101
- </substitute>
102
- </names>
103
- <text macro="recipient-short" />
104
- </macro>
105
- <macro name="interviewer-note">
106
- <names delimiter=", " variable="interviewer">
107
- <label form="verb" prefix=" " suffix=" " text-case="lowercase" />
108
- <name and="text" delimiter=", " />
109
- </names>
110
- </macro>
111
- <macro name="title-note">
112
- <choose>
113
- <if match="none" variable="title">
114
- <text variable="genre" />
115
- </if>
116
- <else-if type="book">
117
- <text font-style="italic" variable="title" />
118
- </else-if>
119
- <else>
120
- <text quotes="true" variable="title" />
121
- </else>
122
- </choose>
123
- </macro>
124
- <macro name="title-short">
125
- <choose>
126
- <if match="none" variable="title">
127
- <choose>
128
- <if type="interview">
129
- <text term="interview" text-case="lowercase" />
130
- </if>
131
- <else-if match="any" type="manuscript speech">
132
- <text form="short" variable="genre" />
133
- </else-if>
134
- <else-if type="personal_communication">
135
- <text macro="issued" />
136
- </else-if>
137
- </choose>
138
- </if>
139
- <else-if type="book">
140
- <text font-style="italic" form="short" variable="title" />
141
- </else-if>
142
- <else>
143
- <text form="short" quotes="true" variable="title" />
144
- </else>
145
- </choose>
146
- </macro>
147
- <macro name="description-note">
148
- <group delimiter=", ">
149
- <text macro="interviewer-note" />
150
- <text variable="medium" />
151
- <choose>
152
- <if match="none" variable="title"> </if>
153
- <else-if match="any" type="thesis speech"> </else-if>
154
- <else>
155
- <text variable="genre" />
156
- </else>
157
- </choose>
158
- </group>
159
- </macro>
160
- <macro name="container-title-note">
161
- <choose>
162
- <if type="chapter">
163
- <text suffix=" " term="in" text-case="lowercase" />
164
- </if>
165
- </choose>
166
- <text font-style="italic" variable="container-title" />
167
- </macro>
168
- <macro name="edition-note">
169
- <choose>
170
- <if match="any" type="book chapter">
171
- <choose>
172
- <if is-numeric="edition">
173
- <group delimiter=" ">
174
- <number form="ordinal" variable="edition" />
175
- <text form="short" suffix="." term="edition" />
176
- </group>
177
- </if>
178
- <else>
179
- <text suffix="." variable="edition" />
180
- </else>
181
- </choose>
182
- </if>
183
- </choose>
184
- </macro>
185
- <macro name="collection-title">
186
- <text variable="collection-title" />
187
- <text prefix=" " variable="collection-number" />
188
- </macro>
189
- <macro name="locators-note">
190
- <choose>
191
- <if type="article-journal">
192
- <text prefix=" " variable="volume" />
193
- <text prefix=", no. " variable="issue" />
194
- </if>
195
- <else-if match="any" type="book chapter">
196
- <group delimiter=", " prefix=", ">
197
- <group>
198
- <text form="short" suffix=". " term="volume" />
199
- <number form="numeric" variable="volume" />
200
- </group>
201
- <choose>
202
- <if match="none" variable="locator">
203
- <group>
204
- <number form="numeric" variable="number-of-volumes" />
205
- <text form="short" plural="true" prefix=" " suffix="." term="volume" />
206
- </group>
207
- </if>
208
- </choose>
209
- <text macro="edition-note" />
210
- </group>
211
- </else-if>
212
- </choose>
213
- </macro>
214
- <macro name="locators-newspaper">
215
- <choose>
216
- <if type="article-newspaper">
217
- <group delimiter=", ">
218
- <group>
219
- <text suffix=" " variable="edition" />
220
- <text prefix=" " term="edition" />
221
- </group>
222
- <group>
223
- <text form="short" suffix=". " term="section" />
224
- <text variable="section" />
225
- </group>
226
- </group>
227
- </if>
228
- </choose>
229
- </macro>
230
- <macro name="event">
231
- <group>
232
- <text suffix=" " term="presented at" />
233
- <text variable="event" />
234
- </group>
235
- </macro>
236
- <macro name="publisher">
237
- <group delimiter=": ">
238
- <text variable="publisher-place" />
239
- <text variable="publisher" />
240
- </group>
241
- </macro>
242
- <macro name="issued">
243
- <choose>
244
- <if match="any" type="graphic report">
245
- <date variable="issued">
246
- <date-part name="month" suffix=" " />
247
- <date-part name="day" suffix=", " />
248
- <date-part name="year" />
249
- </date>
250
- </if>
251
- <else-if match="any" type="book chapter thesis">
252
- <date variable="issued">
253
- <date-part name="year" />
254
- </date>
255
- </else-if>
256
- <else>
257
- <date variable="issued">
258
- <date-part name="month" suffix=" " />
259
- <date-part name="day" suffix=", " />
260
- <date-part name="year" />
261
- </date>
262
- </else>
263
- </choose>
264
- </macro>
265
- <macro name="pages">
266
- <choose>
267
- <if type="article-journal">
268
- <text prefix=": " variable="page" />
269
- </if>
270
- <else-if type="chapter">
271
- <text prefix=", " variable="page" />
272
- </else-if>
273
- </choose>
274
- </macro>
275
- <macro name="point-locators-subsequent">
276
- <group>
277
- <choose>
278
- <if locator="page" match="none">
279
- <label form="short" strip-periods="false" suffix=" " variable="locator" />
280
- </if>
281
- </choose>
282
- <text variable="locator" />
283
- </group>
284
- </macro>
285
- <macro name="point-locators">
286
- <choose>
287
- <if match="none" variable="locator">
288
- <text macro="pages" />
289
- </if>
290
- <else-if type="article-journal">
291
- <text prefix=": " variable="locator" />
292
- </else-if>
293
- <else>
294
- <text macro="point-locators-subsequent" prefix=", " />
295
- </else>
296
- </choose>
297
- </macro>
298
- <macro name="archive-note">
299
- <group delimiter=", ">
300
- <text variable="archive_location" />
301
- <text variable="archive" />
302
- <text variable="archive-place" />
303
- </group>
304
- </macro>
305
- <macro name="issue-note">
306
- <choose>
307
- <if type="article-journal">
308
- <text macro="issued" prefix=" (" suffix=")" />
309
- </if>
310
- <else-if match="any" variable="publisher-place publisher">
311
- <group delimiter=", " prefix=" (" suffix=")">
312
- <group delimiter=" ">
313
- <choose>
314
- <if match="none" variable="title"> </if>
315
- <else-if match="any" type="thesis speech">
316
- <text variable="genre" />
317
- </else-if>
318
- </choose>
319
- <text macro="event" />
320
- </group>
321
- <text macro="publisher" />
322
- <text macro="issued" />
323
- </group>
324
- </else-if>
325
- <else>
326
- <text macro="issued" prefix=", " />
327
- </else>
328
- </choose>
329
- </macro>
330
- <macro name="access-note">
331
- <group delimiter=", ">
332
- <choose>
333
- <if match="any" type="graphic report">
334
- <text macro="archive-note" />
335
- </if>
336
- <else-if match="none" type="book thesis chapter article-journal article-newspaper article-magazine">
337
- <text macro="archive-note" />
338
- </else-if>
339
- </choose>
340
- <text prefix="doi:" variable="DOI" />
341
- <text variable="URL" />
342
- </group>
343
- </macro>
344
- <citation
345
- disambiguate-add-givenname="true"
346
- disambiguate-add-names="true"
347
- et-al-min="4"
348
- et-al-subsequent-min="4"
349
- et-al-subsequent-use-first="1"
350
- et-al-use-first="1">
351
- <layout delimiter="; " prefix="" suffix=".">
352
- <choose>
353
- <if position="ibid-with-locator">
354
- <group delimiter=", ">
355
- <text suffix="." term="ibid" text-case="capitalize-first" />
356
- <text macro="point-locators-subsequent" />
357
- </group>
358
- </if>
359
- <else-if position="ibid">
360
- <text suffix="." term="ibid" text-case="capitalize-first" />
361
- </else-if>
362
- <else-if position="subsequent">
363
- <group delimiter=", ">
364
- <text macro="contributors-short" />
365
- <text macro="title-short" />
366
- <text macro="point-locators-subsequent" />
367
- </group>
368
- </else-if>
369
- <else>
370
- <group delimiter=", ">
371
- <text macro="contributors-note" />
372
- <text macro="title-note" />
373
- <text macro="description-note" />
374
- <text macro="secondary-contributors-note" />
375
- <text macro="container-title-note" />
376
- <text macro="container-contributors-note" />
377
- </group>
378
- <text macro="locators-note" />
379
- <text macro="collection-title" prefix=", " />
380
- <text macro="issue-note" />
381
- <text macro="locators-newspaper" prefix=", " />
382
- <text macro="point-locators" />
383
- <text macro="access-note" prefix=", " />
384
- </else>
385
- </choose>
386
- </layout>
387
- </citation>
388
- </style>
@@ -1,685 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" demote-non-dropping-particle="sort-only">
3
- <info>
4
- <title>Chicago Manual of Style (quick copy)</title>
5
- <id>http://www.zotero.org/styles/chicago-quick-copy</id>
6
- <link href="http://www.zotero.org/styles/chicago-quick-copy" rel="self"/>
7
- <link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
8
- <author>
9
- <name>Julian Onions</name>
10
- <email>julian.onions@gmail.com</email>
11
- </author>
12
- <contributor>
13
- <name>Simon Kornblith</name>
14
- <email>simon@simonster.com</email>
15
- </contributor>
16
- <contributor>
17
- <name>Elena Razlogova</name>
18
- <email>elena.razlogova@gmail.com</email>
19
- </contributor>
20
- <summary>Chicago format for quick copy function in Zotero</summary>
21
- <category field="generic-base"/>
22
- <category citation-format="numeric"/>
23
- <updated>2012-01-01T00:00:00+00:00</updated>
24
- <rights>This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/</rights>
25
- </info>
26
- <macro name="editor-translator">
27
- <group delimiter=", ">
28
- <choose>
29
- <if variable="author">
30
- <names variable="editor" delimiter=", ">
31
- <label form="verb-short" text-case="lowercase" suffix=". " strip-periods="true"/>
32
- <name and="text" delimiter=", "/>
33
- </names>
34
- <choose>
35
- <if variable="container-author">
36
- <group>
37
- <names variable="container-author">
38
- <label form="verb-short" prefix=" " text-case="lowercase" suffix=" " strip-periods="true"/>
39
- <name and="text" delimiter=", "/>
40
- </names>
41
- </group>
42
- </if>
43
- </choose>
44
- </if>
45
- </choose>
46
- <choose>
47
- <if variable="author editor" match="any">
48
- <names variable="translator" delimiter=", ">
49
- <label form="verb-short" text-case="lowercase" suffix=". " strip-periods="true"/>
50
- <name and="text" delimiter=", "/>
51
- </names>
52
- </if>
53
- </choose>
54
- </group>
55
- </macro>
56
- <macro name="secondary-contributors-note">
57
- <choose>
58
- <if type="chapter paper-conference" match="none">
59
- <text macro="editor-translator"/>
60
- </if>
61
- </choose>
62
- </macro>
63
- <macro name="container-contributors-note">
64
- <choose>
65
- <if type="chapter paper-conference" match="any">
66
- <text macro="editor-translator"/>
67
- </if>
68
- </choose>
69
- </macro>
70
- <macro name="secondary-contributors">
71
- <choose>
72
- <if type="chapter paper-conference" match="none">
73
- <group delimiter=". ">
74
- <choose>
75
- <if variable="author">
76
- <names variable="editor" delimiter=". ">
77
- <label form="verb" text-case="capitalize-first" suffix=" "/>
78
- <name and="text" delimiter=", "/>
79
- </names>
80
- </if>
81
- </choose>
82
- <choose>
83
- <if variable="author editor" match="any">
84
- <names variable="translator" delimiter=". ">
85
- <label form="verb" text-case="capitalize-first" suffix=" "/>
86
- <name and="text" delimiter=", "/>
87
- </names>
88
- </if>
89
- </choose>
90
- </group>
91
- </if>
92
- </choose>
93
- </macro>
94
- <macro name="container-contributors">
95
- <choose>
96
- <if type="chapter paper-conference" match="any">
97
- <group delimiter=", ">
98
- <choose>
99
- <if variable="author">
100
- <names variable="editor" delimiter=", ">
101
- <label form="verb" text-case="lowercase" suffix=" "/>
102
- <name and="text" delimiter=", "/>
103
- </names>
104
- <choose>
105
- <if variable="container-author">
106
- <group>
107
- <names variable="container-author">
108
- <label form="verb-short" prefix=" " text-case="lowercase" suffix=" " strip-periods="true"/>
109
- <name and="text" delimiter=", "/>
110
- </names>
111
- </group>
112
- </if>
113
- </choose>
114
- </if>
115
- </choose>
116
- <choose>
117
- <if variable="author editor" match="any">
118
- <names variable="translator" delimiter=", ">
119
- <label form="verb" text-case="lowercase" suffix=" "/>
120
- <name and="text" delimiter=", "/>
121
- </names>
122
- </if>
123
- </choose>
124
- </group>
125
- </if>
126
- </choose>
127
- </macro>
128
- <macro name="editor-note">
129
- <names variable="editor">
130
- <name and="text" sort-separator=", " delimiter=", "/>
131
- <label form="short" prefix=", " suffix="." strip-periods="true"/>
132
- </names>
133
- </macro>
134
- <macro name="translator-note">
135
- <names variable="translator">
136
- <name and="text" sort-separator=", " delimiter=", "/>
137
- <label form="verb-short" prefix=", " suffix="." strip-periods="true"/>
138
- </names>
139
- </macro>
140
- <macro name="recipient-note">
141
- <names variable="recipient" delimiter=", ">
142
- <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
143
- <name and="text" delimiter=", "/>
144
- </names>
145
- </macro>
146
- <macro name="contributors-note">
147
- <names variable="author">
148
- <name and="text" sort-separator=", " delimiter=", "/>
149
- <substitute>
150
- <text macro="editor-note"/>
151
- <text macro="translator-note"/>
152
- </substitute>
153
- </names>
154
- <text macro="recipient-note"/>
155
- </macro>
156
- <macro name="editor">
157
- <names variable="editor">
158
- <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
159
- <label form="short" prefix=", " suffix="." strip-periods="true"/>
160
- </names>
161
- </macro>
162
- <macro name="translator">
163
- <names variable="translator">
164
- <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
165
- <label form="verb-short" prefix=", " suffix="." strip-periods="true"/>
166
- </names>
167
- </macro>
168
- <macro name="recipient">
169
- <choose>
170
- <if type="personal_communication">
171
- <choose>
172
- <if variable="genre">
173
- <text variable="genre" text-case="capitalize-first"/>
174
- </if>
175
- <else>
176
- <text term="letter" text-case="capitalize-first"/>
177
- </else>
178
- </choose>
179
- </if>
180
- </choose>
181
- <text macro="recipient-note" prefix=" "/>
182
- </macro>
183
- <macro name="contributors">
184
- <names variable="author">
185
- <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
186
- <substitute>
187
- <text macro="editor"/>
188
- <text macro="translator"/>
189
- </substitute>
190
- </names>
191
- <text macro="recipient" prefix=". "/>
192
- </macro>
193
- <macro name="recipient-short">
194
- <names variable="recipient">
195
- <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
196
- <name form="short" and="text" delimiter=", "/>
197
- </names>
198
- </macro>
199
- <macro name="contributors-short">
200
- <names variable="author">
201
- <name form="short" and="text" delimiter=", "/>
202
- <substitute>
203
- <names variable="editor"/>
204
- <names variable="translator"/>
205
- </substitute>
206
- </names>
207
- <text macro="recipient-short"/>
208
- </macro>
209
- <macro name="contributors-sort">
210
- <names variable="author">
211
- <name name-as-sort-order="all" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
212
- <label form="verb-short" prefix=", " suffix="." strip-periods="true"/>
213
- <substitute>
214
- <names variable="editor"/>
215
- <names variable="translator"/>
216
- </substitute>
217
- </names>
218
- </macro>
219
- <macro name="interviewer-note">
220
- <names variable="interviewer" delimiter=", ">
221
- <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
222
- <name and="text" delimiter=", "/>
223
- </names>
224
- </macro>
225
- <macro name="interviewer">
226
- <names variable="interviewer" delimiter=", ">
227
- <label form="verb" prefix=" " text-case="capitalize-first" suffix=" "/>
228
- <name and="text" delimiter=", "/>
229
- </names>
230
- </macro>
231
- <macro name="title-note">
232
- <choose>
233
- <if variable="title" match="none">
234
- <text variable="genre"/>
235
- </if>
236
- <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
237
- <text variable="title" text-case="title" font-style="italic"/>
238
- </else-if>
239
- <else>
240
- <text variable="title" text-case="title" quotes="true"/>
241
- </else>
242
- </choose>
243
- </macro>
244
- <macro name="title">
245
- <choose>
246
- <if variable="title" match="none">
247
- <choose>
248
- <if type="personal_communication" match="none">
249
- <text variable="genre" text-case="capitalize-first"/>
250
- </if>
251
- </choose>
252
- </if>
253
- <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
254
- <text variable="title" text-case="title" font-style="italic"/>
255
- </else-if>
256
- <else>
257
- <text variable="title" text-case="title" quotes="true"/>
258
- </else>
259
- </choose>
260
- </macro>
261
- <macro name="title-short">
262
- <choose>
263
- <if variable="title" match="none">
264
- <choose>
265
- <if type="interview">
266
- <text term="interview" text-case="lowercase"/>
267
- </if>
268
- <else-if type="manuscript speech" match="any">
269
- <text variable="genre" form="short"/>
270
- </else-if>
271
- <else-if type="personal_communication">
272
- <text macro="issued"/>
273
- </else-if>
274
- </choose>
275
- </if>
276
- <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
277
- <text variable="title" text-case="title" form="short" font-style="italic"/>
278
- </else-if>
279
- <else>
280
- <text variable="title" text-case="title" form="short" quotes="true"/>
281
- </else>
282
- </choose>
283
- </macro>
284
- <macro name="description-note">
285
- <group delimiter=", ">
286
- <text macro="interviewer-note"/>
287
- <text variable="medium"/>
288
- <choose>
289
- <if variable="title" match="none"/>
290
- <else-if type="thesis speech" match="any"/>
291
- <else>
292
- <text variable="genre"/>
293
- </else>
294
- </choose>
295
- </group>
296
- </macro>
297
- <macro name="description">
298
- <group delimiter=", ">
299
- <group delimiter=". ">
300
- <text macro="interviewer"/>
301
- <text variable="medium" text-case="capitalize-first"/>
302
- </group>
303
- <choose>
304
- <if variable="title" match="none"/>
305
- <else-if type="thesis speech" match="any"/>
306
- <else>
307
- <text variable="genre" text-case="capitalize-first"/>
308
- </else>
309
- </choose>
310
- </group>
311
- </macro>
312
- <macro name="container-title-note">
313
- <choose>
314
- <if type="chapter paper-conference" match="any">
315
- <text term="in" text-case="lowercase" suffix=" "/>
316
- </if>
317
- </choose>
318
- <choose>
319
- <if type="legal_case" match="none">
320
- <text variable="container-title" font-style="italic"/>
321
- </if>
322
- </choose>
323
- </macro>
324
- <macro name="container-title">
325
- <choose>
326
- <if type="chapter paper-conference" match="any">
327
- <text term="in" text-case="capitalize-first" suffix=" "/>
328
- </if>
329
- </choose>
330
- <choose>
331
- <if type="legal_case" match="none">
332
- <text variable="container-title" text-case="title" font-style="italic"/>
333
- </if>
334
- </choose>
335
- </macro>
336
- <macro name="collection-title">
337
- <text variable="collection-title" text-case="title"/>
338
- <text variable="collection-number" prefix=" "/>
339
- </macro>
340
- <macro name="edition-note">
341
- <choose>
342
- <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
343
- <choose>
344
- <if is-numeric="edition">
345
- <group delimiter=" ">
346
- <number variable="edition" form="ordinal"/>
347
- <text term="edition" form="short" suffix="." strip-periods="true"/>
348
- </group>
349
- </if>
350
- <else>
351
- <text variable="edition" suffix="."/>
352
- </else>
353
- </choose>
354
- </if>
355
- </choose>
356
- </macro>
357
- <macro name="edition">
358
- <choose>
359
- <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
360
- <choose>
361
- <if is-numeric="edition">
362
- <group delimiter=" ">
363
- <number variable="edition" form="ordinal"/>
364
- <text term="edition" form="short" suffix="." strip-periods="true"/>
365
- </group>
366
- </if>
367
- <else>
368
- <text variable="edition" text-case="capitalize-first" suffix="."/>
369
- </else>
370
- </choose>
371
- </if>
372
- </choose>
373
- </macro>
374
- <macro name="locators-note">
375
- <choose>
376
- <if type="article-journal">
377
- <text variable="volume" prefix=" "/>
378
- <group prefix=", ">
379
- <text term="issue" form="short" suffix=". " strip-periods="true"/>
380
- <number variable="issue"/>
381
- </group>
382
- </if>
383
- <else-if type="legal_case">
384
- <text variable="volume" prefix=", "/>
385
- <text variable="container-title" prefix=" "/>
386
- <text variable="page" prefix=" "/>
387
- <text variable="locator" prefix=", "/>
388
- </else-if>
389
- <else-if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
390
- <group prefix=", " delimiter=", ">
391
- <group>
392
- <text term="volume" form="short" suffix=". " strip-periods="true"/>
393
- <number variable="volume" form="numeric"/>
394
- </group>
395
- <choose>
396
- <if variable="locator" match="none">
397
- <group>
398
- <number variable="number-of-volumes" form="numeric"/>
399
- <text term="volume" form="short" prefix=" " suffix="." plural="true" strip-periods="true"/>
400
- </group>
401
- </if>
402
- </choose>
403
- <text macro="edition-note"/>
404
- </group>
405
- </else-if>
406
- </choose>
407
- </macro>
408
- <macro name="locators-newspaper">
409
- <choose>
410
- <if type="article-newspaper">
411
- <group delimiter=", ">
412
- <group>
413
- <text variable="edition" suffix=" "/>
414
- <text term="edition" prefix=" "/>
415
- </group>
416
- <group>
417
- <text term="section" form="short" suffix=". " strip-periods="true"/>
418
- <text variable="section"/>
419
- </group>
420
- </group>
421
- </if>
422
- </choose>
423
- </macro>
424
- <macro name="event">
425
- <group>
426
- <text term="presented at" suffix=" "/>
427
- <text variable="event"/>
428
- </group>
429
- </macro>
430
- <macro name="publisher">
431
- <group delimiter=": ">
432
- <text variable="publisher-place"/>
433
- <text variable="publisher"/>
434
- </group>
435
- </macro>
436
- <macro name="issued">
437
- <choose>
438
- <if variable="issued">
439
- <choose>
440
- <if type="graphic report" match="any">
441
- <date variable="issued">
442
- <date-part name="month" suffix=" "/>
443
- <date-part name="day" suffix=", "/>
444
- <date-part name="year"/>
445
- </date>
446
- </if>
447
- <else-if type="legal_case">
448
- <text variable="authority" suffix=" "/>
449
- <date variable="issued">
450
- <date-part name="year"/>
451
- </date>
452
- </else-if>
453
- <else-if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song thesis" match="any">
454
- <date variable="issued">
455
- <date-part name="year"/>
456
- </date>
457
- </else-if>
458
- <else>
459
- <date variable="issued">
460
- <date-part name="month" suffix=" "/>
461
- <date-part name="day" suffix=", "/>
462
- <date-part name="year"/>
463
- </date>
464
- </else>
465
- </choose>
466
- </if>
467
- <else>
468
- <text term="no date" form="short"/>
469
- </else>
470
- </choose>
471
- </macro>
472
- <macro name="point-locators-subsequent">
473
- <choose>
474
- <if variable="locator">
475
- <choose>
476
- <if locator="page" match="none">
477
- <choose>
478
- <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
479
- <choose>
480
- <if variable="volume">
481
- <group>
482
- <text term="volume" form="short" text-case="lowercase" suffix=". " strip-periods="true"/>
483
- <number variable="volume" form="numeric"/>
484
- <label variable="locator" form="short" prefix=", " suffix=" "/>
485
- </group>
486
- </if>
487
- <else>
488
- <label variable="locator" form="short" suffix=" "/>
489
- </else>
490
- </choose>
491
- </if>
492
- </choose>
493
- </if>
494
- <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
495
- <number variable="volume" form="numeric" suffix=":"/>
496
- </else-if>
497
- </choose>
498
- <text variable="locator"/>
499
- </if>
500
- </choose>
501
- </macro>
502
- <macro name="point-locators">
503
- <choose>
504
- <if variable="locator" match="none">
505
- <text macro="pages"/>
506
- </if>
507
- <else-if type="article-journal">
508
- <text variable="locator" prefix=": "/>
509
- </else-if>
510
- <else-if type="legal_case"/>
511
- <else>
512
- <group prefix=", ">
513
- <choose>
514
- <if locator="page" match="none">
515
- <label variable="locator" form="short" suffix=" "/>
516
- </if>
517
- </choose>
518
- <text variable="locator"/>
519
- </group>
520
- </else>
521
- </choose>
522
- </macro>
523
- <macro name="pages">
524
- <choose>
525
- <if type="article-journal">
526
- <text variable="page" prefix=": "/>
527
- </if>
528
- <else-if type="chapter paper-conference" match="any">
529
- <text variable="page" prefix=", "/>
530
- </else-if>
531
- </choose>
532
- </macro>
533
- <macro name="locators-chapter">
534
- <choose>
535
- <if type="chapter paper-conference" match="any">
536
- <text variable="volume" suffix=":"/>
537
- <text variable="page"/>
538
- </if>
539
- </choose>
540
- </macro>
541
- <macro name="locators-journal">
542
- <choose>
543
- <if type="article-journal">
544
- <text variable="page" prefix=": "/>
545
- </if>
546
- </choose>
547
- </macro>
548
- <macro name="archive-note">
549
- <group delimiter=", ">
550
- <text variable="archive_location"/>
551
- <text variable="archive"/>
552
- <text variable="archive-place"/>
553
- </group>
554
- </macro>
555
- <macro name="archive">
556
- <group delimiter=". ">
557
- <text variable="archive_location" text-case="capitalize-first"/>
558
- <text variable="archive"/>
559
- <text variable="archive-place"/>
560
- </group>
561
- </macro>
562
- <macro name="issue-note">
563
- <choose>
564
- <if type="article-journal legal_case" match="any">
565
- <text macro="issued" prefix=" (" suffix=")"/>
566
- </if>
567
- <else-if variable="publisher-place publisher" match="any">
568
- <group prefix=" (" suffix=")" delimiter=", ">
569
- <group delimiter=" ">
570
- <choose>
571
- <if variable="title" match="none"/>
572
- <else-if type="thesis speech" match="any">
573
- <text variable="genre"/>
574
- </else-if>
575
- </choose>
576
- <text macro="event"/>
577
- </group>
578
- <text macro="publisher"/>
579
- <text macro="issued"/>
580
- </group>
581
- </else-if>
582
- <else>
583
- <text macro="issued" prefix=", "/>
584
- </else>
585
- </choose>
586
- </macro>
587
- <macro name="issue">
588
- <choose>
589
- <if type="article-journal legal_case" match="any">
590
- <text macro="issued" prefix=" (" suffix=")"/>
591
- </if>
592
- <else-if type="speech">
593
- <choose>
594
- <if variable="title" match="none"/>
595
- <else>
596
- <text variable="genre" text-case="capitalize-first" prefix=". "/>
597
- </else>
598
- </choose>
599
- <text macro="event" prefix=" "/>
600
- <text variable="event-place" prefix=", "/>
601
- <text macro="issued" prefix=", "/>
602
- </else-if>
603
- <else-if variable="publisher-place publisher" match="any">
604
- <group prefix=". " delimiter=", ">
605
- <choose>
606
- <if type="thesis">
607
- <text variable="genre" text-case="capitalize-first"/>
608
- </if>
609
- </choose>
610
- <text macro="publisher"/>
611
- <text macro="issued"/>
612
- </group>
613
- </else-if>
614
- <else>
615
- <text macro="issued" prefix=", "/>
616
- </else>
617
- </choose>
618
- </macro>
619
- <macro name="access-note">
620
- <group delimiter=", ">
621
- <choose>
622
- <if type="graphic report" match="any">
623
- <text macro="archive-note"/>
624
- </if>
625
- <else-if type="article-journal article-magazine article-newspaper bill book chapter graphic legal_case legislation motion_picture paper-conference report song thesis" match="none">
626
- <text macro="archive-note"/>
627
- </else-if>
628
- </choose>
629
- <choose>
630
- <if type="legal_case" match="none">
631
- <text variable="URL"/>
632
- </if>
633
- </choose>
634
- </group>
635
- </macro>
636
- <macro name="access">
637
- <group delimiter=". ">
638
- <choose>
639
- <if type="graphic report" match="any">
640
- <text macro="archive"/>
641
- </if>
642
- <else-if type="article-journal article-magazine article-newspaper bill book chapter graphic legal_case legislation motion_picture paper-conference report song thesis" match="none">
643
- <text macro="archive"/>
644
- </else-if>
645
- </choose>
646
- <choose>
647
- <if type="legal_case" match="none">
648
- <text variable="URL"/>
649
- </if>
650
- </choose>
651
- </group>
652
- </macro>
653
- <macro name="sort-key">
654
- <text macro="contributors-sort" suffix=" "/>
655
- <text variable="title" suffix=" "/>
656
- <text variable="genre"/>
657
- </macro>
658
- <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">
659
- <layout prefix="" suffix="." delimiter="; ">
660
- <group delimiter=", ">
661
- <text macro="contributors-short"/>
662
- <text macro="title-short"/>
663
- <text macro="point-locators-subsequent"/>
664
- </group>
665
- </layout>
666
- </citation>
667
- <bibliography et-al-min="4" et-al-use-first="1">
668
- <layout suffix=".">
669
- <group delimiter=", ">
670
- <text macro="contributors-note"/>
671
- <text macro="title-note"/>
672
- <text macro="description-note"/>
673
- <text macro="secondary-contributors-note"/>
674
- <text macro="container-title-note"/>
675
- <text macro="container-contributors-note"/>
676
- </group>
677
- <text macro="locators-note"/>
678
- <text macro="collection-title" prefix=", "/>
679
- <text macro="issue-note"/>
680
- <text macro="locators-newspaper" prefix=", "/>
681
- <text macro="point-locators"/>
682
- <text macro="access-note" prefix=", "/>
683
- </layout>
684
- </bibliography>
685
- </style>