aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2025-07-20 00:11:34 -0700
committerJohn MacFarlane <[email protected]>2025-07-20 00:12:15 -0700
commitf4eca1f3fb20b424f111f5623390471ba444cbf9 (patch)
tree7b2d84a6c7ae4aaf5b1213e5d3fb62a5e2d3d2e6
parent9893fe8c656fc164259fec59426705cee242a6e2 (diff)
Use latest dev citeproc and update the default CSL...
from the latest chicago-author-date.csl. (Note that this goes from the 17th to the 18th edition.) Update tests.
-rw-r--r--cabal.project4
-rw-r--r--data/default.csl4167
-rw-r--r--src/Text/Pandoc/Citeproc.hs6
-rw-r--r--src/Text/Pandoc/Readers/EndNote.hs2
-rw-r--r--test/command/10185.md2
-rw-r--r--test/command/6783.md2
-rw-r--r--test/command/6890.md22
-rw-r--r--test/command/6951.md2
-rw-r--r--test/command/7219.md2
-rw-r--r--test/command/7329.md4
-rw-r--r--test/command/8354.md2
-rw-r--r--test/command/9017.md3
-rw-r--r--test/command/9904.md4
-rw-r--r--test/command/citeproc-87.md4
-rw-r--r--test/command/pandoc-citeproc-118.md5
-rw-r--r--test/command/pandoc-citeproc-136.md2
-rw-r--r--test/command/pandoc-citeproc-14.md22
-rw-r--r--test/command/pandoc-citeproc-175.md4
-rw-r--r--test/command/pandoc-citeproc-25.md4
-rw-r--r--test/command/pandoc-citeproc-250.md4
-rw-r--r--test/command/pandoc-citeproc-301.md10
-rw-r--r--test/command/pandoc-citeproc-307.md2
-rw-r--r--test/command/pandoc-citeproc-320a.md14
-rw-r--r--test/command/pandoc-citeproc-325.md8
-rw-r--r--test/command/pandoc-citeproc-327.md2
-rw-r--r--test/command/pandoc-citeproc-371.md4
-rw-r--r--test/command/pandoc-citeproc-38.md6
-rw-r--r--test/command/pandoc-citeproc-401.md10
-rw-r--r--test/command/pandoc-citeproc-408.md6
-rw-r--r--test/command/pandoc-citeproc-416.md8
-rw-r--r--test/command/pandoc-citeproc-47.md8
-rw-r--r--test/command/pandoc-citeproc-51.md2
-rw-r--r--test/command/pandoc-citeproc-64.md8
-rw-r--r--test/command/pandoc-citeproc-65.md5
-rw-r--r--test/command/pandoc-citeproc-7.md4
-rw-r--r--test/command/pandoc-citeproc-70.md8
-rw-r--r--test/command/pandoc-citeproc-76.md10
-rw-r--r--test/command/pandoc-citeproc-87.md38
-rw-r--r--test/command/pandoc-citeproc-chicago-author-date.md8
-rw-r--r--test/command/pandoc-citeproc-no-author.md14
-rw-r--r--test/command/pandoc-citeproc-number-of-volumes.md4
41 files changed, 3867 insertions, 579 deletions
diff --git a/cabal.project b/cabal.project
index 708f2a847..c17d2bf0d 100644
--- a/cabal.project
+++ b/cabal.project
@@ -11,7 +11,7 @@ constraints: skylighting-format-blaze-html >= 0.1.1.3,
source-repository-package
type: git
- location: https://github.com/jgm/citeproc.git
- tag: 157c7815f06e4e6771740a4eb8df97568626a8fe
+ location: file:///Users/jgm/src/citeproc
+ tag: ca4affae538dc4c104bb2411eae8c3167ab3da24
-- TODO: release new skylighting-core, skylighting
diff --git a/data/default.csl b/data/default.csl
index ec1990082..8b344d44a 100644
--- a/data/default.csl
+++ b/data/default.csl
@@ -1,679 +1,3974 @@
<?xml version="1.0" encoding="utf-8"?>
-<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="display-and-sort" page-range-format="chicago">
+<style xmlns="http://purl.org/net/xbiblio/csl" and="text" class="in-text" demote-non-dropping-particle="display-and-sort" page-range-format="chicago-16" version="1.0">
+ <!-- This file was generated by the Style Variant Builder <https://github.com/citation-style-language/style-variant-builder>. To contribute changes, modify the template and regenerate variants. -->
<info>
- <title>Chicago Manual of Style 17th edition (author-date)</title>
+ <title>Chicago Manual of Style 18th edition (author-date)</title>
+ <title-short>CMOS (author-date)</title-short>
<id>http://www.zotero.org/styles/chicago-author-date</id>
<link href="http://www.zotero.org/styles/chicago-author-date" rel="self"/>
- <link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
+ <link href="http://www.zotero.org/styles/chicago-notes-bibliography" rel="template"/>
+ <link href="https://www.chicagomanualofstyle.org/" rel="documentation"/>
<author>
- <name>Julian Onions</name>
- <email>[email protected]</email>
- </author>
- <contributor>
- <name>Sebastian Karcher</name>
- </contributor>
- <contributor>
- <name>Richard Karnesky</name>
- <email>[email protected]</email>
- <uri>http://arc.nucapt.northwestern.edu/Richard_Karnesky</uri>
- </contributor>
- <contributor>
<name>Andrew Dunning</name>
- <email>[email protected]</email>
<uri>https://orcid.org/0000-0003-0464-5036</uri>
- </contributor>
- <contributor>
- <name>Matthew Roth</name>
- <email>[email protected]</email>
- <uri> https://orcid.org/0000-0001-7902-6331</uri>
- </contributor>
- <contributor>
- <name>Brenton M. Wiernik</name>
- </contributor>
+ </author>
<category citation-format="author-date"/>
+ <category field="anthropology"/>
+ <category field="communications"/>
<category field="generic-base"/>
- <summary>The author-date variant of the Chicago style</summary>
- <updated>2018-01-24T12:00:00+00:00</updated>
+ <category field="geography"/>
+ <category field="history"/>
+ <category field="humanities"/>
+ <category field="law"/>
+ <category field="linguistics"/>
+ <category field="literature"/>
+ <category field="philosophy"/>
+ <category field="political_science"/>
+ <category field="science"/>
+ <category field="social_science"/>
+ <category field="sociology"/>
+ <category field="theology"/>
+ <summary>Chicago-style source citations (with Bluebook for legal citations), author-date system</summary>
+ <updated>2025-05-19T00:00:00+00:00</updated>
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
</info>
<locale xml:lang="en">
<terms>
- <term name="editor" form="verb-short">ed.</term>
- <term name="container-author" form="verb">by</term>
- <term name="translator" form="verb-short">trans.</term>
- <term name="editortranslator" form="verb">edited and translated by</term>
- <term name="translator" form="short">trans.</term>
+ <!-- Chicago omits 'by' from `verb-short` forms; it abbreviates only the most common roles -->
+ <term name="advance-online-publication">ahead of print</term>
+ <term name="anonymous">unsigned</term>
+ <term form="verb-short" name="collection-editor">ed.</term>
+ <term form="short" name="collection-number">
+ <single>vol.</single>
+ <multiple>vols.</multiple>
+ </term>
+ <term form="verb-short" name="compiler">comp.</term>
+ <term form="verb-short" name="editor">ed.</term>
+ <term form="short" name="editor-translator">
+ <single>ed. and trans.</single>
+ <multiple>eds. and trans.</multiple>
+ </term>
+ <term form="short" name="editortranslator">
+ <single>ed. and trans.</single>
+ <multiple>eds. and trans.</multiple>
+ </term>
+ <term form="verb" name="editor-translator">edited and translated by</term>
+ <term form="verb" name="editortranslator">edited and translated by</term>
+ <term form="verb-short" name="editor-translator">ed. and trans.</term>
+ <term form="verb-short" name="editortranslator">ed. and trans.</term>
+ <term form="verb-short" name="illustrator">ill.</term>
+ <term form="short" name="legislation">Pub. L.</term>
+ <term form="short" name="line">
+ <single>line</single>
+ <multiple>lines</multiple>
+ </term>
+ <term name="manuscript">unpublished manuscript</term>
+ <term form="verb" name="narrator">read by</term>
+ <!-- both 'narrated by' (CMOS18 14.58) and 'read by' (CMOS18 14.164): taking the latter as it is in the section on recorded readings -->
+ <term name="original-work-published">originally published as</term>
+ <term form="short" name="paper-conference">paper</term>
+ <term name="review-of">review of the</term>
+ <term form="short" name="review-of">review of</term>
+ <term name="sub-verbo">under</term>
+ <term form="short" name="sub-verbo">under</term>
+ <term name="timestamp">at</term>
+ <term form="verb-short" name="translator">trans.</term>
</terms>
</locale>
- <locale xml:lang="pt-PT">
- <terms>
- <term name="accessed">acedido a</term>
- </terms>
- </locale>
- <locale xml:lang="pt">
- <terms>
- <term name="editor" form="verb">editado por</term>
- <term name="editor" form="verb-short">ed.</term>
- <term name="container-author" form="verb">por</term>
- <term name="translator" form="verb-short">traduzido por</term>
- <term name="translator" form="short">trad.</term>
- <term name="editortranslator" form="verb">editado e traduzido por</term>
- <term name="and">e</term>
- <term name="no date" form="long">s.d</term>
- <term name="no date" form="short">s.d.</term>
- <term name="in">em</term>
- <term name="at">em</term>
- <term name="by">por</term>
- </terms>
- </locale>
- <macro name="secondary-contributors">
+ <!-- Contents:
+
+ This file interprets Chicago using APA's four basic reference elements
+ (cf. CMOS18 14.2, 14.64, 14.161):
+
+ 1. Author (CMOS18 13.74-86)
+ 2. Date (author-date system only, CMOS18 13.102)
+ 3. Title and descriptions (CMOS18 13.87-101)
+ 3.1. Title
+ 3.2. Description
+ 3.3. Identifiers (edition, contributors, volume)
+ 4. Source
+ 4.1. Serial sources
+ 4.2. Monographic sources
+ 4.3. Series
+ 4.4. Event
+ 4.5. Publisher
+ 4.6. Date
+ 4.7. Locator (including page references)
+ 4.8. Medium
+ 4.9. Archival location
+ 4.10. URL or persistent identifier
+
+ Freeform annotations to bibliography entries:
+
+ 5. Notes
+
+ Chicago also provides parallel rules for legal references following
+ The Bluebook: A Uniform System of Citation (code shared with APA):
+
+ 6. Legal references
+ 6.1. Legal author
+ 6.2. Legal date
+ 6.3. Legal title
+ 6.4. Legal source
+ -->
+ <!-- In this file, macros suffixed `-bib` and `-note` are parallel versions
+ of the same features for the bibliography and notes, and all changes
+ must be applied to both. They should only contain differences of
+ punctuation (periods in bibliography, commas in notes) and capitalization,
+ except where the comments indicate structural changes. -->
+ <!-- Categories of CSL item types:
+
+ Serial
+ : article-journal article-magazine article-newspaper periodical post-weblog review review-book
+
+ Serial or Monographic
+ : interview paper-conference
+
+ Monographic with any of `collection-editor compiler editor editorial-director`.
+ A serial `paper-conference` is unpublished if it lacks any of `issue page supplement-number volume`.
+
+ Monographic
+ : article book broadcast chapter classic collection dataset document
+ entry entry-dictionary entry-encyclopedia event figure
+ graphic manuscript map motion_picture musical_score
+ pamphlet patent performance personal_communication post report
+ software song speech standard thesis webpage
+
+ Legal
+ : bill hearing legal_case legislation regulation treaty
+ -->
+ <!-- Variable labels -->
+ <macro name="label-chapter-number-capitalized">
+ <group delimiter=" ">
+ <choose>
+ <if is-numeric="chapter-number" type="song">
+ <text text-case="capitalize-first" value="track"/>
+ </if>
+ <else-if is-numeric="chapter-number">
+ <label form="short" text-case="capitalize-first" variable="chapter-number"/>
+ </else-if>
+ </choose>
+ <text text-case="capitalize-first" variable="chapter-number"/>
+ </group>
+ </macro>
+ <macro name="label-collection-number">
+ <group delimiter=" ">
+ <choose>
+ <if is-numeric="collection-number">
+ <label form="short" variable="collection-number"/>
+ </if>
+ </choose>
+ <text variable="collection-number"/>
+ </group>
+ </macro>
+ <macro name="label-edition">
+ <group delimiter=" ">
+ <choose>
+ <if is-numeric="edition">
+ <number form="ordinal" variable="edition"/>
+ <label form="short" variable="edition"/>
+ </if>
+ <else-if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book">
+ <!-- full label for serial edition (CMOS18 14.89) -->
+ <text variable="edition"/>
+ <label variable="edition"/>
+ </else-if>
+ <else-if match="any" type="interview paper-conference">
+ <choose>
+ <if match="any" variable="collection-editor compiler editor editorial-director">
+ <!-- monographic usage -->
+ <text variable="edition"/>
+ </if>
+ <else>
+ <!-- serial usage -->
+ <text variable="edition"/>
+ <label variable="edition"/>
+ </else>
+ </choose>
+ </else-if>
+ <else>
+ <text variable="edition"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <macro name="label-edition-capitalized">
+ <group delimiter=" ">
+ <choose>
+ <if is-numeric="edition">
+ <number form="ordinal" variable="edition"/>
+ <label form="short" variable="edition"/>
+ </if>
+ <else-if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book">
+ <!-- full label for serial edition (CMOS18 14.89) -->
+ <text text-case="title" variable="edition"/>
+ <label text-case="capitalize-first" variable="edition"/>
+ </else-if>
+ <else-if match="any" type="interview paper-conference">
+ <choose>
+ <if match="any" variable="collection-editor compiler editor editorial-director">
+ <!-- monographic usage -->
+ <text text-case="capitalize-first" variable="edition"/>
+ </if>
+ <else>
+ <!-- serial usage -->
+ <text text-case="title" variable="edition"/>
+ <label text-case="capitalize-first" variable="edition"/>
+ </else>
+ </choose>
+ </else-if>
+ <else>
+ <text text-case="capitalize-first" variable="edition"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <macro name="label-issue">
+ <group delimiter=" ">
+ <label form="short" variable="issue"/>
+ <text variable="issue"/>
+ </group>
+ </macro>
+ <macro name="label-locator">
+ <group delimiter=" ">
+ <choose>
+ <if locator="page"/>
+ <else-if is-numeric="locator">
+ <label form="short" variable="locator"/>
+ </else-if>
+ <else-if locator="chapter line verse" match="any"/>
+ <!-- a non-numeric canonical reference is identified by its formatting and does not need a label (CMOS18 14.143-54) -->
+ <else>
+ <label form="short" variable="locator"/>
+ </else>
+ </choose>
+ <text variable="locator"/>
+ </group>
+ </macro>
+ <macro name="label-number-capitalized">
+ <group delimiter=" ">
+ <choose>
+ <if type="standard"/>
+ <else-if is-numeric="number" match="any" type="legislation regulation">
+ <label form="short" text-case="capitalize-first" variable="number"/>
+ </else-if>
+ </choose>
+ <text text-case="capitalize-first" variable="number"/>
+ </group>
+ </macro>
+ <macro name="label-number-of-volumes">
+ <group delimiter=" ">
+ <text variable="number-of-volumes"/>
+ <choose>
+ <if is-numeric="number-of-volumes">
+ <label form="short" variable="number-of-volumes"/>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="label-part-number">
+ <group delimiter=" ">
+ <choose>
+ <if is-numeric="part-number">
+ <!-- TODO: Replace with `part-number` label when CSL provides one -->
+ <text form="short" term="part"/>
+ </if>
+ </choose>
+ <text variable="part-number"/>
+ </group>
+ </macro>
+ <macro name="label-part-number-capitalized">
+ <group delimiter=" ">
+ <choose>
+ <if is-numeric="part-number">
+ <!-- TODO: Replace with `part-number` label when CSL provides one -->
+ <text form="short" term="part" text-case="capitalize-first"/>
+ </if>
+ </choose>
+ <text text-case="capitalize-first" variable="part-number"/>
+ </group>
+ </macro>
+ <macro name="label-section-capitalized">
+ <group delimiter=" ">
+ <choose>
+ <if is-numeric="section">
+ <label form="short" text-case="capitalize-first" variable="section"/>
+ </if>
+ </choose>
+ <text text-case="title" variable="section"/>
+ </group>
+ </macro>
+ <macro name="label-section-symbol">
+ <group delimiter=" ">
+ <label form="symbol" variable="section"/>
+ <text variable="section"/>
+ </group>
+ </macro>
+ <macro name="label-supplement-number">
+ <group delimiter=" ">
+ <choose>
+ <!-- TODO: Replace with `supplement-number` label when CSL provides one -->
+ <if variable="supplement-number volume-title">
+ <!-- if there is a volume title, it is already described as a supplement -->
+ <text form="short" term="issue"/>
+ </if>
+ <else-if type="periodical" variable="supplement-number title">
+ <text form="short" term="issue"/>
+ </else-if>
+ <else-if variable="supplement-number">
+ <text form="short" term="supplement"/>
+ </else-if>
+ </choose>
+ <text variable="supplement-number"/>
+ </group>
+ </macro>
+ <macro name="label-version">
+ <group delimiter=" ">
+ <choose>
+ <if type="software">
+ <!-- short version label for software (CMOS18 14.169) -->
+ <label form="short" variable="version"/>
+ </if>
+ <else>
+ <label variable="version"/>
+ </else>
+ </choose>
+ <text variable="version"/>
+ </group>
+ </macro>
+ <macro name="label-version-capitalized">
+ <group delimiter=" ">
+ <choose>
+ <if type="software">
+ <!-- short version label for software (CMOS18 14.169) -->
+ <label form="short" text-case="capitalize-first" variable="version"/>
+ </if>
+ <else>
+ <label text-case="capitalize-first" variable="version"/>
+ </else>
+ </choose>
+ <text variable="version"/>
+ </group>
+ </macro>
+ <macro name="label-volume">
+ <group delimiter=" ">
+ <choose>
+ <if is-numeric="volume">
+ <label form="short" variable="volume"/>
+ </if>
+ </choose>
+ <text variable="volume"/>
+ </group>
+ </macro>
+ <macro name="label-volume-capitalized">
+ <group delimiter=" ">
+ <choose>
+ <if is-numeric="volume">
+ <label form="short" text-case="capitalize-first" variable="volume"/>
+ </if>
+ </choose>
+ <text text-case="capitalize-first" variable="volume"/>
+ </group>
+ </macro>
+ <!-- 1. Author (CMOS18 13.74-86) -->
+ <macro name="author-bib">
+ <names variable="composer">
+ <name delimiter-precedes-last="always" name-as-sort-order="first"/>
+ <label form="short" prefix=", "/>
+ <substitute>
+ <names variable="author"/>
+ <!-- cf. `interview` model (CMOS18 14.110); if it is desired to prioritize `host` over `guest`, the latter could be encoded as a `contributor` -->
+ <names variable="guest"/>
+ <names variable="host"/>
+ <choose>
+ <if type="song">
+ <names variable="performer"/>
+ </if>
+ </choose>
+ <choose>
+ <if type="classic">
+ <!-- contributors fall after the title of `classic` (CMOS18 14.147) -->
+ <text macro="author-title-substitute-bib"/>
+ </if>
+ <else-if type="entry-dictionary" variable="container-title">
+ <!-- contributors fall after the title of unsigned reference entries (CMOS18 14.130) -->
+ <text macro="author-title-substitute-container"/>
+ </else-if>
+ <else-if type="entry-encyclopedia" variable="container-title">
+ <text macro="author-title-substitute-container"/>
+ </else-if>
+ </choose>
+ <names variable="illustrator"/>
+ <choose>
+ <if match="none" type="standard">
+ <names variable="editor-translator"/>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <names variable="collection-editor"/>
+ </if>
+ </choose>
+ <names variable="director"/>
+ <choose>
+ <!-- serial `broadcast` prioritizes title (CMOS18 14.165, 14.168) -->
+ <if type="broadcast" variable="container-title number title"/>
+ <else>
+ <names variable="producer"/>
+ <names variable="executive-producer"/>
+ <names variable="series-creator"/>
+ <choose>
+ <if type="broadcast">
+ <names variable="contributor"/>
+ </if>
+ </choose>
+ </else>
+ </choose>
+ <names variable="editorial-director"/>
+ <names variable="compiler"/>
+ <choose>
+ <if match="any" type="event performance speech">
+ <names variable="chair"/>
+ <names variable="organizer"/>
+ </if>
+ </choose>
+ <names variable="curator"/>
+ <choose>
+ <if type="software">
+ <!-- `software` listed under the name of the publisher or developer (CMOS18 14.169) -->
+ <text variable="publisher"/>
+ </if>
+ <else-if type="standard">
+ <!-- `standard` listed in bibliography under organization, but note omits this (CMOS18 14.159) -->
+ <text variable="authority"/>
+ </else-if>
+ </choose>
+ <text macro="author-title-substitute-container"/>
+ <text macro="author-title-substitute-bib"/>
+ <choose>
+ <if type="manuscript">
+ <choose>
+ <if match="none" variable="container-title event-date event-place event-title genre title publisher publisher-place">
+ <text macro="source-archive-bib"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="author-inline">
<choose>
- <if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="none">
- <group delimiter=". ">
- <names variable="editor translator" delimiter=". ">
- <label form="verb" text-case="capitalize-first" suffix=" "/>
- <name and="text" delimiter=", "/>
- </names>
- <names variable="director" delimiter=". ">
- <label form="verb" text-case="capitalize-first" suffix=" "/>
- <name and="text" delimiter=", "/>
- </names>
- </group>
+ <if match="any" type="bill hearing legal_case legislation regulation treaty">
+ <text macro="title-and-descriptions-short"/>
</if>
+ <else-if match="any" type="interview personal_communication">
+ <text macro="author-short-and-recipient"/>
+ </else-if>
+ <else>
+ <names variable="composer">
+ <name form="short" initialize-with=". "/>
+ <substitute>
+ <names variable="author"/>
+ <names variable="guest"/>
+ <names variable="host"/>
+ <choose>
+ <if type="song">
+ <names variable="performer"/>
+ </if>
+ </choose>
+ <choose>
+ <if type="classic">
+ <!-- contributors fall after the title of `classic` (CMOS18 14.147) -->
+ <text macro="author-title-substitute-short"/>
+ </if>
+ <else-if type="entry-dictionary" variable="container-title">
+ <!-- contributors fall after the title of unsigned reference entries (CMOS18 14.130) -->
+ <text macro="author-title-substitute-container"/>
+ </else-if>
+ <else-if type="entry-encyclopedia" variable="container-title">
+ <text macro="author-title-substitute-container"/>
+ </else-if>
+ </choose>
+ <names variable="illustrator"/>
+ <choose>
+ <if match="none" type="standard">
+ <names variable="editor-translator"/>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <names variable="collection-editor"/>
+ </if>
+ </choose>
+ <choose>
+ <if type="broadcast" variable="container-title number title"/>
+ <else>
+ <names variable="director"/>
+ <names variable="producer"/>
+ <names variable="executive-producer"/>
+ <names variable="series-creator"/>
+ <choose>
+ <if type="broadcast">
+ <names variable="contributor"/>
+ </if>
+ </choose>
+ </else>
+ </choose>
+ <names variable="editorial-director"/>
+ <names variable="compiler"/>
+ <choose>
+ <if match="any" type="event performance speech">
+ <names variable="chair"/>
+ <names variable="organizer"/>
+ </if>
+ </choose>
+ <names variable="curator"/>
+ <choose>
+ <if type="software">
+ <!-- `software` listed under the name of the publisher or developer (CMOS18 14.169) -->
+ <text variable="publisher"/>
+ </if>
+ <else-if type="standard">
+ <!-- `standard` listed in bibliography under organization, but note omits this (CMOS18 14.159) -->
+ <text variable="authority"/>
+ </else-if>
+ </choose>
+ <text macro="author-title-substitute-container-short"/>
+ <text macro="author-title-substitute-short"/>
+ <choose>
+ <if type="manuscript">
+ <choose>
+ <if match="none" variable="container-title event-date event-place event-title genre title publisher publisher-place">
+ <text macro="source-archive-note"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </substitute>
+ </names>
+ </else>
</choose>
</macro>
- <macro name="container-contributors">
+ <macro name="author-sort">
<choose>
- <if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">
- <group prefix=", " delimiter=", ">
- <names variable="container-author" delimiter=", ">
- <label form="verb" suffix=" "/>
- <name and="text" delimiter=", "/>
+ <if match="any" type="bill hearing legal_case legislation regulation treaty">
+ <text macro="legal-title"/>
+ </if>
+ <else>
+ <text macro="author-bib"/>
+ </else>
+ </choose>
+ </macro>
+ <!-- Author elements -->
+ <macro name="author-short-and-recipient">
+ <group delimiter=" ">
+ <choose>
+ <!-- Inaccessible personal commmunication is cited in-text (CMOS18 14.111) -->
+ <if match="none" variable="archive archive-place container-title DOI number publisher references URL">
+ <!-- These variables indicate whether the letter is retrievable by the reader -->
+ <group delimiter=", ">
+ <names variable="author">
+ <substitute>
+ <text macro="title-and-descriptions-short"/>
+ </substitute>
+ </names>
+ </group>
+ <choose>
+ <if match="none" variable="genre">
+ <names variable="recipient">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ </if>
+ </choose>
+ </if>
+ <else-if variable="author recipient">
+ <names variable="author">
+ <label/>
+ <name form="short"/>
</names>
- <names variable="editor translator" delimiter=", ">
- <label form="verb" suffix=" "/>
- <name and="text" delimiter=", "/>
+ <choose>
+ <if match="none" variable="genre">
+ <names variable="recipient">
+ <label form="verb" suffix=" "/>
+ <name form="short"/>
+ </names>
+ </if>
+ </choose>
+ </else-if>
+ <else>
+ <names variable="author">
+ <name form="short"/>
+ <substitute>
+ <text macro="title-and-descriptions-short"/>
+ </substitute>
</names>
- </group>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <macro name="author-title-substitute-bib">
+ <choose>
+ <if match="any" type="review review-book" variable="reviewed-author reviewed-genre reviewed-title">
+ <!-- If a review has no `reviewed-genre` or `reviewed-title`, assume that `title` contains the title of the reviewed work; the description provides it. -->
+ <choose>
+ <if variable="reviewed-genre title">
+ <text macro="title-bib"/>
+ </if>
+ <else-if variable="reviewed-genre reviewed-title title">
+ <text macro="title-bib"/>
+ </else-if>
+ <else>
+ <text macro="title-and-descriptions-bib"/>
+ </else>
+ </choose>
</if>
+ <else-if variable="title">
+ <text macro="title-bib"/>
+ </else-if>
+ <else>
+ <!-- If an item has no `title`, substitute with descriptions. -->
+ <text macro="title-and-descriptions-bib"/>
+ </else>
</choose>
</macro>
- <macro name="editor">
- <names variable="editor">
- <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
- <label form="short" prefix=", "/>
- </names>
+ <macro name="author-title-substitute-short">
+ <choose>
+ <if match="any" type="review review-book" variable="reviewed-author reviewed-genre reviewed-title">
+ <!-- If a review has no `reviewed-genre` or `reviewed-title`, assume that `title` contains the title of the reviewed work; the description provides it. -->
+ <choose>
+ <if variable="reviewed-genre title">
+ <text macro="title-short"/>
+ </if>
+ <else-if variable="reviewed-genre reviewed-title title">
+ <text macro="title-short"/>
+ </else-if>
+ <else>
+ <text macro="title-and-descriptions-short"/>
+ </else>
+ </choose>
+ </if>
+ <else-if variable="title">
+ <text macro="title-short"/>
+ </else-if>
+ <else>
+ <!-- If an item has no `title`, substitute with descriptions and capitalize -->
+ <text macro="title-and-descriptions-bib"/>
+ </else>
+ </choose>
</macro>
- <macro name="translator">
- <names variable="translator">
- <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
- <label form="short" prefix=", "/>
- </names>
+ <macro name="author-title-substitute-container">
+ <choose>
+ <if match="none" variable="container-title"/>
+ <else-if match="any" type="article-magazine article-newspaper">
+ <!-- Anonymous magazine and newspaper articles substitute name of publication (CMOS18 14.87, 14.97) -->
+ <text macro="source-serial-name"/>
+ </else-if>
+ <else-if match="any" type="review review-book" variable="reviewed-author reviewed-genre reviewed-title">
+ <!-- Publication name also substituted for unsigned reviews (CMOS18 14.102) -->
+ <text macro="source-serial-name"/>
+ </else-if>
+ <else-if match="any" type="interview paper-conference">
+ <choose>
+ <if match="none" variable="collection-editor compiler editor editorial-director">
+ <!-- serial usage -->
+ <text macro="source-serial-name"/>
+ </if>
+ </choose>
+ </else-if>
+ <else-if match="any" type="entry entry-dictionary entry-encyclopedia">
+ <!-- Anonymous entries in reference works (CMOS18 14.130) -->
+ <text font-style="italic" text-case="title" variable="container-title"/>
+ </else-if>
+ <else-if type="broadcast">
+ <!-- TV broadcasts and podcasts (CMOS18 14.165, 14.168) -->
+ <text font-style="italic" text-case="title" variable="container-title"/>
+ </else-if>
+ <else-if type="webpage">
+ <!-- Website title substituted in bibliography only (CMOS18 14.104) -->
+ <text text-case="title" variable="container-title"/>
+ </else-if>
+ </choose>
</macro>
- <macro name="recipient">
+ <macro name="author-title-substitute-container-short">
<choose>
- <if type="personal_communication">
+ <if match="none" variable="container-title"/>
+ <else-if match="any" type="article-magazine article-newspaper">
+ <!-- Anonymous magazine/newspaper articles substitute name of publication (CMOS18 14.87, 14.97) -->
+ <text font-style="italic" form="short" text-case="title" variable="container-title"/>
+ </else-if>
+ <else-if match="any" type="review review-book" variable="reviewed-author reviewed-genre reviewed-title">
+ <!-- Publication name also substituted for unsigned reviews (CMOS18 14.102) -->
+ <text font-style="italic" form="short" text-case="title" variable="container-title"/>
+ </else-if>
+ <else-if match="any" type="interview paper-conference">
<choose>
- <if variable="genre">
- <text variable="genre" text-case="capitalize-first"/>
+ <if match="none" variable="collection-editor compiler editor editorial-director">
+ <!-- serial usage -->
+ <text font-style="italic" form="short" text-case="title" variable="container-title"/>
+ </if>
+ </choose>
+ </else-if>
+ <else-if match="any" type="entry entry-dictionary entry-encyclopedia">
+ <!-- Anonymous entries in reference works (CMOS18 14.130) -->
+ <text font-style="italic" form="short" text-case="title" variable="container-title"/>
+ </else-if>
+ <else-if type="broadcast">
+ <!-- TV broadcasts and podcasts (CMOS18 14.165, 14.168) -->
+ <text font-style="italic" form="short" text-case="title" variable="container-title"/>
+ </else-if>
+ <else-if type="webpage">
+ <!-- Website title substituted in bibliography only (CMOS18 14.104) -->
+ <text form="short" text-case="title" variable="container-title"/>
+ </else-if>
+ </choose>
+ </macro>
+ <!-- 2. Date (CMOS18 13.102) -->
+ <macro name="date">
+ <choose>
+ <if variable="issued">
+ <group delimiter=" ">
+ <!-- reprints and earlier editions may give original year in brackets (CMOS18 14.16) -->
+ <text macro="date-original-year" prefix="(" suffix=")"/>
+ <group>
+ <text macro="date-issued-year"/>
+ <text variable="year-suffix"/>
+ </group>
+ </group>
+ </if>
+ <else-if variable="available-date">
+ <date date-parts="year" form="text" variable="available-date"/>
+ </else-if>
+ <else-if variable="event-date">
+ <date date-parts="year" form="text" variable="event-date"/>
+ </else-if>
+ <else-if variable="status">
+ <group>
+ <!-- Print the status variable rather than use generic CSL terms (`in press`, etc.) -->
+ <text text-case="capitalize-first" variable="status"/>
+ <text prefix="-" variable="year-suffix"/>
+ </group>
+ </else-if>
+ <else-if type="collection">
+ <!-- do not give n.d. for archival collections (CMOS18 14.128) -->
+ <text prefix="-" variable="year-suffix"/>
+ </else-if>
+ <else-if type="manuscript">
+ <!-- do not give n.d. with a bare shelfmark -->
+ <choose>
+ <if match="any" variable="container-title event-date event-place event-title genre title publisher publisher-place">
+ <text form="short" term="no date"/>
+ <text prefix="-" variable="year-suffix"/>
+ </if>
+ </choose>
+ </else-if>
+ <else-if type="article-journal">
+ <choose>
+ <if match="any" variable="number page">
+ <text form="short" term="no date"/>
</if>
+ <else-if match="any" variable="available-date collection-title issue supplement-number volume">
+ <!-- journal articles should be forthcoming with an issue/volume but no date or locator (CMOS18 14.75) -->
+ <text term="forthcoming"/>
+ </else-if>
<else>
- <text term="letter" text-case="capitalize-first"/>
+ <text form="short" term="no date"/>
</else>
</choose>
+ <text prefix="-" variable="year-suffix"/>
+ </else-if>
+ <else>
+ <text form="short" term="no date"/>
+ <text prefix="-" variable="year-suffix"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="date-short">
+ <choose>
+ <if variable="issued">
+ <group delimiter=" ">
+ <choose>
+ <if is-uncertain-date="original-date">
+ <!-- Uncertain date already has square brackets -->
+ <text macro="date-original-year"/>
+ </if>
+ <else>
+ <text macro="date-original-year" prefix="[" suffix="]"/>
+ </else>
+ </choose>
+ <group>
+ <choose>
+ <if match="any" type="interview personal_communication">
+ <choose>
+ <if match="none" variable="archive archive-place container-title DOI number publisher references URL">
+ <!-- These variables indicate that the communication is retrievable by the reader. If not, then use the in-text-only personal communication format -->
+ <text macro="date-issued-full"/>
+ </if>
+ <else>
+ <text macro="date-issued-year"/>
+ </else>
+ </choose>
+ </if>
+ <else>
+ <text macro="date-issued-year"/>
+ </else>
+ </choose>
+ <text variable="year-suffix"/>
+ </group>
+ </group>
</if>
+ <else-if variable="available-date">
+ <date date-parts="year" form="text" variable="available-date"/>
+ </else-if>
+ <else-if variable="event-date">
+ <date date-parts="year" form="text" variable="event-date"/>
+ </else-if>
+ <else-if variable="status">
+ <!-- Print the status variable rather than use generic CSL terms (`in press`, etc.) -->
+ <text text-case="lowercase" variable="status"/>
+ <text prefix="-" variable="year-suffix"/>
+ </else-if>
+ <else>
+ <choose>
+ <if match="any" type="interview personal_communication">
+ <choose>
+ <if match="any" variable="archive archive-place container-title DOI number publisher references URL">
+ <!-- only give n.d. for accessible personal communication (CMOS18 14.111)-->
+ <text form="short" term="no date"/>
+ </if>
+ </choose>
+ <text prefix="-" variable="year-suffix"/>
+ </if>
+ <else-if match="any" type="classic collection entry entry-dictionary entry-encyclopedia">
+ <!-- do not give n.d. for archival collections (CMOS18 14.128), `classic` (CMOS18 14.143), or reference entries (CMOS18 14.131) -->
+ <text prefix="-" variable="year-suffix"/>
+ </else-if>
+ <else-if type="manuscript">
+ <!-- do not give n.d. with a bare shelfmark -->
+ <choose>
+ <if match="any" variable="container-title event-date event-place event-title genre title publisher publisher-place">
+ <text form="short" term="no date"/>
+ <text prefix="-" variable="year-suffix"/>
+ </if>
+ </choose>
+ </else-if>
+ <else-if type="article-journal">
+ <choose>
+ <if match="any" variable="number page">
+ <text form="short" term="no date"/>
+ </if>
+ <else-if match="any" variable="available-date collection-title issue supplement-number volume">
+ <!-- journal articles should be forthcoming with an issue/volume but no date or locator (CMOS18 14.75) -->
+ <text term="forthcoming"/>
+ </else-if>
+ <else>
+ <text form="short" term="no date"/>
+ </else>
+ </choose>
+ <text prefix="-" variable="year-suffix"/>
+ </else-if>
+ <else>
+ <text form="short" term="no date"/>
+ <text prefix="-" variable="year-suffix"/>
+ </else>
+ </choose>
+ </else>
</choose>
- <names variable="recipient" delimiter=", ">
- <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
- <name and="text" delimiter=", "/>
- </names>
</macro>
- <macro name="substitute-title">
+ <macro name="date-sort">
+ <!-- Sort items by issue date as printed by `source-date-issued-month-day` macro -->
<choose>
- <if type="article-magazine article-newspaper review review-book" match="any">
- <text macro="container-title"/>
+ <if type="personal_communication" variable="event-date issued">
+ <date date-parts="year" form="text" variable="event-date"/>
</if>
+ <else-if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book">
+ <choose>
+ <if type="article-newspaper">
+ <text macro="date-issued-leading-zeros-full"/>
+ </if>
+ <else-if match="any" variable="issue supplement-number volume">
+ <text macro="date-issued-leading-zeros-year-month"/>
+ </else-if>
+ <else>
+ <text macro="date-issued-leading-zeros-full"/>
+ </else>
+ </choose>
+ </else-if>
+ <else-if match="any" type="interview paper-conference">
+ <choose>
+ <if match="none" variable="collection-editor compiler editor editorial-director">
+ <!-- serial usage -->
+ <choose>
+ <if match="any" variable="issue supplement-number volume">
+ <text macro="date-issued-leading-zeros-year-month"/>
+ </if>
+ <else>
+ <text macro="date-issued-leading-zeros-full"/>
+ </else>
+ </choose>
+ </if>
+ <else>
+ <date date-parts="year" form="text" variable="issued"/>
+ </else>
+ </choose>
+ </else-if>
+ <else-if match="any" type="entry entry-dictionary entry-encyclopedia">
+ <choose>
+ <if match="any" variable="DOI URL">
+ <text macro="date-issued-leading-zeros-full"/>
+ </if>
+ <else>
+ <date date-parts="year" form="text" variable="issued"/>
+ </else>
+ </choose>
+ </else-if>
+ <else-if match="any" type="article broadcast collection dataset document event graphic interview manuscript map patent performance personal_communication post software song speech standard webpage">
+ <text macro="date-issued-leading-zeros-full"/>
+ </else-if>
+ <else>
+ <date date-parts="year" form="text" variable="issued"/>
+ </else>
</choose>
</macro>
- <macro name="contributors">
- <group delimiter=". ">
- <names variable="author">
- <name and="text" name-as-sort-order="first" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
- <label form="short" prefix=", "/>
- <substitute>
- <names variable="editor"/>
- <names variable="translator"/>
- <names variable="director"/>
- <text macro="substitute-title"/>
- <text macro="title"/>
- </substitute>
- </names>
- <text macro="recipient"/>
- </group>
+ <macro name="date-sort-group">
+ <!-- Sort items with and without dates (CMOS18 14.44):
+
+ 1. items with dates (= 0)
+ 2. `no date` items (= 1)
+ 3. items with `status` (forthcoming, in press, etc.) (= 2) -->
+ <choose>
+ <if variable="issued">
+ <text value="0"/>
+ </if>
+ <else-if variable="status">
+ <text value="2"/>
+ </else-if>
+ <else>
+ <!-- n.d. -->
+ <text value="1"/>
+ </else>
+ </choose>
</macro>
- <macro name="contributors-short">
- <names variable="author">
- <name form="short" and="text" delimiter=", " initialize-with=". "/>
- <substitute>
- <names variable="editor"/>
- <names variable="translator"/>
- <names variable="director"/>
- <text macro="substitute-title"/>
- <text macro="title"/>
- </substitute>
- </names>
+ <!-- Date elements -->
+ <macro name="date-issued-full">
+ <choose>
+ <if is-uncertain-date="issued">
+ <!-- guessed-at date (CMOS18 14.44) -->
+ <date form="text" prefix="[" suffix="?]" variable="issued"/>
+ </if>
+ <else>
+ <date form="text" variable="issued"/>
+ </else>
+ </choose>
</macro>
- <macro name="interviewer">
- <names variable="interviewer" delimiter=", ">
- <label form="verb" prefix=" " text-case="capitalize-first" suffix=" "/>
- <name and="text" delimiter=", "/>
- </names>
+ <macro name="date-issued-leading-zeros-full">
+ <date delimiter="-" variable="issued">
+ <date-part name="year"/>
+ <date-part form="numeric-leading-zeros" name="month"/>
+ <date-part form="numeric-leading-zeros" name="day"/>
+ </date>
</macro>
- <macro name="archive">
- <group delimiter=". ">
- <text variable="archive_location" text-case="capitalize-first"/>
- <text variable="archive"/>
- <text variable="archive-place"/>
- </group>
+ <macro name="date-issued-leading-zeros-year-month">
+ <date delimiter="-" variable="issued">
+ <date-part name="year"/>
+ <date-part form="numeric-leading-zeros" name="month"/>
+ </date>
+ </macro>
+ <macro name="date-issued-month">
+ <date variable="issued">
+ <date-part name="month"/>
+ </date>
+ </macro>
+ <macro name="date-issued-month-day">
+ <date variable="issued">
+ <date-part name="month"/>
+ <date-part name="day" prefix=" "/>
+ </date>
+ </macro>
+ <macro name="date-issued-year">
+ <choose>
+ <if is-uncertain-date="issued">
+ <!-- guessed-at date (CMOS18 14.44) -->
+ <date date-parts="year" form="text" prefix="[" suffix="?]" variable="issued"/>
+ </if>
+ <else>
+ <date date-parts="year" form="text" variable="issued"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="date-original-month">
+ <date variable="original-date">
+ <date-part name="month"/>
+ </date>
+ </macro>
+ <macro name="date-original-month-day">
+ <date variable="original-date">
+ <date-part name="month"/>
+ <date-part name="day" prefix=" "/>
+ </date>
</macro>
- <macro name="access">
+ <macro name="date-original-year">
+ <choose>
+ <if is-uncertain-date="original-date">
+ <date date-parts="year" form="text" prefix="[" suffix="?]" variable="original-date"/>
+ </if>
+ <else>
+ <date date-parts="year" form="text" variable="original-date"/>
+ </else>
+ </choose>
+ </macro>
+ <!-- 3. Title and descriptions (CMOS18 13.87-101) -->
+ <macro name="title-and-descriptions-bib">
<group delimiter=". ">
<choose>
- <if type="graphic report" match="any">
- <text macro="archive"/>
+ <if variable="title">
+ <text macro="title-bib"/>
+ <text macro="description-bib"/>
+ <text macro="identifier-bib"/>
</if>
- <else-if type="article-journal bill book chapter legal_case legislation motion_picture paper-conference" match="none">
- <text macro="archive"/>
+ <else-if match="any" type="bill report">
+ <!-- Bills, resolutions, and congressional reports substitute bill number if no title -->
+ <!-- Congressional reports are indistinguishable from other reports -->
+ <text macro="identifier-number-bib"/>
+ <text macro="identifier-bib"/>
+ <text macro="description-bib"/>
</else-if>
+ <else>
+ <text macro="description-bib"/>
+ <text macro="identifier-bib"/>
+ </else>
</choose>
+ </group>
+ </macro>
+ <macro name="title-and-descriptions-short">
+ <choose>
+ <if variable="title">
+ <text macro="title-short"/>
+ </if>
+ <else-if match="any" type="bill report">
+ <!-- Bills, resolutions, and congressional reports substitute bill number if no title -->
+ <text macro="legal-identifier-bill-report"/>
+ </else-if>
+ <else>
+ <text macro="description-short"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="title-and-source-bib">
+ <group delimiter=". ">
<choose>
- <if type="webpage post-weblog" match="any">
- <date variable="issued" form="text"/>
- </if>
- </choose>
- <choose>
- <if variable="issued" match="none">
- <group delimiter=" ">
- <text term="accessed" text-case="capitalize-first"/>
- <date variable="accessed" form="text"/>
+ <if type="broadcast" variable="container-title number title">
+ <!-- Bespoke `broadcast` format (CMOS18 14.165, 14.168) -->
+ <text macro="source-monographic-title-bib"/>
+ <group delimiter=", ">
+ <text macro="identifier-number-bib"/>
+ <text macro="title-bib"/>
+ <text macro="description-bib"/>
+ <text macro="source-monographic-identifier-contributors-bib"/>
</group>
- </if>
- </choose>
- <choose>
- <if type="legal_case" match="none">
+ <text macro="source-series-bib"/>
<choose>
- <if variable="DOI">
- <text variable="DOI" prefix="https://doi.org/"/>
+ <!-- show event information here only if not collapsed with `issued` (CMOS18 14.167) -->
+ <if match="any" variable="event-date original-date original-publisher original-publisher-place publisher status">
+ <text macro="source-event-bib"/>
</if>
- <else>
- <text variable="URL"/>
- </else>
</choose>
</if>
+ <else-if type="chapter" variable="container-title genre">
+ <!-- 'Introduction to' etc. (CMOS18 14.12, 14.14) -->
+ <group delimiter=" ">
+ <text macro="title-and-descriptions-bib"/>
+ <text macro="source-bib"/>
+ </group>
+ </else-if>
+ <else>
+ <text macro="title-and-descriptions-bib"/>
+ <text macro="source-bib"/>
+ </else>
</choose>
+ <group delimiter=", ">
+ <choose>
+ <!-- show event information here only if collapsed with `issued` (CMOS18 14.167) -->
+ <if match="any" variable="event-date original-date original-publisher original-publisher-place publisher status"/>
+ <!-- monographic usage only -->
+ <else-if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book"/>
+ <else-if match="any" type="interview paper-conference">
+ <choose>
+ <if match="any" variable="collection-editor container-author editor editorial-director">
+ <!-- monographic usage -->
+ <text macro="source-event-bib"/>
+ </if>
+ </choose>
+ </else-if>
+ <else>
+ <text macro="source-event-bib"/>
+ </else>
+ </choose>
+ <text macro="source-monographic-publication-bib"/>
+ </group>
+ <text macro="source-medium-bib"/>
+ <text macro="source-archive-bib"/>
+ <text macro="source-DOI-URL-bib"/>
</group>
</macro>
- <macro name="title">
+ <!-- 3.1. Title -->
+ <macro name="title-bib">
<choose>
- <if variable="title" match="none">
+ <if match="any" type="post webpage">
+ <!-- Handle `container-title` on `post` or `webpage` in manner of `publisher` -->
+ <text macro="title-and-part-filter-review-bib"/>
+ </if>
+ <else-if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book">
+ <text macro="title-serial-bib"/>
+ </else-if>
+ <else-if match="any" type="interview paper-conference">
<choose>
- <if type="personal_communication speech thesis" match="none">
- <text variable="genre" text-case="capitalize-first"/>
+ <if match="any" variable="collection-editor compiler editor editorial-director">
+ <!-- monographic usage -->
+ <text macro="title-monographic-bib"/>
</if>
+ <else>
+ <!-- serial usage -->
+ <text macro="title-serial-bib"/>
+ </else>
</choose>
- </if>
- <else-if type="bill book graphic legislation motion_picture song" match="any">
- <text variable="title" text-case="title" font-style="italic"/>
- <group prefix=" (" suffix=")" delimiter=" ">
- <text term="version"/>
- <text variable="version"/>
- </group>
</else-if>
- <else-if variable="reviewed-author">
+ <else>
+ <text macro="title-monographic-bib"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="title-short">
+ <choose>
+ <if match="any" type="review review-book" variable="reviewed-author reviewed-genre reviewed-title">
+ <!-- If a review has no `reviewed-title`, assume that `title` contains the title of the reviewed work; the description provides it. -->
<choose>
- <if variable="reviewed-title">
- <group delimiter=". ">
- <text variable="title" text-case="title" quotes="true"/>
- <group delimiter=", ">
- <text variable="reviewed-title" text-case="title" font-style="italic" prefix="Review of "/>
- <names variable="reviewed-author">
- <label form="verb-short" text-case="lowercase" suffix=" "/>
- <name and="text" delimiter=", "/>
- </names>
- </group>
- </group>
+ <if variable="reviewed-genre title">
+ <!-- Quotes, title case -->
+ <text form="short" quotes="true" text-case="title" variable="title"/>
</if>
+ <else-if variable="reviewed-genre reviewed-title title">
+ <!-- Quotes, title case -->
+ <text form="short" quotes="true" text-case="title" variable="title"/>
+ </else-if>
<else>
- <group delimiter=", ">
- <text variable="title" text-case="title" font-style="italic" prefix="Review of "/>
- <names variable="reviewed-author">
- <label form="verb-short" text-case="lowercase" suffix=" "/>
- <name and="text" delimiter=", "/>
- </names>
- </group>
+ <text macro="description-short"/>
</else>
</choose>
+ </if>
+ <else>
+ <text macro="title-primary-short"/>
+ </else>
+ </choose>
+ </macro>
+ <!-- Title elements -->
+ <macro name="title-and-part-filter-review-bib">
+ <choose>
+ <if match="any" type="review review-book" variable="reviewed-author reviewed-genre reviewed-title">
+ <!-- `title` is only the review title if there is a separate `reviewed-genre` or `reviewed-title`; otherwise, it is the title of the reviewed work, printed in the description -->
+ <choose>
+ <if match="any" variable="reviewed-genre reviewed-title">
+ <text macro="title-and-part-title-bib"/>
+ </if>
+ </choose>
+ </if>
+ <else>
+ <text macro="title-and-part-title-bib"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="title-and-part-title-bib">
+ <group delimiter=". ">
+ <text macro="title-primary"/>
+ <group delimiter=", ">
+ <text macro="label-part-number-capitalized"/>
+ <text macro="title-part"/>
+ </group>
+ </group>
+ </macro>
+ <macro name="title-monographic-bib">
+ <!-- For monographic items, assume `part-number` and `part-title` refer to the book/volume. -->
+ <choose>
+ <if variable="container-title">
+ <text macro="title-primary"/>
+ </if>
+ <!-- For monographic items without `container-title`, bibliography entries list `part-title` or `volume-title` first if available -->
+ <else-if variable="part-title">
+ <text font-style="italic" text-case="title" variable="part-title"/>
</else-if>
- <else-if type="legal_case interview patent" match="any">
- <text variable="title"/>
+ <else-if variable="volume-title">
+ <text font-style="italic" text-case="title" variable="volume-title"/>
</else-if>
<else>
- <text variable="title" text-case="title" quotes="true"/>
+ <text macro="title-primary"/>
</else>
</choose>
</macro>
- <macro name="edition">
+ <macro name="title-part">
<choose>
- <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book">
+ <text quotes="true" text-case="title" variable="part-title"/>
+ </if>
+ <else-if match="any" type="interview paper-conference">
<choose>
- <if is-numeric="edition">
- <group delimiter=" " prefix=". ">
- <number variable="edition" form="ordinal"/>
- <text term="edition" form="short" strip-periods="true"/>
- </group>
+ <if match="any" variable="collection-editor compiler editor editorial-director">
+ <!-- monographic usage -->
+ <text font-style="italic" text-case="title" variable="part-title"/>
</if>
<else>
- <text variable="edition" text-case="capitalize-first" prefix=". "/>
+ <!-- serial usage -->
+ <text quotes="true" text-case="title" variable="part-title"/>
</else>
</choose>
+ </else-if>
+ <else>
+ <text font-style="italic" text-case="title" variable="part-title"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="title-serial-bib">
+ <!-- For serials, assume that `part-number` and `part-title` refer to the article and append to `title` -->
+ <choose>
+ <if variable="container-title">
+ <text macro="title-and-part-filter-review-bib"/>
</if>
- <else-if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">
+ <else>
+ <!-- for serial items without `container-title`, don't append `volume-title` to `title` -->
+ <text macro="title-and-part-filter-review-bib"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="title-primary">
+ <choose>
+ <if type="patent">
+ <!-- No italics or quotes, sentence case -->
+ <text form="short" text-case="capitalize-first" variable="title"/>
+ </if>
+ <else-if match="any" type="bill collection legislation regulation treaty">
+ <!-- No italics or quotes, title case -->
+ <text text-case="title" variable="title"/>
+ </else-if>
+ <else-if type="legal_case">
+ <!-- Italicized, sentence case -->
+ <text font-style="italic" variable="title"/>
+ </else-if>
+ <else-if match="any" type="book classic graphic hearing map">
+ <!-- Italicized, title case (regardless of `container-title`) -->
+ <text font-style="italic" text-case="title" variable="title"/>
+ </else-if>
+ <else-if type="entry-encyclopedia" variable="author container-title">
+ <!-- Signed encyclopedia entry in quotes, title case (CMOS18 14.132) -->
+ <text quotes="true" text-case="title" variable="title"/>
+ </else-if>
+ <else-if type="entry-dictionary" variable="container-title">
+ <!-- Quotes, sentence case -->
+ <text quotes="true" variable="title"/>
+ </else-if>
+ <else-if type="entry-encyclopedia" variable="container-title">
+ <!-- Quotes, sentence case -->
+ <text quotes="true" variable="title"/>
+ </else-if>
+ <else-if type="post">
+ <!-- Quotes, sentence case -->
+ <text quotes="true" variable="title"/>
+ </else-if>
+ <!-- Other types are formatted based on presence of `container-title` -->
+ <else-if variable="container-title">
+ <!-- Quotes, title case -->
+ <text quotes="true" text-case="title" variable="title"/>
+ </else-if>
+ <else-if match="any" type="article dataset document interview manuscript paper-conference personal_communication speech thesis webpage">
+ <!-- Container-like but not necessarily with `container-title` -->
+ <!-- Quotes, title case -->
+ <text quotes="true" text-case="title" variable="title"/>
+ </else-if>
+ <else>
+ <!-- Italicized, title case (default) -->
+ <text font-style="italic" text-case="title" variable="title"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="title-primary-short">
+ <choose>
+ <if type="patent">
+ <!-- No italics or quotes, sentence case -->
+ <text form="short" text-case="capitalize-first" variable="title"/>
+ </if>
+ <else-if match="any" type="bill collection legislation regulation treaty">
+ <!-- No italics or quotes, title case -->
+ <text form="short" text-case="title" variable="title"/>
+ </else-if>
+ <else-if type="legal_case">
+ <!-- Italicized, sentence case -->
+ <text font-style="italic" form="short" variable="title"/>
+ </else-if>
+ <else-if match="any" type="book classic graphic hearing map">
+ <!-- Italicized, title case (regardless of `container-title`) -->
+ <text font-style="italic" form="short" text-case="title" variable="title"/>
+ </else-if>
+ <else-if type="entry-encyclopedia" variable="author container-title">
+ <!-- Signed encyclopedia entry in quotes, title case (CMOS18 14.132) -->
+ <text form="short" quotes="true" text-case="title" variable="title"/>
+ </else-if>
+ <else-if type="entry-dictionary" variable="container-title">
+ <!-- Quotes, sentence case -->
+ <text form="short" quotes="true" variable="title"/>
+ </else-if>
+ <else-if type="entry-encyclopedia" variable="container-title">
+ <!-- Quotes, sentence case -->
+ <text form="short" quotes="true" variable="title"/>
+ </else-if>
+ <else-if type="post">
+ <!-- Quotes, sentence case -->
+ <text form="short" quotes="true" variable="title"/>
+ </else-if>
+ <!-- Other types are formatted based on presence of `container-title` -->
+ <else-if variable="container-title">
+ <!-- Quotes, title case -->
+ <text form="short" quotes="true" text-case="title" variable="title"/>
+ </else-if>
+ <else-if match="any" type="article dataset document interview manuscript paper-conference personal_communication speech thesis webpage">
+ <!-- Container-like but not necessarily with `container-title` -->
+ <!-- Quotes, title case -->
+ <text form="short" quotes="true" text-case="title" variable="title"/>
+ </else-if>
+ <else>
+ <!-- Italicized, title case (default) -->
+ <text font-style="italic" form="short" text-case="title" variable="title"/>
+ </else>
+ </choose>
+ </macro>
+ <!-- 3.2. Description -->
+ <macro name="description-bib">
+ <choose>
+ <if match="any" type="interview" variable="interviewer">
+ <text macro="description-interview-bib"/>
+ </if>
+ <else-if match="any" type="review review-book" variable="reviewed-author reviewed-genre reviewed-title">
+ <text macro="description-review-bib"/>
+ </else-if>
+ <else-if type="personal_communication">
+ <text macro="description-letter-bib"/>
+ </else-if>
+ <else-if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book">
+ <text macro="description-serial-bib"/>
+ </else-if>
+ <else-if type="paper-conference">
+ <text macro="description-paper-conference-bib"/>
+ </else-if>
+ <else-if type="song" variable="composer">
+ <text macro="description-song-bib"/>
+ </else-if>
+ <!-- thesis type appears with university name (CMOS18 14.113) -->
+ <else-if type="thesis"/>
+ <else-if match="none" variable="container-title">
+ <!-- Other description -->
+ <text macro="description-format-bib"/>
+ </else-if>
+ <else>
+ <text macro="description-generic-bib"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="description-short">
+ <choose>
+ <if match="any" type="interview" variable="interviewer">
+ <text macro="description-interview-short"/>
+ </if>
+ <else-if match="any" type="review review-book" variable="reviewed-author reviewed-genre reviewed-title">
+ <text macro="description-review-short"/>
+ </else-if>
+ <else-if type="personal_communication">
+ <text macro="description-letter-short"/>
+ </else-if>
+ <else-if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book">
+ <text macro="description-serial-short"/>
+ </else-if>
+ <else-if type="paper-conference">
<choose>
- <if is-numeric="edition">
- <group delimiter=" " prefix=", ">
- <number variable="edition" form="ordinal"/>
- <text term="edition" form="short"/>
- </group>
+ <if match="any" variable="collection-editor container-author editor editorial-director">
+ <!-- monographic usage -->
+ <text macro="description-format-short"/>
</if>
<else>
- <text variable="edition" prefix=", "/>
+ <!-- serial usage -->
+ <text macro="description-serial-short"/>
</else>
</choose>
</else-if>
+ <else>
+ <text macro="description-format-short"/>
+ </else>
</choose>
</macro>
- <macro name="locators">
+ <!-- Description elements -->
+ <macro name="description-format-bib">
<choose>
- <if type="article-journal">
+ <if variable="genre number"/>
+ <else-if variable="genre">
+ <text text-case="capitalize-first" variable="genre"/>
+ </else-if>
+ <else-if type="manuscript">
+ <!-- 'unpublished manuscript' if no `genre` (CMOS18 14.114) -->
<choose>
- <if variable="volume">
- <text variable="volume" prefix=" "/>
- <group prefix=" (" suffix=")">
- <choose>
- <if variable="issue">
- <text variable="issue"/>
- </if>
- <else>
- <date variable="issued">
- <date-part name="month"/>
- </date>
- </else>
- </choose>
- </group>
+ <if match="none" variable="archive archive-place container-title DOI number publisher references URL">
+ <text term="manuscript" text-case="capitalize-first"/>
</if>
- <else-if variable="issue">
- <group delimiter=" " prefix=", ">
- <text term="issue" form="short"/>
- <text variable="issue"/>
- <date variable="issued" prefix="(" suffix=")">
- <date-part name="month"/>
- </date>
+ </choose>
+ </else-if>
+ <else-if type="personal_communication">
+ <!-- 'personal communication' if no `genre` (CMOS18 14.111) -->
+ <choose>
+ <if match="none" variable="archive archive-place container-title DOI number publisher references URL">
+ <text term="personal-communication" text-case="capitalize-first"/>
+ </if>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="description-format-short">
+ <choose>
+ <if variable="genre">
+ <text variable="genre"/>
+ </if>
+ <else-if variable="medium">
+ <text variable="medium"/>
+ </else-if>
+ <else-if type="manuscript">
+ <!-- 'unpublished manuscript' if no `genre` (CMOS18 14.114) -->
+ <choose>
+ <if match="none" variable="archive archive-place container-title DOI number publisher references URL">
+ <text term="manuscript"/>
+ </if>
+ </choose>
+ </else-if>
+ <else-if type="personal_communication">
+ <!-- 'pers. comm.' if no `genre` (CMOS18 14.111) -->
+ <choose>
+ <if match="none" variable="archive archive-place container-title DOI number publisher references URL">
+ <text form="short" term="personal-communication"/>
+ </if>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="description-generic-bib">
+ <!-- For conference presentations/performances/events, chapters in reports/standards/generic documents, software, place description within the source element -->
+ <choose>
+ <if match="any" type="event paper-conference performance speech">
+ <choose>
+ <if match="any" variable="collection-editor compiler editor editorial-director">
+ <!-- monographic usage -->
+ <text macro="description-format-bib"/>
+ </if>
+ </choose>
+ </if>
+ <else-if match="none" type="document report software standard">
+ <text macro="description-format-bib"/>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="description-interview-bib">
+ <group delimiter=", ">
+ <choose>
+ <if variable="genre number">
+ <!-- `genre` printed with `number` -->
+ <names variable="interviewer">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ </if>
+ <else-if variable="genre">
+ <group delimiter=" ">
+ <text text-case="capitalize-first" variable="genre"/>
+ <group delimiter=" ">
+ <text form="verb" term="container-author"/>
+ <names variable="interviewer"/>
</group>
- </else-if>
+ </group>
+ </else-if>
+ <else-if variable="interviewer">
+ <names variable="interviewer">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ </else-if>
+ <else>
+ <text macro="description-format-bib"/>
+ </else>
+ </choose>
+ <text macro="source-event-place-first"/>
+ </group>
+ </macro>
+ <macro name="description-interview-short">
+ <choose>
+ <if disambiguate="true">
+ <names variable="interviewer">
+ <label form="verb" suffix=" "/>
+ <name/>
+ <substitute>
+ <text macro="description-format-short"/>
+ </substitute>
+ </names>
+ </if>
+ <else-if match="any" variable="genre medium">
+ <choose>
+ <if match="none" variable="author chair collection-editor compiler composer curator director editor editor-translator editorial-director executive-producer guest host illustrator organizer producer series-creator translator">
+ <!-- capitalize if no author or title -->
+ <text macro="description-format-bib"/>
+ </if>
<else>
- <date variable="issued" prefix=", ">
- <date-part name="month"/>
- </date>
+ <text macro="description-format-short"/>
</else>
</choose>
- </if>
- <else-if type="legal_case">
- <text variable="volume" prefix=", "/>
- <text variable="container-title" prefix=" "/>
- <text variable="page" prefix=" "/>
</else-if>
- <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
- <group prefix=". " delimiter=". ">
- <group>
- <text term="volume" form="short" text-case="capitalize-first" suffix=" "/>
- <number variable="volume" form="numeric"/>
- </group>
- <group>
- <number variable="number-of-volumes" form="numeric"/>
- <text term="volume" form="short" prefix=" " plural="true"/>
+ <else>
+ <!-- generic description for an unpublished interview (CMOS18 14.108) -->
+ <text term="interview"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="description-letter-bib">
+ <choose>
+ <if variable="recipient">
+ <group delimiter=", ">
+ <choose>
+ <if variable="genre number">
+ <!-- `genre` appears with `number` -->
+ <names variable="recipient">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ </if>
+ <else-if variable="genre">
+ <group delimiter=" ">
+ <text macro="description-format-bib"/>
+ <names variable="recipient">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ </group>
+ </else-if>
+ <else>
+ <names variable="recipient">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ </else>
+ </choose>
+ <text variable="event-place"/>
+ <date form="text" variable="event-date"/>
+ </group>
+ </if>
+ <else>
+ <text macro="description-format-bib"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="description-letter-short">
+ <!-- shortened notes ideally give author, recipient, place, and date (CMOS18 14.13) -->
+ <group delimiter=", ">
+ <choose>
+ <if variable="genre recipient">
+ <group delimiter=" ">
+ <text macro="description-format-short"/>
+ <names variable="recipient">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
</group>
+ </if>
+ <else>
+ <text macro="description-format-short"/>
+ </else>
+ </choose>
+ <text variable="event-place"/>
+ <date form="text" variable="event-date"/>
+ </group>
+ </macro>
+ <macro name="description-paper-conference-bib">
+ <choose>
+ <if match="any" variable="collection-editor container-author editor editorial-director">
+ <!-- monographic usage -->
+ <text macro="description-generic-bib"/>
+ </if>
+ <else>
+ <!-- serial usage -->
+ <group delimiter=". ">
+ <text macro="description-serial-bib"/>
+ <text macro="source-event-bib"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="description-review-bib">
+ <!-- Reviewed item -->
+ <group delimiter=". ">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <text macro="description-review-genre-bib"/>
+ <text macro="description-review-title"/>
</group>
- </else-if>
- <else-if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">
<choose>
- <if variable="page" match="none">
- <group prefix=". ">
- <text term="volume" form="short" text-case="capitalize-first" suffix=" "/>
- <number variable="volume" form="numeric"/>
- </group>
+ <if variable="reviewed-genre reviewed-title title">
+ <names variable="reviewed-author">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
</if>
+ <else-if variable="reviewed-genre"/>
+ <else>
+ <names variable="reviewed-author">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ </else>
</choose>
+ <text macro="source-event-place-first"/>
+ </group>
+ <text macro="label-section-capitalized"/>
+ </group>
+ </macro>
+ <macro name="description-review-genre-bib">
+ <choose>
+ <if variable="reviewed-genre">
+ <group delimiter=" ">
+ <text macro="description-review-term-unsigned-bib"/>
+ <text variable="reviewed-genre"/>
+ <choose>
+ <if match="none" variable="reviewed-title">
+ <names variable="reviewed-author">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ </if>
+ </choose>
+ </group>
+ </if>
+ <else-if variable="number">
+ <text macro="description-review-term-unsigned-bib"/>
</else-if>
+ <!-- If no `reviewed-genre`, assume that `genre` is entered as 'Review of the book' or similar -->
+ <else-if variable="genre">
+ <text text-case="capitalize-first" variable="genre"/>
+ </else-if>
+ <else>
+ <text macro="description-review-term-unsigned-bib"/>
+ </else>
</choose>
</macro>
- <macro name="locators-chapter">
+ <macro name="description-review-short">
+ <group delimiter=" ">
+ <text form="short" term="review-of"/>
+ <text macro="description-review-title-short"/>
+ </group>
+ </macro>
+ <macro name="description-review-term-unsigned-bib">
+ <!-- Anonymous reviews appear as 'unsigned' (CMOS18 14.102) -->
<choose>
- <if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">
+ <if match="any" variable="author chair collection-editor compiler composer curator director editor editor-translator editorial-director executive-producer guest host illustrator organizer producer series-creator translator">
<choose>
- <if variable="page">
- <group prefix=", ">
- <text variable="volume" suffix=":"/>
- <text variable="page"/>
- </group>
+ <if variable="reviewed-genre">
+ <text term="review-of" text-case="capitalize-first"/>
</if>
+ <else>
+ <text form="short" term="review-of" text-case="capitalize-first"/>
+ </else>
</choose>
</if>
+ <else>
+ <group delimiter=" ">
+ <text term="anonymous" text-case="capitalize-first"/>
+ <choose>
+ <if variable="reviewed-genre">
+ <text term="review-of"/>
+ </if>
+ <else>
+ <text form="short" term="review-of"/>
+ </else>
+ </choose>
+ </group>
+ </else>
</choose>
</macro>
- <macro name="locators-article">
+ <macro name="description-review-title">
<choose>
- <if type="article-newspaper">
- <group prefix=", " delimiter=", ">
- <group delimiter=" ">
- <text variable="edition"/>
- <text term="edition"/>
+ <if match="any" variable="reviewed-genre reviewed-title">
+ <!-- Not possible to distinguish TV series episode from other reviewed works without a reviewed source title -->
+ <!-- Adapt for `reviewed-container-title` or similar if it becomes available -->
+ <text font-style="italic" text-case="title" variable="reviewed-title"/>
+ </if>
+ <else>
+ <!-- Assume title is title of reviewed work -->
+ <text font-style="italic" text-case="title" variable="title"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="description-review-title-short">
+ <choose>
+ <if match="any" variable="reviewed-genre reviewed-title">
+ <!-- Not possible to distinguish TV series episode from other reviewed works without a reviewed source title -->
+ <!-- Adapt for `reviewed-container-title` or similar if it becomes available -->
+ <text font-style="italic" form="short" text-case="title" variable="reviewed-title"/>
+ </if>
+ <else>
+ <!-- Assume title is title of reviewed work -->
+ <text font-style="italic" form="short" text-case="title" variable="title"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="description-serial-bib">
+ <group delimiter=". ">
+ <choose>
+ <if match="none" type="periodical" variable="volume-title">
+ <!-- move `genre` with special issue (CMOS18 14.77) or supplement (CMOS18 14.78) -->
+ <text macro="description-format-bib"/>
+ </if>
+ </choose>
+ <!-- `section` provides magazine departments (CMOS18 14.88) and newspaper column names (CMOS18 14.93) -->
+ <text macro="label-section-capitalized"/>
+ </group>
+ </macro>
+ <macro name="description-serial-short">
+ <choose>
+ <if variable="title"/>
+ <else-if variable="genre">
+ <text macro="description-format-short"/>
+ </else-if>
+ <else>
+ <text variable="section"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="description-song-bib">
+ <!-- Performer of classical music works -->
+ <!-- TODO: remove when Zotero fixes mapping of performer to `author` -->
+ <group delimiter=" ">
+ <!-- Based on `description-format` macro -->
+ <choose>
+ <if variable="genre">
+ <text text-case="capitalize-first" variable="genre"/>
+ <text form="verb" term="performer"/>
+ </if>
+ <!-- providing 'performed by' label for recorded readings (CMOS18 14.164), but it should be omitted for classical music (CMOS18 14.163) -->
+ <else>
+ <text form="verb" term="performer" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ <names variable="author">
+ <substitute>
+ <names variable="performer"/>
+ </substitute>
+ </names>
+ </group>
+ </macro>
+ <!-- 3.3. Identifier (edition, contributors, volume) -->
+ <macro name="identifier-bib">
+ <group delimiter=". ">
+ <choose>
+ <if type="patent">
+ <text macro="identifier-patent"/>
+ </if>
+ <else-if type="report">
+ <text macro="identifier-report-bib"/>
+ </else-if>
+ <else-if match="any" type="post webpage">
+ <!-- Handle `container-title` on `post` or `webpage` as `publisher` -->
+ <text macro="identifier-number-bib"/>
+ <text macro="label-version-capitalized"/>
+ <text macro="identifier-edition-bib"/>
+ <text macro="identifier-contributors-bib"/>
+ <text macro="identifier-volume-monographic-bib"/>
+ </else-if>
+ <else-if variable="container-title">
+ <choose>
+ <if match="any" type="broadcast graphic map motion_picture">
+ <!-- For audiovisual media, number information comes after `title`, not `container-title`; `song` places album catalogue `number` with `publisher` (CMOS18 14.163-164) -->
+ <text macro="identifier-number-bib"/>
+ </if>
+ </choose>
+ <text macro="identifier-contributors-bib"/>
+ </else-if>
+ <else>
+ <choose>
+ <if match="none" type="song">
+ <text macro="identifier-number-bib"/>
+ </if>
+ </choose>
+ <text macro="label-version-capitalized"/>
+ <text macro="identifier-edition-bib"/>
+ <choose>
+ <if match="any" variable="part-title volume-title">
+ <text macro="identifier-contributors-bib"/>
+ </if>
+ <else-if match="any" variable="number-of-volumes part-number volume">
+ <!-- `collection-editor` belongs with `collection-title` if item is not multivolume -->
+ <choose>
+ <if variable="collection-editor">
+ <names variable="collection-editor">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ </if>
+ <else>
+ <text macro="identifier-contributors-bib"/>
+ </else>
+ </choose>
+ </else-if>
+ <else>
+ <text macro="identifier-contributors-bib"/>
+ </else>
+ </choose>
+ <text macro="identifier-volume-monographic-bib"/>
+ <choose>
+ <!-- `collection-editor` supplied in `identifier-volume-monographic-bib` if there is a `part-title` or `volume-title` -->
+ <if match="any" variable="part-title volume-title"/>
+ <else-if match="any" variable="number-of-volumes part-number volume">
+ <choose>
+ <if variable="collection-editor">
+ <text macro="identifier-contributors-bib"/>
+ </if>
+ </choose>
+ </else-if>
+ </choose>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <!-- Identifier elements -->
+ <macro name="identifier-contributors-bib">
+ <choose>
+ <if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book">
+ <text macro="identifier-contributors-serial-bib"/>
+ </if>
+ <else-if match="any" type="interview paper-conference">
+ <choose>
+ <if match="any" variable="collection-editor compiler editor editorial-director">
+ <!-- monographic usage -->
+ <text macro="identifier-contributors-monographic-bib"/>
+ </if>
+ <else>
+ <!-- serial usage -->
+ <text macro="identifier-contributors-serial-bib"/>
+ </else>
+ </choose>
+ </else-if>
+ <else>
+ <text macro="identifier-contributors-monographic-bib"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="identifier-contributors-monographic-bib">
+ <group delimiter=". ">
+ <choose>
+ <if match="any" type="post webpage">
+ <group delimiter=". ">
+ <names variable="container-author">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names variable="editor-translator">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names delimiter=". " variable="editor translator">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names variable="editorial-director">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names variable="guest">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names variable="host">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names variable="illustrator">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names variable="narrator">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names delimiter=". " variable="compiler chair organizer curator">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names delimiter=". " variable="series-creator executive-producer">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names variable="producer">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names variable="director">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <choose>
+ <if match="any" type="broadcast performance">
+ <names variable="script-writer">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ </if>
+ </choose>
+ <names variable="performer">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <choose>
+ <if match="none" type="thesis">
+ <names variable="contributor">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ </if>
+ </choose>
</group>
- <group>
- <text term="section" form="short" suffix=" "/>
- <text variable="section"/>
+ </if>
+ <else>
+ <!-- Handle `container-title` on `post` or `webpage` as `publisher` -->
+ <group delimiter=". ">
+ <choose>
+ <if match="none" variable="container-title">
+ <names variable="container-author">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names variable="editor-translator">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names delimiter=". " variable="editor translator">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names variable="editorial-director">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names variable="guest">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names variable="host">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ </if>
+ </choose>
+ <names variable="illustrator">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names variable="narrator">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <choose>
+ <if match="none" variable="container-title">
+ <names delimiter=". " variable="compiler chair organizer curator">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names delimiter=". " variable="series-creator executive-producer">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names variable="producer">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names variable="director">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <choose>
+ <if match="any" type="broadcast performance">
+ <names variable="script-writer">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ </if>
+ </choose>
+ <names variable="performer">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <choose>
+ <if match="none" type="song thesis">
+ <names variable="contributor">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ <choose>
+ <if type="song">
+ <!-- Song contributors attached to album (CMOS18 14.163) -->
+ <names variable="contributor">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ </if>
+ </choose>
</group>
- </group>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <macro name="identifier-contributors-serial-bib">
+ <group delimiter=". ">
+ <names delimiter=". " variable="translator narrator">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names delimiter=", " variable="compiler chair organizer curator">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names delimiter=", " variable="series-creator executive-producer">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names variable="producer">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names variable="director">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names variable="script-writer">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ <names variable="performer">
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
+ <name/>
+ </names>
+ </group>
+ </macro>
+ <macro name="identifier-edition-bib">
+ <choose>
+ <if match="none" variable="original-date">
+ <text macro="label-edition-capitalized"/>
</if>
- <else-if type="article-journal">
+ <else-if variable="original-title">
+ <text macro="label-edition-capitalized"/>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="identifier-number-bib">
+ <group delimiter=" ">
+ <choose>
+ <if is-numeric="number" type="broadcast" variable="genre">
+ <text text-case="capitalize-first" variable="genre"/>
+ <text variable="number"/>
+ </if>
+ <else-if is-numeric="number" type="broadcast">
+ <text text-case="capitalize-first" value="episode"/>
+ <text variable="number"/>
+ </else-if>
+ <else-if variable="number">
+ <text text-case="title" variable="genre"/>
+ <text macro="label-number-capitalized"/>
+ </else-if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="identifier-patent">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <!-- `authority`: US ; `genre`: patent ; `number`: 123,445 -->
+ <text form="short" variable="authority"/>
+ <!-- 'US Patent' capitalized in both bibliography and note forms -->
<choose>
- <if variable="volume issue" match="any">
- <text variable="page" prefix=": "/>
+ <if variable="genre">
+ <text text-case="capitalize-first" variable="genre"/>
</if>
<else>
- <text variable="page" prefix=", "/>
+ <text term="patent" text-case="capitalize-first"/>
</else>
</choose>
+ <text variable="number"/>
+ </group>
+ <group delimiter=" ">
+ <text value="filed"/>
+ <date form="text" variable="submitted"/>
+ </group>
+ <group delimiter=" ">
+ <choose>
+ <if variable="issued submitted">
+ <text term="and"/>
+ </if>
+ </choose>
+ <text value="issued"/>
+ <!-- Always give full issue date, even in author-date (CMOS18 14.158) -->
+ <text macro="date-issued-full"/>
+ </group>
+ </group>
+ </macro>
+ <macro name="identifier-report-bib">
+ <group delimiter=". ">
+ <choose>
+ <if variable="container-title">
+ <!-- If the report is a chapter in a larger report, then most identifying information is printed in the source. -->
+ <text macro="identifier-contributors-bib"/>
+ </if>
+ <else-if variable="title">
+ <text macro="identifier-number-bib"/>
+ <text macro="label-version-capitalized"/>
+ <text macro="identifier-edition-bib"/>
+ <text macro="identifier-contributors-bib"/>
+ <text macro="identifier-volume-monographic-bib"/>
+ </else-if>
+ <else>
+ <!-- If there is no `title`, then `genre` and `number` are already printed as the title. -->
+ <text macro="label-version-capitalized"/>
+ <text macro="identifier-edition-bib"/>
+ <text macro="identifier-contributors-bib"/>
+ <text macro="identifier-volume-monographic-bib"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <macro name="identifier-volume-bib">
+ <!-- In notes styles, bibliography entries may be listed either under an individual volume title or its series, but the former approach is required for author-date, which is the form that this macro implements (CMOS18 14.21) -->
+ <group delimiter=", ">
+ <choose>
+ <if variable="part-number part-title volume volume-title">
+ <!-- part and title with individual titles -->
+ <group delimiter=" ">
+ <text macro="label-part-number-capitalized"/>
+ <text value="of"/>
+ <text font-style="italic" text-case="title" variable="volume-title"/>
+ </group>
+ <group delimiter=" ">
+ <text macro="label-volume"/>
+ <text value="of"/>
+ <group delimiter=", ">
+ <text macro="title-primary"/>
+ <names variable="collection-editor">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ </group>
+ </group>
+ </if>
+ <else-if match="any" variable="part-title volume-title">
+ <group delimiter=" ">
+ <choose>
+ <if variable="part-number volume">
+ <group delimiter=", ">
+ <text macro="label-volume-capitalized"/>
+ <text macro="label-part-number"/>
+ <text value="of"/>
+ </group>
+ </if>
+ <else-if variable="part-number">
+ <text macro="label-part-number-capitalized"/>
+ <text value="of"/>
+ </else-if>
+ <else-if variable="volume">
+ <text macro="label-volume-capitalized"/>
+ <text value="of"/>
+ </else-if>
+ </choose>
+ <group delimiter=", ">
+ <text macro="title-primary"/>
+ <names variable="collection-editor">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ </group>
+ </group>
+ </else-if>
+ <else-if variable="part-number volume">
+ <text macro="label-volume-capitalized"/>
+ <text macro="label-part-number"/>
+ </else-if>
+ <else-if variable="part-number">
+ <text macro="label-part-number-capitalized"/>
+ </else-if>
+ <else-if variable="volume">
+ <text macro="label-volume-capitalized"/>
+ </else-if>
+ <else>
+ <text macro="label-number-of-volumes"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <macro name="identifier-volume-monographic-bib">
+ <choose>
+ <if match="any" type="article-journal article-magazine article-newspaper broadcast event interview patent performance periodical post post-weblog review review-book speech webpage"/>
+ <else-if match="any" type="interview paper-conference">
+ <choose>
+ <if match="any" variable="collection-editor compiler editor editorial-director">
+ <!-- monographic usage -->
+ <text macro="identifier-volume-bib"/>
+ </if>
+ </choose>
</else-if>
+ <else>
+ <text macro="identifier-volume-bib"/>
+ </else>
</choose>
</macro>
- <macro name="point-locators">
+ <!-- 4. Source -->
+ <macro name="source-bib">
+ <group delimiter=". ">
+ <choose>
+ <if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book">
+ <!-- Serial items -->
+ <text macro="source-serial-bib"/>
+ </if>
+ <else-if match="any" type="interview paper-conference">
+ <choose>
+ <if match="any" variable="collection-editor container-author editor editorial-director">
+ <!-- monographic usage -->
+ <text macro="source-monographic-bib"/>
+ </if>
+ <else>
+ <!-- serial usage -->
+ <text macro="source-serial-bib"/>
+ </else>
+ </choose>
+ </else-if>
+ <else-if match="any" type="patent post webpage"/>
+ <else>
+ <text macro="source-monographic-bib"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <!-- 4.1. Serial sources -->
+ <macro name="source-serial-bib">
+ <group delimiter=". ">
+ <text macro="source-serial-title-volume-bib"/>
+ <choose>
+ <if type="article-newspaper">
+ <group delimiter=", ">
+ <text macro="source-serial-title-bib"/>
+ <text macro="source-serial-identifier-bib"/>
+ </group>
+ </if>
+ <else-if variable="collection-title volume">
+ <group delimiter=", ">
+ <text macro="source-serial-title-bib"/>
+ <text macro="source-serial-identifier-bib"/>
+ </group>
+ </else-if>
+ <else-if variable="volume">
+ <group delimiter=" ">
+ <text macro="source-serial-title-bib"/>
+ <text macro="source-serial-identifier-bib"/>
+ </group>
+ </else-if>
+ <else>
+ <group delimiter=", ">
+ <text macro="source-serial-title-bib"/>
+ <text macro="source-serial-identifier-bib"/>
+ </group>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <!-- Serial source title -->
+ <macro name="source-serial-name">
+ <group delimiter=" ">
+ <text font-style="italic" text-case="title" variable="container-title"/>
+ <choose>
+ <!-- TODO: remove conditional when Zotero stops double-mapping `event-place` and `publisher-place` -->
+ <if match="none" variable="event-date event-title">
+ <text prefix="(" suffix=")" variable="publisher-place"/>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="source-serial-title-bib">
+ <group delimiter=", ">
+ <choose>
+ <!-- Journal special issues (CMOS18 14.77) and supplements (CMOS18 14.78) -->
+ <if variable="collection-title supplement-number"/>
+ <else-if variable="supplement-number volume-title">
+ <text term="supplement" text-case="capitalize-first"/>
+ </else-if>
+ <else-if type="periodical" variable="supplement-number title">
+ <text term="supplement" text-case="capitalize-first"/>
+ </else-if>
+ <else-if match="any" type="periodical" variable="volume-title">
+ <choose>
+ <if variable="genre">
+ <text text-case="capitalize-first" variable="genre"/>
+ </if>
+ <else-if variable="volume-title">
+ <text term="special-issue" text-case="capitalize-first"/>
+ </else-if>
+ <else-if type="periodical" variable="editor title">
+ <text term="special-issue" text-case="capitalize-first"/>
+ </else-if>
+ </choose>
+ </else-if>
+ </choose>
+ <text macro="source-serial-name"/>
+ <choose>
+ <!-- 'ahead of print' is placed akin to a series (CMOS18 14.75) -->
+ <if match="any" variable="available-date collection-title issue number page status supplement-number volume"/>
+ <else-if type="article-journal" variable="DOI issued">
+ <text term="advance-online-publication"/>
+ </else-if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="source-serial-title-volume-bib">
<choose>
- <if variable="locator">
- <choose>
- <if locator="page" match="none">
+ <if variable="volume-title">
+ <!-- Journal special issues (CMOS18 14.77) and supplements (CMOS18 14.78) -->
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <text macro="source-monographic-preposition-bib"/>
+ <text quotes="true" text-case="title" variable="volume-title"/>
+ </group>
+ <text macro="source-monographic-identifier-contributors-bib"/>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <!-- Serial source identifier -->
+ <macro name="source-serial-identifier-bib">
+ <choose>
+ <if match="any" variable="issue supplement-number volume">
+ <group delimiter=": ">
+ <text macro="source-serial-identifier-volume-author-date"/>
+ <text macro="source-serial-locator"/>
+ </group>
+ </if>
+ <else>
+ <group delimiter=", ">
+ <group delimiter=". ">
+ <text macro="source-serial-identifier-volume-author-date"/>
+ <!-- periodical edition always capitalized (CMOS18 14.89) -->
+ <text macro="label-edition-capitalized"/>
+ </group>
+ <text macro="source-serial-locator"/>
+ </group>
+ </else>
+ <!-- TODO: If CSL adds `date-part` detection, add two further conditions to address CMOS18 14.74: delimiting with ":" if there is a `volume` and no month or `issue` or `supplement number`; delimiting with ", " or there is an `issue` or `supplement number` and no month -->
+ </choose>
+ </macro>
+ <macro name="source-serial-identifier-volume-author-date">
+ <group delimiter=", ">
+ <choose>
+ <if type="article-newspaper">
+ <!-- newspapers provide the full date in place of volume/issue numbers (CMOS18 14.89) -->
+ <text variable="collection-title"/>
+ <text macro="source-serial-volume-status-bib"/>
+ </if>
+ <else-if match="any" variable="issue supplement-number volume">
+ <choose>
+ <if match="any" type="article-magazine review review-book" variable="reviewed-author reviewed-genre reviewed-title">
+ <!-- date appears first if the magazine or review `container-title` has been substituted for a missing author (CMOS18 14.87, 14.102) -->
+ <choose>
+ <if match="none" variable="author chair collection-editor compiler composer curator director editor editor-translator editorial-director executive-producer guest host illustrator organizer producer series-creator translator">
+ <choose>
+ <!-- no extra date details with a volume plus issue/supplement -->
+ <if variable="issue volume"/>
+ <else-if variable="supplement-number"/>
+ <!-- nothing to substitute if there is no issue/supplement/volume -->
+ <else-if match="none" variable="issue volume"/>
+ <else>
+ <text macro="source-date-bib"/>
+ <!-- for author-date 17th edition: -->
+ <!-- <text macro="source-date-issued-month-day"/> -->
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ <!-- `collection-title` is for any serial with multiple series (e.g. '4th ser.') -->
+ <text variable="collection-title"/>
+ <group delimiter=" ">
<choose>
- <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <if variable="volume">
<choose>
- <if variable="volume">
- <group>
- <text term="volume" form="short" suffix=" "/>
- <number variable="volume" form="numeric"/>
- <label variable="locator" form="short" prefix=", " suffix=" "/>
- </group>
+ <if variable="collection-title">
+ <text macro="label-volume"/>
</if>
+ <else-if match="any" type="article-magazine review review-book" variable="reviewed-author reviewed-genre reviewed-title">
+ <!-- provide label if a magazine or review `container-title` has been substituted for a missing author (CMOS18 14.87, 14.102) -->
+ <choose>
+ <if match="any" variable="author chair collection-editor compiler composer curator director editor editor-translator editorial-director executive-producer guest host illustrator organizer producer series-creator translator">
+ <text variable="volume"/>
+ </if>
+ <!-- TODO: when CSL provides date part detection, volume should be lowercase if there is a month, but otherwise capitalized -->
+ <else>
+ <text macro="label-volume-capitalized"/>
+ </else>
+ </choose>
+ </else-if>
<else>
- <label variable="locator" form="short" suffix=" "/>
+ <text variable="volume"/>
</else>
</choose>
+ <group delimiter=", " prefix="(" suffix=")">
+ <choose>
+ <if match="any" variable="issue supplement-number">
+ <text variable="issue"/>
+ <text macro="label-supplement-number"/>
+ </if>
+ <else-if match="any" type="article-magazine review review-book" variable="reviewed-author reviewed-genre reviewed-title">
+ <!-- date for anonymous magazine and review articles only appears here if it did not earlier (CMOS18 14.87, 14.102) -->
+ <choose>
+ <if match="any" variable="author chair collection-editor compiler composer curator director editor editor-translator editorial-director executive-producer guest host illustrator organizer producer series-creator translator">
+ <text macro="source-date-bib"/>
+ <!-- for author-date 17th edition: -->
+ <!-- <text macro="source-date-issued-month-day"/> -->
+ </if>
+ </choose>
+ </else-if>
+ <else>
+ <text macro="source-date-bib"/>
+ <!-- for author-date 17th edition: -->
+ <!-- <text macro="source-date-issued-month-day"/> -->
+ </else>
+ </choose>
+ </group>
</if>
- <else>
- <label variable="locator" form="short" suffix=" "/>
- </else>
+ <else-if match="any" variable="issue supplement-number">
+ <group delimiter=" ">
+ <group delimiter=", ">
+ <text macro="label-issue"/>
+ <text macro="label-supplement-number"/>
+ </group>
+ <choose>
+ <if match="any" variable="author chair collection-editor compiler composer curator director editor editor-translator editorial-director executive-producer guest host illustrator organizer producer series-creator translator">
+ <text macro="source-date-bib" prefix="(" suffix=")"/>
+ <!-- for author-date 17th edition: -->
+ <!-- <text macro="source-date-issued-month-day" prefix="(" suffix=")"/> -->
+ </if>
+ </choose>
+ </group>
+ </else-if>
</choose>
+ </group>
+ </else-if>
+ <else>
+ <text variable="collection-title"/>
+ <choose>
+ <if match="any" type="interview" variable="interviewer">
+ <!-- publisher possible with `interview` (cf. CMOS18 14.110) -->
+ <text variable="publisher"/>
+ </if>
+ </choose>
+ <text macro="source-serial-volume-status-bib"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <macro name="source-serial-volume-status-bib">
+ <group delimiter=", ">
+ <choose>
+ <if match="none" variable="collection-title issue number page supplement-number volume">
+ <group delimiter=" ">
+ <!-- article accepted for publication and available on publisher website (CMOS18 14.75) -->
+ <!-- TODO: use CSL term for `available-date` when available -->
+ <text value="accepted"/>
+ <date form="text" variable="available-date"/>
+ </group>
+ </if>
+ </choose>
+ <group delimiter=" ">
+ <text macro="source-date-status-bib"/>
+ <text macro="source-date-bib"/>
+ </group>
+ </group>
+ </macro>
+ <!-- Serial source locator -->
+ <macro name="source-serial-locator">
+ <choose>
+ <if match="any" variable="locator number">
+ <!-- Page numbers cited in notes appear alongside article ID (CMOS18 14.71) -->
+ <group delimiter=", ">
+ <text macro="label-locator"/>
+ <text variable="number"/>
+ </group>
+ </if>
+ <!-- do not give pages for newspapers (CMOS18 14.89) -->
+ <else-if type="article-newspaper"/>
+ <else>
+ <text variable="page"/>
+ </else>
+ </choose>
+ </macro>
+ <!-- 4.2. Monographic sources -->
+ <macro name="source-monographic-bib">
+ <group delimiter=". ">
+ <!-- Monographic sources repeat main reference elements -->
+ <choose>
+ <if variable="container-title">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <choose>
+ <if match="none" type="broadcast motion_picture">
+ <text macro="source-monographic-preposition-bib"/>
+ </if>
+ </choose>
+ <text macro="source-monographic-title-bib"/>
+ </group>
+ <text macro="source-monographic-description-bib"/>
+ <text macro="source-monographic-identifier-bib"/>
+ <text macro="source-monographic-locator"/>
+ </group>
+ </if>
+ </choose>
+ <text macro="source-series-bib"/>
+ <choose>
+ <!-- show event information here only if not collapsed with `issued` (CMOS18 14.167) -->
+ <if match="any" variable="event-date original-date original-publisher original-publisher-place publisher status">
+ <text macro="source-event-bib"/>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <!-- Monographic source title -->
+ <macro name="source-monographic-preposition-bib">
+ <choose>
+ <if type="chapter" variable="container-title genre">
+ <text value="to"/>
+ </if>
+ <else-if match="any" type="entry entry-dictionary entry-encyclopedia">
+ <choose>
+ <if match="any" variable="author composer">
+ <!-- Give preposition only for signed entries; otherwise, title is substituted -->
+ <text term="in" text-case="capitalize-first"/>
</if>
- <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
- <number variable="volume" form="numeric" suffix=":"/>
- </else-if>
</choose>
- <text variable="locator"/>
+ </else-if>
+ <!-- if printing chapter page numbers:
+ <else-if variable="chapter-number page"><text term="in" text-case="capitalize-first"/></else-if>
+ -->
+ <else-if variable="chapter-number">
+ <group delimiter=" ">
+ <text macro="label-chapter-number-capitalized"/>
+ <choose>
+ <if type="song">
+ <text term="on"/>
+ </if>
+ <else>
+ <text term="in"/>
+ </else>
+ </choose>
+ </group>
+ </else-if>
+ <else>
+ <text term="in" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="source-monographic-title-bib">
+ <choose>
+ <if variable="part-title">
+ <text font-style="italic" text-case="title" variable="part-title"/>
</if>
+ <else-if variable="volume-title">
+ <text font-style="italic" text-case="title" variable="volume-title"/>
+ </else-if>
+ <else>
+ <text font-style="italic" text-case="title" variable="container-title"/>
+ </else>
</choose>
</macro>
- <macro name="container-prefix">
- <text term="in" text-case="capitalize-first"/>
+ <!-- Monographic source description -->
+ <macro name="source-monographic-description-bib">
+ <choose>
+ <if match="any" type="event paper-conference performance speech">
+ <!-- Conference presentations should describe the session unless published in a proceedings -->
+ <choose>
+ <if match="none" variable="collection-editor compiler editor editorial-director">
+ <!-- serial usage -->
+ <text macro="description-format-bib"/>
+ </if>
+ </choose>
+ </if>
+ <else-if type="software">
+ <!-- For entries in mobile app reference works, place description after `container-title` -->
+ <text macro="description-format-bib"/>
+ </else-if>
+ <else-if match="any" type="document report standard">
+ <!-- For chapters in report, standards, and generic documents, place description after `container-title` -->
+ <text macro="description-format-bib"/>
+ </else-if>
+ </choose>
</macro>
- <macro name="container-title">
+ <!-- Monographic source identifier -->
+ <macro name="source-monographic-identifier-bib">
+ <!-- Based on `identifier-bib` -->
<choose>
- <if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">
- <text macro="container-prefix" suffix=" "/>
+ <if variable="container-title">
+ <group delimiter=", ">
+ <choose>
+ <if match="none" type="broadcast graphic map motion_picture song">
+ <!-- For audiovisual media, number information comes after `title`, not `container-title`; `song` places album catalogue `number` with `publisher` (CMOS18 14.163-164) -->
+ <text macro="identifier-number-bib"/>
+ </if>
+ </choose>
+ <text macro="label-version"/>
+ <text macro="label-edition"/>
+ <choose>
+ <if match="any" variable="part-title volume-title">
+ <text macro="source-monographic-identifier-contributors-bib"/>
+ </if>
+ <else-if match="any" variable="number-of-volumes part-number volume">
+ <!-- `collection-editor` belongs with `collection-title` if item is not multivolume -->
+ <choose>
+ <if variable="collection-editor">
+ <names variable="collection-editor">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ </if>
+ <else>
+ <text macro="source-monographic-identifier-contributors-bib"/>
+ </else>
+ </choose>
+ </else-if>
+ <else>
+ <text macro="source-monographic-identifier-contributors-bib"/>
+ </else>
+ </choose>
+ <text macro="source-monographic-identifier-volume-bib"/>
+ <choose>
+ <!-- `collection-editor` supplied in `source-monographic-identifier-volume-bib` if there is a `part-title` or `volume-title` -->
+ <if match="any" variable="part-title volume-title"/>
+ <else-if match="any" variable="number-of-volumes part-number volume">
+ <choose>
+ <if variable="collection-editor">
+ <text macro="source-monographic-identifier-contributors-bib"/>
+ </if>
+ </choose>
+ </else-if>
+ </choose>
+ </group>
</if>
</choose>
+ </macro>
+ <macro name="source-monographic-identifier-contributors-bib">
+ <group delimiter=", ">
+ <names variable="container-author">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ <names variable="editor-translator">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ <names delimiter=", " variable="editor translator">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ <names variable="guest">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ <names variable="host">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ <names delimiter=", " variable="chair organizer">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ <names delimiter=", " variable="illustrator narrator compiler curator">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ <names delimiter=", " variable="series-creator executive-producer">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ <names variable="producer">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ <names variable="editorial-director">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ <choose>
+ <if match="any" type="broadcast performance">
+ <names variable="script-writer">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ </if>
+ </choose>
+ <names variable="director">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ <names variable="performer">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ <choose>
+ <if match="none" type="song thesis">
+ <!-- Song contributors attached to album (CMOS18 14.163) -->
+ <names variable="contributor">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="source-monographic-identifier-volume-bib">
+ <!-- Mostly identical to `identifier-volume-bib` but without capitalization; giving `container-title` rather than `title-primary`; and ensuring volume number -->
+ <group delimiter=", ">
+ <choose>
+ <if variable="part-number part-title volume volume-title">
+ <!-- part and title with individual titles -->
+ <group delimiter=" ">
+ <text macro="label-part-number"/>
+ <text value="of"/>
+ <text font-style="italic" text-case="title" variable="volume-title"/>
+ </group>
+ <group delimiter=" ">
+ <text macro="label-volume"/>
+ <text value="of"/>
+ <group delimiter=", ">
+ <text font-style="italic" text-case="title" variable="container-title"/>
+ <names variable="collection-editor">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ </group>
+ </group>
+ </if>
+ <else-if match="any" variable="part-title volume-title">
+ <group delimiter=" ">
+ <choose>
+ <if variable="part-number volume">
+ <group delimiter=", ">
+ <text macro="label-volume"/>
+ <text macro="label-part-number"/>
+ <text value="of"/>
+ </group>
+ </if>
+ <else-if variable="part-number">
+ <text macro="label-part-number"/>
+ <text value="of"/>
+ </else-if>
+ <else-if variable="volume">
+ <text macro="label-volume"/>
+ <text value="of"/>
+ </else-if>
+ </choose>
+ <group delimiter=", ">
+ <text font-style="italic" text-case="title" variable="container-title"/>
+ <names variable="collection-editor">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ </group>
+ </group>
+ </else-if>
+ <else-if match="any" variable="part-number volume">
+ <choose>
+ <if is-numeric="volume" match="none">
+ <text macro="label-volume"/>
+ </if>
+ <else-if variable="container-title title">
+ <!-- remove condition in styles that print chapter page numbers -->
+ <text macro="label-volume"/>
+ </else-if>
+ <else-if is-numeric="volume" variable="page">
+ <choose>
+ <!-- check for variables that might come between the volume and page number -->
+ <if match="any" variable="collection-editor part-number part-title volume-title">
+ <text macro="label-volume"/>
+ </if>
+ </choose>
+ </else-if>
+ <else>
+ <text macro="label-volume"/>
+ </else>
+ </choose>
+ <text macro="label-part-number"/>
+ </else-if>
+ <else>
+ <text macro="label-number-of-volumes"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <!-- Monographic source locator -->
+ <macro name="source-monographic-locator">
<choose>
- <if type="webpage">
- <text variable="container-title" text-case="title"/>
+ <if is-numeric="volume" locator="page">
+ <group delimiter=":">
+ <choose>
+ <if match="none" variable="collection-editor part-number part-title volume-title">
+ <text variable="volume"/>
+ </if>
+ </choose>
+ <text variable="locator"/>
+ </group>
</if>
- <else-if type="legal_case" match="none">
- <group delimiter=" ">
- <text variable="container-title" text-case="title" font-style="italic"/>
+ <else-if variable="locator">
+ <text macro="label-locator"/>
+ </else-if>
+ <!-- Remove `container-title` condition in styles that provide chapter page numbers -->
+ <else-if variable="container-title title"/>
+ <else-if is-numeric="volume" variable="page">
+ <!-- collapse the volume and page number if adjacent -->
+ <group delimiter=":">
<choose>
- <if type="post-weblog">
- <text value="(blog)"/>
+ <!-- check for variables that might come between the volume and page number -->
+ <if match="none" variable="collection-editor part-number part-title volume-title">
+ <text variable="volume"/>
</if>
</choose>
+ <text variable="page"/>
</group>
</else-if>
+ <else>
+ <text variable="page"/>
+ </else>
</choose>
</macro>
- <macro name="publisher">
- <group delimiter=": ">
- <text variable="publisher-place"/>
- <text variable="publisher"/>
+ <!-- 4.3. Series -->
+ <macro name="source-series-bib">
+ <group delimiter=", ">
+ <choose>
+ <if variable="collection-editor collection-title">
+ <choose>
+ <if match="any" variable="number-of-volumes part-number part-title volume volume-title">
+ <text macro="source-series-title"/>
+ </if>
+ <else>
+ <text text-case="title" variable="collection-title"/>
+ <names variable="collection-editor">
+ <label form="verb" suffix=" "/>
+ <name/>
+ </names>
+ <text macro="label-collection-number"/>
+ <text macro="label-issue"/>
+ </else>
+ </choose>
+ </if>
+ <else>
+ <text macro="source-series-title"/>
+ </else>
+ </choose>
</group>
</macro>
- <macro name="date">
+ <macro name="source-series-title">
+ <group delimiter=", ">
+ <choose>
+ <if variable="issue">
+ <text text-case="title" variable="collection-title"/>
+ <text macro="label-collection-number"/>
+ <text macro="label-issue"/>
+ </if>
+ <else-if is-numeric="collection-number" variable="collection-title">
+ <group delimiter=" ">
+ <text text-case="title" variable="collection-title"/>
+ <text variable="collection-number"/>
+ </group>
+ </else-if>
+ <else-if variable="collection-title">
+ <text text-case="title" variable="collection-title"/>
+ <text variable="collection-number"/>
+ </else-if>
+ </choose>
+ </group>
+ </macro>
+ <!-- 4.4. Event -->
+ <macro name="source-event-bib">
+ <group delimiter=" ">
+ <choose>
+ <!-- omit types that provide event information in description -->
+ <if match="any" type="interview" variable="interviewer"/>
+ <else-if type="personal_communication" variable="recipient"/>
+ <else-if match="any" type="review review-book" variable="reviewed-author reviewed-genre reviewed-title"/>
+ <else-if match="any" variable="event event-date event-title">
+ <!-- TODO: To prevent Zotero from printing `event-place`, due to its double-mapping of `publisher-place` and `event-place`. Remove this when that is changed. -->
+ <choose>
+ <if type="paper-conference">
+ <choose>
+ <if match="none" variable="collection-editor compiler editor editorial-director issue page supplement-number volume">
+ <!-- Don't print event info for conference papers published in proceedings -->
+ <text macro="source-event-status-bib"/>
+ <text macro="source-event-description-bib"/>
+ </if>
+ </choose>
+ </if>
+ <else>
+ <!-- For other item types, print event info even if published (e.g. collection catalogs, performance programs). -->
+ <text macro="source-event-status-bib"/>
+ <text macro="source-event-description-bib"/>
+ </else>
+ </choose>
+ </else-if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="source-event-place-first">
+ <!-- for descriptive elements for interviews, reviews, letters -->
<choose>
- <if variable="issued">
- <group delimiter=" ">
- <date variable="original-date" form="text" date-parts="year" prefix="(" suffix=")"/>
- <date variable="issued">
- <date-part name="year"/>
- </date>
+ <if match="any" variable="event event-date event-title">
+ <group delimiter=", ">
+ <text variable="event-title"/>
+ <text variable="event-place"/>
+ <date form="text" variable="event-date"/>
</group>
</if>
- <else-if variable="status">
- <text variable="status" text-case="capitalize-first"/>
+ </choose>
+ </macro>
+ <macro name="source-event-status-bib">
+ <group delimiter=" ">
+ <choose>
+ <if type="broadcast" variable="status">
+ <!-- 'aired', 'performed', etc. (CMOS18 14.165) -->
+ <text text-case="capitalize-first" variable="status"/>
+ </if>
+ <else-if type="paper-conference">
+ <choose>
+ <if variable="genre">
+ <text text-case="capitalize-first" value="presented"/>
+ </if>
+ <else>
+ <text form="short" term="paper-conference" text-case="capitalize-first"/>
+ <text value="presented"/>
+ </else>
+ </choose>
+ <choose>
+ <if variable="event-title">
+ <text term="at"/>
+ </if>
+ </choose>
+ </else-if>
+ <else-if type="song">
+ <text text-case="capitalize-first" value="recorded"/>
+ <choose>
+ <if variable="event-title">
+ <text term="at"/>
+ </if>
+ </choose>
+ </else-if>
+ <else-if variable="event-date issued"/>
+ <else-if match="none" variable="issued">
+ <text text-case="capitalize-first" variable="status"/>
+ </else-if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="source-event-title">
+ <choose>
+ <!-- TODO: We expect `event-title` to be used, but processors and applications may not be updated yet. This macro ensures that either `event` or `event-title` can be accepted. Remove if processor logic and application adoption can handle this. -->
+ <if variable="event-title">
+ <text variable="event-title"/>
+ </if>
+ <else>
+ <text variable="event"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="source-event-title-capitalized">
+ <choose>
+ <!-- TODO: We expect `event-title` to be used, but processors and applications may not be updated yet. This macro ensures that either `event` or `event-title` can be accepted. Remove if processor logic and application adoption can handle this. -->
+ <if variable="event-title">
+ <text text-case="capitalize-first" variable="event-title"/>
+ </if>
+ <else>
+ <text text-case="capitalize-first" variable="event"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="source-event-description-bib">
+ <group delimiter=", ">
+ <choose>
+ <if type="song">
+ <text macro="source-event-title"/>
+ </if>
+ <else-if type="paper-conference" variable="genre">
+ <text macro="source-event-title-capitalized"/>
+ </else-if>
+ <else-if type="paper-conference">
+ <text macro="source-event-title"/>
+ </else-if>
+ <else>
+ <text macro="source-event-title-capitalized"/>
+ </else>
+ </choose>
+ <date form="text" variable="event-date"/>
+ <text variable="event-place"/>
+ </group>
+ </macro>
+ <!-- 4.5. Facts of publication -->
+ <macro name="source-monographic-publication-bib">
+ <group delimiter=". ">
+ <choose>
+ <!-- Provide only for monographic types -->
+ <if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book"/>
+ <else-if match="any" type="interview paper-conference">
+ <choose>
+ <if match="any" variable="collection-editor container-author editor editorial-director">
+ <!-- monographic usage -->
+ <text macro="source-publication-and-date-bib"/>
+ </if>
+ </choose>
+ </else-if>
+ <!-- `patent` date in identification (CMOS18 14.158) -->
+ <else-if type="patent"/>
+ <else>
+ <text macro="source-publication-and-date-bib"/>
+ </else>
+ </choose>
+ <text macro="source-publication-original-title-bib"/>
+ </group>
+ </macro>
+ <macro name="source-publication-and-date-bib">
+ <group delimiter=", ">
+ <choose>
+ <if match="any" type="post webpage">
+ <!-- `container-title` functions like a publisher with social media and website sources (CMOS18 14.104-106) -->
+ <text text-case="title" variable="container-title"/>
+ </if>
+ </choose>
+ <choose>
+ <if type="broadcast" variable="DOI">
+ <!-- a podcast publisher appears before the date, whereas the network of an aired show appears after (CMOS18 14.165); unfortunately CSL stores both in `publisher` -->
+ <!-- TODO: `DOI` or `URL` detection is the only way to distinguish radio/TV from podcasts, but it is obviously imprecise; modify if CSL provides a `podcast` type -->
+ <text macro="source-publication-history-bib"/>
+ </if>
+ <else-if type="broadcast" variable="URL">
+ <text macro="source-publication-history-bib"/>
+ </else-if>
+ <else-if type="broadcast"/>
+ <else>
+ <text macro="source-publication-history-bib"/>
+ </else>
+ </choose>
+ <group delimiter=" ">
+ <text macro="source-date-status-bib"/>
+ <text macro="source-date-bib"/>
+ </group>
+ <choose>
+ <if type="broadcast" variable="URL"/>
+ <else-if type="broadcast">
+ <group delimiter=" ">
+ <text term="on"/>
+ <text macro="source-publication-history-bib"/>
+ </group>
+ </else-if>
+ </choose>
+ </group>
+ </macro>
+ <!-- Facts of publication elements -->
+ <macro name="source-publication-description-bib">
+ <choose>
+ <if type="article" variable="genre"/>
+ <else-if type="article">
+ <!-- `preprint` term attached to repository name, but specific working paper descriptors appear in description (CMOS18 14.76, 14.116) -->
+ <text term="preprint" text-case="capitalize-first"/>
+ </else-if>
+ <else-if type="thesis">
+ <!-- thesis type appears with university name (CMOS18 14.113) -->
+ <text macro="description-format-bib"/>
+ </else-if>
+ <else-if match="any" variable="original-publisher original-publisher-place">
+ <choose>
+ <!-- `edition` provides an alternative label to `reprint` (CMOS18 14.16) -->
+ <if match="any" variable="edition original-title"/>
+ <else-if match="none" type="book chapter classic entry entry-dictionary entry-encyclopedia interview musical_score pamphlet paper-conference report thesis"/>
+ <else-if variable="issued original-date">
+ <text text-case="capitalize-first" value="reprint"/>
+ </else-if>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="source-publication-history-bib">
+ <choose>
+ <if variable="original-title">
+ <!-- `original-title` is covered in `source-publication-original-title-bib` -->
+ <group delimiter=", ">
+ <text macro="source-publication-description-bib"/>
+ <text macro="source-publication-publisher-bib"/>
+ </group>
+ </if>
+ <else-if match="any" variable="edition original-publisher original-publisher-place">
+ <group delimiter=". ">
+ <!-- full stop to separate original date if `original-publisher` (CMOS18 14.16) -->
+ <group delimiter=", ">
+ <text macro="source-publication-publisher-original-bib"/>
+ <text macro="source-date-original"/>
+ </group>
+ <group delimiter=". ">
+ <choose>
+ <if variable="issued original-date">
+ <text macro="label-edition-capitalized"/>
+ </if>
+ </choose>
+ <group delimiter=", ">
+ <text macro="source-publication-description-bib"/>
+ <text macro="source-publication-publisher-bib"/>
+ </group>
+ </group>
+ </group>
</else-if>
<else>
- <text term="no date" form="short"/>
+ <group delimiter="; ">
+ <!-- semicolon to separate original date if no publisher (CMOS18 14.165) -->
+ <text macro="source-date-original"/>
+ <group delimiter=", ">
+ <text macro="source-publication-description-bib"/>
+ <text macro="source-publication-publisher-bib"/>
+ </group>
+ </group>
</else>
</choose>
</macro>
- <macro name="date-in-text">
+ <macro name="source-publication-original-title-bib">
+ <!-- Work originally published under a different title (CMOS18 13.101) -->
<choose>
- <if variable="issued">
+ <if variable="original-title">
<group delimiter=" ">
- <date variable="original-date" form="text" date-parts="year" prefix="[" suffix="]"/>
- <date variable="issued">
- <date-part name="year"/>
- </date>
+ <text term="original-work-published" text-case="capitalize-first"/>
+ <group delimiter=", ">
+ <names variable="original-author"/>
+ <text font-style="italic" text-case="title" variable="original-title"/>
+ </group>
+ <group delimiter=", " prefix="(" suffix=")">
+ <text macro="source-publication-publisher-original-bib"/>
+ <text macro="source-date-original"/>
+ </group>
</group>
</if>
- <else-if variable="status">
- <text variable="status"/>
+ </choose>
+ </macro>
+ <macro name="source-publication-publisher-bib">
+ <group delimiter=" ">
+ <choose>
+ <if type="thesis" variable="publisher">
+ <text text-case="capitalize-first" variable="publisher"/>
+ </if>
+ <else-if variable="publisher">
+ <group delimiter=": ">
+ <!-- <text text-case="capitalize-first" variable="publisher-place"/> -->
+ <text text-case="capitalize-first" variable="publisher"/>
+ </group>
+ </else-if>
+ <!-- TODO: remove conditional when Zotero fixes double-mapping of `event-place` -->
+ <else-if match="any" variable="event-date event-title"/>
+ <else>
+ <text text-case="capitalize-first" variable="publisher-place"/>
+ </else>
+ </choose>
+ <choose>
+ <if type="song">
+ <!-- Album catalogue number follows label name (CMOS18 14.163-164) -->
+ <text variable="number"/>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="source-publication-publisher-original-bib">
+ <choose>
+ <if variable="original-publisher">
+ <group delimiter=": ">
+ <!-- <text text-case="capitalize-first" variable="original-publisher-place"/> -->
+ <text text-case="capitalize-first" variable="original-publisher"/>
+ </group>
+ </if>
+ <else>
+ <text text-case="capitalize-first" variable="original-publisher-place"/>
+ </else>
+ </choose>
+ </macro>
+ <!-- 4.6. Date -->
+ <macro name="source-date-bib">
+ <choose>
+ <if variable="available-date volume-title">
+ <!-- TODO: Is there a better CSL variable for a date of a multivolume work (CMOS18 14.21)? -->
+ <date date-parts="year" form="text" variable="available-date"/>
+ </if>
+ <else-if variable="available-date part-title">
+ <date date-parts="year" form="text" variable="available-date"/>
</else-if>
<else>
- <text term="no date" form="short"/>
+ <text macro="source-date-issued-month-day"/>
</else>
</choose>
</macro>
- <macro name="day-month">
- <date variable="issued">
- <date-part name="month"/>
- <date-part name="day" prefix=" "/>
- </date>
+ <!-- Date elements -->
+ <macro name="source-date-issued-month-day">
+ <!-- Variant for author-date styles -->
+ <!-- Give full date for more ephemeral types; reflected in `date-sort` -->
+ <!-- NB: any changes must also be applied to `date-sort` and `source-date-original-month-day` -->
+ <choose>
+ <if type="personal_communication" variable="event-date issued">
+ <!-- Provide issue date for letters listed under event-date -->
+ <text macro="date-issued-year"/>
+ </if>
+ <else-if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book">
+ <text macro="source-date-issued-month-day-serial"/>
+ </else-if>
+ <else-if match="any" type="interview paper-conference">
+ <choose>
+ <if match="none" variable="collection-editor compiler editor editorial-director">
+ <!-- serial usage -->
+ <text macro="source-date-issued-month-day-serial"/>
+ </if>
+ </choose>
+ </else-if>
+ <else-if match="any" type="entry entry-dictionary entry-encyclopedia">
+ <choose>
+ <if match="any" variable="DOI URL">
+ <!-- Online reference works use full dates (CMOS18 14.131) -->
+ <text macro="date-issued-month-day"/>
+ </if>
+ </choose>
+ </else-if>
+ <else-if match="any" type="article broadcast collection dataset document event graphic interview manuscript map patent performance personal_communication post software song speech standard webpage">
+ <text macro="date-issued-month-day"/>
+ </else-if>
+ </choose>
</macro>
- <macro name="collection-title">
+ <macro name="source-date-issued-month-day-serial">
<choose>
- <if match="none" type="article-journal">
+ <if type="article-newspaper">
+ <!-- newspapers provide the full date in place of volume/issue numbers (CMOS18 14.89) -->
+ <text macro="date-issued-month-day"/>
+ </if>
+ <else-if match="any" variable="issue supplement-number volume">
+ <text macro="date-issued-month"/>
+ </else-if>
+ <else>
+ <text macro="date-issued-month-day"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="source-date-original">
+ <text macro="source-date-original-month-day"/>
+ </macro>
+ <macro name="source-date-original-month-day">
+ <!-- Give full date for more ephemeral types; reflected in `date-sort` -->
+ <!-- Macro derived from `source-date-issued-month-day` -->
+ <choose>
+ <if type="personal_communication" variable="event-date original-date">
+ <!-- Provide original date for letters listed under event-date -->
+ <text macro="date-original-year"/>
+ </if>
+ <else-if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book">
<choose>
- <if match="none" is-numeric="collection-number">
- <group delimiter=", ">
- <text variable="collection-title" text-case="title"/>
- <text variable="collection-number"/>
- </group>
+ <if match="any" variable="issue supplement-number volume">
+ <text macro="date-original-month"/>
</if>
<else>
+ <text macro="date-original-month-day"/>
+ </else>
+ </choose>
+ </else-if>
+ <else-if match="any" type="interview paper-conference">
+ <choose>
+ <if match="none" variable="collection-editor compiler editor editorial-director">
+ <!-- serial usage -->
+ <choose>
+ <if match="any" variable="issue supplement-number volume">
+ <text macro="date-original-month"/>
+ </if>
+ <else>
+ <text macro="date-original-month-day"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </else-if>
+ <else-if match="any" type="entry entry-dictionary entry-encyclopedia">
+ <choose>
+ <if match="any" variable="DOI URL">
+ <!-- Online reference works use full dates (CMOS18 14.131) -->
+ <text macro="date-original-month-day"/>
+ </if>
+ </choose>
+ </else-if>
+ <else-if match="any" type="article broadcast collection dataset document event graphic interview manuscript map patent performance personal_communication post software song speech standard webpage">
+ <text macro="date-original-month-day"/>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="source-date-status-bib">
+ <choose>
+ <if type="broadcast" variable="event-title issued status"/>
+ <!-- on a `broadcast`, if there is an `event-title`, `status` appears with `event-date` as part of `source-event` (CMOS18 14.165) -->
+ <else-if variable="issued status">
+ <!-- `status` specifies date type, e.g. 'effective', 'last modified', 'approved' (CMOS18 14.104 for `webpage`; CMOS18 14.159 for `standard`) -->
+ <choose>
+ <if match="any" variable="original-date original-publisher original-publisher-place original-title publisher">
+ <text variable="status"/>
+ </if>
+ <else>
+ <text text-case="capitalize-first" variable="status"/>
+ </else>
+ </choose>
+ </else-if>
+ <else-if type="broadcast" variable="issued URL"/>
+ <else-if type="broadcast" variable="issued">
+ <!-- `status` of a radio or TV broadcast is 'aired' if unspecified (CMOS18 14.165) -->
+ <text text-case="capitalize-first" value="aired"/>
+ </else-if>
+ <else-if type="software" variable="issued publisher">
+ <!-- `status` of software is 'released' if unspecified (CMOS18 14.169) -->
+ <choose>
+ <if match="any" variable="author chair collection-editor compiler composer contributor curator director editor editor-translator editorial-director executive-producer guest host illustrator organizer producer series-creator translator">
+ <!-- lowercase if `publisher` is adjacent -->
+ <text value="released"/>
+ </if>
+ <else>
+ <text text-case="capitalize-first" value="released"/>
+ </else>
+ </choose>
+ </else-if>
+ <else-if type="software" variable="original-date">
+ <!-- lowercase if `original-date` is adjacent -->
+ <text value="released"/>
+ </else-if>
+ <else-if type="software" variable="issued">
+ <!-- capitalize if `publisher` is not present -->
+ <text text-case="capitalize-first" value="released"/>
+ </else-if>
+ </choose>
+ </macro>
+ <!-- 4.7. Locator (including page references) -->
+ <macro name="source-locator-author-date">
+ <choose>
+ <if match="any" type="entry entry-dictionary entry-encyclopedia">
+ <choose>
+ <if match="any" variable="author locator">
+ <text macro="label-locator"/>
+ </if>
+ <else-if variable="container-title title">
+ <!-- unsigned reference entry title appears in the locator (CMOS18 13.130) -->
<group delimiter=" ">
- <text variable="collection-title" text-case="title"/>
- <text variable="collection-number"/>
+ <choose>
+ <if match="none" variable="DOI URL">
+ <!-- Only print reference entries use `sub-verbo` (CMOS18 14.131) -->
+ <text form="short" term="sub-verbo"/>
+ </if>
+ </choose>
+ <text form="short" quotes="true" variable="title"/>
</group>
- </else>
+ </else-if>
</choose>
</if>
+ <else>
+ <text macro="label-locator"/>
+ </else>
+ </choose>
+ </macro>
+ <!-- 4.8. Medium -->
+ <macro name="source-medium-bib">
+ <group delimiter=", ">
+ <text text-case="capitalize-first" variable="medium"/>
+ <text variable="scale"/>
+ <text variable="dimensions"/>
+ </group>
+ </macro>
+ <!-- 4.9. Archival location -->
+ <macro name="source-archive-bib">
+ <choose>
+ <!-- With `archive_collection` or `archive-place`: physical archives. Without: digital archives (database and identifier) -->
+ <if type="graphic">
+ <text macro="source-archive-name-first"/>
+ </if>
+ <else-if match="any" type="collection document manuscript" variable="archive_collection archive-place">
+ <text macro="source-archive-location-first-bib"/>
+ </else-if>
+ <else>
+ <text macro="source-archive-identifier"/>
+ </else>
</choose>
</macro>
- <macro name="collection-title-journal">
+ <macro name="source-archive-note">
<choose>
- <if type="article-journal">
+ <!-- With `archive_collection` or `archive-place`: physical archives -->
+ <if type="graphic">
+ <text macro="source-archive-name-first"/>
+ </if>
+ <else-if match="any" type="collection document manuscript" variable="archive_collection archive-place">
+ <text macro="source-archive-location-first-note"/>
+ </else-if>
+ <!-- Without `archive_collection` or `archive-place`: digital archives (database and identifier) -->
+ <else>
+ <text macro="source-archive-identifier"/>
+ </else>
+ </choose>
+ </macro>
+ <!-- Archival elements -->
+ <macro name="source-archive-identifier">
+ <choose>
+ <if variable="archive archive_location">
+ <!-- database identifier: the only example is `thesis`, but presumably this is for all types (CMOS18 14.113) -->
<group delimiter=" ">
- <text variable="collection-title"/>
- <text variable="collection-number"/>
+ <text variable="archive"/>
+ <text prefix="(" suffix=")" variable="archive_location"/>
</group>
</if>
+ <else>
+ <group delimiter=", ">
+ <text variable="archive"/>
+ <text variable="archive_location"/>
+ </group>
+ </else>
</choose>
</macro>
- <macro name="event">
+ <macro name="source-archive-location-first-bib">
+ <!-- Order of elements begins with the most specific (CMOS18 14.119, 14.127) -->
+ <!-- In note styles, the bibliography generally provide entries for a `collection` rather than individual items (CMOS18 14.120, 14.128) -->
+ <group delimiter=". ">
+ <group delimiter=", ">
+ <text text-case="capitalize-first" variable="archive_location"/>
+ <text variable="archive_collection"/>
+ </group>
+ <group delimiter=", ">
+ <text variable="archive"/>
+ <text variable="archive-place"/>
+ </group>
+ </group>
+ </macro>
+ <macro name="source-archive-location-first-note">
+ <!-- Order of elements begins with the most specific (CMOS18 14.119, 14.127) -->
+ <!-- In note styles, the bibliography generally provide entries for a `collection` rather than individual items (CMOS18 14.120, 14.128) -->
+ <group delimiter=", ">
+ <group delimiter=", ">
+ <text variable="archive_location"/>
+ <text variable="archive_collection"/>
+ </group>
+ <group delimiter=", ">
+ <text variable="archive"/>
+ <text variable="archive-place"/>
+ </group>
+ </group>
+ </macro>
+ <macro name="source-archive-name-first">
+ <!-- Archive (gallery) name first for art (CMOS18 14.133) -->
+ <group delimiter=", ">
+ <text variable="archive"/>
+ <text variable="archive-place"/>
+ <text variable="archive_collection"/>
+ <text variable="archive_location"/>
+ </group>
+ </macro>
+ <!-- 4.10. URL or persistent identifier -->
+ <macro name="source-DOI-URL-bib">
+ <choose>
+ <if variable="DOI">
+ <text prefix="https://doi.org/" variable="DOI"/>
+ </if>
+ <else-if variable="URL">
+ <group delimiter=". ">
+ <choose>
+ <if match="none" variable="event-date issued status">
+ <group delimiter=" ">
+ <text term="accessed" text-case="capitalize-first"/>
+ <date form="text" variable="accessed"/>
+ </group>
+ </if>
+ </choose>
+ <text variable="URL"/>
+ </group>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="source-DOI-URL">
+ <!-- Alias to avoid modifying legal references block shared with APA -->
+ <text macro="source-DOI-URL-bib"/>
+ </macro>
+ <!-- 5. Notes -->
+ <macro name="notes">
+ <!-- Notes on source element: original publication, reprint info, retraction info -->
+ <text variable="references"/>
+ </macro>
+ <!-- 6. Legal references: Bluebook style (shared with APA) -->
+ <macro name="legal-reference">
+ <!-- Type usage:
+
+ `bill`
+ : bills, resolutions, federal reports
+
+ `legal_case`
+ : all legal and court cases
+
+ `hearing`
+ : hearings and testimony
+
+ `legislation`
+ : statutes, constitutional items, and charters
+
+ `regulation`
+ : codified regulations, uncodified regulations, executive orders
+
+ `treaty`
+ : treaties
+ -->
<group delimiter=" ">
<choose>
- <if variable="genre">
- <text term="presented at"/>
+ <if type="treaty">
+ <group delimiter=", " suffix=".">
+ <!-- APA generally defers to Bluebook for legal citations, but diverges without explanation for treaty items. We follow the Bluebook format that was used in APA 6th ed. -->
+ <!-- APA manual omits treaty parties/authors, but per Bluebook they should be included at least for bilateral treaties. -->
+ <text macro="legal-title"/>
+ <text macro="legal-author"/>
+ <text macro="legal-date"/>
+ <!-- APA manual omits treaty source/report called for by Bluebook in favor of just URL. Both are included here, following the APA style used for all other item types to end the reference with a period, then give the URL afterward. -->
+ <text macro="legal-source"/>
+ </group>
</if>
<else>
- <text term="presented at" text-case="capitalize-first"/>
+ <group delimiter=" " suffix=".">
+ <group delimiter=", ">
+ <text macro="legal-title"/>
+ <text macro="legal-source"/>
+ </group>
+ <text macro="legal-date"/>
+ <text macro="legal-identifier"/>
+ </group>
</else>
</choose>
- <text variable="event"/>
+ <text variable="references"/>
+ <text macro="source-DOI-URL"/>
</group>
</macro>
- <macro name="description">
+ <!-- 6.1. Legal author -->
+ <macro name="legal-author">
+ <names variable="author">
+ <name delimiter="-" form="short"/>
+ </names>
+ </macro>
+ <!-- 6.2. Legal date -->
+ <macro name="legal-date">
<choose>
- <if variable="interviewer" type="interview" match="any">
- <group delimiter=". ">
- <text macro="interviewer"/>
- <text variable="medium" text-case="capitalize-first"/>
- </group>
+ <if type="treaty">
+ <text macro="date-issued-full"/>
</if>
- <else-if type="patent">
- <group delimiter=" " prefix=". ">
- <text variable="authority"/>
- <text variable="number"/>
- </group>
+ <else-if type="legal_case">
+ <text macro="legal-date-case"/>
</else-if>
- <else>
- <text variable="medium" text-case="capitalize-first" prefix=". "/>
- </else>
- </choose>
- <choose>
- <if variable="title" match="none"/>
- <else-if type="thesis personal_communication speech" match="any"/>
- <else>
- <group delimiter=" " prefix=". ">
- <text variable="genre" text-case="capitalize-first"/>
+ <else-if match="any" type="bill hearing legislation regulation">
+ <group delimiter=" " prefix="(" suffix=")">
+ <group delimiter=" ">
+ <text macro="date-original-year"/>
+ <text form="symbol" term="and"/>
+ </group>
<choose>
- <if type="report">
- <text variable="number"/>
+ <if variable="issued">
+ <!-- APA manual includes "rev." before the revision year, but this isn't part of the Bluebook rules. -->
+ <text macro="date-issued-year"/>
</if>
+ <else>
+ <!-- Show proposal date for uncodified regulations. Assume date is entered literally ala "proposed May 23, 2016". -->
+ <!-- TODO: Add `proposed` date here if that becomes available -->
+ <date form="text" variable="submitted"/>
+ </else>
</choose>
</group>
- </else>
+ </else-if>
</choose>
</macro>
- <macro name="issue">
+ <macro name="legal-date-case">
+ <group delimiter=" " prefix="(" suffix=")">
+ <text variable="authority"/>
+ <choose>
+ <if variable="container-title">
+ <!-- Print only year for cases published in reporters-->
+ <text macro="date-issued-year"/>
+ </if>
+ <else>
+ <text macro="date-issued-full"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <!-- 6.3.1. Legal title -->
+ <macro name="legal-title">
<choose>
- <if type="legal_case">
- <text variable="authority" prefix=". "/>
+ <if match="any" type="bill legal_case legislation regulation treaty">
+ <text text-case="title" variable="title"/>
</if>
- <else-if type="speech">
- <group prefix=". " delimiter=", ">
+ <else-if type="hearing">
+ <!-- APA uses a comma delimiter and omits "hearing before the" for hearings with testimony, but follows Bluebook rules (colon delimiter, prefix before the committee name) for references to the whole hearing. We simply follow the Bluebook rules for both, but use APA style capitalization (not capitalizing "Before" or the title of the hearing). -->
+ <group delimiter=": " font-style="italic">
+ <text text-case="capitalize-first" variable="title"/>
<group delimiter=" ">
- <text variable="genre" text-case="capitalize-first"/>
- <text macro="event"/>
+ <text term="hearing" text-case="capitalize-first"/>
+ <group delimiter=" ">
+ <group delimiter=" ">
+ <!-- APA manual omits the bill number, but it should be included per Bluebook if relevant -->
+ <text term="on"/>
+ <text variable="number"/>
+ </group>
+ <group delimiter=" ">
+ <!-- Use the `at` term to hold "before the" -->
+ <text term="at"/>
+ <text variable="section"/>
+ </group>
+ </group>
</group>
- <text variable="event-place"/>
- <text macro="day-month"/>
</group>
</else-if>
- <else-if type="article-newspaper article-magazine personal_communication" match="any">
- <date variable="issued" form="text" prefix=", "/>
+ </choose>
+ </macro>
+ <!-- 6.3.2. Legal identifier -->
+ <macro name="legal-identifier">
+ <choose>
+ <if type="hearing">
+ <group delimiter=" " prefix="(" suffix=")">
+ <!-- Use the 'verb' form of the hearing term to hold 'testimony of' -->
+ <text form="verb" term="hearing"/>
+ <names variable="author">
+ <name initialize="false"/>
+ </names>
+ </group>
+ </if>
+ <else-if match="any" type="bill legislation regulation">
+ <!-- For uncodified regulations, assume future code section is in `status`. -->
+ <text prefix="(" suffix=")" variable="status"/>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="legal-identifier-bill-report">
+ <group delimiter=" ">
+ <text variable="genre"/>
+ <choose>
+ <if match="any" variable="authority chapter-number container-title">
+ <text variable="number"/>
+ </if>
+ <else>
+ <!-- If there is no legislative body, session number, or code/record title, assume the item is a congressional report and include 'No.' label. -->
+ <text macro="label-number-capitalized"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <!-- 6.4. Legal source -->
+ <macro name="legal-source">
+ <!-- Expect legal item `container-title` to be stored in short form -->
+ <choose>
+ <if type="bill">
+ <text macro="legal-source-bill"/>
+ </if>
+ <else-if type="hearing">
+ <text macro="legal-source-hearing"/>
+ </else-if>
+ <else-if type="legal_case">
+ <text macro="legal-source-case"/>
+ </else-if>
+ <else-if type="legislation">
+ <text macro="legal-source-legislation"/>
+ </else-if>
+ <else-if type="regulation">
+ <text macro="legal-source-regulation"/>
+ </else-if>
+ <else-if type="treaty">
+ <text macro="legal-source-treaty"/>
</else-if>
- <else-if type="patent">
- <group delimiter=", " prefix=", ">
+ </choose>
+ </macro>
+ <!-- Legal source types -->
+ <macro name="legal-source-bill">
+ <group delimiter=", ">
+ <text macro="legal-identifier-bill-report"/>
+ <group delimiter=" ">
+ <text variable="authority"/>
+ <!-- 'session' is `chapter-number` -->
+ <text variable="chapter-number"/>
+ </group>
+ <group delimiter=" ">
+ <text variable="volume"/>
+ <text variable="container-title"/>
+ <text variable="page-first"/>
+ </group>
+ </group>
+ </macro>
+ <macro name="legal-source-case">
+ <group delimiter=" ">
+ <choose>
+ <if variable="container-title">
<group delimiter=" ">
- <!--Needs Localization-->
- <text value="filed"/>
- <date variable="submitted" form="text"/>
+ <text variable="volume"/>
+ <text variable="container-title"/>
+ <text macro="label-section-symbol"/>
+ <choose>
+ <if match="any" variable="page page-first">
+ <text variable="page-first"/>
+ </if>
+ <else>
+ <text value="___"/>
+ </else>
+ </choose>
</group>
+ </if>
+ <else>
+ <text macro="label-number-capitalized"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <macro name="legal-source-hearing">
+ <group delimiter=" ">
+ <text variable="authority"/>
+ <!-- 'session' is `chapter-number` -->
+ <text variable="chapter-number"/>
+ </group>
+ </macro>
+ <macro name="legal-source-legislation">
+ <choose>
+ <if variable="number">
+ <!-- There's a public law number. -->
+ <group delimiter=", ">
<group delimiter=" ">
<choose>
- <if variable="issued submitted" match="all">
- <text term="and"/>
+ <if variable="genre">
+ <text text-case="capitalize-first" variable="genre"/>
</if>
+ <else>
+ <text form="short" term="legislation" text-case="capitalize-first"/>
+ </else>
</choose>
- <!--Needs Localization-->
- <text value="issued"/>
- <date variable="issued" form="text"/>
+ <text macro="label-number-capitalized"/>
+ </group>
+ <group delimiter=" ">
+ <text variable="volume"/>
+ <text variable="container-title"/>
+ <text variable="page-first"/>
</group>
</group>
- </else-if>
- <else-if type="article-journal" match="any"/>
+ </if>
<else>
- <group prefix=". " delimiter=", ">
+ <group delimiter=" ">
+ <text variable="volume"/>
+ <text variable="container-title"/>
<choose>
- <if type="thesis">
- <text variable="genre" text-case="capitalize-first"/>
+ <if variable="section">
+ <text macro="label-section-symbol"/>
</if>
+ <else>
+ <text variable="page-first"/>
+ </else>
</choose>
- <text macro="publisher"/>
</group>
</else>
</choose>
</macro>
- <citation et-al-min="4" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true" givenname-disambiguation-rule="primary-name" collapse="year" after-collapse-delimiter="; ">
- <layout prefix="(" suffix=")" delimiter="; ">
- <group delimiter=", ">
+ <macro name="legal-source-regulation">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <text variable="genre"/>
+ <text macro="label-number-capitalized"/>
+ </group>
+ <group delimiter=" ">
+ <text variable="volume"/>
+ <text variable="container-title"/>
<choose>
- <if variable="issued accessed" match="any">
- <group delimiter=" ">
- <text macro="contributors-short"/>
- <text macro="date-in-text"/>
+ <if variable="section">
+ <text macro="label-section-symbol"/>
+ </if>
+ <else>
+ <text variable="page-first"/>
+ </else>
+ </choose>
+ </group>
+ </group>
+ </macro>
+ <macro name="legal-source-treaty">
+ <group delimiter=" ">
+ <number variable="volume"/>
+ <text variable="container-title"/>
+ <choose>
+ <if match="any" variable="page page-first">
+ <text variable="page-first"/>
+ </if>
+ <else>
+ <text macro="label-number-capitalized"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <!-- Citation -->
+ <macro name="citation-author-date">
+ <!-- Usage:
+
+ <citation after-collapse-delimiter="; " collapse="year" disambiguate-add-givenname="true" disambiguate-add-names="true" disambiguate-add-year-suffix="true" et-al-min="3" et-al-use-first="1" givenname-disambiguation-rule="primary-name-with-initials"><layout delimiter="; " prefix="(" suffix=")"><text macro="citation-author-date"/></layout></citation>
+ -->
+ <choose>
+ <if type="classic">
+ <!-- with `classic`, a non-numeric canonical reference or identifying number is separated by a space rather than a comma (CMOS18 14.145) -->
+ <choose>
+ <if is-numeric="locator">
+ <group delimiter=", ">
+ <text macro="citation-author-date-item"/>
+ <text macro="source-locator-author-date"/>
</group>
</if>
- <!---comma before forthcoming and n.d.-->
+ <else-if locator="chapter line verse" match="any">
+ <group delimiter=" ">
+ <text macro="citation-author-date-item"/>
+ <text macro="source-locator-author-date"/>
+ </group>
+ </else-if>
<else>
<group delimiter=", ">
- <text macro="contributors-short"/>
- <text macro="date-in-text"/>
+ <text macro="citation-author-date-item"/>
+ <text macro="source-locator-author-date"/>
</group>
</else>
</choose>
- <text macro="point-locators"/>
- </group>
+ </if>
+ <else>
+ <group delimiter=", ">
+ <text macro="citation-author-date-item"/>
+ <text macro="source-locator-author-date"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="citation-author-date-item">
+ <group delimiter=", ">
+ <choose>
+ <if type="classic">
+ <text macro="author-inline"/>
+ <choose>
+ <if variable="author">
+ <text macro="title-and-descriptions-short"/>
+ </if>
+ </choose>
+ </if>
+ <else-if match="any" variable="event-date issued">
+ <choose>
+ <if match="any" type="interview personal_communication">
+ <choose>
+ <if match="any" variable="archive archive-place container-title DOI number publisher references URL">
+ <group delimiter=" ">
+ <text macro="author-inline"/>
+ <text macro="date-short"/>
+ </group>
+ </if>
+ <else>
+ <!-- unpublished `interview` or `personal_communication` use inline format (CMOS18 14.111) -->
+ <text macro="author-inline"/>
+ <text macro="title-and-descriptions-short"/>
+ <text macro="date-short"/>
+ </else>
+ </choose>
+ </if>
+ <else>
+ <group delimiter=" ">
+ <text macro="author-inline"/>
+ <text macro="date-short"/>
+ </group>
+ </else>
+ </choose>
+ </else-if>
+ <else>
+ <!--- Comma with forthcoming or n.d. -->
+ <text macro="author-inline"/>
+ <choose>
+ <if match="any" type="interview personal_communication">
+ <choose>
+ <if match="none" variable="archive archive-place container-title DOI number publisher references URL">
+ <!-- unpublished `interview` or `personal_communication` use inline format (CMOS18 14.111) -->
+ <text macro="title-and-descriptions-short"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ <text macro="date-short"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <citation after-collapse-delimiter="; " collapse="year" disambiguate-add-givenname="true" disambiguate-add-names="true" disambiguate-add-year-suffix="true" et-al-min="3" et-al-use-first="1" givenname-disambiguation-rule="primary-name-with-initials">
+ <layout delimiter="; " prefix="(" suffix=")">
+ <text macro="citation-author-date"/>
</layout>
</citation>
- <bibliography hanging-indent="true" et-al-min="11" et-al-use-first="7" subsequent-author-substitute="&#8212;&#8212;&#8212;" entry-spacing="0">
+ <!-- Bibliography -->
+ <macro name="bibliography-author-date">
+ <choose>
+ <if match="any" type="bill hearing legal_case legislation regulation treaty">
+ <!-- Legal items have different orders and delimiters -->
+ <text macro="legal-reference"/>
+ </if>
+ <else>
+ <group delimiter=". ">
+ <text macro="author-bib"/>
+ <text macro="date"/>
+ <text macro="title-and-source-bib"/>
+ <text macro="notes"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="bibliography-filtered-author-date">
+ <!-- usage:
+ <sort><key macro="author-sort"/><key macro="date-sort-group"/><key macro="date-sort"/><key variable="status"/><key macro="title-bib"/><key variable="part-number"/><key variable="volume"/></sort><layout suffix="."><text macro="bibliography-filtered-author-date"/></layout>
+ -->
+ <choose>
+ <if type="classic">
+ <choose>
+ <if match="any" variable="archive editor translator publisher">
+ <text macro="bibliography-author-date"/>
+ </if>
+ </choose>
+ </if>
+ <else-if match="any" type="entry entry-dictionary entry-encyclopedia">
+ <choose>
+ <if variable="author">
+ <!-- Signed reference entries appear in the bibliography (CMOS18 14.132) -->
+ <text macro="bibliography-author-date"/>
+ </if>
+ <else-if match="any" variable="DOI URL">
+ <!-- Provide a bibliography if necessary identifying information is not in text -->
+ <text macro="bibliography-author-date"/>
+ </else-if>
+ </choose>
+ </else-if>
+ <else-if match="any" type="interview personal_communication">
+ <choose>
+ <if match="any" variable="archive archive-place container-title DOI number publisher references URL">
+ <!-- Personal communications only appear in the bibliography if the reader can retrieve them (CMOS18 14.13, 14.111) -->
+ <text macro="bibliography-author-date"/>
+ </if>
+ </choose>
+ </else-if>
+ <else>
+ <text macro="bibliography-author-date"/>
+ </else>
+ </choose>
+ </macro>
+ <bibliography et-al-min="7" et-al-use-first="3" hanging-indent="true">
<sort>
- <key macro="contributors"/>
- <key variable="issued"/>
- <key variable="title"/>
+ <key macro="author-sort"/>
+ <key macro="date-sort-group"/>
+ <key macro="date-sort"/>
+ <key variable="status"/>
+ <key macro="title-bib"/>
+ <key variable="part-number"/>
+ <key variable="volume"/>
</sort>
<layout suffix=".">
- <group delimiter=". ">
- <text macro="contributors"/>
- <text macro="date"/>
- <text macro="title"/>
- </group>
- <text macro="description"/>
- <text macro="secondary-contributors" prefix=". "/>
- <text macro="container-title" prefix=". "/>
- <text macro="container-contributors"/>
- <text macro="edition"/>
- <text macro="locators-chapter"/>
- <text macro="collection-title-journal" prefix=", " suffix=", "/>
- <text macro="locators"/>
- <text macro="collection-title" prefix=". "/>
- <text macro="issue"/>
- <text macro="locators-article"/>
- <text macro="access" prefix=". "/>
+ <text macro="bibliography-filtered-author-date"/>
</layout>
</bibliography>
</style>
diff --git a/src/Text/Pandoc/Citeproc.hs b/src/Text/Pandoc/Citeproc.hs
index a290a8bdf..5ab245e16 100644
--- a/src/Text/Pandoc/Citeproc.hs
+++ b/src/Text/Pandoc/Citeproc.hs
@@ -299,6 +299,8 @@ getCitations locale otherIdsMap = Foldable.toList . query getCitation
where
getCitation (Cite cs _fallback) = Seq.singleton $
Citeproc.Citation { Citeproc.citationId = Nothing
+ , Citeproc.citationPrefix = Nothing
+ , Citeproc.citationSuffix = Nothing
, Citeproc.citationNoteNumber =
case cs of
[] -> Nothing
@@ -318,7 +320,7 @@ fromPandocCitations locale otherIdsMap = concatMap go
where
locmap = toLocatorMap locale
go c =
- let (mblocinfo, suffix) = parseLocator locmap (citationSuffix c)
+ let (mblocinfo, suffix) = parseLocator locmap (Pandoc.citationSuffix c)
cit = CitationItem
{ citationItemId = fromMaybe
(ItemId $ Pandoc.citationId c)
@@ -326,7 +328,7 @@ fromPandocCitations locale otherIdsMap = concatMap go
, citationItemLabel = locatorLabel <$> mblocinfo
, citationItemLocator = locatorLoc <$> mblocinfo
, citationItemType = NormalCite
- , citationItemPrefix = case citationPrefix c of
+ , citationItemPrefix = case Pandoc.citationPrefix c of
[] -> Nothing
ils -> Just $ B.fromList ils <>
B.space
diff --git a/src/Text/Pandoc/Readers/EndNote.hs b/src/Text/Pandoc/Readers/EndNote.hs
index b49581131..f0f22338d 100644
--- a/src/Text/Pandoc/Readers/EndNote.hs
+++ b/src/Text/Pandoc/Readers/EndNote.hs
@@ -81,6 +81,8 @@ readEndNoteXMLCitation xml = do
let items = map toCitationItem $ filterElementsName (name "Cite") tree
return $ Citeproc.Citation{
Citeproc.citationId = Nothing
+ , Citeproc.citationPrefix = Nothing
+ , Citeproc.citationSuffix = Nothing
, Citeproc.citationNoteNumber = Nothing
, Citeproc.citationItems = items
}
diff --git a/test/command/10185.md b/test/command/10185.md
index e41fdf480..9c5746937 100644
--- a/test/command/10185.md
+++ b/test/command/10185.md
@@ -36,7 +36,7 @@ Lorem ipsum (John Doe, n.d.).
\section{References}\label{references}
\protect\phantomsection\label{refs}
-\begin{CSLReferences}{1}{0}
+\begin{CSLReferences}{1}{1}
\bibitem[\citeproctext]{ref-foo}
John Doe. n.d. \emph{The Title}.
diff --git a/test/command/6783.md b/test/command/6783.md
index bbb98ce18..64e085dbd 100644
--- a/test/command/6783.md
+++ b/test/command/6783.md
@@ -20,7 +20,7 @@ This is a test[@ref-1].
This is a test(Jupyter 2018).
Jupyter, Project. 2018. “Binder 2.0 - Reproducible, Interactive,
-Sharable Environments for Science at Scale.” In Proceedings of the 17th
+Sharable Environments for Science at Scale.” Proceedings of the 17th
Python in Science Conference.
```
diff --git a/test/command/6890.md b/test/command/6890.md
index 3404a7ee3..267694488 100644
--- a/test/command/6890.md
+++ b/test/command/6890.md
@@ -38,13 +38,11 @@ Some text.[^1]
, citationHash = 0
}
]
- [ Str "Fr\252chtel,"
+ [ Str "Fr\252chtel"
, Space
- , Str "Budde,"
+ , Str "et"
, Space
- , Str "and"
- , Space
- , Str "Cyprian"
+ , Str "al."
, Space
, Str "(2013)"
]
@@ -65,13 +63,11 @@ Some text.[^1]
, citationHash = 0
}
]
- [ Str "Fr\252chtel,"
- , Space
- , Str "Budde,"
+ [ Str "Fr\252chtel"
, Space
- , Str "and"
+ , Str "et"
, Space
- , Str "Cyprian"
+ , Str "al."
, Space
, Str "(2013)"
]
@@ -81,7 +77,7 @@ Some text.[^1]
, Div
( "refs"
, [ "references" , "csl-bib-body" , "hanging-indent" ]
- , [ ( "entry-spacing" , "0" ) ]
+ , []
)
[ Div
( "ref-fruchtel-sozialer-2013a" , [ "csl-entry" ] , [] )
@@ -127,10 +123,6 @@ Some text.[^1]
, Space
, Str "ed."
, Space
- , Str "Wiesbaden,"
- , Space
- , Str "Germany:"
- , Space
, Str "Springer"
, Space
, Str "VS."
diff --git a/test/command/6951.md b/test/command/6951.md
index 4a6301d80..69815f8ed 100644
--- a/test/command/6951.md
+++ b/test/command/6951.md
@@ -14,5 +14,5 @@ references:
Crazy. n.d.
-Doe, John. 2005. First Book. Cambridge: Cambridge University Press.
+Doe, John. 2005. First Book. Cambridge University Press.
```
diff --git a/test/command/7219.md b/test/command/7219.md
index 34b9341ef..9f5bc30e9 100644
--- a/test/command/7219.md
+++ b/test/command/7219.md
@@ -20,6 +20,6 @@ and also in -@reese
and also in (1958)
Reese, Trevor R. 1958. “Georgia in Anglo-Spanish Diplomacy, 1736-1739.”
-William and Mary Quarterly, 3rd series, 15: 168–90.
+William and Mary Quarterly, 3rd series, vol. 15: 168–90.
```
diff --git a/test/command/7329.md b/test/command/7329.md
index 623ee8126..cb3403288 100644
--- a/test/command/7329.md
+++ b/test/command/7329.md
@@ -32,7 +32,7 @@
<<refs>>
<<ref-item1>>
-Doe, John. 2005. /First Book/. Cambridge: Cambridge University Press.
+Doe, John. 2005. /First Book/. Cambridge University Press.
```
@@ -45,7 +45,7 @@ Doe, John. 2005. /First Book/. Cambridge: Cambridge University Press.
<<refs>>
<<ref-item1>>
-Doe, John. 2005. /First Book/. Cambridge: Cambridge University Press.
+Doe, John. 2005. /First Book/. Cambridge University Press.
```
```
diff --git a/test/command/8354.md b/test/command/8354.md
index 6089556c9..96e3d6801 100644
--- a/test/command/8354.md
+++ b/test/command/8354.md
@@ -26,7 +26,7 @@ references:
^D
<h2 class="unnumbered" id="references">References</h2>
<div id="refs" class="references csl-bib-body hanging-indent"
-data-entry-spacing="0" role="list">
+role="list">
<div id="ref-feketeExploringReproducibilityVisualization2020"
class="csl-entry" role="listitem">
Fekete, Jean-Daniel, and Juliana Freire. 2020. <span>“Exploring
diff --git a/test/command/9017.md b/test/command/9017.md
index dd4fd6c51..4faa153b8 100644
--- a/test/command/9017.md
+++ b/test/command/9017.md
@@ -45,7 +45,8 @@ title: Doc example with single reference
<ref-list>
<title></title>
<ref id="ref-degroot_probability">
- <mixed-citation>DeGroot. 2002. “Probability.”</mixed-citation>
+ <mixed-citation>DeGroot. 2002.
+ <italic>Probability</italic>.</mixed-citation>
</ref>
</ref-list>
</back>
diff --git a/test/command/9904.md b/test/command/9904.md
index c03b1d95c..8a5048651 100644
--- a/test/command/9904.md
+++ b/test/command/9904.md
@@ -153,7 +153,7 @@ Axioms were introduced :cite:p:`{see}item1{p. 1166}`.
, Div
( "refs"
, [ "references" , "csl-bib-body" , "hanging-indent" ]
- , [ ( "entry-spacing" , "0" ) ]
+ , []
)
[ Div
( "ref-item1" , [ "csl-entry" ] , [] )
@@ -167,8 +167,6 @@ Axioms were introduced :cite:p:`{see}item1{p. 1166}`.
, Emph [ Str "First" , Space , Str "Book" ]
, Str "."
, Space
- , Str "Cambridge:"
- , Space
, Str "Cambridge"
, Space
, Str "University"
diff --git a/test/command/citeproc-87.md b/test/command/citeproc-87.md
index dd9287e78..5ff5131f0 100644
--- a/test/command/citeproc-87.md
+++ b/test/command/citeproc-87.md
@@ -32,7 +32,7 @@ Foo [@a 50].
^D
Foo (Aristotele, n.d., 50).
-Aristotele. n.d. “Metafisica Et ‘Physica’.”
+Aristotele. n.d. Metafisica Et “Physica”.
```
```
@@ -50,6 +50,6 @@ Foo [@a 50].
^D
Foo (Aristotele, s.d., 50).
-Aristotele. s.d. «Metafisica et “Physica”».
+Aristotele. s.d. Metafisica et «Physica».
```
diff --git a/test/command/pandoc-citeproc-118.md b/test/command/pandoc-citeproc-118.md
index 1559bbfcc..5aa727ec3 100644
--- a/test/command/pandoc-citeproc-118.md
+++ b/test/command/pandoc-citeproc-118.md
@@ -19,10 +19,9 @@ references:
^D
(Hitchcock 1959) is a spy thriller film.
-:::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+:::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-nbn .csl-entry}
-Hitchcock, Alfred, dir. 1959. *North by Northwest*. USA:
-Metro-Goldwyn-Mayer.
+Hitchcock, Alfred, dir. 1959. *North by Northwest*. Metro-Goldwyn-Mayer.
:::
::::
```
diff --git a/test/command/pandoc-citeproc-136.md b/test/command/pandoc-citeproc-136.md
index 86a952617..3657900a8 100644
--- a/test/command/pandoc-citeproc-136.md
+++ b/test/command/pandoc-citeproc-136.md
@@ -15,7 +15,7 @@ references:
^D
*Stanze in lode della donna brutta* (1547) is an anoynymous work.
-:::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+:::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-stanze .csl-entry}
*Stanze in lode della donna brutta*. 1547. Florence.
:::
diff --git a/test/command/pandoc-citeproc-14.md b/test/command/pandoc-citeproc-14.md
index fd51e496d..99b4f89bc 100644
--- a/test/command/pandoc-citeproc-14.md
+++ b/test/command/pandoc-citeproc-14.md
@@ -51,27 +51,27 @@ Foo [@CT, 1:12]. Bar [@CTv1, 12]. Baz [@CTv1c2, 12].
References {#references .unnumbered}
==========
^D
-Foo (Pelikan 1971b, 1:12). Bar (Pelikan 1971c, 1:12). Baz (Pelikan
-1971a, 12).
+Foo (Pelikan 1971b, 1:12). Bar (Pelikan 1971c, 12). Baz (Pelikan 1971a,
+12).
# References {#references .unnumbered}
-:::::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+:::::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-CTv1c2 .csl-entry}
-Pelikan, Jaroslav. 1971a. "Chapter Two." In *The Christian Tradition: A
-History of the Development of Doctrine*, 1:34--56. Chicago: University
-of Chicago Press.
+Pelikan, Jaroslav. 1971a. "Chapter Two." In *The Emergence of the
+Catholic Tradition (100--600)*, vol. 1 of *The Christian Tradition: A
+History of the Development of Doctrine*. University of Chicago Press.
:::
::: {#ref-CT .csl-entry}
----------. 1971b. *The Christian Tradition: A History of the Development
-of Doctrine*. Chicago: University of Chicago Press.
+Pelikan, Jaroslav. 1971b. *The Christian Tradition: A History of the
+Development of Doctrine*. University of Chicago Press.
:::
::: {#ref-CTv1 .csl-entry}
----------. 1971c. *The Emergence of the Catholic Tradition (100--600)*.
-*The Christian Tradition: A History of the Development of Doctrine*.
-Vol. 1. Chicago: University of Chicago Press.
+Pelikan, Jaroslav. 1971c. *The Emergence of the Catholic Tradition
+(100--600)*. In *The Christian Tradition: A History of the Development
+of Doctrine*, vol. 1, 1. University of Chicago Press.
:::
::::::
```
diff --git a/test/command/pandoc-citeproc-175.md b/test/command/pandoc-citeproc-175.md
index 9af990290..552d24c0c 100644
--- a/test/command/pandoc-citeproc-175.md
+++ b/test/command/pandoc-citeproc-175.md
@@ -35,9 +35,9 @@ Foo (Doe 2011).
> Doe, Jane. 2011. "A Title." *A Magazine*, January--February.
-:::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+:::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-item1 .csl-entry}
-Doe, Jane. 2011. "A Title." *A Magazine*, January--February 2011.
+Doe, Jane. 2011. "A Title." *A Magazine*, January--February, 33--44.
:::
::::
```
diff --git a/test/command/pandoc-citeproc-25.md b/test/command/pandoc-citeproc-25.md
index c1971de27..1e49f4f60 100644
--- a/test/command/pandoc-citeproc-25.md
+++ b/test/command/pandoc-citeproc-25.md
@@ -22,9 +22,9 @@ Foo (Author 1998).
# References {#references .unnumbered}
-:::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+:::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-item1 .csl-entry}
-Author, Al. 1998. "Foo Bar Baz: Bazbaz Foo."
+Author, Al. 1998. *Foo Bar Baz: Bazbaz Foo*.
:::
::::
```
diff --git a/test/command/pandoc-citeproc-250.md b/test/command/pandoc-citeproc-250.md
index cfbf754e3..77dc335c5 100644
--- a/test/command/pandoc-citeproc-250.md
+++ b/test/command/pandoc-citeproc-250.md
@@ -13,9 +13,9 @@ references:
^D
([Doe, n.d.](#ref-doe))
-:::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+:::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-doe .csl-entry}
-Doe. n.d. "Title."
+Doe. n.d. *Title*.
:::
::::
```
diff --git a/test/command/pandoc-citeproc-301.md b/test/command/pandoc-citeproc-301.md
index 9eafc22fc..128431f40 100644
--- a/test/command/pandoc-citeproc-301.md
+++ b/test/command/pandoc-citeproc-301.md
@@ -10,16 +10,16 @@ references:
@test; @test2
^D
-"Essays Presented to N.R. Ker (On Art)" (n.d.); "*Test:* An Experiment:
-An Abridgement" (n.d.)
+*Essays Presented to N.R. Ker (On Art)* (n.d.); **Test:* An Experiment:
+An Abridgement* (n.d.)
-::::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+::::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-test .csl-entry}
-"Essays Presented to N.R. Ker (On Art)." n.d.
+*Essays Presented to N.R. Ker (On Art)*. n.d.
:::
::: {#ref-test2 .csl-entry}
-"*Test:* An Experiment: An Abridgement." n.d.
+**Test:* An Experiment: An Abridgement*. n.d.
:::
:::::
```
diff --git a/test/command/pandoc-citeproc-307.md b/test/command/pandoc-citeproc-307.md
index 30246552d..de595a23e 100644
--- a/test/command/pandoc-citeproc-307.md
+++ b/test/command/pandoc-citeproc-307.md
@@ -22,7 +22,7 @@ Bonjour[@bazin_cybernetique_1954] !
^D
Bonjour(Bazin 1954) !
-:::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+:::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-bazin_cybernetique_1954 .csl-entry}
Bazin, André. 1954. « La Cybernétique d'André Cayatte ». *Cahiers du
cinéma*, nᵒ 36 (juin): 22‑27.
diff --git a/test/command/pandoc-citeproc-320a.md b/test/command/pandoc-citeproc-320a.md
index a5348adb9..95378ea09 100644
--- a/test/command/pandoc-citeproc-320a.md
+++ b/test/command/pandoc-citeproc-320a.md
@@ -61,17 +61,17 @@ Foo (al-ʾUdhrī 2000; al-ʿUdhrī 2000; al-’Udhrī 2000b, 2000a; al-‘Udhrī
Uch, Ann. 2000.
-‘Udhrī, Jamīl al-. 2000. “Inverted Curly Apostrophe = Opening Single
-Curly Quote (for Ayn).”
+‘Udhrī, Jamīl al-. 2000. Inverted Curly Apostrophe = Opening Single
+Curly Quote (for Ayn).
-ʿUdhrī, Jamīl al-. 2000. “Ayn.”
+ʿUdhrī, Jamīl al-. 2000. Ayn.
-’Udhrī, Jamīl al-. 2000a. “Curly Apostrophe = Closing Single Curly Quote
-(for Hamza).”
+’Udhrī, Jamīl al-. 2000a. Curly Apostrophe = Closing Single Curly Quote
+(for Hamza).
-ʾUdhrī, Jamīl al-. 2000. “Hamza.”
+ʾUdhrī, Jamīl al-. 2000. Hamza.
-’Udhrī, Jamīl al-. 2000b. “Straight Apostrophe.”
+’Udhrī, Jamīl al-. 2000b. Straight Apostrophe.
Uebel, Joe. 2000.
diff --git a/test/command/pandoc-citeproc-325.md b/test/command/pandoc-citeproc-325.md
index 0b5dbdd24..1516298bd 100644
--- a/test/command/pandoc-citeproc-325.md
+++ b/test/command/pandoc-citeproc-325.md
@@ -16,15 +16,15 @@ references:
[@item1; @item2]
^D
-(Smith, n.d.a, n.d.b)
+(Smith, n.d.-a, n.d.-b)
-::::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+::::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-item1 .csl-entry}
-Smith, John. n.d.a.
+Smith, John. n.d.-a.
:::
::: {#ref-item2 .csl-entry}
----------. n.d.b.
+Smith, John. n.d.-b.
:::
:::::
```
diff --git a/test/command/pandoc-citeproc-327.md b/test/command/pandoc-citeproc-327.md
index 5918a0efa..6678a16f2 100644
--- a/test/command/pandoc-citeproc-327.md
+++ b/test/command/pandoc-citeproc-327.md
@@ -45,7 +45,7 @@ I referenced something here^\[1\]^
::: {#ref-LiLiaoDongWanHaiYuDiQiDongWuCiJiShengChanLiYanJiuJiShengJingGuaYiXingPingJie2017 .csl-entry}
[\[1\] ]{.csl-left-margin}[李轶平, 于旭光, 孙明, 等.
[辽东湾海域底栖动物次级生产力研究及生境适宜性评价](http://kns.cnki.net/kns/detail/detail.aspx?QueryID=4&CurRec=4&recid=&FileName=CHAN201706006&DbName=CJFDLAST2018&DbCode=CJFQ&yx=Y&pr=&URLID=21.1110.S.20171129.1725.006)\[J\].
-水产科学, 2017(6): 728--734.]{.csl-right-inline}
+水产科学, 2017(6): 728~734.]{.csl-right-inline}
:::
::::
```
diff --git a/test/command/pandoc-citeproc-371.md b/test/command/pandoc-citeproc-371.md
index 6d67414fe..0c8a2829e 100644
--- a/test/command/pandoc-citeproc-371.md
+++ b/test/command/pandoc-citeproc-371.md
@@ -28,13 +28,13 @@ Foo (Doe 2018, in press).
# References {#references .unnumbered}
-::::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+::::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-item2 .csl-entry}
Doe, Jane. 2018. *Title Two*.
:::
::: {#ref-item1 .csl-entry}
----------. In press. *Title One*.
+Doe, Jane. In press. *Title One*.
:::
:::::
```
diff --git a/test/command/pandoc-citeproc-38.md b/test/command/pandoc-citeproc-38.md
index 3c01bd51d..1c5a77310 100644
--- a/test/command/pandoc-citeproc-38.md
+++ b/test/command/pandoc-citeproc-38.md
@@ -19,11 +19,11 @@ references:
@a
^D
-Doe, Doe, and Roe (2007)
+Doe et al. (2007)
-:::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+:::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-a .csl-entry}
-Doe, Ann, Ben Doe, and Ron Roe. 2007. "Title."
+Doe, Ann, Ben Doe, and Ron Roe. 2007. *Title*.
:::
::::
```
diff --git a/test/command/pandoc-citeproc-401.md b/test/command/pandoc-citeproc-401.md
index 7bbcd59d1..256aaaa0d 100644
--- a/test/command/pandoc-citeproc-401.md
+++ b/test/command/pandoc-citeproc-401.md
@@ -43,17 +43,17 @@ Haslanger [-@haslanger2012SocialConstructionDebunking; @haslanger2012FeminismMet
^D
Haslanger (\[2003\] 2012, \[2000\] 2012) says...
-::::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+::::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-haslanger2012FeminismMetaphysicsNegotiating .csl-entry}
Haslanger, Sally. (2000) 2012. "Feminism in Metaphysics: Negotiating the
Natural." In *Resisting Reality: Social Construction and Social
-Critique*, 139--57. Oxford: Oxford University Press.
+Critique*. Oxford University Press.
:::
::: {#ref-haslanger2012SocialConstructionDebunking .csl-entry}
----------. (2003) 2012. "Social Construction: The 'Debunking' Project."
-In *Resisting Reality: Social Construction and Social Critique*,
-113--38. Oxford: Oxford University Press.
+Haslanger, Sally. (2003) 2012. "Social Construction: The 'Debunking'
+Project." In *Resisting Reality: Social Construction and Social
+Critique*. Oxford University Press.
:::
:::::
```
diff --git a/test/command/pandoc-citeproc-408.md b/test/command/pandoc-citeproc-408.md
index f7e1dca46..bdf1e1c07 100644
--- a/test/command/pandoc-citeproc-408.md
+++ b/test/command/pandoc-citeproc-408.md
@@ -27,13 +27,13 @@ references:
^D
(Smith and Smith 2019; Smith 2019)
-::::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+::::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-smith1 .csl-entry}
-Smith, Mary. 2019. "Foo."
+Smith, Mary. 2019. *Foo*.
:::
::: {#ref-smithsmith .csl-entry}
-Smith, Mary, and John Smith. 2019. "Foo Bar."
+Smith, Mary, and John Smith. 2019. *Foo Bar*.
:::
:::::
```
diff --git a/test/command/pandoc-citeproc-416.md b/test/command/pandoc-citeproc-416.md
index 9a4fb5b2b..9cbf7555e 100644
--- a/test/command/pandoc-citeproc-416.md
+++ b/test/command/pandoc-citeproc-416.md
@@ -44,17 +44,17 @@ Blah blah (Doe 2010, 2007, 2008).
# References {#references .unnumbered}
-:::::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+:::::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-item2 .csl-entry}
-Doe, J. 2007. "The Title," December 12--13, 2007.
+Doe, J. 2007. *The Title*. December 12--13.
:::
::: {#ref-item3 .csl-entry}
----------. 2008. "The Title," 2008.
+Doe, J. 2008. *The Title*.
:::
::: {#ref-item1 .csl-entry}
----------. 2010. "The Title," December 13, 2010.
+Doe, J. 2010. *The Title*. December 13.
:::
::::::
```
diff --git a/test/command/pandoc-citeproc-47.md b/test/command/pandoc-citeproc-47.md
index 36947df80..f5d9eb116 100644
--- a/test/command/pandoc-citeproc-47.md
+++ b/test/command/pandoc-citeproc-47.md
@@ -69,8 +69,8 @@ chronological order is maintained, regardless of the added abbreviation.
References {#references .unnumbered}
==========
^D
-Foo (Doe 2000a). Bar (Doe and Poe 2000). Foo (Doe 2000b). Bar (Doe, Loe,
-and Toe 2000).
+Foo (Doe 2000a). Bar (Doe and Poe 2000). Foo (Doe 2000b). Bar (Doe et
+al. 2000).
Expected output:
@@ -92,13 +92,13 @@ chronological order is maintained, regardless of the added abbreviation.
# References {#references .unnumbered}
-::::::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+::::::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-doe .csl-entry}
Doe, A. 2000a. *Title*.
:::
::: {#ref-doe-ed .csl-entry}
----------, ed. 2000b. *Title*.
+Doe, A., ed. 2000b. *Title*.
:::
::: {#ref-doeloetoe .csl-entry}
diff --git a/test/command/pandoc-citeproc-51.md b/test/command/pandoc-citeproc-51.md
index 22cfac4b0..61cff71a2 100644
--- a/test/command/pandoc-citeproc-51.md
+++ b/test/command/pandoc-citeproc-51.md
@@ -33,7 +33,7 @@ references:
^D
Doe (1987--1988); Roe (1987)
-::::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+::::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-item1 .csl-entry}
Doe, John. 1987--1988. "The Title." *Journal of Something* 3: 12--34.
:::
diff --git a/test/command/pandoc-citeproc-64.md b/test/command/pandoc-citeproc-64.md
index 660892a9f..a08602363 100644
--- a/test/command/pandoc-citeproc-64.md
+++ b/test/command/pandoc-citeproc-64.md
@@ -7,18 +7,18 @@ nocite: '[@*]'
---
^D
-:::::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+:::::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-item1 .csl-entry}
-Doe, John. 2005. *First Book*. Cambridge: Cambridge University Press.
+Doe, John. 2005. *First Book*. Cambridge University Press.
:::
::: {#ref-item2 .csl-entry}
----------. 2006. "Article." *Journal of Generic Studies* 6: 33--34.
+Doe, John. 2006. "Article." *Journal of Generic Studies* 6: 33--34.
:::
::: {#ref-пункт3 .csl-entry}
Doe, John, and Jenny Roe. 2007. "Why Water Is Wet." In *Third Book*,
-edited by Sam Smith. Oxford: Oxford University Press.
+edited by Sam Smith. Oxford University Press.
:::
::::::
```
diff --git a/test/command/pandoc-citeproc-65.md b/test/command/pandoc-citeproc-65.md
index d0a8e7acb..7fc178d35 100644
--- a/test/command/pandoc-citeproc-65.md
+++ b/test/command/pandoc-citeproc-65.md
@@ -28,11 +28,10 @@ references:
^D
(Stotz 1996--2004)
-:::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+:::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-stotz:1996handbuch .csl-entry}
Stotz, Peter. 1996--2004. *Handbuch zur lateinischen Sprache des
-Mittelalters*. 5 vols. Handbuch der Altertumswissenschaft 2.5. Munich:
-Beck.
+Mittelalters*. 5 vols. Handbuch der Altertumswissenschaft 2.5. Beck.
:::
::::
```
diff --git a/test/command/pandoc-citeproc-7.md b/test/command/pandoc-citeproc-7.md
index 8fb275d48..bf1e39e6b 100644
--- a/test/command/pandoc-citeproc-7.md
+++ b/test/command/pandoc-citeproc-7.md
@@ -23,9 +23,9 @@ references:
^D
Author (2011)
-:::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+:::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-item1 .csl-entry}
-Author, Ann. 2011. "Title." *Journal*, September 24--26, 2011.
+Author, Ann. 2011. "Title." *Journal*, September 24--26.
:::
::::
```
diff --git a/test/command/pandoc-citeproc-70.md b/test/command/pandoc-citeproc-70.md
index 00bb0313b..f08b62030 100644
--- a/test/command/pandoc-citeproc-70.md
+++ b/test/command/pandoc-citeproc-70.md
@@ -56,14 +56,14 @@ references:
^D
(Thorndike 1955; Dinkova-Bruun 2009)
-::::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+::::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-bruun:2009samuel .csl-entry}
Dinkova-Bruun, Greti. 2009. "Samuel Presbyter and the Glosses to His
Versification of Psalm 1: An Anti-Church Invective?" In *Florilegium
mediaevale: Études offertes à Jacqueline Hamesse à l'occasion de son
-éméritat*, edited by José Francisco Meirinhos and Olga Weijers, 155--74.
-Textes et études du moyen âge 50. Louvain-la-Neuve: Fédération
-Internationale des Instituts d'Études Médiévales.
+éméritat*, edited by José Francisco Meirinhos and Olga Weijers. Textes
+et études du moyen âge 50. Fédération Internationale des Instituts
+d'Études Médiévales.
:::
::: {#ref-thorndike:1955unde .csl-entry}
diff --git a/test/command/pandoc-citeproc-76.md b/test/command/pandoc-citeproc-76.md
index 701402944..5240c0905 100644
--- a/test/command/pandoc-citeproc-76.md
+++ b/test/command/pandoc-citeproc-76.md
@@ -44,21 +44,21 @@ references:
^D
Author (1998c), Author (1998d), Author (1998a), Author (1998b)
-::::::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+::::::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-item3 .csl-entry}
-Author, Al. 1998a. "Foo Bar Baz: A Bazbaz Bar Foo."
+Author, Al. 1998a. *Foo Bar Baz: A Bazbaz Bar Foo*.
:::
::: {#ref-item4 .csl-entry}
----------. 1998b. "Foo Bar Baz: An Abazbaz Bar Foo."
+Author, Al. 1998b. *Foo Bar Baz: An Abazbaz Bar Foo*.
:::
::: {#ref-item1 .csl-entry}
----------. 1998c. "Foo Bar Baz: Bazbaz Bar Foo."
+Author, Al. 1998c. *Foo Bar Baz: Bazbaz Bar Foo*.
:::
::: {#ref-item2 .csl-entry}
----------. 1998d. "Foo Bar Baz: The Bazbaz Bar Foo."
+Author, Al. 1998d. *Foo Bar Baz: The Bazbaz Bar Foo*.
:::
:::::::
```
diff --git a/test/command/pandoc-citeproc-87.md b/test/command/pandoc-citeproc-87.md
index 109f4362a..e54edba42 100644
--- a/test/command/pandoc-citeproc-87.md
+++ b/test/command/pandoc-citeproc-87.md
@@ -108,49 +108,49 @@ references:
References
==========
^D
-Doe (2006c) -- webpage, date
+Doe (2006a) -- webpage, date
-Doe (2006d) -- webpage, date range
+Doe (2006b) -- webpage, date range
-Doe (2006a) -- webpage, date range YM
+Doe (2006d) -- webpage, date range YM
Doe (2006--2007) -- webpage, date range across years
-Doe (2006e) -- article-newspaper
+Doe (2006c) -- article-newspaper
-Doe (2006b) -- article-newspaper YM
+Doe (2006e) -- article-newspaper YM
# References {#references .unnumbered}
-::::::::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
-::: {#ref-item2a .csl-entry}
-Doe, John. 2006a. "Title." The Web Site. October--November 2006.
+::::::::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-item1 .csl-entry}
+Doe, John. 2006a. "Title." The Web Site, October 26.
<http://www.example.com>.
:::
-::: {#ref-item3b .csl-entry}
----------. 2006b. "Title." *The Newspaper*, October--November 2006.
+::: {#ref-item2 .csl-entry}
+Doe, John. 2006b. "Title." The Web Site, October 26--November 27.
<http://www.example.com>.
:::
-::: {#ref-item1 .csl-entry}
----------. 2006c. "Title." The Web Site. October 26, 2006.
+::: {#ref-item3 .csl-entry}
+Doe, John. 2006c. "Title." *The Newspaper*, October 26--November 27.
<http://www.example.com>.
:::
-::: {#ref-item2 .csl-entry}
----------. 2006d. "Title." The Web Site. October 26--November 27, 2006.
+::: {#ref-item2a .csl-entry}
+Doe, John. 2006d. "Title." The Web Site, October--November.
<http://www.example.com>.
:::
-::: {#ref-item3 .csl-entry}
----------. 2006e. "Title." *The Newspaper*, October 26--November 27,
-2006. <http://www.example.com>.
+::: {#ref-item3b .csl-entry}
+Doe, John. 2006e. "Title." *The Newspaper*, October--November.
+<http://www.example.com>.
:::
::: {#ref-item2b .csl-entry}
----------. 2006--2007. "Title." The Web Site. December 31, 2006--January
-1, 2007. <http://www.example.com>.
+Doe, John. 2006--2007. "Title." The Web Site, December 31--January 1.
+<http://www.example.com>.
:::
:::::::::
```
diff --git a/test/command/pandoc-citeproc-chicago-author-date.md b/test/command/pandoc-citeproc-chicago-author-date.md
index 2614b9d97..f88578d84 100644
--- a/test/command/pandoc-citeproc-chicago-author-date.md
+++ b/test/command/pandoc-citeproc-chicago-author-date.md
@@ -83,18 +83,18 @@ With some markup (*see* [Doe 2005, 32](#ref-item1)).
# References {#references .unnumbered}
-:::::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+:::::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-item1 .csl-entry}
-Doe, John. 2005. *First Book*. Cambridge: Cambridge University Press.
+Doe, John. 2005. *First Book*. Cambridge University Press.
:::
::: {#ref-item2 .csl-entry}
----------. 2006. "Article." *Journal of Generic Studies* 6: 33--34.
+Doe, John. 2006. "Article." *Journal of Generic Studies* 6: 33--34.
:::
::: {#ref-пункт3 .csl-entry}
Doe, John, and Jenny Roe. 2007. "Why Water Is Wet." In *Third Book*,
-edited by Sam Smith. Oxford: Oxford University Press.
+edited by Sam Smith. Oxford University Press.
:::
::::::
diff --git a/test/command/pandoc-citeproc-no-author.md b/test/command/pandoc-citeproc-no-author.md
index 549e4a364..ae1ce9803 100644
--- a/test/command/pandoc-citeproc-no-author.md
+++ b/test/command/pandoc-citeproc-no-author.md
@@ -45,29 +45,29 @@ references:
*Magazine* (2012a, 3), *Magazine* (2012b), *Magazine* (2012c),
*Magazine* (2012d), *Newspaper* (2012a), *Newspaper* (2012b)
-::::::::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+::::::::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-item1 .csl-entry}
-*Magazine*. 2012a. "Title A," 2012.
+*Magazine*. 2012a. "Title A."
:::
::: {#ref-item2 .csl-entry}
----------. 2012b. "Title B," 2012.
+*Magazine*. 2012b. "Title B."
:::
::: {#ref-item3 .csl-entry}
----------. 2012c. "Title C," 2012.
+*Magazine*. 2012c. "Title C."
:::
::: {#ref-item4 .csl-entry}
----------. 2012d. "Title D," 2012.
+*Magazine*. 2012d. "Title D."
:::
::: {#ref-item5 .csl-entry}
-*Newspaper*. 2012a. "Title E," 2012.
+*Newspaper*. 2012a. "Title E."
:::
::: {#ref-item6 .csl-entry}
----------. 2012b. "Title F," 2012.
+*Newspaper*. 2012b. "Title F."
:::
:::::::::
```
diff --git a/test/command/pandoc-citeproc-number-of-volumes.md b/test/command/pandoc-citeproc-number-of-volumes.md
index ba83497f8..b098b4680 100644
--- a/test/command/pandoc-citeproc-number-of-volumes.md
+++ b/test/command/pandoc-citeproc-number-of-volumes.md
@@ -21,9 +21,9 @@ references:
^D
Author (2013)
-:::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
+:::: {#refs .references .csl-bib-body .hanging-indent}
::: {#ref-item1 .csl-entry}
-Author, Al. 2013. *Title*. 2 vols. Location: Publisher.
+Author, Al. 2013. *Title*. 2 vols. Publisher.
:::
::::
```