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,394 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only">
3
- <info>
4
- <title>Chicago Manual of Style (author-date, German)</title>
5
- <id>http://www.zotero.org/styles/chicago-author-date-de</id>
6
- <link href="http://www.zotero.org/styles/chicago-author-date-de" rel="self"/>
7
- <author>
8
- <name>Julian Onions</name>
9
- <email>julian.onions@gmail.com</email>
10
- </author>
11
- <contributor>
12
- <name>Peter Baumgartner</name>
13
- <email>peter.baumgartner@donau-uni.ac.at</email>
14
- </contributor>
15
- <category citation-format="author-date"/>
16
- <category field="generic-base"/>
17
- <updated>2008-01-01T11:11:12+00:00</updated>
18
- <link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
19
- <summary>The author-date variant of the Chicago style adapted for German. I addition to the online reference I've used:
20
- Turabian, K. L. (2007). A Manual for Writers of Research Papers, Theses, and Dissertations. Chicago Style for Students and Researchers. University Of Chicago Press.
21
- Especially figure 18.1 pp 218-220 --
22
- NOTE: check all the details and special cases of chapter 19: "Parethetical Citations-Reference List Style: Citing Specific Types of Sources --
23
- I used as template the Chicago Manual of Style (author-date) Revision 3195 --
24
- Code changes to adapt for a valid German version: --
25
- * replaced delimiter-precedes-last="always" with "never" to get rid of the last comma in author names --
26
- * added colon as suffix of the term "in" --
27
- * added colon as suffix of the termin "accessed" --
28
- * changed variable "issue" of "article-journal from "no." to "Nr." --
29
- * changed "month day" to "day. month" for blog posts (and other entry types? which ones else?)
30
- I also changed some script logic which in noted in the code: --
31
- * do not add day-month at the end of a book, even it is provided in the date field of the zotero database (as it sometimes come from amazon) --
32
- * added access date for material with URL. --
33
- * not all archive items should end with a fullstop. A doi is followed by a comma and space, a URL just by a space before the date comes. --
34
- NOTE: this should be checked more in detail --
35
- * if there is just a secondary contributor (e.g. editor of a book) then this is the primary contributor and the generated output should not repeat the name as secondary contributor.
36
- </summary>
37
- <rights>This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/</rights>
38
- </info>
39
- <macro name="secondary-contributors">
40
- <choose>
41
- <if type="chapter paper-conference" match="none">
42
- <group delimiter=". ">
43
- <choose>
44
- <if variable="author">
45
- <names variable="editor">
46
- <label form="verb-short" prefix=" " text-case="capitalize-first" suffix=". " strip-periods="true"/>
47
- <name and="text" delimiter=", "/>
48
- </names>
49
- </if>
50
- </choose>
51
- <choose>
52
- <if variable="author editor" match="any">
53
- <names variable="translator">
54
- <label form="verb-short" prefix=" " text-case="capitalize-first" suffix=". " strip-periods="true"/>
55
- <name and="text" delimiter=", "/>
56
- </names>
57
- </if>
58
- </choose>
59
- </group>
60
- </if>
61
- </choose>
62
- </macro>
63
- <macro name="container-contributors">
64
- <choose>
65
- <if type="chapter paper-conference" match="any">
66
- <group prefix="," delimiter=", ">
67
- <choose>
68
- <if variable="author">
69
- <names variable="editor">
70
- <label form="verb-short" prefix=" " text-case="lowercase" suffix=". " strip-periods="true"/>
71
- <name and="text" delimiter=", "/>
72
- </names>
73
- </if>
74
- </choose>
75
- <choose>
76
- <if variable="author editor" match="any">
77
- <names variable="translator">
78
- <label form="verb-short" prefix=" " text-case="lowercase" suffix=". " strip-periods="true"/>
79
- <name and="text" delimiter=", "/>
80
- </names>
81
- </if>
82
- </choose>
83
- </group>
84
- </if>
85
- </choose>
86
- </macro>
87
- <macro name="anon">
88
- <choose>
89
- <if variable="author editor translator" match="none">
90
- <text term="anonymous" form="short" text-case="capitalize-first" strip-periods="true"/>
91
- </if>
92
- </choose>
93
- </macro>
94
- <macro name="editor">
95
- <names variable="editor">
96
- <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="never"/>
97
- <label form="short" prefix=", " suffix="." strip-periods="true"/>
98
- </names>
99
- </macro>
100
- <macro name="translator">
101
- <names variable="translator">
102
- <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="never"/>
103
- <label form="verb-short" prefix=", " suffix="." strip-periods="true"/>
104
- </names>
105
- </macro>
106
- <macro name="recipient">
107
- <choose>
108
- <if type="personal_communication">
109
- <choose>
110
- <if variable="genre">
111
- <text variable="genre" text-case="capitalize-first"/>
112
- </if>
113
- <else>
114
- <text term="letter" text-case="capitalize-first"/>
115
- </else>
116
- </choose>
117
- </if>
118
- </choose>
119
- <names variable="recipient" delimiter=", ">
120
- <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
121
- <name and="text" delimiter=", "/>
122
- </names>
123
- </macro>
124
- <macro name="contributors">
125
- <names variable="author">
126
- <name and="text" name-as-sort-order="first" sort-separator=", " delimiter=", " delimiter-precedes-last="never"/>
127
- <label form="verb-short" prefix=", " suffix="." text-case="lowercase" strip-periods="true"/>
128
- <substitute>
129
- <text macro="editor"/>
130
- <text macro="translator"/>
131
- </substitute>
132
- </names>
133
- <text macro="anon"/>
134
- <text macro="recipient"/>
135
- </macro>
136
- <macro name="contributors-short">
137
- <names variable="author">
138
- <name form="short" and="text" delimiter=", " delimiter-precedes-last="never"/>
139
- <substitute>
140
- <names variable="editor"/>
141
- <names variable="translator"/>
142
- </substitute>
143
- </names>
144
- <text macro="anon"/>
145
- </macro>
146
- <macro name="interviewer">
147
- <names variable="interviewer" delimiter=", ">
148
- <label form="verb" prefix=" " text-case="capitalize-first" suffix=" "/>
149
- <name and="text" delimiter=", "/>
150
- </names>
151
- </macro>
152
- <macro name="archive">
153
- <group delimiter=". ">
154
- <text variable="archive_location" text-case="capitalize-first"/>
155
- <text variable="archive"/>
156
- <text variable="archive-place"/>
157
- </group>
158
- </macro>
159
- <macro name="access">
160
- <group delimiter=". ">
161
- <choose>
162
- <if type="graphic report" match="any">
163
- <text macro="archive"/>
164
- </if>
165
- <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">
166
- <text macro="archive"/>
167
- </else-if>
168
- </choose>
169
- </group>
170
- <!-- not all items of archive should end with a fullstop. I've transfered end of the delimiter="." group at this place -->
171
- <text variable="DOI" prefix="doi:" suffix=", "/>
172
- <text variable="URL"/>
173
- <!-- added date for material on the web -->
174
- <group prefix=" (" suffix=")">
175
- <text term="accessed" text-case="capitalize-first" suffix=": "/>
176
- <date variable="accessed">
177
- <date-part name="day" suffix=". "/>
178
- <date-part name="month" suffix=" "/>
179
- <date-part name="year"/>
180
- </date>
181
- </group>
182
- </macro>
183
- <macro name="title">
184
- <choose>
185
- <if variable="title" match="none">
186
- <choose>
187
- <if type="personal_communication" match="none">
188
- <text variable="genre" text-case="capitalize-first"/>
189
- </if>
190
- </choose>
191
- </if>
192
- <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
193
- <text variable="title" font-style="italic"/>
194
- </else-if>
195
- <else>
196
- <text variable="title"/>
197
- </else>
198
- </choose>
199
- </macro>
200
- <macro name="edition">
201
- <choose>
202
- <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
203
- <choose>
204
- <if is-numeric="edition">
205
- <group delimiter=" ">
206
- <number variable="edition" form="ordinal"/>
207
- <text term="edition" form="short" suffix="." strip-periods="true"/>
208
- </group>
209
- </if>
210
- <else>
211
- <text variable="edition" suffix="."/>
212
- </else>
213
- </choose>
214
- </if>
215
- </choose>
216
- </macro>
217
- <macro name="locators">
218
- <choose>
219
- <if type="article-journal">
220
- <text variable="volume" prefix=" "/>
221
- <text variable="issue" prefix=", Nr. "/>
222
- </if>
223
- <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
224
- <group prefix=". " delimiter=". ">
225
- <group>
226
- <text term="volume" form="short" text-case="capitalize-first" suffix=". " strip-periods="true"/>
227
- <number variable="volume" form="numeric"/>
228
- </group>
229
- <group>
230
- <number variable="number-of-volumes" form="numeric"/>
231
- <text term="volume" form="short" prefix=" " suffix="." plural="true" strip-periods="true"/>
232
- </group>
233
- </group>
234
- </else-if>
235
- </choose>
236
- </macro>
237
- <macro name="locators-chapter">
238
- <choose>
239
- <if type="chapter paper-conference" match="any">
240
- <group prefix=", ">
241
- <text variable="volume" suffix=":"/>
242
- <text variable="page"/>
243
- </group>
244
- </if>
245
- </choose>
246
- </macro>
247
- <macro name="locators-article">
248
- <choose>
249
- <if type="article-newspaper">
250
- <group prefix=", " delimiter=", ">
251
- <group>
252
- <text variable="edition" suffix=" "/>
253
- <text term="edition" prefix=" "/>
254
- </group>
255
- <group>
256
- <text term="section" form="short" suffix=". " strip-periods="true"/>
257
- <text variable="section"/>
258
- </group>
259
- </group>
260
- </if>
261
- <else-if type="article-journal">
262
- <text variable="page" prefix=": "/>
263
- </else-if>
264
- </choose>
265
- </macro>
266
- <macro name="point-locators">
267
- <choose>
268
- <if variable="locator">
269
- <choose>
270
- <if locator="page" match="none">
271
- <label variable="locator" form="short" suffix=" "/>
272
- </if>
273
- </choose>
274
- <text variable="locator"/>
275
- </if>
276
- </choose>
277
- </macro>
278
- <macro name="container-prefix">
279
- <text term="in" text-case="capitalize-first" suffix=":"/>
280
- </macro>
281
- <macro name="container-title">
282
- <choose>
283
- <if type="chapter paper-conference" match="any">
284
- <text macro="container-prefix" suffix=" "/>
285
- </if>
286
- </choose>
287
- <text variable="container-title" font-style="italic"/>
288
- </macro>
289
- <macro name="publisher">
290
- <group delimiter=": ">
291
- <text variable="publisher-place"/>
292
- <text variable="publisher"/>
293
- </group>
294
- </macro>
295
- <macro name="date">
296
- <date variable="issued">
297
- <date-part name="year"/>
298
- </date>
299
- </macro>
300
- <macro name="day-month">
301
- <date variable="issued">
302
- <date-part name="day" suffix=". "/>
303
- <date-part name="month"/>
304
- </date>
305
- </macro>
306
- <macro name="collection-title">
307
- <text variable="collection-title"/>
308
- <text variable="collection-number" prefix=" "/>
309
- </macro>
310
- <macro name="event">
311
- <group>
312
- <text term="presented at" suffix=" "/>
313
- <text variable="event"/>
314
- </group>
315
- </macro>
316
- <macro name="description">
317
- <group delimiter=". ">
318
- <text macro="interviewer"/>
319
- <text variable="medium" text-case="capitalize-first"/>
320
- </group>
321
- <choose>
322
- <if variable="title" match="none"/>
323
- <else-if type="thesis"/>
324
- <else>
325
- <text variable="genre" text-case="capitalize-first" prefix=". "/>
326
- </else>
327
- </choose>
328
- </macro>
329
- <macro name="issue">
330
- <choose>
331
- <if type="article-journal">
332
- <text macro="day-month" prefix=" (" suffix=")"/>
333
- </if>
334
- <else-if type="speech">
335
- <group prefix=" " delimiter=", ">
336
- <text macro="event"/>
337
- <text macro="day-month"/>
338
- <text variable="event-place"/>
339
- </group>
340
- </else-if>
341
- <else-if type="article-newspaper article-magazine" match="any">
342
- <text macro="day-month" prefix=", "/>
343
- </else-if>
344
- <!-- do not add day-month at the end of a book, even it is provided in the date field of the zotero database (as it sometimes come from amazon) -->
345
- <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
346
- <text macro="publisher" prefix=". "/>
347
- </else-if>
348
- <else>
349
- <group prefix=". " delimiter=", ">
350
- <choose>
351
- <if type="thesis">
352
- <text variable="genre" text-case="capitalize-first"/>
353
- </if>
354
- </choose>
355
- <text macro="publisher"/>
356
- <text macro="day-month"/>
357
- </group>
358
- </else>
359
- </choose>
360
- </macro>
361
- <citation et-al-min="4" et-al-use-first="1" et-al-subsequent-min="4" et-al-subsequent-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true">
362
- <layout prefix="(" suffix=")" delimiter="; ">
363
- <group delimiter=", ">
364
- <group delimiter=" ">
365
- <text macro="contributors-short"/>
366
- <text macro="date"/>
367
- </group>
368
- <text macro="point-locators"/>
369
- </group>
370
- </layout>
371
- </citation>
372
- <bibliography hanging-indent="true" et-al-min="11" et-al-use-first="7" subsequent-author-substitute="---" entry-spacing="0">
373
- <sort>
374
- <key macro="contributors"/>
375
- <key variable="issued"/>
376
- </sort>
377
- <layout suffix=".">
378
- <text macro="contributors" suffix=". "/>
379
- <text macro="date" suffix=". "/>
380
- <text macro="title"/>
381
- <text macro="description"/>
382
- <text macro="secondary-contributors" prefix=". "/>
383
- <text macro="container-title" prefix=". "/>
384
- <text macro="container-contributors"/>
385
- <text macro="locators-chapter"/>
386
- <text macro="edition" prefix=". "/>
387
- <text macro="locators"/>
388
- <text macro="collection-title" prefix=". "/>
389
- <text macro="issue"/>
390
- <text macro="locators-article"/>
391
- <text macro="access" prefix=". "/>
392
- </layout>
393
- </bibliography>
394
- </style>
@@ -1,434 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.1x" default-locale="en-US-x-sort-ja-alalc97">
3
- <info>
4
- <title>Chicago Manual of Style (Author-Date format)</title>
5
- <id>http://www.zotero.org/styles/chicago-author-date</id>
6
- <link href="http://www.zotero.org/styles/chicago-author-date-listing" rel="self"/>
7
- <author>
8
- <name>Julian Onions</name>
9
- <email>julian.onions@gmail.com</email>
10
- </author>
11
- <category citation-format="author-date"/>
12
- <category field="generic-base"/>
13
- <updated>2009-12-04T20:22:16+00:00</updated>
14
- <summary>The author-date variant of the Chicago style, as per-author-listing</summary>
15
- <link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
16
- </info>
17
- <locale>
18
- <terms>
19
- <term name="and others"></term>
20
- <term name="contributor"></term>
21
- </terms>
22
- </locale>
23
- <macro name="secondary-contributors">
24
- <choose>
25
- <if match="none" type="chapter">
26
- <group delimiter=". ">
27
- <choose>
28
- <if variable="author">
29
- <names variable="editor">
30
- <label form="verb-short" prefix=" " suffix=". " text-case="capitalize-first" />
31
- <name and="text" delimiter=", " />
32
- </names>
33
- </if>
34
- </choose>
35
- <choose>
36
- <if match="any" variable="author editor">
37
- <names variable="translator">
38
- <label form="verb-short" prefix=" " suffix=". " text-case="capitalize-first" />
39
- <name and="text" delimiter=", " />
40
- </names>
41
- </if>
42
- </choose>
43
- </group>
44
- </if>
45
- </choose>
46
- </macro>
47
- <macro name="container-contributors">
48
- <choose>
49
- <if type="chapter">
50
- <group delimiter=", " prefix=",">
51
- <choose>
52
- <if variable="author">
53
- <names variable="editor">
54
- <label form="verb-short" prefix=" " suffix=". " text-case="lowercase" />
55
- <name and="text" delimiter=", " />
56
- </names>
57
- </if>
58
- </choose>
59
- <choose>
60
- <if match="any" variable="author editor">
61
- <names variable="translator">
62
- <label form="verb-short" prefix=" " suffix=". " text-case="lowercase" />
63
- <name and="text" delimiter=", " />
64
- </names>
65
- </if>
66
- </choose>
67
- </group>
68
- </if>
69
- </choose>
70
- </macro>
71
- <macro name="anon">
72
- <choose>
73
- <if match="none" variable="author editor translator">
74
- <text form="short" term="anonymous" text-case="capitalize-first" />
75
- </if>
76
- </choose>
77
- </macro>
78
- <macro name="editor">
79
- <names variable="editor">
80
- <name and="text" delimiter=", " delimiter-precedes-last="always" name-as-sort-order="first" sort-separator=", " />
81
- <label form="short" prefix=", " suffix="." />
82
- </names>
83
- </macro>
84
- <macro name="translator">
85
- <names variable="translator">
86
- <name and="text" delimiter=", " delimiter-precedes-last="always" name-as-sort-order="first" sort-separator=", " />
87
- <label form="verb-short" prefix=", " suffix="." />
88
- </names>
89
- </macro>
90
- <macro name="recipient">
91
- <choose>
92
- <if type="personal_communication">
93
- <choose>
94
- <if variable="genre">
95
- <text text-case="capitalize-first" variable="genre" />
96
- </if>
97
- <else>
98
- <text term="letter" text-case="capitalize-first" />
99
- </else>
100
- </choose>
101
- </if>
102
- </choose>
103
- <names delimiter=", " variable="recipient">
104
- <label form="verb" prefix=" " suffix=" " text-case="lowercase" />
105
- <name and="text" delimiter=", " />
106
- </names>
107
- </macro>
108
- <macro name="contributors">
109
- <names variable="author">
110
- <name and="text" delimiter=", " delimiter-precedes-last="always" />
111
- <label form="verb-short" prefix=", " suffix="." text-case="lowercase" />
112
- <substitute>
113
- <text macro="editor" />
114
- <text macro="translator" />
115
- </substitute>
116
- </names>
117
- <text macro="anon" />
118
- <text macro="recipient" />
119
- </macro>
120
- <macro name="headline-contributor">
121
- <names variable="contributor">
122
- <name and="text" delimiter=", "
123
- delimiter-precedes-last="always"
124
- name-as-sort-order="first"
125
- sort-separator=", "
126
- et-al-use-first="1"
127
- et-al-min="2"/>
128
- <et-al term="and others"/>
129
- <label form="verb-short" prefix=", " suffix="." text-case="lowercase" />
130
- </names>
131
- </macro>
132
- <macro name="headline-author">
133
- <names variable="author">
134
- <name and="text" delimiter=", "
135
- delimiter-precedes-last="always"
136
- name-as-sort-order="first"
137
- sort-separator=", "
138
- et-al-use-first="1"
139
- et-al-min="1"/>
140
- <et-al term="and others"/>
141
- <label form="verb-short" prefix=", " suffix="." text-case="lowercase" />
142
- <substitute>
143
- <text macro="editor" />
144
- <text macro="translator" />
145
- </substitute>
146
- </names>
147
- <text macro="anon" />
148
- <text macro="recipient" />
149
- </macro>
150
- <macro name="contributors-short">
151
- <names variable="author">
152
- <name and="text" delimiter=", " form="short" />
153
- <substitute>
154
- <names variable="editor" />
155
- <names variable="translator" />
156
- </substitute>
157
- </names>
158
- <text macro="anon" />
159
- </macro>
160
- <macro name="interviewer">
161
- <names delimiter=", " variable="interviewer">
162
- <label form="verb" prefix=" " suffix=" " text-case="capitalize-first" />
163
- <name and="text" delimiter=", " />
164
- </names>
165
- </macro>
166
- <macro name="archive">
167
- <group delimiter=". ">
168
- <text text-case="capitalize-first" variable="archive_location" />
169
- <text variable="archive" />
170
- <text variable="archive-place" />
171
- </group>
172
- </macro>
173
- <macro name="access">
174
- <group delimiter=". ">
175
- <choose>
176
- <if match="any" type="graphic report">
177
- <text macro="archive" />
178
- </if>
179
- <else-if match="none" type="book thesis chapter article-journal article-newspaper article-magazine">
180
- <text macro="archive" />
181
- </else-if>
182
- </choose>
183
- <text prefix="doi:" variable="DOI" />
184
- <text variable="URL" />
185
- </group>
186
- </macro>
187
- <macro name="title">
188
- <choose>
189
- <if match="none" variable="title">
190
- <choose>
191
- <if match="none" type="personal_communication">
192
- <text text-case="capitalize-first" variable="genre" />
193
- </if>
194
- </choose>
195
- </if>
196
- <else-if type="book">
197
- <text font-style="italic" variable="title" />
198
- </else-if>
199
- <else>
200
- <text variable="title" />
201
- </else>
202
- </choose>
203
- </macro>
204
- <macro name="edition">
205
- <choose>
206
- <if match="any" type="book chapter">
207
- <choose>
208
- <if is-numeric="edition">
209
- <group delimiter=" ">
210
- <number form="ordinal" variable="edition" />
211
- <text form="short" suffix="." term="edition" />
212
- </group>
213
- </if>
214
- <else>
215
- <text suffix="." variable="edition" />
216
- </else>
217
- </choose>
218
- </if>
219
- </choose>
220
- </macro>
221
- <macro name="locators">
222
- <choose>
223
- <if type="article-journal">
224
- <text prefix=" " variable="volume" />
225
- <text prefix=", no. " variable="issue" />
226
- </if>
227
- <else-if type="book">
228
- <group delimiter=". " prefix=". ">
229
- <group>
230
- <text form="short" suffix=". " term="volume" text-case="capitalize-first" />
231
- <number form="numeric" variable="volume" />
232
- </group>
233
- <group>
234
- <number form="numeric" variable="number-of-volumes" />
235
- <text form="short" plural="true" prefix=" " suffix="." term="volume" />
236
- </group>
237
- </group>
238
- </else-if>
239
- </choose>
240
- </macro>
241
- <macro name="locators-chapter">
242
- <choose>
243
- <if type="chapter">
244
- <group prefix=", ">
245
- <text suffix=":" variable="volume" />
246
- <text variable="page" />
247
- </group>
248
- </if>
249
- </choose>
250
- </macro>
251
- <macro name="locators-article">
252
- <choose>
253
- <if type="article-newspaper">
254
- <group delimiter=", " prefix=", ">
255
- <group>
256
- <text suffix=" " variable="edition" />
257
- <text prefix=" " term="edition" />
258
- </group>
259
- <group>
260
- <text form="short" suffix=". " term="section" />
261
- <text variable="section" />
262
- </group>
263
- </group>
264
- </if>
265
- <else-if type="article-journal">
266
- <text prefix=": " variable="page" />
267
- </else-if>
268
- </choose>
269
- </macro>
270
- <macro name="point-locators">
271
- <group>
272
- <choose>
273
- <if locator="page" match="none">
274
- <label form="short" strip-periods="false" suffix=" " variable="locator" />
275
- </if>
276
- </choose>
277
- <text variable="locator" />
278
- </group>
279
- </macro>
280
- <macro name="container-prefix">
281
- <text term="in" text-case="capitalize-first" />
282
- </macro>
283
- <macro name="container-title">
284
- <choose>
285
- <if type="chapter">
286
- <text macro="container-prefix" suffix=" " />
287
- </if>
288
- </choose>
289
- <text font-style="italic" variable="container-title" />
290
- </macro>
291
- <macro name="publisher">
292
- <group delimiter=": ">
293
- <text variable="publisher-place" />
294
- <text variable="publisher" />
295
- </group>
296
- </macro>
297
- <macro name="date">
298
- <date variable="issued">
299
- <date-part name="year" />
300
- </date>
301
- </macro>
302
- <macro name="day-month">
303
- <date variable="issued">
304
- <date-part name="month" />
305
- <date-part name="day" prefix=" " />
306
- </date>
307
- </macro>
308
- <macro name="collection-title">
309
- <text variable="collection-title" />
310
- <text prefix=" " variable="collection-number" />
311
- </macro>
312
- <macro name="event">
313
- <group>
314
- <text suffix=" " term="presented at" />
315
- <text variable="event" />
316
- </group>
317
- </macro>
318
- <macro name="description">
319
- <group delimiter=". ">
320
- <text macro="interviewer" />
321
- <text text-case="capitalize-first" variable="medium" />
322
- </group>
323
- <choose>
324
- <if match="none" variable="title"> </if>
325
- <else-if type="thesis"> </else-if>
326
- <else>
327
- <text prefix=". " text-case="capitalize-first" variable="genre" />
328
- </else>
329
- </choose>
330
- </macro>
331
- <macro name="issue">
332
- <choose>
333
- <if type="article-journal">
334
- <text macro="day-month" prefix=" (" suffix=")" />
335
- </if>
336
- <else-if type="speech">
337
- <group delimiter=", " prefix=" ">
338
- <text macro="event" />
339
- <text macro="day-month" />
340
- <text variable="event-place" />
341
- </group>
342
- </else-if>
343
- <else-if match="any" type="article-newspaper article-magazine">
344
- <text macro="day-month" prefix=", " />
345
- </else-if>
346
- <else>
347
- <group delimiter=", " prefix=". ">
348
- <choose>
349
- <if type="thesis">
350
- <text text-case="capitalize-first" variable="genre" />
351
- </if>
352
- </choose>
353
- <text macro="publisher" />
354
- <text macro="day-month" />
355
- </group>
356
- </else>
357
- </choose>
358
- </macro>
359
- <macro name="headline">
360
- <choose>
361
- <if variable="contributor">
362
- <text macro="headline-contributor"/>
363
- </if>
364
- <else>
365
- <text macro="headline-author"/>
366
- </else>
367
- </choose>
368
- </macro>
369
- <citation
370
- disambiguate-add-givenname="true"
371
- disambiguate-add-names="true"
372
- disambiguate-add-year-suffix="true"
373
- et-al-min="4"
374
- et-al-subsequent-min="4"
375
- et-al-subsequent-use-first="1"
376
- et-al-use-first="1">
377
- <layout delimiter="; " prefix="(" suffix=")">
378
- <group delimiter=", ">
379
- <group delimiter=" ">
380
- <text macro="contributors-short" />
381
- <text macro="date" />
382
- </group>
383
- <text macro="point-locators" />
384
- </group>
385
- </layout>
386
- </citation>
387
- <bibliography
388
- entry-spacing="0"
389
- et-al-min="11"
390
- et-al-use-first="7"
391
- hanging-indent="true"
392
- subsequent-author-substitute="">
393
- <sort>
394
- <key macro="headline"
395
- names-min="1"
396
- names-use-first="1"
397
- sort="ascending"/>
398
- <key variable="issued"
399
- sort="descending"/>
400
- </sort>
401
- <layout>
402
- <text macro="headline" display="block"/>
403
- <group display="left-margin">
404
- <text macro="date" />
405
- </group>
406
- <group display="right-inline">
407
- <group suffix=".">
408
- <text macro="title" />
409
- <text macro="description" />
410
- <text macro="secondary-contributors" prefix=". " />
411
- <text macro="container-title" prefix=". " />
412
- <text macro="container-contributors" />
413
- <text macro="locators-chapter" />
414
- <text macro="edition" prefix=". " />
415
- <text macro="locators" />
416
- <text macro="collection-title" prefix=". " />
417
- <text macro="issue" />
418
- <text macro="locators-article" />
419
- <text macro="access" prefix=". " />
420
- </group>
421
- <group prefix=" (" suffix=")" delimiter=" ">
422
- <choose>
423
- <if variable="contributor">
424
- <text prefix="co-author among: " macro="contributors"/>
425
- </if>
426
- <else>
427
- <text prefix="co-authorship: " macro="contributors"/>
428
- </else>
429
- </choose>
430
- </group>
431
- </group>
432
- </layout>
433
- </bibliography>
434
- </style>