git.iko.soy/typeable/pandoc
on master help sign in
Added material for citation tests.
c44ff4cJohn MacFarlane
tests/RunTests.hs+2
@@ -106,6 +106,7 @@ main = do
106 "latex-reader.latex" "latex-reader.native"
106 "latex-reader.latex" "latex-reader.native"
107 r11 <- runTest "native reader" ["-r", "native", "-w", "native", "-s"]
107 r11 <- runTest "native reader" ["-r", "native", "-w", "native", "-s"]
108 "testsuite.native" "testsuite.native"
108 "testsuite.native" "testsuite.native"
109+ r14 <- runTest "markdown reader (citations)" ["-r", "markdown", "-w", "plain", "--biblio", "biblio.bib", "--csl", "chicago-author-date.csl"] "markdown-citations.txt" "markdown-citations.plain"
109 r12s <- if runLhsTests
110 r12s <- if runLhsTests
110 then mapM runLhsWriterTest lhsWriterFormats
111 then mapM runLhsWriterTest lhsWriterFormats
111 else putStrLn "Skipping lhs writer tests because they presuppose highlighting support" >> return []
112 else putStrLn "Skipping lhs writer tests because they presuppose highlighting support" >> return []
@@ -119,6 +120,7 @@ main = do
119 , r9 -- html
120 , r9 -- html
120 , r10 -- latex
121 , r10 -- latex
121 , r11 -- native
122 , r11 -- native
123+ , r14 -- citations
122 ] ++ r12s ++ r13s
124 ] ++ r12s ++ r13s
123 if all id results
125 if all id results
124 then do
126 then do
tests/biblio.bibnew file+26
@@ -0,0 +1,26 @@
1+@Book{item1,
2+author="John Doe",
3+title="First Book",
4+year="2005",
5+address="Cambridge",
6+publisher="Cambridge University Press"
7+}
8+
9+@Article{item2,
10+author="John Doe",
11+title="Article",
12+year="2006",
13+journal="Journal of Generic Studies",
14+volume="6",
15+pages="33-34"
16+}
17+
18+@InCollection{item3,
19+author="John Doe and Jenny Roe",
20+title="Why Water Is Wet",
21+booktitle="Third Book",
22+editor="Sam Smith",
23+publisher="Oxford University PresS",
24+address="Oxford",
25+year="2007"
26+}
tests/chicago-author-date.cslnew file+369
@@ -0,0 +1,369 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" page-range-format="chicago">
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" 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</summary>
15+ <link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
16+ </info>
17+ <macro name="secondary-contributors">
18+ <choose>
19+ <if match="none" type="chapter">
20+ <group delimiter=". ">
21+ <choose>
22+ <if variable="author">
23+ <names variable="editor">
24+ <label form="verb-short" prefix=" " suffix=". " text-case="capitalize-first" />
25+ <name and="text" delimiter=", " />
26+ </names>
27+ </if>
28+ </choose>
29+ <choose>
30+ <if match="any" variable="author editor">
31+ <names variable="translator">
32+ <label form="verb-short" prefix=" " suffix=". " text-case="capitalize-first" />
33+ <name and="text" delimiter=", " />
34+ </names>
35+ </if>
36+ </choose>
37+ </group>
38+ </if>
39+ </choose>
40+ </macro>
41+ <macro name="container-contributors">
42+ <choose>
43+ <if type="chapter">
44+ <group delimiter=", " prefix=",">
45+ <choose>
46+ <if variable="author">
47+ <names variable="editor">
48+ <label form="verb-short" prefix=" " suffix=". " text-case="lowercase" />
49+ <name and="text" delimiter=", " />
50+ </names>
51+ </if>
52+ </choose>
53+ <choose>
54+ <if match="any" variable="author editor">
55+ <names variable="translator">
56+ <label form="verb-short" prefix=" " suffix=". " text-case="lowercase" />
57+ <name and="text" delimiter=", " />
58+ </names>
59+ </if>
60+ </choose>
61+ </group>
62+ </if>
63+ </choose>
64+ </macro>
65+ <macro name="anon">
66+ <choose>
67+ <if match="none" variable="author editor translator">
68+ <text form="short" term="anonymous" text-case="capitalize-first" />
69+ </if>
70+ </choose>
71+ </macro>
72+ <macro name="editor">
73+ <names variable="editor">
74+ <name and="text" delimiter=", " delimiter-precedes-last="always" name-as-sort-order="first" sort-separator=", " />
75+ <label form="short" prefix=", " suffix="." />
76+ </names>
77+ </macro>
78+ <macro name="translator">
79+ <names variable="translator">
80+ <name and="text" delimiter=", " delimiter-precedes-last="always" name-as-sort-order="first" sort-separator=", " />
81+ <label form="verb-short" prefix=", " suffix="." />
82+ </names>
83+ </macro>
84+ <macro name="recipient">
85+ <choose>
86+ <if type="personal_communication">
87+ <choose>
88+ <if variable="genre">
89+ <text text-case="capitalize-first" variable="genre" />
90+ </if>
91+ <else>
92+ <text term="letter" text-case="capitalize-first" />
93+ </else>
94+ </choose>
95+ </if>
96+ </choose>
97+ <names delimiter=", " variable="recipient">
98+ <label form="verb" prefix=" " suffix=" " text-case="lowercase" />
99+ <name and="text" delimiter=", " />
100+ </names>
101+ </macro>
102+ <macro name="contributors">
103+ <names variable="author">
104+ <name and="text" delimiter=", " delimiter-precedes-last="always" name-as-sort-order="first" sort-separator=", " />
105+ <label form="verb-short" prefix=", " suffix="." text-case="lowercase" />
106+ <substitute>
107+ <text macro="editor" />
108+ <text macro="translator" />
109+ </substitute>
110+ </names>
111+ <text macro="anon" />
112+ <text macro="recipient" />
113+ </macro>
114+ <macro name="contributors-short">
115+ <names variable="author">
116+ <name and="text" delimiter=", " form="short" />
117+ <substitute>
118+ <names variable="editor" />
119+ <names variable="translator" />
120+ </substitute>
121+ </names>
122+ <text macro="anon" />
123+ </macro>
124+ <macro name="interviewer">
125+ <names delimiter=", " variable="interviewer">
126+ <label form="verb" prefix=" " suffix=" " text-case="capitalize-first" />
127+ <name and="text" delimiter=", " />
128+ </names>
129+ </macro>
130+ <macro name="archive">
131+ <group delimiter=". ">
132+ <text text-case="capitalize-first" variable="archive_location" />
133+ <text variable="archive" />
134+ <text variable="archive-place" />
135+ </group>
136+ </macro>
137+ <macro name="access">
138+ <group delimiter=". ">
139+ <choose>
140+ <if match="any" type="graphic report">
141+ <text macro="archive" />
142+ </if>
143+ <else-if match="none" type="book thesis chapter article-journal article-newspaper article-magazine">
144+ <text macro="archive" />
145+ </else-if>
146+ </choose>
147+ <text prefix="doi:" variable="DOI" />
148+ <text variable="URL" />
149+ </group>
150+ </macro>
151+ <macro name="title">
152+ <choose>
153+ <if match="none" variable="title">
154+ <choose>
155+ <if match="none" type="personal_communication">
156+ <text text-case="capitalize-first" variable="genre" />
157+ </if>
158+ </choose>
159+ </if>
160+ <else-if type="book">
161+ <text font-style="italic" variable="title" />
162+ </else-if>
163+ <else>
164+ <text variable="title" />
165+ </else>
166+ </choose>
167+ </macro>
168+ <macro name="edition">
169+ <choose>
170+ <if match="any" type="book chapter">
171+ <choose>
172+ <if is-numeric="edition">
173+ <group delimiter=" ">
174+ <number form="ordinal" variable="edition" />
175+ <text form="short" suffix="." term="edition" />
176+ </group>
177+ </if>
178+ <else>
179+ <text suffix="." variable="edition" />
180+ </else>
181+ </choose>
182+ </if>
183+ </choose>
184+ </macro>
185+ <macro name="locators">
186+ <choose>
187+ <if type="article-journal">
188+ <text prefix=" " variable="volume" />
189+ <text prefix=", no. " variable="issue" />
190+ </if>
191+ <else-if type="book">
192+ <group delimiter=". " prefix=". ">
193+ <group>
194+ <text form="short" suffix=". " term="volume" text-case="capitalize-first" />
195+ <number form="numeric" variable="volume" />
196+ </group>
197+ <group>
198+ <number form="numeric" variable="number-of-volumes" />
199+ <text form="short" plural="true" prefix=" " suffix="." term="volume" />
200+ </group>
201+ </group>
202+ </else-if>
203+ </choose>
204+ </macro>
205+ <macro name="locators-chapter">
206+ <choose>
207+ <if type="chapter">
208+ <group prefix=", ">
209+ <text suffix=":" variable="volume" />
210+ <text variable="page" />
211+ </group>
212+ </if>
213+ </choose>
214+ </macro>
215+ <macro name="locators-article">
216+ <choose>
217+ <if type="article-newspaper">
218+ <group delimiter=", " prefix=", ">
219+ <group>
220+ <text suffix=" " variable="edition" />
221+ <text prefix=" " term="edition" />
222+ </group>
223+ <group>
224+ <text form="short" suffix=". " term="section" />
225+ <text variable="section" />
226+ </group>
227+ </group>
228+ </if>
229+ <else-if type="article-journal">
230+ <text prefix=": " variable="page" />
231+ </else-if>
232+ </choose>
233+ </macro>
234+ <macro name="point-locators">
235+ <group>
236+ <choose>
237+ <if locator="page" match="none">
238+ <label form="short" suffix=" " variable="locator" />
239+ </if>
240+ </choose>
241+ <text variable="locator" />
242+ </group>
243+ </macro>
244+ <macro name="container-prefix">
245+ <text term="in" text-case="capitalize-first" />
246+ </macro>
247+ <macro name="container-title">
248+ <choose>
249+ <if type="chapter">
250+ <text macro="container-prefix" suffix=" " />
251+ </if>
252+ </choose>
253+ <text font-style="italic" variable="container-title" />
254+ </macro>
255+ <macro name="publisher">
256+ <group delimiter=": ">
257+ <text variable="publisher-place" />
258+ <text variable="publisher" />
259+ </group>
260+ </macro>
261+ <macro name="date">
262+ <date variable="issued">
263+ <date-part name="year" />
264+ </date>
265+ </macro>
266+ <macro name="day-month">
267+ <date variable="issued">
268+ <date-part name="month" />
269+ <date-part name="day" prefix=" " />
270+ </date>
271+ </macro>
272+ <macro name="collection-title">
273+ <text variable="collection-title" />
274+ <text prefix=" " variable="collection-number" />
275+ </macro>
276+ <macro name="event">
277+ <group>
278+ <text suffix=" " term="presented at" />
279+ <text variable="event" />
280+ </group>
281+ </macro>
282+ <macro name="description">
283+ <group delimiter=". ">
284+ <text macro="interviewer" />
285+ <text text-case="capitalize-first" variable="medium" />
286+ </group>
287+ <choose>
288+ <if match="none" variable="title"> </if>
289+ <else-if type="thesis"> </else-if>
290+ <else>
291+ <text prefix=". " text-case="capitalize-first" variable="genre" />
292+ </else>
293+ </choose>
294+ </macro>
295+ <macro name="issue">
296+ <choose>
297+ <if type="article-journal">
298+ <text macro="day-month" prefix=" (" suffix=")" />
299+ </if>
300+ <else-if type="speech">
301+ <group delimiter=", " prefix=" ">
302+ <text macro="event" />
303+ <text macro="day-month" />
304+ <text variable="event-place" />
305+ </group>
306+ </else-if>
307+ <else-if match="any" type="article-newspaper article-magazine">
308+ <text macro="day-month" prefix=", " />
309+ </else-if>
310+ <else>
311+ <group delimiter=", " prefix=". ">
312+ <choose>
313+ <if type="thesis">
314+ <text text-case="capitalize-first" variable="genre" />
315+ </if>
316+ </choose>
317+ <text macro="publisher" />
318+ <text macro="day-month" />
319+ </group>
320+ </else>
321+ </choose>
322+ </macro>
323+ <citation
324+ disambiguate-add-givenname="true"
325+ disambiguate-add-names="true"
326+ disambiguate-add-year-suffix="true"
327+ et-al-min="4"
328+ et-al-subsequent-min="4"
329+ et-al-subsequent-use-first="1"
330+ et-al-use-first="1">
331+ <layout delimiter="; " prefix="(" suffix=")">
332+ <group delimiter=", ">
333+ <group delimiter=" ">
334+ <text macro="contributors-short" />
335+ <text macro="date" />
336+ </group>
337+ <text macro="point-locators" />
338+ </group>
339+ </layout>
340+ </citation>
341+ <bibliography
342+ entry-spacing="0"
343+ et-al-min="11"
344+ et-al-use-first="7"
345+ hanging-indent="true"
346+ subsequent-author-substitute="---">
347+ <sort>
348+ <key macro="contributors" />
349+ <key variable="issued" />
350+ <key variable="title" />
351+ </sort>
352+ <layout suffix=".">
353+ <text macro="contributors" suffix=". " />
354+ <text macro="date" suffix=". " />
355+ <text macro="title" />
356+ <text macro="description" />
357+ <text macro="secondary-contributors" prefix=". " />
358+ <text macro="container-title" prefix=". " />
359+ <text macro="container-contributors" />
360+ <text macro="locators-chapter" />
361+ <text macro="edition" prefix=". " />
362+ <text macro="locators" />
363+ <text macro="collection-title" prefix=". " />
364+ <text macro="issue" />
365+ <text macro="locators-article" />
366+ <text macro="access" prefix=". " />
367+ </layout>
368+ </bibliography>
369+</style>
tests/ieee.cslnew file+129
@@ -0,0 +1,129 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<style xmlns="http://purl.org/net/xbiblio/csl" class="numeric" version="1.0">
3+ <info>
4+ <title>IEEE</title>
5+ <id>http://www.zotero.org/styles/ieee</id>
6+ <link href="http://www.zotero.org/styles/ieee" rel="self"/>
7+ <author>
8+ <name>Michael Berkowitz</name>
9+ <email>mberkowi@gmu.edu</email>
10+ </author>
11+ <contributor>
12+ <name>Julian Onions</name>
13+ <email>julian.onions@gmail.com</email>
14+ </contributor>
15+ <contributor>
16+ <name>Rintze Zelle</name>
17+ <uri>http://forums.zotero.org/account/831/</uri>
18+ </contributor>
19+ <category field="engineering"/>
20+ <category field="generic-base"/>
21+ <category citation-format="numeric"/>
22+ <updated>2010-02-06T06:35:40+00:00</updated>
23+ <link href="http://www.ieee.org/portal/cms_docs_iportals/iportals/publications/authors/transjnl/stylemanual.pdf" rel="documentation"/>
24+ </info>
25+ <macro name="author">
26+ <names variable="author">
27+ <name initialize-with="." delimiter=", " and="text"/>
28+ <label form="short" prefix=", " text-case="capitalize-first" suffix="." strip-periods="true"/>
29+ <substitute>
30+ <names variable="editor"/>
31+ <names variable="translator"/>
32+ </substitute>
33+ </names>
34+ </macro>
35+ <macro name="editor">
36+ <names variable="editor">
37+ <name initialize-with="." delimiter=", " and="text" name-as-sort-order="all"/>
38+ <label form="short" prefix=", " text-case="capitalize-first" suffix="." strip-periods="true"/>
39+ </names>
40+ </macro>
41+ <macro name="title">
42+ <choose>
43+ <if type="bill book graphic legal_case motion_picture report song" match="any">
44+ <text variable="title" font-style="italic"/>
45+ </if>
46+ <else>
47+ <text variable="title" quotes="true"/>
48+ </else>
49+ </choose>
50+ </macro>
51+ <macro name="publisher">
52+ <text variable="publisher-place" suffix=": " prefix=" "/>
53+ <text variable="publisher" suffix=", "/>
54+ <date variable="issued">
55+ <date-part name="year"/>
56+ </date>
57+ </macro>
58+ <macro name="access">
59+ <text variable="URL"/>
60+ </macro>
61+ <macro name="page">
62+ <group>
63+ <label variable="page" form="short" suffix=". " strip-periods="true"/>
64+ <text variable="page"/>
65+ </group>
66+ </macro>
67+ <citation et-al-min="3" et-al-use-first="1" collapse="citation-number">
68+ <sort>
69+ <key variable="citation-number"/>
70+ </sort>
71+ <layout delimiter=",">
72+ <text variable="citation-number" prefix="[" suffix="]"/>
73+ </layout>
74+ </citation>
75+ <bibliography entry-spacing="0" second-field-align="flush">
76+ <layout suffix=".">
77+ <text variable="citation-number" prefix="[" suffix="]"/>
78+ <text macro="author" prefix=" " suffix=", "/>
79+ <choose>
80+ <if type="bill book graphic legal_case motion_picture report song" match="any">
81+ <group delimiter=", ">
82+ <text macro="title"/>
83+ <text macro="publisher"/>
84+ </group>
85+ </if>
86+ <else-if type="chapter paper-conference" match="any">
87+ <group delimiter=", ">
88+ <text macro="title"/>
89+ <text variable="container-title" font-style="italic"/>
90+ <text macro="editor"/>
91+ <text macro="publisher"/>
92+ <text macro="page"/>
93+ </group>
94+ </else-if>
95+ <else-if type="patent">
96+ <text macro="title" suffix=", "/>
97+ <text variable="number" prefix="U.S. Patent "/>
98+ <date variable="issued" prefix=", ">
99+ <date-part name="month" suffix=" "/>
100+ <date-part name="day" suffix=", "/>
101+ <date-part name="year"/>
102+ </date>
103+ </else-if>
104+ <else-if type="thesis">
105+ <group delimiter=", ">
106+ <text macro="title"/>
107+ <text variable="genre"/>
108+ <text variable="publisher"/>
109+ <date variable="issued">
110+ <date-part name="year"/>
111+ </date>
112+ </group>
113+ </else-if>
114+ <else>
115+ <group delimiter=", ">
116+ <text macro="title"/>
117+ <text variable="container-title" font-style="italic"/>
118+ <text variable="volume" prefix=" vol. "/>
119+ <date variable="issued">
120+ <date-part name="month" form="short" suffix=". " strip-periods="true"/>
121+ <date-part name="year"/>
122+ </date>
123+ <text macro="page"/>
124+ </group>
125+ </else>
126+ </choose>
127+ </layout>
128+ </bibliography>
129+</style>
tests/markdown-citations.plainnew file+36
@@ -0,0 +1,36 @@
1+Pandoc with citeproc-hs
2+=======================
3+
4+[@nonexistent]
5+
6+@nonexistent
7+
8+Doe (2005) says blah. Doe (2005, 30) says blah. Doe (2005; 2006,
9+30; see also Doe and Roe 2007) says blah.
10+
11+In a note.[^1] A citation group
12+(see Doe 2005, 34-35; also Doe and Roe 2007, chap. 3). Another one
13+(see Doe 2005, 34-35). And another one in a note.[^2]
14+
15+Now some modifiers.[^3]
16+
17+References
18+==========
19+
20+Doe, John. 2005. First Book. Cambridge: Cambridge University Press.
21+
22+---. 2006. Article. Journal of Generic Studies 6: 33-34.
23+
24+Doe, John, and Jenny Roe. 2007. Why Water Is Wet. Sam Smith Ed.
25+Third Book. Oxford: Oxford University Press.
26+
27+[^1]:
28+ A citation without locators [Doe and Roe (2007)].
29+
30+[^2]:
31+ Some citations (see Doe 2006, chap. 3; Doe and Roe 2007; Doe
32+ 2005).
33+
34+[^3]:
35+ Like a citation without author: (2005), and now Doe with a
36+ locator (2006, 44).
tests/markdown-citations.txtnew file+28
@@ -0,0 +1,28 @@
1+# Pandoc with citeproc-hs
2+
3+[@nonexistent]
4+
5+@nonexistent
6+
7+@item1 says blah.
8+@item1 [p. 30] says blah.
9+@item1 [-@item2, p. 30; see also @item3] says blah.
10+
11+In a note.[^1] A citation group [see
12+@item1, p. 34-35; also @item3, chap. 3]. Another one [see
13+@item1, p. 34-35]. And another one in a note.[^2]
14+
15+Now some modifiers.[^3]
16+
17+[^1]:
18+ A citation without locators [@item3].
19+
20+[^2]:
21+ Some citations [see @item2, chap. 3; @item3; @item1].
22+
23+[^3]:
24+ Like a citation without author: [-@item1], and now Doe with a
25+ locator [-@item2, p. 44].
26+
27+# References
28+
tests/mhra.cslnew file+390
@@ -0,0 +1,390 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0">
3+ <info>
4+ <title>Modern Humanities Research Association (Note with Bibliography)</title>
5+ <id>http://www.zotero.org/styles/mhra</id>
6+ <link href="http://www.zotero.org/styles/mhra" rel="self"/>
7+ <link href="http://www.mhra.org.uk/Publications/Books/StyleGuide/download.shtml" rel="documentation"/>
8+ <author>
9+ <name>Rintze Zelle</name>
10+ <uri>http://forums.zotero.org/account/831/</uri>
11+ </author>
12+ <contributor>
13+ <name>Sebastian Karcher</name>
14+ </contributor>
15+ <summary>MHRA format with full notes and bibliography</summary>
16+ <category field="generic-base"/>
17+ <category citation-format="note"/>
18+ <updated>2009-12-15T12:42:52+00:00</updated>
19+ </info>
20+ <locale xml:lang="en">
21+ <terms>
22+ <term name="et-al">and others</term>
23+ <term name="editor" form="verb-short">ed. by</term>
24+ <term name="edition" form="short">edn</term>
25+ <term name="translator" form="verb-short">trans. by</term>
26+ </terms>
27+ </locale>
28+ <macro name="author">
29+ <names variable="author">
30+ <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
31+ <label form="short" prefix=", " suffix="." strip-periods="true"/>
32+ <substitute>
33+ <names variable="editor"/>
34+ <names variable="translator"/>
35+ <text macro="title-note"/>
36+ </substitute>
37+ </names>
38+ </macro>
39+ <macro name="contributors-note">
40+ <names variable="author">
41+ <name and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="never"/>
42+ </names>
43+ <text macro="recipient-note"/>
44+ </macro>
45+ <macro name="title-note">
46+ <choose>
47+ <if type="bill book graphic legal_case motion_picture report song" match="any">
48+ <text variable="title" font-style="italic"/>
49+ </if>
50+ <else>
51+ <text variable="title" prefix="‘" suffix="’"/>
52+ </else>
53+ </choose>
54+ </macro>
55+ <macro name="editor-translator">
56+ <group delimiter=", ">
57+ <names variable="editor" delimiter=", ">
58+ <label form="verb-short" text-case="lowercase" suffix=" " strip-periods="true"/>
59+ <name and="text" delimiter=", " delimiter-precedes-last="never"/>
60+ </names>
61+ <choose>
62+ <if variable="author editor" match="any">
63+ <names variable="translator" delimiter=", ">
64+ <label form="verb-short" text-case="lowercase" suffix=" " strip-periods="true"/>
65+ <name and="text" delimiter=", " delimiter-precedes-last="never"/>
66+ </names>
67+ </if>
68+ </choose>
69+ </group>
70+ </macro>
71+ <macro name="collection-title">
72+ <text variable="collection-title"/>
73+ <text variable="collection-number" prefix=", "/>
74+ </macro>
75+ <macro name="locators-note">
76+ <choose>
77+ <if type="article-journal">
78+ <text variable="volume"/>
79+ </if>
80+ <else-if type="bill book graphic legal_case motion_picture report song chapter paper-conference" match="any">
81+ <group delimiter=", ">
82+ <text macro="edition-note"/>
83+ <group>
84+ <number variable="number-of-volumes" form="numeric"/>
85+ <text term="volume" form="short" prefix=" " plural="true" strip-periods="true"/>
86+ </group>
87+ </group>
88+ </else-if>
89+ </choose>
90+ </macro>
91+ <macro name="volume">
92+ <choose>
93+ <if type="article-journal">
94+ <text variable="volume"/>
95+ </if>
96+ <else-if type="bill book graphic legal_case motion_picture report song chapter paper-conference" match="any">
97+ <group delimiter=", ">
98+ <text macro="edition-note"/>
99+ <group>
100+ <number variable="number-of-volumes" form="numeric"/>
101+ <text term="volume" form="short" prefix=" " plural="true" strip-periods="true"/>
102+ </group>
103+ </group>
104+ </else-if>
105+ </choose>
106+ </macro>
107+ <macro name="issue-note">
108+ <choose>
109+ <if type="article-journal">
110+ <choose>
111+ <if variable="volume">
112+ <text macro="issued" prefix=" (" suffix=")"/>
113+ </if>
114+ <else>
115+ <text macro="issued" prefix=", "/>
116+ </else>
117+ </choose>
118+ </if>
119+ <else-if variable="publisher-place publisher" match="any">
120+ <group prefix=" (" suffix=")" delimiter=", ">
121+ <group delimiter=" ">
122+ <choose>
123+ <if variable="title" match="none"/>
124+ <else-if type="thesis speech" match="any">
125+ <text variable="genre" prefix="unpublished "/>
126+ </else-if>
127+ </choose>
128+ <text macro="event"/>
129+ </group>
130+ <text macro="publisher"/>
131+ <text macro="issued"/>
132+ </group>
133+ </else-if>
134+ <else>
135+ <text macro="issued" prefix=", "/>
136+ </else>
137+ </choose>
138+ </macro>
139+ <macro name="locators-specific-note">
140+ <choose>
141+ <if type="bill book graphic legal_case motion_picture report song chapter paper-conference" match="any">
142+ <choose>
143+ <if is-numeric="volume">
144+ <number variable="volume" form="roman" font-variant="small-caps"/>
145+ </if>
146+ </choose>
147+ </if>
148+ </choose>
149+ </macro>
150+ <macro name="container-title-note">
151+ <choose>
152+ <if type="chapter paper-conference" match="any">
153+ <text term="in" text-case="lowercase" suffix=" "/>
154+ </if>
155+ </choose>
156+ <text variable="container-title" font-style="italic"/>
157+ </macro>
158+ <macro name="edition-note">
159+ <choose>
160+ <if type="bill book graphic legal_case motion_picture report song chapter paper-conference" match="any">
161+ <choose>
162+ <if is-numeric="edition">
163+ <group delimiter=" ">
164+ <number variable="edition" form="ordinal"/>
165+ <text term="edition" form="short" strip-periods="true"/>
166+ </group>
167+ </if>
168+ <else>
169+ <text variable="edition"/>
170+ </else>
171+ </choose>
172+ </if>
173+ </choose>
174+ </macro>
175+ <macro name="editor-note">
176+ <names variable="editor">
177+ <name and="text" sort-separator=", " delimiter=", "/>
178+ <label form="short" prefix=", " suffix="." strip-periods="true"/>
179+ </names>
180+ </macro>
181+ <macro name="translator-note">
182+ <names variable="translator">
183+ <name and="text" sort-separator=", " delimiter=", "/>
184+ <label form="verb-short" prefix=", " suffix="." strip-periods="true"/>
185+ </names>
186+ </macro>
187+ <macro name="recipient-note">
188+ <names variable="recipient" delimiter=", ">
189+ <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
190+ <name and="text" delimiter=", "/>
191+ </names>
192+ </macro>
193+ <macro name="recipient-short">
194+ <names variable="recipient">
195+ <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
196+ <name form="short" and="text" delimiter=", "/>
197+ </names>
198+ </macro>
199+ <macro name="contributors-short">
200+ <names variable="author">
201+ <name form="short" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="never"/>
202+ <substitute>
203+ <names variable="editor"/>
204+ <names variable="translator"/>
205+ </substitute>
206+ </names>
207+ <text macro="recipient-short"/>
208+ </macro>
209+ <macro name="interviewer-note">
210+ <names variable="interviewer" delimiter=", ">
211+ <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
212+ <name and="text" delimiter=", "/>
213+ </names>
214+ </macro>
215+ <macro name="locators-newspaper">
216+ <choose>
217+ <if type="article-newspaper">
218+ <group delimiter=", ">
219+ <group>
220+ <text variable="edition" suffix=" "/>
221+ <text term="edition" prefix=" "/>
222+ </group>
223+ <group>
224+ <text term="section" suffix=" "/>
225+ <text variable="section"/>
226+ </group>
227+ </group>
228+ </if>
229+ </choose>
230+ </macro>
231+ <macro name="event">
232+ <group>
233+ <text term="presented at" suffix=" "/>
234+ <text variable="event"/>
235+ </group>
236+ </macro>
237+ <macro name="publisher">
238+ <group delimiter=": ">
239+ <text variable="publisher-place"/>
240+ <text variable="publisher"/>
241+ </group>
242+ </macro>
243+ <macro name="issued">
244+ <choose>
245+ <if type="graphic report article-newspaper" match="any">
246+ <date variable="issued">
247+ <date-part name="day" suffix=" "/>
248+ <date-part name="month" suffix=" "/>
249+ <date-part name="year"/>
250+ </date>
251+ </if>
252+ <else-if type="bill book graphic legal_case motion_picture report song thesis chapter paper-conference" match="any">
253+ <date variable="issued">
254+ <date-part name="year"/>
255+ </date>
256+ </else-if>
257+ <else>
258+ <date variable="issued">
259+ <date-part name="year"/>
260+ </date>
261+ </else>
262+ </choose>
263+ </macro>
264+ <macro name="pages">
265+ <choose>
266+ <if type="article-journal">
267+ <text variable="page" prefix=", "/>
268+ </if>
269+ <else>
270+ <choose>
271+ <if variable="volume">
272+ <text variable="page" prefix=", "/>
273+ </if>
274+ <else>
275+ <label variable="page" form="short" prefix=", " suffix=" "/>
276+ <text variable="page"/>
277+ </else>
278+ </choose>
279+ </else>
280+ </choose>
281+ </macro>
282+ <macro name="point-locators">
283+ <text macro="pages"/>
284+ <choose>
285+ <if variable="page">
286+ <group prefix=" (" suffix=")">
287+ <label variable="locator" form="short" suffix=" "/>
288+ <text variable="locator"/>
289+ </group>
290+ </if>
291+ <else>
292+ <label variable="locator" form="short" prefix=", " suffix=" "/>
293+ <text variable="locator"/>
294+ </else>
295+ </choose>
296+ </macro>
297+ <macro name="archive-note">
298+ <group delimiter=", ">
299+ <text variable="archive_location"/>
300+ <text variable="archive"/>
301+ <text variable="archive-place"/>
302+ </group>
303+ </macro>
304+ <macro name="access-note">
305+ <group delimiter=", ">
306+ <choose>
307+ <if type="graphic report" match="any">
308+ <text macro="archive-note" prefix=", "/>
309+ </if>
310+ <else-if type="bill book graphic legal_case motion_picture report song article-journal article-magazine article-newspaper thesis chapter paper-conference" match="none">
311+ <text macro="archive-note" prefix=", "/>
312+ </else-if>
313+ </choose>
314+ </group>
315+ <choose>
316+ <if variable="DOI">
317+ <text variable="DOI" prefix=" &lt;doi:" suffix="&gt;"/>
318+ </if>
319+ <else>
320+ <text variable="URL" prefix=" &lt;" suffix="&gt;"/>
321+ <choose>
322+ <if variable="accessed">
323+ <group prefix=" [" suffix="]">
324+ <text term="accessed" text-case="lowercase"/>
325+ <date variable="accessed">
326+ <date-part name="day" prefix=" "/>
327+ <date-part name="month" prefix=" "/>
328+ <date-part name="year" prefix=" "/>
329+ </date>
330+ </group>
331+ </if>
332+ </choose>
333+ </else>
334+ </choose>
335+ </macro>
336+ <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" disambiguate-add-givenname="true" givenname-disambiguation-rule="by-cite">
337+ <layout prefix="" suffix="." delimiter="; ">
338+ <choose>
339+ <if position="subsequent">
340+ <group delimiter=", ">
341+ <text macro="contributors-short"/>
342+ <choose>
343+ <if disambiguate="true">
344+ <text variable="title" form="short"/>
345+ </if>
346+ </choose>
347+ </group>
348+ <text macro="locators-specific-note" prefix=", "/>
349+ <text macro="point-locators"/>
350+ </if>
351+ <else>
352+ <group delimiter=", ">
353+ <text macro="contributors-note"/>
354+ <text macro="title-note"/>
355+ <text macro="container-title-note"/>
356+ <text macro="editor-translator"/>
357+ <text macro="collection-title"/>
358+ <text macro="locators-note"/>
359+ </group>
360+ <text macro="issue-note"/>
361+ <text macro="locators-specific-note" prefix=", "/>
362+ <text macro="locators-newspaper" prefix=", "/>
363+ <text macro="point-locators"/>
364+ <text macro="access-note"/>
365+ </else>
366+ </choose>
367+ </layout>
368+ </citation>
369+ <bibliography hanging-indent="true" et-al-min="6" et-al-use-first="6" subsequent-author-substitute="---">
370+ <sort>
371+ <key macro="author"/>
372+ <key variable="title"/>
373+ </sort>
374+ <layout suffix=".">
375+ <group delimiter=", ">
376+ <text macro="author"/>
377+ <text macro="title-note"/>
378+ <text macro="container-title-note"/>
379+ <text macro="editor-translator"/>
380+ <text macro="collection-title"/>
381+ <text macro="volume"/>
382+ </group>
383+ <text macro="issue-note"/>
384+ <text macro="locators-specific-note" prefix=", "/>
385+ <text macro="locators-newspaper" prefix=", "/>
386+ <text macro="pages"/>
387+ <text macro="access-note"/>
388+ </layout>
389+ </bibliography>
390+</style>