citeproc-ruby 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. data/README.md +78 -0
  2. data/lib/citeproc.rb +100 -0
  3. data/lib/citeproc/bibliography.rb +57 -0
  4. data/lib/citeproc/data.rb +149 -0
  5. data/lib/citeproc/date.rb +133 -0
  6. data/lib/citeproc/formatter.rb +38 -0
  7. data/lib/citeproc/item.rb +53 -0
  8. data/lib/citeproc/name.rb +284 -0
  9. data/lib/citeproc/processor.rb +166 -0
  10. data/lib/citeproc/selector.rb +61 -0
  11. data/lib/citeproc/variable.rb +82 -0
  12. data/lib/citeproc/version.rb +3 -0
  13. data/lib/csl/locale.rb +223 -0
  14. data/lib/csl/node.rb +72 -0
  15. data/lib/csl/nodes.rb +1364 -0
  16. data/lib/csl/renderer.rb +88 -0
  17. data/lib/csl/sort.rb +53 -0
  18. data/lib/csl/style.rb +110 -0
  19. data/lib/csl/term.rb +124 -0
  20. data/lib/extensions/core.rb +43 -0
  21. data/lib/plugins/filters/bibtex.rb +12 -0
  22. data/lib/plugins/formats/default.rb +134 -0
  23. data/lib/plugins/formats/html.rb +67 -0
  24. data/lib/support/attributes.rb +99 -0
  25. data/lib/support/tree.rb +80 -0
  26. data/resource/locale/locales-af-ZA.xml +304 -0
  27. data/resource/locale/locales-ar-AR.xml +304 -0
  28. data/resource/locale/locales-bg-BG.xml +304 -0
  29. data/resource/locale/locales-ca-AD.xml +304 -0
  30. data/resource/locale/locales-cs-CZ.xml +304 -0
  31. data/resource/locale/locales-da-DK.xml +304 -0
  32. data/resource/locale/locales-de-AT.xml +304 -0
  33. data/resource/locale/locales-de-CH.xml +304 -0
  34. data/resource/locale/locales-de-DE.xml +332 -0
  35. data/resource/locale/locales-el-GR.xml +303 -0
  36. data/resource/locale/locales-en-US.xml +313 -0
  37. data/resource/locale/locales-es-ES.xml +304 -0
  38. data/resource/locale/locales-et-EE.xml +304 -0
  39. data/resource/locale/locales-fr-FR.xml +304 -0
  40. data/resource/locale/locales-he-IL.xml +304 -0
  41. data/resource/locale/locales-hu-HU.xml +304 -0
  42. data/resource/locale/locales-is-IS.xml +304 -0
  43. data/resource/locale/locales-it-IT.xml +304 -0
  44. data/resource/locale/locales-ja-JP.xml +304 -0
  45. data/resource/locale/locales-kh-KH.xml +303 -0
  46. data/resource/locale/locales-ko-KR.xml +304 -0
  47. data/resource/locale/locales-mn-MN.xml +304 -0
  48. data/resource/locale/locales-nb-NO.xml +304 -0
  49. data/resource/locale/locales-nl-NL.xml +304 -0
  50. data/resource/locale/locales-nn-NO.xml +304 -0
  51. data/resource/locale/locales-pl-PL.xml +304 -0
  52. data/resource/locale/locales-pt-BR.xml +304 -0
  53. data/resource/locale/locales-pt-PT.xml +304 -0
  54. data/resource/locale/locales-ro-RO.xml +304 -0
  55. data/resource/locale/locales-ru-RU.xml +304 -0
  56. data/resource/locale/locales-sk-SK.xml +304 -0
  57. data/resource/locale/locales-sl-SI.xml +304 -0
  58. data/resource/locale/locales-sr-RS.xml +304 -0
  59. data/resource/locale/locales-sv-SE.xml +304 -0
  60. data/resource/locale/locales-th-TH.xml +304 -0
  61. data/resource/locale/locales-tr-TR.xml +304 -0
  62. data/resource/locale/locales-uk-UA.xml +304 -0
  63. data/resource/locale/locales-vi-VN.xml +304 -0
  64. data/resource/locale/locales-zh-CN.xml +304 -0
  65. data/resource/locale/locales-zh-TW.xml +304 -0
  66. data/resource/schema/csl-categories.rnc +39 -0
  67. data/resource/schema/csl-data.rnc +98 -0
  68. data/resource/schema/csl-terms.rnc +106 -0
  69. data/resource/schema/csl-types.rnc +39 -0
  70. data/resource/schema/csl-variables.rnc +182 -0
  71. data/resource/schema/csl.rnc +941 -0
  72. data/resource/style/acta-materialia-x.csl +128 -0
  73. data/resource/style/advanced-engineering-materials-x.csl +121 -0
  74. data/resource/style/ama.csl +185 -0
  75. data/resource/style/ama2-x.csl +179 -0
  76. data/resource/style/apa-x.csl +324 -0
  77. data/resource/style/apa.csl +254 -0
  78. data/resource/style/apsa-x.csl +163 -0
  79. data/resource/style/apsa.csl +176 -0
  80. data/resource/style/asa-x.csl +203 -0
  81. data/resource/style/asa.csl +216 -0
  82. data/resource/style/asm-journals-x.csl +131 -0
  83. data/resource/style/bibtex-x2.csl +175 -0
  84. data/resource/style/bluebook-demo-x.csl +392 -0
  85. data/resource/style/bluebook-demo.csl +942 -0
  86. data/resource/style/chicago-author-date-listing.csl +434 -0
  87. data/resource/style/chicago-author-date.csl +369 -0
  88. data/resource/style/chicago-fullnote-bibliography-bb.csl +928 -0
  89. data/resource/style/chicago-fullnote-bibliography.csl +695 -0
  90. data/resource/style/chicago-note-bibliography.csl +446 -0
  91. data/resource/style/chicago-note.csl +388 -0
  92. data/resource/style/greek-chicago-x.csl +1182 -0
  93. data/resource/style/harvard1-institution-italic.csl +190 -0
  94. data/resource/style/harvard1.csl +181 -0
  95. data/resource/style/ieee.csl +129 -0
  96. data/resource/style/mhra-x.csl +312 -0
  97. data/resource/style/mhra.csl +390 -0
  98. data/resource/style/mhra_note_without_bibliography-x.csl +330 -0
  99. data/resource/style/mhra_note_without_bibliography.csl +338 -0
  100. data/resource/style/mla-x.csl +178 -0
  101. data/resource/style/mla.csl +189 -0
  102. data/resource/style/nature-x.csl +81 -0
  103. data/resource/style/nature.csl +88 -0
  104. data/resource/style/nlm.csl +117 -0
  105. data/spec/citeproc/bibliography_spec.rb +45 -0
  106. data/spec/citeproc/citeproc_spec.rb +76 -0
  107. data/spec/citeproc/date_spec.rb +85 -0
  108. data/spec/citeproc/formatter_spec.rb +101 -0
  109. data/spec/citeproc/item_spec.rb +71 -0
  110. data/spec/citeproc/name_spec.rb +30 -0
  111. data/spec/citeproc/processor_spec.rb +61 -0
  112. data/spec/citeproc/selector_spec.rb +82 -0
  113. data/spec/citeproc/variable_spec.rb +69 -0
  114. data/spec/csl/locale_spec.rb +208 -0
  115. data/spec/csl/node_spec.rb +25 -0
  116. data/spec/csl/nodes_spec.rb +140 -0
  117. data/spec/csl/style_spec.rb +62 -0
  118. data/spec/csl/term_spec.rb +56 -0
  119. data/spec/fixtures/dates.yaml +80 -0
  120. data/spec/fixtures/names.yaml +115 -0
  121. data/spec/fixtures/nodes.yaml +245 -0
  122. data/spec/spec_helper.rb +18 -0
  123. data/spec/support/attributes_spec.rb +39 -0
  124. data/spec/support/tree_spec.rb +163 -0
  125. metadata +264 -0
@@ -0,0 +1,163 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0">
3
+ <info>
4
+ <title>American Political Science Association</title>
5
+ <id>http://www.zotero.org/styles/apsa</id>
6
+ <link href="http://www.zotero.org/styles/apsa" 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="political_science"/>
13
+ <updated>2008-11-22T17:18:47+00:00</updated>
14
+ <summary>The American Political Science Association style.</summary>
15
+ <link href="http://www.ipsonet.org/data/files/APSAStyleManual2006.pdf" rel="documentation"/>
16
+ </info>
17
+ <macro name="editor">
18
+ <names variable="editor" delimiter=", ">
19
+ <label form="short" text-case="lowercase" suffix=". " strip-periods="true"/>
20
+ <name and="text" delimiter=", "/>
21
+ </names>
22
+ </macro>
23
+ <macro name="author">
24
+ <names variable="author">
25
+ <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
26
+ <label form="short" prefix=", " suffix="." text-case="lowercase" strip-periods="true"/>
27
+ <substitute>
28
+ <names variable="editor"/>
29
+ <text variable="title"/>
30
+ </substitute>
31
+ </names>
32
+ </macro>
33
+ <macro name="author-short">
34
+ <names variable="author">
35
+ <name form="short" and="text" delimiter=", " initialize-with=". "/>
36
+ <substitute>
37
+ <names variable="editor"/>
38
+ <names variable="translator"/>
39
+ <text variable="title"/>
40
+ </substitute>
41
+ </names>
42
+ </macro>
43
+ <macro name="access">
44
+ <group delimiter=" ">
45
+ <text value="Available at:"/>
46
+ <text variable="URL"/>
47
+ <group prefix="[" suffix="]">
48
+ <text term="accessed" text-case="capitalize-first" suffix=" "/>
49
+ <date variable="accessed">
50
+ <date-part name="month" suffix=" "/>
51
+ <date-part name="day" suffix=", "/>
52
+ <date-part name="year"/>
53
+ </date>
54
+ </group>
55
+ </group>
56
+ </macro>
57
+ <macro name="title">
58
+ <choose>
59
+ <if type="bill book graphic legal_case motion_picture report song" match="any">
60
+ <text variable="title" font-style="italic"/>
61
+ </if>
62
+ <else>
63
+ <text variable="title"/>
64
+ </else>
65
+ </choose>
66
+ </macro>
67
+ <macro name="publisher">
68
+ <group delimiter=": ">
69
+ <text variable="publisher-place"/>
70
+ <text variable="publisher"/>
71
+ </group>
72
+ </macro>
73
+ <macro name="year-date">
74
+ <group prefix=" ">
75
+ <choose>
76
+ <if variable="issued">
77
+ <date variable="issued">
78
+ <date-part name="year"/>
79
+ </date>
80
+ </if>
81
+ <else>
82
+ <text term="no date" form="short"/>
83
+ </else>
84
+ </choose>
85
+ </group>
86
+ </macro>
87
+ <macro name="edition">
88
+ <choose>
89
+ <if is-numeric="edition">
90
+ <group delimiter=" ">
91
+ <number variable="edition" form="ordinal"/>
92
+ <text term="edition" form="short" suffix="." strip-periods="true"/>
93
+ </group>
94
+ </if>
95
+ <else>
96
+ <text variable="edition" suffix="."/>
97
+ </else>
98
+ </choose>
99
+ </macro>
100
+ <citation et-al-min="4" et-al-use-first="1" et-al-subsequent-min="6" et-al-subsequent-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true" collapse="year">
101
+ <layout prefix="(" suffix=")" delimiter="; ">
102
+ <group delimiter=", ">
103
+ <group delimiter=" ">
104
+ <text macro="author-short"/>
105
+ <text macro="year-date"/>
106
+ </group>
107
+ <text variable="locator"/>
108
+ </group>
109
+ </layout>
110
+ </citation>
111
+ <bibliography hanging-indent="true" et-al-min="4" et-al-use-first="1">
112
+ <sort>
113
+ <key macro="author"/>
114
+ <key variable="title"/>
115
+ </sort>
116
+ <layout>
117
+ <text macro="author" suffix="."/>
118
+ <date variable="issued" prefix=" " suffix=".">
119
+ <date-part name="year"/>
120
+ </date>
121
+ <choose>
122
+ <if type="bill book graphic legal_case motion_picture report song" match="any">
123
+ <group prefix=" " delimiter=" ">
124
+ <text macro="title" suffix="."/>
125
+ <text macro="edition"/>
126
+ <text macro="editor" suffix="."/>
127
+ </group>
128
+ <text prefix=" " suffix="." macro="publisher"/>
129
+ </if>
130
+ <else-if type="chapter paper-conference" match="any">
131
+ <text macro="title" prefix=" " suffix="." quotes="true"/>
132
+ <group prefix=" " delimiter=" ">
133
+ <text term="in" text-case="capitalize-first"/>
134
+ <text variable="container-title" font-style="italic" suffix=","/>
135
+ <text variable="collection-title" suffix=","/>
136
+ <text macro="editor" suffix="."/>
137
+ <group suffix=".">
138
+ <text macro="publisher"/>
139
+ <group prefix=", ">
140
+ <text variable="page" prefix="p. "/>
141
+ </group>
142
+ </group>
143
+ </group>
144
+ </else-if>
145
+ <else>
146
+ <group prefix=" " delimiter=" " suffix=".">
147
+ <text macro="title" quotes="true"/>
148
+ <text macro="editor"/>
149
+ </group>
150
+ <group prefix=" " suffix=".">
151
+ <text variable="container-title" font-style="italic"/>
152
+ <group prefix=" ">
153
+ <text variable="volume"/>
154
+ <text variable="issue" prefix="(" suffix=")"/>
155
+ </group>
156
+ <text variable="page" prefix=": "/>
157
+ </group>
158
+ </else>
159
+ </choose>
160
+ <text prefix=" " macro="access" suffix="."/>
161
+ </layout>
162
+ </bibliography>
163
+ </style>
@@ -0,0 +1,176 @@
1
+ <style
2
+ xmlns="http://purl.org/net/xbiblio/csl"
3
+ class="in-text"
4
+ xml:lang="en">
5
+ <info>
6
+ <title>American Political Science Association</title>
7
+ <id>http://www.zotero.org/styles/apsa</id>
8
+ <link href="http://www.zotero.org/styles/apsa" />
9
+ <author>
10
+ <name>Julian Onions</name>
11
+ <email>julian.onions@gmail.com</email>
12
+ </author>
13
+ <category term="author-date" />
14
+ <category term="political_science" />
15
+ <updated />
16
+ <summary>The American Political Science Association style.</summary>
17
+ <link href="http://www.ipsonet.org/data/files/APSAStyleManual2006.pdf" rel="documentation" />
18
+ </info>
19
+ <macro name="editor">
20
+ <names delimiter=", " variable="editor">
21
+ <label form="short" suffix=". " text-case="lowercase" />
22
+ <name and="text" delimiter=", " />
23
+ </names>
24
+ </macro>
25
+ <macro name="author">
26
+ <names variable="author">
27
+ <name and="text" delimiter=", " delimiter-precedes-last="always" name-as-sort-order="first" sort-separator=", " />
28
+ <label form="short" prefix=", " suffix="." text-case="lowercase" />
29
+ <substitute>
30
+ <names variable="editor" />
31
+ <text variable="title" />
32
+ </substitute>
33
+ </names>
34
+ </macro>
35
+ <macro name="author-short">
36
+ <names variable="author">
37
+ <name and="text" delimiter=", " form="short" initialize-with=". " />
38
+ <substitute>
39
+ <names variable="editor" />
40
+ <names variable="translator" />
41
+ <text variable="title" />
42
+ </substitute>
43
+ </names>
44
+ </macro>
45
+ <macro name="access">
46
+ <group delimiter=" ">
47
+ <text value="Available at:" />
48
+ <text variable="URL" />
49
+ <group prefix="[" suffix="]">
50
+ <text suffix=" " term="accessed" text-case="capitalize-first" />
51
+ <date variable="accessed">
52
+ <date-part name="month" suffix=" " />
53
+ <date-part name="day" suffix=", " />
54
+ <date-part name="year" />
55
+ </date>
56
+ </group>
57
+ </group>
58
+ </macro>
59
+ <macro name="title">
60
+ <choose>
61
+ <if type="book">
62
+ <text font-style="italic" variable="title" />
63
+ </if>
64
+ <else>
65
+ <text variable="title" />
66
+ </else>
67
+ </choose>
68
+ </macro>
69
+ <macro name="publisher">
70
+ <group delimiter=": ">
71
+ <text variable="publisher-place" />
72
+ <text variable="publisher" />
73
+ </group>
74
+ </macro>
75
+ <macro name="year-date">
76
+ <group prefix=" ">
77
+ <choose>
78
+ <if variable="issued">
79
+ <date variable="issued">
80
+ <date-part name="year" />
81
+ </date>
82
+ </if>
83
+ <else>
84
+ <text term="no date" />
85
+ </else>
86
+ </choose>
87
+ </group>
88
+ </macro>
89
+ <macro name="edition">
90
+ <choose>
91
+ <if is-numeric="edition">
92
+ <group delimiter=" ">
93
+ <number form="ordinal" variable="edition" />
94
+ <text form="short" suffix="." term="edition" />
95
+ </group>
96
+ </if>
97
+ <else>
98
+ <text suffix="." variable="edition" />
99
+ </else>
100
+ </choose>
101
+ </macro>
102
+ <citation
103
+ collapse="year"
104
+ disambiguate-add-givenname="true"
105
+ disambiguate-add-names="true"
106
+ disambiguate-add-year-suffix="true"
107
+ et-al-min="4"
108
+ et-al-subsequent-min="6"
109
+ et-al-subsequent-use-first="1"
110
+ et-al-use-first="1">
111
+ <layout delimiter="; " prefix="(" suffix=")">
112
+ <group delimiter=", ">
113
+ <group delimiter=" ">
114
+ <text macro="author-short" />
115
+ <text macro="year-date" />
116
+ </group>
117
+ <text variable="locator" />
118
+ </group>
119
+ </layout>
120
+ </citation>
121
+ <bibliography
122
+ et-al-min="4"
123
+ et-al-use-first="1"
124
+ hanging-indent="true">
125
+ <sort>
126
+ <key macro="author" />
127
+ <key variable="title" />
128
+ </sort>
129
+ <layout>
130
+ <text macro="author" suffix="." />
131
+ <date prefix=" " suffix="." variable="issued">
132
+ <date-part name="year" />
133
+ </date>
134
+ <choose>
135
+ <if type="book">
136
+ <group delimiter=" " prefix=" ">
137
+ <text macro="title" suffix="." />
138
+ <text macro="edition" />
139
+ <text macro="editor" suffix="." />
140
+ </group>
141
+ <text macro="publisher" prefix=" " suffix="." />
142
+ </if>
143
+ <else-if type="chapter">
144
+ <text macro="title" prefix=" " quotes="true" suffix="." />
145
+ <group delimiter=" " prefix=" ">
146
+ <text term="in" text-case="capitalize-first" />
147
+ <text font-style="italic" suffix="," variable="container-title" />
148
+ <text suffix="," variable="collection-title" />
149
+ <text macro="editor" suffix="." />
150
+ <group suffix=".">
151
+ <text macro="publisher" />
152
+ <group prefix=", ">
153
+ <text prefix="p. " variable="page" />
154
+ </group>
155
+ </group>
156
+ </group>
157
+ </else-if>
158
+ <else>
159
+ <group delimiter=" " prefix=" " suffix=".">
160
+ <text macro="title" quotes="true" />
161
+ <text macro="editor" />
162
+ </group>
163
+ <group prefix=" " suffix=".">
164
+ <text font-style="italic" variable="container-title" />
165
+ <group prefix=" ">
166
+ <text variable="volume" />
167
+ <text prefix="(" suffix=")" variable="issue" />
168
+ </group>
169
+ <text prefix=": " variable="page" />
170
+ </group>
171
+ </else>
172
+ </choose>
173
+ <text macro="access" prefix=" " suffix="." />
174
+ </layout>
175
+ </bibliography>
176
+ </style>
@@ -0,0 +1,203 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0">
3
+ <info>
4
+ <title>American Sociological Association</title>
5
+ <id>http://www.zotero.org/styles/asa</id>
6
+ <link href="http://www.zotero.org/styles/asa" 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="sociology"/>
13
+ <updated>2008-10-20T16:32:11+00:00</updated>
14
+ <summary>The ASA style.</summary>
15
+ <link href="http://www.asanet.org/galleries/default-file/asaguidelinesnew.pdf" rel="documentation"/>
16
+ </info>
17
+ <macro name="editor">
18
+ <names variable="editor">
19
+ <label form="verb" text-case="lowercase" suffix=" "/>
20
+ <name and="text" delimiter=", "/>
21
+ </names>
22
+ </macro>
23
+ <macro name="series-editor">
24
+ <names variable="original-author">
25
+ <label form="short" text-case="capitalize-first" suffix=". " strip-periods="true"/>
26
+ <name and="text" delimiter=", "/>
27
+ </names>
28
+ </macro>
29
+ <macro name="anon">
30
+ <text term="anonymous" form="short" text-case="capitalize-first" strip-periods="true"/>
31
+ </macro>
32
+ <macro name="author">
33
+ <names variable="author">
34
+ <name and="text" name-as-sort-order="first" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
35
+ <label form="short" prefix=", " suffix="." text-case="lowercase" strip-periods="true"/>
36
+ <substitute>
37
+ <names variable="editor"/>
38
+ <names variable="translator"/>
39
+ <text macro="anon"/>
40
+ </substitute>
41
+ </names>
42
+ </macro>
43
+ <macro name="author-short">
44
+ <names variable="author">
45
+ <name form="short" and="text" delimiter=", "/>
46
+ <substitute>
47
+ <names variable="editor"/>
48
+ <names variable="translator"/>
49
+ <text macro="anon"/>
50
+ </substitute>
51
+ </names>
52
+ </macro>
53
+ <macro name="access">
54
+ <group>
55
+ <text variable="URL"/>
56
+ <group prefix=" (" suffix=")">
57
+ <text term="accessed" text-case="capitalize-first" suffix=" "/>
58
+ <date variable="accessed">
59
+ <date-part name="month" suffix=" "/>
60
+ <date-part name="day" suffix=", "/>
61
+ <date-part name="year"/>
62
+ </date>
63
+ </group>
64
+ </group>
65
+ </macro>
66
+ <macro name="title">
67
+ <choose>
68
+ <if type="thesis">
69
+ <text variable="title"/>
70
+ </if>
71
+ <else-if type="bill book graphic legal_case motion_picture report song" match="any">
72
+ <text variable="title" font-style="italic"/>
73
+ </else-if>
74
+ <else>
75
+ <text variable="title" quotes="true"/>
76
+ </else>
77
+ </choose>
78
+ </macro>
79
+ <macro name="publisher">
80
+ <group delimiter=": ">
81
+ <text variable="publisher-place"/>
82
+ <text variable="publisher"/>
83
+ </group>
84
+ </macro>
85
+ <macro name="year-date">
86
+ <choose>
87
+ <if variable="issued">
88
+ <date variable="issued">
89
+ <date-part name="year"/>
90
+ </date>
91
+ </if>
92
+ <else>
93
+ <text term="no date" form="short" strip-periods="true"/>
94
+ </else>
95
+ </choose>
96
+ </macro>
97
+ <macro name="day-month">
98
+ <date variable="issued">
99
+ <date-part name="month"/>
100
+ <date-part name="day" prefix=" "/>
101
+ </date>
102
+ </macro>
103
+ <macro name="pages">
104
+ <label variable="page" form="short" suffix=". " text-case="capitalize-first" strip-periods="true"/>
105
+ <text variable="page"/>
106
+ </macro>
107
+ <macro name="edition">
108
+ <choose>
109
+ <if is-numeric="edition">
110
+ <group delimiter=" ">
111
+ <number variable="edition" form="ordinal"/>
112
+ <text term="edition" form="short" suffix="." strip-periods="true"/>
113
+ </group>
114
+ </if>
115
+ <else>
116
+ <text variable="edition" suffix="."/>
117
+ </else>
118
+ </choose>
119
+ </macro>
120
+ <citation et-al-min="4" et-al-use-first="1" et-al-subsequent-min="3" et-al-subsequent-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true" collapse="year">
121
+ <layout prefix="(" suffix=")" delimiter="; ">
122
+ <group delimiter=":">
123
+ <group delimiter=" ">
124
+ <text macro="author-short"/>
125
+ <text macro="year-date"/>
126
+ </group>
127
+ <text variable="locator"/>
128
+ </group>
129
+ </layout>
130
+ </citation>
131
+ <bibliography hanging-indent="true" et-al-min="6" et-al-use-first="1">
132
+ <sort>
133
+ <key macro="author"/>
134
+ <key variable="title"/>
135
+ </sort>
136
+ <layout suffix=".">
137
+ <group delimiter=" ">
138
+ <text macro="author" suffix="."/>
139
+ <text macro="year-date" suffix="."/>
140
+ </group>
141
+ <choose>
142
+ <if type="article-newspaper article-magazine" match="any">
143
+ <group delimiter=" ">
144
+ <text macro="title" prefix=" " suffix="."/>
145
+ </group>
146
+ <group prefix=" " delimiter=", ">
147
+ <text variable="container-title" font-style="italic"/>
148
+ <text macro="day-month"/>
149
+ <text variable="edition"/>
150
+ <text variable="page"/>
151
+ </group>
152
+ </if>
153
+ <else-if type="thesis">
154
+ <text macro="title" prefix=" " suffix="." quotes="true"/>
155
+ <group prefix=" " delimiter=", ">
156
+ <text macro="edition"/>
157
+ <text macro="editor" suffix="."/>
158
+ <text variable="genre"/>
159
+ <text macro="publisher"/>
160
+ </group>
161
+ </else-if>
162
+ <else-if type="bill book graphic legal_case motion_picture report song" match="any">
163
+ <group delimiter=" ">
164
+ <text macro="title" prefix=" " suffix="."/>
165
+ <text macro="edition"/>
166
+ <text macro="editor" suffix="."/>
167
+ <text macro="publisher"/>
168
+ </group>
169
+ </else-if>
170
+ <else-if type="chapter paper-conference" match="any">
171
+ <group delimiter=" ">
172
+ <text macro="title" prefix=" " suffix="."/>
173
+ <group delimiter=", " suffix=".">
174
+ <group delimiter=" ">
175
+ <text macro="pages"/>
176
+ <text term="in" text-case="lowercase"/>
177
+ <text variable="container-title" font-style="italic"/>
178
+ </group>
179
+ <text variable="volume" prefix="vol. "/>
180
+ <text variable="collection-title" font-style="italic"/>
181
+ <text macro="editor"/>
182
+ </group>
183
+ <text macro="publisher"/>
184
+ </group>
185
+ </else-if>
186
+ <else>
187
+ <group suffix=".">
188
+ <text macro="title" prefix=" "/>
189
+ <text macro="editor" prefix=" "/>
190
+ </group>
191
+ <group prefix=" " suffix="." delimiter=" ">
192
+ <text variable="container-title" font-style="italic"/>
193
+ <group delimiter=":">
194
+ <text variable="volume"/>
195
+ <text variable="page"/>
196
+ </group>
197
+ </group>
198
+ </else>
199
+ </choose>
200
+ <text prefix=" " macro="access" suffix="."/>
201
+ </layout>
202
+ </bibliography>
203
+ </style>