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,177 +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>BibTex generic citation style</title>
5
- <id>http://www.zotero.org/styles/bibtex</id>
6
- <link href="http://www.zotero.org/styles/bibtex" rel="self"/>
7
- <link href="http://www.bibtex.org/" rel="documentation"/>
8
- <author>
9
- <name>Markus Schaffner</name>
10
- </author>
11
- <contributor>
12
- <name>Richard Karnesky</name>
13
- <email>karnesky+zotero@gmail.com</email>
14
- <uri>http://arc.nucapt.northwestern.edu/Richard_Karnesky</uri>
15
- </contributor>
16
- <category field="generic-base"/>
17
- <updated>2008-10-05T10:04:29-07:00</updated>
18
- <rights>This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/</rights>
19
- </info>
20
- <macro name="zotero2bibtexType">
21
- <choose>
22
- <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
23
- <text value="book"/>
24
- </if>
25
- <else-if type="chapter paper-conference" match="any">
26
- <text value="inbook"/>
27
- </else-if>
28
- <else-if type="article article-journal article-magazine article-newspaper" match="any">
29
- <text value="article"/>
30
- </else-if>
31
- <else-if type="thesis" match="any">
32
- <text value="phdthesis"/>
33
- </else-if>
34
- <else-if type="manuscript" match="any">
35
- <text value="unpublished"/>
36
- </else-if>
37
- <else-if type="paper-conference" match="any">
38
- <text value="inproceedings"/>
39
- </else-if>
40
- <else-if type="report" match="any">
41
- <text value="techreport"/>
42
- </else-if>
43
- <else>
44
- <text value="misc"/>
45
- </else>
46
- </choose>
47
- </macro>
48
- <macro name="citeKey">
49
- <group delimiter="_">
50
- <text macro="author-short" text-case="lowercase"/>
51
- <text macro="issued-year"/>
52
- </group>
53
- </macro>
54
- <macro name="author-short">
55
- <names variable="author">
56
- <name form="short" delimiter="_" delimiter-precedes-last="always"/>
57
- <substitute>
58
- <names variable="editor"/>
59
- <names variable="translator"/>
60
- <choose>
61
- <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
62
- <text variable="title" form="short"/>
63
- </if>
64
- <else>
65
- <text variable="title" form="short"/>
66
- </else>
67
- </choose>
68
- </substitute>
69
- </names>
70
- </macro>
71
- <macro name="issued-year">
72
- <date variable="issued">
73
- <date-part name="year"/>
74
- </date>
75
- </macro>
76
- <macro name="issued-month">
77
- <date variable="issued">
78
- <date-part name="month" form="short" strip-periods="true"/>
79
- </date>
80
- </macro>
81
- <macro name="author">
82
- <names variable="author">
83
- <name sort-separator=", " delimiter=" and " delimiter-precedes-last="always" name-as-sort-order="all"/>
84
- <label form="long" text-case="capitalize-first"/>
85
- </names>
86
- </macro>
87
- <macro name="editor-translator">
88
- <names variable="editor translator" delimiter=", ">
89
- <name sort-separator=", " delimiter=" and " delimiter-precedes-last="always" name-as-sort-order="all"/>
90
- <label form="long" text-case="capitalize-first"/>
91
- </names>
92
- </macro>
93
- <macro name="title">
94
- <text variable="title"/>
95
- </macro>
96
- <macro name="number">
97
- <text variable="issue"/>
98
- <text variable="number"/>
99
- </macro>
100
- <macro name="container-title">
101
- <choose>
102
- <if type="chapter paper-conference" match="any">
103
- <text variable="container-title" prefix=" booktitle={" suffix="}"/>
104
- </if>
105
- <else>
106
- <text variable="container-title" prefix=" journal={" suffix="}"/>
107
- </else>
108
- </choose>
109
- </macro>
110
- <macro name="publisher">
111
- <choose>
112
- <if type="thesis">
113
- <text variable="publisher" prefix=" school={" suffix="}"/>
114
- </if>
115
- <else-if type="report">
116
- <text variable="publisher" prefix=" institution={" suffix="}"/>
117
- </else-if>
118
- <else>
119
- <text variable="publisher" prefix=" publisher={" suffix="}"/>
120
- </else>
121
- </choose>
122
- </macro>
123
- <macro name="pages">
124
- <text variable="page"/>
125
- </macro>
126
- <macro name="edition">
127
- <text variable="edition"/>
128
- </macro>
129
- <citation et-al-min="10" et-al-use-first="10" et-al-subsequent-min="10" et-al-subsequent-use-first="10" disambiguate-add-year-suffix="true" disambiguate-add-names="false" disambiguate-add-givenname="false" collapse="year">
130
- <sort>
131
- <key macro="author"/>
132
- <key variable="issued"/>
133
- </sort>
134
- <layout delimiter="_">
135
- <text macro="citeKey"/>
136
- </layout>
137
- </citation>
138
- <bibliography hanging-indent="false" et-al-min="10" et-al-use-first="10">
139
- <sort>
140
- <key macro="author"/>
141
- <key variable="issued"/>
142
- </sort>
143
- <layout>
144
- <text macro="zotero2bibtexType" prefix=" @" suffix=""/>
145
- <group prefix="{" suffix="}" delimiter=", ">
146
- <text macro="citeKey"/>
147
- <text variable="publisher-place" prefix=" place={" suffix="}"/>
148
- <!--Fix This-->
149
- <text variable="chapter-number" prefix=" chapter={" suffix="}"/>
150
- <!--Fix This-->
151
- <text macro="edition" prefix=" edition={" suffix="}"/>
152
- <!--Is this in CSL? <text variable="type" prefix=" type={" suffix="}" />-->
153
- <text variable="collection-title" prefix=" series={" suffix="}"/>
154
- <text macro="title" prefix=" title={" suffix="}"/>
155
- <text variable="volume" prefix=" volume={" suffix="}"/>
156
- <!--Not in CSL<text variable="rights" prefix=" rights={" suffix="}" />-->
157
- <text variable="ISBN" prefix=" ISBN={" suffix="}"/>
158
- <!--Not in CSL <text variable="ISSN" prefix=" ISSN={" suffix="}" />-->
159
- <!--Not in CSL <text variable="LCCN" prefix=" callNumber={" suffix="}" />-->
160
- <text variable="archive_location" prefix=" archiveLocation={" suffix="}"/>
161
- <text variable="URL" prefix=" url={" suffix="}"/>
162
- <text variable="DOI" prefix=" DOI={" suffix="}"/>
163
- <text variable="abstract" prefix=" abstractNote={" suffix="}"/>
164
- <text variable="note" prefix=" note={" suffix="}"/>
165
- <text macro="number" prefix=" number={" suffix="}"/>
166
- <text macro="container-title"/>
167
- <text macro="publisher"/>
168
- <text macro="author" prefix=" author={" suffix="}"/>
169
- <text macro="editor-translator" prefix=" editor={" suffix="}"/>
170
- <text macro="issued-year" prefix=" year={" suffix="}"/>
171
- <text macro="issued-month" prefix=" month={" suffix="}"/>
172
- <text macro="pages" prefix=" pages={" suffix="}"/>
173
- <text variable="collection-title" prefix=" collection={" suffix="}"/>
174
- </group>
175
- </layout>
176
- </bibliography>
177
- </style>
@@ -1,513 +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 (note, annotated bibliography)</title>
5
- <id>http://www.zotero.org/styles/chicago-annotated-bibliography</id>
6
- <link href="http://www.zotero.org/styles/chicago-annotated-bibliography" 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 with short notes and annotated bibliography</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="secondary-contributors">
27
- <choose>
28
- <if type="chapter paper-conference" match="none">
29
- <group delimiter=". ">
30
- <choose>
31
- <if variable="author">
32
- <names variable="editor" delimiter=". ">
33
- <label form="verb" text-case="capitalize-first" suffix=" "/>
34
- <name and="text" delimiter=", "/>
35
- </names>
36
- </if>
37
- </choose>
38
- <choose>
39
- <if variable="author editor" match="any">
40
- <names variable="translator" delimiter=". ">
41
- <label form="verb" text-case="capitalize-first" suffix=" "/>
42
- <name and="text" delimiter=", "/>
43
- </names>
44
- </if>
45
- </choose>
46
- </group>
47
- </if>
48
- </choose>
49
- </macro>
50
- <macro name="container-contributors">
51
- <choose>
52
- <if type="chapter paper-conference" match="any">
53
- <group delimiter=", ">
54
- <choose>
55
- <if variable="author">
56
- <names variable="editor" delimiter=", ">
57
- <label form="verb" text-case="lowercase" suffix=" "/>
58
- <name and="text" delimiter=", "/>
59
- </names>
60
- <choose>
61
- <if variable="container-author">
62
- <group>
63
- <names variable="container-author">
64
- <label form="verb-short" prefix=" " text-case="lowercase" suffix=" " strip-periods="true"/>
65
- <name and="text" delimiter=", "/>
66
- </names>
67
- </group>
68
- </if>
69
- </choose>
70
- </if>
71
- </choose>
72
- <choose>
73
- <if variable="author editor" match="any">
74
- <names variable="translator" delimiter=", ">
75
- <label form="verb" text-case="lowercase" suffix=" "/>
76
- <name and="text" delimiter=", "/>
77
- </names>
78
- </if>
79
- </choose>
80
- </group>
81
- </if>
82
- </choose>
83
- </macro>
84
- <macro name="editor">
85
- <names variable="editor">
86
- <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
87
- <label form="short" prefix=", " suffix="." strip-periods="true"/>
88
- </names>
89
- </macro>
90
- <macro name="translator">
91
- <names variable="translator">
92
- <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
93
- <label form="verb-short" prefix=", " suffix="." strip-periods="true"/>
94
- </names>
95
- </macro>
96
- <macro name="recipient-note">
97
- <names variable="recipient" delimiter=", ">
98
- <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
99
- <name and="text" delimiter=", "/>
100
- </names>
101
- </macro>
102
- <macro name="recipient">
103
- <choose>
104
- <if type="personal_communication">
105
- <choose>
106
- <if variable="genre">
107
- <text variable="genre" text-case="capitalize-first"/>
108
- </if>
109
- <else>
110
- <text term="letter" text-case="capitalize-first"/>
111
- </else>
112
- </choose>
113
- </if>
114
- </choose>
115
- <text macro="recipient-note" prefix=" "/>
116
- </macro>
117
- <macro name="contributors">
118
- <names variable="author">
119
- <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
120
- <substitute>
121
- <text macro="editor"/>
122
- <text macro="translator"/>
123
- </substitute>
124
- </names>
125
- <text macro="recipient" prefix=". "/>
126
- </macro>
127
- <macro name="recipient-short">
128
- <names variable="recipient">
129
- <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
130
- <name form="short" and="text" delimiter=", "/>
131
- </names>
132
- </macro>
133
- <macro name="contributors-short">
134
- <names variable="author">
135
- <name form="short" and="text" delimiter=", "/>
136
- <substitute>
137
- <names variable="editor"/>
138
- <names variable="translator"/>
139
- </substitute>
140
- </names>
141
- <text macro="recipient-short"/>
142
- </macro>
143
- <macro name="contributors-sort">
144
- <names variable="author">
145
- <name name-as-sort-order="all" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
146
- <label form="verb-short" prefix=", " suffix="." strip-periods="true"/>
147
- <substitute>
148
- <names variable="editor"/>
149
- <names variable="translator"/>
150
- </substitute>
151
- </names>
152
- </macro>
153
- <macro name="interviewer">
154
- <names variable="interviewer" delimiter=", ">
155
- <label form="verb" prefix=" " text-case="capitalize-first" suffix=" "/>
156
- <name and="text" delimiter=", "/>
157
- </names>
158
- </macro>
159
- <macro name="title">
160
- <choose>
161
- <if variable="title" match="none">
162
- <choose>
163
- <if type="personal_communication" match="none">
164
- <text variable="genre" text-case="capitalize-first"/>
165
- </if>
166
- </choose>
167
- </if>
168
- <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
169
- <text variable="title" font-style="italic" text-case="title"/>
170
- </else-if>
171
- <else>
172
- <text variable="title" quotes="true" text-case="title"/>
173
- </else>
174
- </choose>
175
- </macro>
176
- <macro name="title-short">
177
- <choose>
178
- <if variable="title" match="none">
179
- <choose>
180
- <if type="interview">
181
- <text term="interview" text-case="lowercase"/>
182
- </if>
183
- <else-if type="manuscript speech" match="any">
184
- <text variable="genre" form="short"/>
185
- </else-if>
186
- <else-if type="personal_communication">
187
- <text macro="issued"/>
188
- </else-if>
189
- </choose>
190
- </if>
191
- <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
192
- <text variable="title" form="short" font-style="italic" text-case="title"/>
193
- </else-if>
194
- <else>
195
- <text variable="title" form="short" quotes="true" text-case="title"/>
196
- </else>
197
- </choose>
198
- </macro>
199
- <macro name="description">
200
- <group delimiter=", ">
201
- <group delimiter=". ">
202
- <text macro="interviewer"/>
203
- <text variable="medium" text-case="capitalize-first"/>
204
- </group>
205
- <choose>
206
- <if variable="title" match="none"/>
207
- <else-if type="thesis speech" match="any"/>
208
- <else>
209
- <text variable="genre" text-case="capitalize-first"/>
210
- </else>
211
- </choose>
212
- </group>
213
- </macro>
214
- <macro name="container-title">
215
- <choose>
216
- <if type="chapter paper-conference" match="any">
217
- <text term="in" text-case="capitalize-first" suffix=" "/>
218
- </if>
219
- </choose>
220
- <choose>
221
- <if type="legal_case" match="none">
222
- <text variable="container-title" text-case="title" font-style="italic"/>
223
- </if>
224
- </choose>
225
- </macro>
226
- <macro name="edition">
227
- <choose>
228
- <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
229
- <choose>
230
- <if is-numeric="edition">
231
- <group delimiter=" ">
232
- <number variable="edition" form="ordinal"/>
233
- <text term="edition" form="short" suffix="." strip-periods="true"/>
234
- </group>
235
- </if>
236
- <else>
237
- <text variable="edition" text-case="capitalize-first" suffix="."/>
238
- </else>
239
- </choose>
240
- </if>
241
- </choose>
242
- </macro>
243
- <macro name="collection-title">
244
- <text variable="collection-title" text-case="title"/>
245
- <text variable="collection-number" prefix=" "/>
246
- </macro>
247
- <macro name="locators">
248
- <choose>
249
- <if type="article-journal">
250
- <text variable="volume" prefix=" "/>
251
- <group prefix=", ">
252
- <text term="issue" form="short" suffix=". " strip-periods="true"/>
253
- <number variable="issue"/>
254
- </group>
255
- </if>
256
- <else-if type="legal_case">
257
- <text variable="volume" prefix=", "/>
258
- <text variable="container-title" prefix=" "/>
259
- <text variable="page" prefix=" "/>
260
- </else-if>
261
- <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
262
- <group prefix=". " delimiter=". ">
263
- <group>
264
- <text term="volume" form="short" text-case="capitalize-first" suffix=". " strip-periods="true"/>
265
- <number variable="volume" form="numeric"/>
266
- </group>
267
- <group>
268
- <number variable="number-of-volumes" form="numeric"/>
269
- <text term="volume" form="short" prefix=" " suffix="." plural="true" strip-periods="true"/>
270
- </group>
271
- <text macro="edition"/>
272
- </group>
273
- </else-if>
274
- <else-if type="chapter paper-conference" match="any">
275
- <group prefix=". " delimiter=". ">
276
- <choose>
277
- <if variable="page" match="none">
278
- <group>
279
- <text term="volume" form="short" text-case="capitalize-first" suffix=". " strip-periods="true"/>
280
- <number variable="volume" form="numeric"/>
281
- </group>
282
- </if>
283
- </choose>
284
- <text macro="edition"/>
285
- </group>
286
- </else-if>
287
- </choose>
288
- </macro>
289
- <macro name="locators-newspaper">
290
- <choose>
291
- <if type="article-newspaper">
292
- <group delimiter=", ">
293
- <group>
294
- <text variable="edition" suffix=" "/>
295
- <text term="edition" prefix=" "/>
296
- </group>
297
- <group>
298
- <text term="section" form="short" suffix=". " strip-periods="true"/>
299
- <text variable="section"/>
300
- </group>
301
- </group>
302
- </if>
303
- </choose>
304
- </macro>
305
- <macro name="event">
306
- <group>
307
- <text term="presented at" suffix=" "/>
308
- <text variable="event"/>
309
- </group>
310
- </macro>
311
- <macro name="publisher">
312
- <group delimiter=": ">
313
- <text variable="publisher-place"/>
314
- <text variable="publisher"/>
315
- </group>
316
- </macro>
317
- <macro name="issued">
318
- <choose>
319
- <if variable="issued">
320
- <choose>
321
- <if type="graphic report" match="any">
322
- <date variable="issued">
323
- <date-part name="month" suffix=" "/>
324
- <date-part name="day" suffix=", "/>
325
- <date-part name="year"/>
326
- </date>
327
- </if>
328
- <else-if type="legal_case">
329
- <text variable="authority" suffix=" "/>
330
- <date variable="issued">
331
- <date-part name="year"/>
332
- </date>
333
- </else-if>
334
- <else-if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song thesis" match="any">
335
- <date variable="issued">
336
- <date-part name="year"/>
337
- </date>
338
- </else-if>
339
- <else>
340
- <date variable="issued">
341
- <date-part name="month" suffix=" "/>
342
- <date-part name="day" suffix=", "/>
343
- <date-part name="year"/>
344
- </date>
345
- </else>
346
- </choose>
347
- </if>
348
- <else>
349
- <text term="no date" form="short"/>
350
- </else>
351
- </choose>
352
- </macro>
353
- <macro name="locators-chapter">
354
- <choose>
355
- <if type="chapter paper-conference" match="any">
356
- <choose>
357
- <if variable="page">
358
- <text variable="volume" suffix=":"/>
359
- <text variable="page"/>
360
- </if>
361
- </choose>
362
- </if>
363
- </choose>
364
- </macro>
365
- <macro name="locators-journal">
366
- <choose>
367
- <if type="article-journal">
368
- <text variable="page" prefix=": "/>
369
- </if>
370
- </choose>
371
- </macro>
372
- <macro name="point-locators-subsequent">
373
- <choose>
374
- <if variable="locator">
375
- <choose>
376
- <if locator="page" match="none">
377
- <choose>
378
- <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
379
- <choose>
380
- <if variable="volume">
381
- <group>
382
- <text term="volume" form="short" text-case="lowercase" suffix=". " strip-periods="true"/>
383
- <number variable="volume" form="numeric"/>
384
- <label variable="locator" form="short" prefix=", " suffix=" "/>
385
- </group>
386
- </if>
387
- <else>
388
- <label variable="locator" form="short" suffix=" "/>
389
- </else>
390
- </choose>
391
- </if>
392
- </choose>
393
- </if>
394
- <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
395
- <number variable="volume" form="numeric" suffix=":"/>
396
- </else-if>
397
- </choose>
398
- <text variable="locator"/>
399
- </if>
400
- </choose>
401
- </macro>
402
- <macro name="archive">
403
- <group delimiter=". ">
404
- <text variable="archive_location" text-case="capitalize-first"/>
405
- <text variable="archive"/>
406
- <text variable="archive-place"/>
407
- </group>
408
- </macro>
409
- <macro name="issue">
410
- <choose>
411
- <if type="article-journal legal_case" match="any">
412
- <text macro="issued" prefix=" (" suffix=")"/>
413
- </if>
414
- <else-if type="speech">
415
- <choose>
416
- <if variable="title" match="none"/>
417
- <else>
418
- <text variable="genre" text-case="capitalize-first" prefix=". "/>
419
- </else>
420
- </choose>
421
- <text macro="event" prefix=" "/>
422
- <text variable="event-place" prefix=", "/>
423
- <text macro="issued" prefix=", "/>
424
- </else-if>
425
- <else-if variable="publisher-place publisher" match="any">
426
- <group prefix=". " delimiter=", ">
427
- <choose>
428
- <if type="thesis">
429
- <text variable="genre" text-case="capitalize-first"/>
430
- </if>
431
- </choose>
432
- <text macro="publisher"/>
433
- <text macro="issued"/>
434
- </group>
435
- </else-if>
436
- <else>
437
- <text macro="issued" prefix=", "/>
438
- </else>
439
- </choose>
440
- </macro>
441
- <macro name="access">
442
- <group delimiter=". ">
443
- <choose>
444
- <if type="graphic report" match="any">
445
- <text macro="archive"/>
446
- </if>
447
- <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">
448
- <text macro="archive"/>
449
- </else-if>
450
- </choose>
451
- <choose>
452
- <if type="legal_case" match="none">
453
- <text variable="URL"/>
454
- </if>
455
- </choose>
456
- </group>
457
- </macro>
458
- <macro name="sort-key">
459
- <text macro="contributors-sort" suffix=" "/>
460
- <text variable="title" suffix=" "/>
461
- <text variable="genre"/>
462
- </macro>
463
- <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">
464
- <layout prefix="" suffix="." delimiter="; ">
465
- <choose>
466
- <if position="ibid-with-locator">
467
- <group delimiter=", ">
468
- <text term="ibid"/>
469
- <text macro="point-locators-subsequent"/>
470
- </group>
471
- </if>
472
- <else-if position="ibid">
473
- <text term="ibid"/>
474
- </else-if>
475
- <else>
476
- <group delimiter=", ">
477
- <text macro="contributors-short"/>
478
- <text macro="title-short"/>
479
- <text macro="point-locators-subsequent"/>
480
- </group>
481
- </else>
482
- </choose>
483
- </layout>
484
- </citation>
485
- <bibliography hanging-indent="true" et-al-min="11" et-al-use-first="7" subsequent-author-substitute="———" entry-spacing="0">
486
- <sort>
487
- <key macro="sort-key"/>
488
- <key variable="issued"/>
489
- </sort>
490
- <layout suffix=".">
491
- <group suffix=".">
492
- <group delimiter=". ">
493
- <text macro="contributors"/>
494
- <text macro="title"/>
495
- <text macro="description"/>
496
- <text macro="secondary-contributors"/>
497
- <group delimiter=", ">
498
- <text macro="container-title"/>
499
- <text macro="container-contributors"/>
500
- <text macro="locators-chapter"/>
501
- </group>
502
- </group>
503
- <text macro="locators"/>
504
- <text macro="collection-title" prefix=". "/>
505
- <text macro="issue"/>
506
- <text macro="locators-newspaper" prefix=", "/>
507
- <text macro="locators-journal"/>
508
- <text macro="access" prefix=". "/>
509
- </group>
510
- <text variable="note" display="block"/>
511
- </layout>
512
- </bibliography>
513
- </style>