<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" and="text" class="note" demote-non-dropping-particle="display-and-sort" et-al-min="4" et-al-use-first="1" page-range-format="minimal-two" version="1.0" default-locale="en-GB">
  <!-- 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>MHRA Style Guide 4th edition (notes)</title>
    <title-short>Modern Humanities Research Association (notes)</title-short>
    <id>http://www.zotero.org/styles/mhra-notes</id>
    <link href="http://www.zotero.org/styles/mhra-notes" rel="self"/>
    <link href="https://www.mhra.org.uk/style/" rel="documentation"/>
    <author>
      <name>Andrew Dunning</name>
      <uri>https://orcid.org/0000-0003-0464-5036</uri>
    </author>
    <category citation-format="note"/>
    <category field="generic-base"/>
    <category field="history"/>
    <category field="humanities"/>
    <category field="linguistics"/>
    <category field="literature"/>
    <category field="philosophy"/>
    <category field="theology"/>
    <summary>MHRA source citations, notes system</summary>
    <updated>2026-01-11T22:54:31+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="advance-online-publication">published online</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-short" name="editor-translator">ed. and trans. by</term>
      <term form="verb-short" name="editortranslator">ed. and trans. by</term>
      <term name="et-al">and others</term>
      <term name="manuscript">unpublished manuscript</term>
      <term name="original-work-published">originally published as</term>
      <term form="short" name="paper-conference">paper</term>
    </terms>
  </locale>
  <!-- Contents:
    
       This file interprets MHRA using APA's four basic reference elements:

        1. Author
        2. Date (author-date system only)
        3. Title and descriptions
            3.1. Title
            3.2. Description
            3.3. Identifiers (contributors, edition, 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
  -->
  <!-- MHRA draws heavily on the Oxford Style Manual <https://archive.org/details/oxfordstylemanua0000unse> (especially its approach to the author-date system, 15.19), with some updates from more recent editions (including New Hart's Rules). This file follows OSM/NHR guidance where MHRA is silent. It also reuses code written for the Chicago Manual of Style (CMOS) and APA. -->
  <!-- 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">
    <group delimiter=" ">
      <choose>
        <if is-numeric="chapter-number" type="song">
          <text value="track"/>
        </if>
        <else-if is-numeric="chapter-number">
          <label form="short" variable="chapter-number"/>
        </else-if>
      </choose>
      <text variable="chapter-number"/>
    </group>
  </macro>
  <macro name="label-chapter-number-long">
    <group delimiter=" ">
      <choose>
        <if is-numeric="chapter-number" type="song">
          <text value="track"/>
        </if>
        <else-if is-numeric="chapter-number">
          <label variable="chapter-number"/>
        </else-if>
      </choose>
      <text variable="chapter-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">
          <!-- serial types: full label (cf. CMOS18 14.89) -->
          <text variable="edition"/>
          <label variable="edition"/>
        </else-if>
        <else-if match="any" variable="collection-editor compiler editor editorial-director">
          <!-- monographic types -->
          <text variable="edition"/>
        </else-if>
        <else-if match="any" type="interview paper-conference">
          <!-- serial types -->
          <text variable="edition"/>
          <label variable="edition"/>
        </else-if>
        <else>
          <!-- monographic types -->
          <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">
          <!-- serial types: full label (cf. CMOS18 14.89) -->
          <text text-case="title" variable="edition"/>
          <label text-case="capitalize-first" variable="edition"/>
        </else-if>
        <else-if match="any" variable="collection-editor compiler editor editorial-director">
          <!-- monographic types -->
          <text text-case="capitalize-first" variable="edition"/>
        </else-if>
        <else-if match="any" type="interview paper-conference">
          <!-- serial types -->
          <text text-case="title" variable="edition"/>
          <label text-case="capitalize-first" variable="edition"/>
        </else-if>
        <else>
          <!-- monographic types -->
          <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 is-numeric="locator">
          <label form="short" variable="locator"/>
        </if>
        <!-- a non-numeric canonical reference is described by its formatting and does not need a label, similar to a timestamp (MHRA 7.3c) -->
        <else-if locator="chapter line verse" match="any"/>
        <else>
          <label form="short" variable="locator"/>
        </else>
      </choose>
      <text variable="locator"/>
    </group>
  </macro>
  <macro name="label-number">
    <group delimiter=" ">
      <choose>
        <if type="standard"/>
        <else-if is-numeric="number">
          <label form="short" variable="number"/>
        </else-if>
      </choose>
      <text variable="number"/>
    </group>
  </macro>
  <macro name="label-number-article">
    <group delimiter=" ">
      <choose>
        <if is-numeric="number">
          <text form="short" term="article-locator"/>
        </if>
      </choose>
      <text 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-page">
    <group delimiter=" ">
      <label form="short" variable="page"/>
      <text variable="page"/>
    </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-section">
    <group delimiter=" ">
      <choose>
        <if is-numeric="section">
          <label variable="section"/>
        </if>
      </choose>
      <text text-case="title" variable="section"/>
    </group>
  </macro>
  <macro name="label-supplement-number">
    <group delimiter=" ">
      <choose>
        <!-- TODO: Replace with `supplement-number` label when CSL provides one -->
        <if variable="issue supplement-number">
          <!-- if there is both an issue and supplement number, do not label both as 'no.' -->
          <text form="short" term="supplement"/>
        </if>
        <else-if is-numeric="supplement-number" variable="volume-title">
          <!-- if there is a volume title, it is already described as a supplement -->
          <text form="short" term="issue"/>
        </else-if>
        <else-if is-numeric="supplement-number" type="periodical" variable="title">
          <text form="short" term="issue"/>
        </else-if>
        <else-if is-numeric="supplement-number">
          <text form="short" term="supplement"/>
        </else-if>
      </choose>
      <text variable="supplement-number"/>
    </group>
  </macro>
  <macro name="label-version">
    <group delimiter=" ">
      <label variable="version"/>
      <text variable="version"/>
    </group>
  </macro>
  <macro name="label-volume">
    <!-- label a volume by rendering it in Roman numerals (MHRA 7.3) -->
    <choose>
      <if is-numeric="volume">
        <number font-variant="small-caps" form="roman" variable="volume"/>
      </if>
      <else>
        <text variable="volume"/>
      </else>
    </choose>
  </macro>
  <!-- 1. Author -->
  <macro name="author-bib">
    <group delimiter=", ">
      <names variable="composer">
        <name delimiter-precedes-et-al="after-inverted-name" delimiter-precedes-last="always" name-as-sort-order="first"/>
        <label form="short" prefix=" (" suffix=")"/>
        <substitute>
          <choose>
            <if match="any" variable="container-title DOI issue number publisher publisher-place references URL volume">
              <!-- `interviewer` is the author of a published interview (MHRA 7.11) -->
              <names variable="interviewer"/>
            </if>
          </choose>
          <names variable="author"/>
          <names variable="host"/>
          <names variable="guest"/>
          <choose>
            <if type="song">
              <names variable="performer"/>
            </if>
          </choose>
          <choose>
            <if type="classic">
              <!-- editors in author position only for an edited collection (MHRA 8.3) -->
              <text macro="author-title-substitute"/>
            </if>
          </choose>
          <names variable="illustrator"/>
          <choose>
            <!-- list an edited multivolume work under the name of the series editor -->
            <if variable="container-title"/>
            <else-if match="any" variable="number-of-volumes part-number part-title volume volume-title">
              <names variable="collection-editor"/>
            </else-if>
          </choose>
          <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"/>
          <names variable="producer"/>
          <names variable="executive-producer"/>
          <names variable="series-creator"/>
          <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 (MHRA 7.8) -->
              <text variable="publisher"/>
            </if>
            <else-if type="standard">
              <!-- `standard` listed in bibliography under organization, but note omits this (cf. CMOS18 14.159) -->
              <text variable="authority"/>
            </else-if>
          </choose>
          <text macro="author-review-unsigned"/>
          <text macro="author-title-substitute"/>
          <choose>
            <if match="any" variable="container-title event-date event-place event-title genre title publisher publisher-place"/>
            <else-if type="manuscript">
              <text macro="source-archive"/>
            </else-if>
          </choose>
        </substitute>
      </names>
      <text macro="author-contributors"/>
    </group>
  </macro>
  <macro name="author-note">
    <group delimiter=", ">
      <names variable="composer">
        <name delimiter-precedes-last="contextual"/>
        <label form="short" prefix=" (" suffix=")"/>
        <substitute>
          <choose>
            <if match="any" variable="container-title DOI issue number publisher publisher-place references URL volume">
              <!-- `interviewer` is the author of a published interview (MHRA 7.11) -->
              <names variable="interviewer"/>
            </if>
          </choose>
          <names variable="author"/>
          <names variable="illustrator"/>
          <choose>
            <if type="song">
              <names variable="performer"/>
            </if>
          </choose>
          <!-- do not list editors or translators as authors (MHRA 7.3) -->
          <choose>
            <if type="software">
              <!-- `software` listed under the name of the publisher or developer (MHRA 7.8) -->
              <text variable="publisher"/>
            </if>
            <else-if type="standard">
              <!-- `standard` listed in bibliography under organization, but note omits this (cf. CMOS18 14.159) -->
              <text variable="authority"/>
            </else-if>
          </choose>
          <text macro="author-review-unsigned"/>
        </substitute>
      </names>
      <text macro="author-contributors"/>
    </group>
  </macro>
  <macro name="author-short">
    <choose>
      <if match="any" type="interview personal_communication">
        <text macro="author-short-and-recipient"/>
      </if>
      <else>
        <names variable="composer">
          <name form="short"/>
          <substitute>
            <choose>
              <if match="any" variable="container-title DOI issue number publisher publisher-place references URL volume">
                <!-- `interviewer` is the author of a published interview (MHRA 7.11) -->
                <names variable="interviewer"/>
              </if>
            </choose>
            <names variable="author"/>
            <names variable="host"/>
            <names variable="illustrator"/>
            <choose>
              <if type="song">
                <names variable="performer"/>
              </if>
            </choose>
            <choose>
              <if type="software">
                <!-- `software` listed under the name of the publisher or developer (MHRA 7.8) -->
                <text variable="publisher"/>
              </if>
              <else-if type="standard">
                <!-- `standard` listed in bibliography under organization, but note omits this (cf. CMOS18 14.159) -->
                <text variable="authority"/>
              </else-if>
            </choose>
            <choose>
              <if match="any" variable="container-title event-date event-place event-title genre title publisher publisher-place"/>
              <else-if type="manuscript">
                <text macro="source-archive-short"/>
              </else-if>
            </choose>
          </substitute>
        </names>
      </else>
    </choose>
  </macro>
  <!-- Author elements -->
  <macro name="author-contributors">
    <!-- contributors immediately follow the main author (MHRA 7.9.v); assumed that this should appear with most bracketed types -->
    <choose>
      <if match="none" variable="author composer interviewer performer"/>
      <else-if match="any" type="classic thesis"/>
      <else-if match="any" type="book broadcast chapter classic entry interview motion_picture musical_score pamphlet paper-conference report software song standard thesis">
        <names variable="contributor">
          <label form="verb" suffix=" "/>
          <name/>
        </names>
      </else-if>
    </choose>
  </macro>
  <macro name="author-short-and-recipient">
    <group delimiter=" ">
      <choose>
        <!-- inaccessible `interview` or `personal_commmunication`: in-text citation (cf. CMOS18 14.111) -->
        <if match="none" variable="archive archive-place container-title DOI number publisher references URL">
          <choose>
            <if position="first">
              <!-- at the first citation in shortened forms, give the full name -->
              <names variable="author">
                <substitute>
                  <text macro="title-and-descriptions-short"/>
                </substitute>
              </names>
            </if>
            <else>
              <names variable="author">
                <name form="short"/>
                <substitute>
                  <text macro="title-and-descriptions-short"/>
                </substitute>
              </names>
            </else>
          </choose>
          <choose>
            <if variable="genre"/>
            <!-- recipient appears in the description if there is a `genre`; otherwise after `author` -->
            <else-if position="first">
              <names variable="recipient">
                <label form="verb" suffix=" "/>
                <name/>
              </names>
            </else-if>
            <else>
              <names variable="recipient">
                <label form="verb" suffix=" "/>
                <name form="short"/>
              </names>
            </else>
          </choose>
        </if>
        <!-- accessible `interview` or `personal_communication`: standard citation -->
        <else-if variable="interviewer">
          <choose>
            <if match="any" variable="container-title DOI issue number publisher publisher-place references URL volume">
              <!-- cite published interviews under interviewer name (MHRA 7.11) -->
              <names variable="interviewer">
                <name form="short"/>
              </names>
            </if>
            <else>
              <names variable="author">
                <name form="short"/>
              </names>
            </else>
          </choose>
        </else-if>
        <else-if variable="author recipient">
          <names variable="author">
            <label/>
            <name form="short"/>
          </names>
          <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>
        </else>
      </choose>
    </group>
  </macro>
  <macro name="author-review-unsigned">
    <choose>
      <!-- [Anon.] with an unsigned review (MHRA 7.4.x) -->
      <if type="article-journal" variable="reviewed-author">
        <text form="short" prefix="[" suffix="]" term="anonymous" text-case="capitalize-first"/>
      </if>
    </choose>
  </macro>
  <macro name="author-title-substitute">
    <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"/>
          </if>
          <else-if variable="reviewed-genre reviewed-title title">
            <text macro="title"/>
          </else-if>
          <else>
            <text macro="title-and-descriptions"/>
          </else>
        </choose>
      </if>
      <else-if variable="title">
        <text macro="title"/>
      </else-if>
      <else>
        <!-- If an item has no `title`, substitute with descriptions. -->
        <text macro="title-and-descriptions"/>
      </else>
    </choose>
  </macro>
  <!-- 2. Date -->
  <macro name="date-short">
    <group delimiter="-">
      <choose>
        <if variable="issued">
          <group delimiter=" ">
            <text macro="date-original-year" prefix="[" suffix="]"/>
            <group>
              <choose>
                <if match="none" type="interview personal_communication">
                  <text macro="date-issued-year"/>
                </if>
                <!-- accessible `interview` or `personal_communication` items appear in the bibliography; inaccessible items are in-text only -->
                <else-if match="any" variable="archive archive-place container-title DOI number publisher references URL">
                  <text macro="date-issued-year"/>
                </else-if>
                <else>
                  <text macro="date-issued-full"/>
                </else>
              </choose>
              <text variable="year-suffix"/>
            </group>
          </group>
        </if>
        <else-if variable="available-date">
          <date date-parts="year" form="numeric" variable="available-date"/>
        </else-if>
        <else-if variable="event-date">
          <text macro="date-event-year"/>
        </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 variable="year-suffix"/>
        </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">
              <!-- only give n.d. for accessible personal communication (cf. CMOS18 14.111)-->
              <text form="short" term="no date"/>
              <text variable="year-suffix"/>
            </if>
          </choose>
        </else-if>
        <else-if match="any" type="classic collection entry entry-dictionary entry-encyclopedia">
          <!-- do not give n.d. for archival collections (cf. CMOS18 14.128), `classic` (cf. 14.143), or reference entries (cf. 14.131) -->
          <text 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 variable="year-suffix"/>
            </if>
          </choose>
        </else-if>
        <else>
          <text form="short" term="no date"/>
          <text variable="year-suffix"/>
        </else>
      </choose>
    </group>
  </macro>
  <!-- Date elements -->
  <macro name="date-event-full">
    <choose>
      <if is-uncertain-date="issued">
        <date form="text" prefix="[" suffix="?]" variable="event-date"/>
      </if>
      <else>
        <date form="text" variable="event-date"/>
      </else>
    </choose>
  </macro>
  <macro name="date-event-year">
    <choose>
      <if is-uncertain-date="issued">
        <date date-parts="year" form="numeric" prefix="[" suffix="?]" variable="event-date"/>
      </if>
      <else>
        <date date-parts="year" form="numeric" variable="event-date"/>
      </else>
    </choose>
  </macro>
  <macro name="date-issued-full">
    <choose>
      <if is-uncertain-date="issued" type="graphic">
        <!-- artwork exceptionally uses 'c.' with uncertain dates (MHRA 7.9.i) -->
        <group delimiter=" ">
          <text font-style="italic" form="short" term="circa"/>
          <date form="text" variable="issued"/>
        </group>
      </if>
      <else-if is-uncertain-date="issued">
        <!-- uncertain dates are presumably bracketed for other types (MHRA 7.3) -->
        <date form="text" prefix="[" suffix="?]" variable="issued"/>
      </else-if>
      <else>
        <date form="text" variable="issued"/>
      </else>
    </choose>
  </macro>
  <macro name="date-issued-year">
    <choose>
      <if is-uncertain-date="issued" type="graphic">
        <!-- artwork exceptionally uses 'c.' with uncertain dates (MHRA 7.9.i) -->
        <group delimiter=" ">
          <text font-style="italic" form="short" term="circa"/>
          <date date-parts="year" form="numeric" variable="issued"/>
        </group>
      </if>
      <else-if is-uncertain-date="issued">
        <!-- uncertain dates are presumably bracketed for other types (MHRA 7.3) -->
        <date date-parts="year" form="numeric" prefix="[" suffix="?]" variable="issued"/>
      </else-if>
      <else>
        <date date-parts="year" form="numeric" variable="issued"/>
      </else>
    </choose>
  </macro>
  <macro name="date-issued-year-month">
    <choose>
      <if is-uncertain-date="issued" type="graphic">
        <!-- artwork exceptionally uses 'c.' with uncertain dates (MHRA 7.9.i) -->
        <group delimiter=" ">
          <text font-style="italic" form="short" term="circa"/>
          <date date-parts="year-month" form="text" variable="issued"/>
        </group>
      </if>
      <else-if is-uncertain-date="issued">
        <!-- uncertain dates are presumably bracketed for other types (MHRA 7.3) -->
        <date date-parts="year-month" form="text" prefix="[" suffix="?]" variable="issued"/>
      </else-if>
      <else>
        <date date-parts="year-month" form="text" variable="issued"/>
      </else>
    </choose>
  </macro>
  <macro name="date-original-full">
    <choose>
      <if is-uncertain-date="original-date" type="graphic">
        <!-- artwork exceptionally uses 'c.' with uncertain dates (MHRA 7.9.i) -->
        <group delimiter=" ">
          <text font-style="italic" form="short" term="circa"/>
          <date form="text" variable="original-date"/>
        </group>
      </if>
      <else-if is-uncertain-date="original-date">
        <!-- uncertain dates are presumably bracketed for other types (MHRA 7.3) -->
        <date form="text" prefix="[" suffix="?]" variable="original-date"/>
      </else-if>
      <else>
        <date form="text" variable="original-date"/>
      </else>
    </choose>
  </macro>
  <macro name="date-original-year">
    <choose>
      <if is-uncertain-date="original-date" type="graphic">
        <!-- artwork exceptionally uses 'c.' with uncertain dates (MHRA 7.9.i) -->
        <group delimiter=" ">
          <text font-style="italic" form="short" term="circa"/>
          <date date-parts="year" form="numeric" variable="original-date"/>
        </group>
      </if>
      <else-if is-uncertain-date="original-date">
        <!-- uncertain dates are presumably bracketed for other types (MHRA 7.3) -->
        <date date-parts="year" form="numeric" prefix="[" suffix="?]" variable="original-date"/>
      </else-if>
      <else>
        <date date-parts="year" form="numeric" variable="original-date"/>
      </else>
    </choose>
  </macro>
  <macro name="date-original-year-month">
    <choose>
      <if is-uncertain-date="original-date" type="graphic">
        <!-- artwork exceptionally uses 'c.' with uncertain dates (MHRA 7.9.i) -->
        <group delimiter=" ">
          <text font-style="italic" form="short" term="circa"/>
          <date date-parts="year-month" form="text" variable="original-date"/>
        </group>
      </if>
      <else-if is-uncertain-date="original-date">
        <!-- uncertain dates are presumably bracketed for other types (MHRA 7.3) -->
        <date date-parts="year-month" form="text" prefix="[" suffix="?]" variable="original-date"/>
      </else-if>
      <else>
        <date date-parts="year-month" form="text" variable="original-date"/>
      </else>
    </choose>
  </macro>
  <!-- 3. Title and descriptions -->
  <macro name="title-and-descriptions">
    <group delimiter=", ">
      <choose>
        <if variable="title">
          <group delimiter=" ">
            <choose>
              <!-- label for unsigned dictionary/encyclopedia entry in notes (MHRA 7.5) -->
              <if variable="author"/>
              <else-if match="none" type="entry-dictionary entry-encyclopedia"/>
              <else-if position="first" variable="container-title title">
                <text term="entry"/>
              </else-if>
            </choose>
            <text macro="title"/>
          </group>
          <text macro="description"/>
          <text macro="identifier"/>
        </if>
        <else>
          <text macro="description"/>
          <!-- for author-date: -->
          <!-- <text macro="description-capitalized"/> -->
          <text macro="identifier"/>
        </else>
      </choose>
    </group>
  </macro>
  <macro name="title-and-descriptions-short">
    <choose>
      <if variable="title">
        <group delimiter=", ">
          <text macro="title-short"/>
          <choose>
            <if variable="author"/>
            <else-if match="any" type="entry entry-dictionary entry-encyclopedia">
              <!-- give `container-title` to distinguish an unsigned reference entry -->
              <text font-style="italic" form="short" variable="container-title"/>
            </else-if>
          </choose>
        </group>
      </if>
      <else>
        <text macro="description-short"/>
      </else>
    </choose>
  </macro>
  <macro name="title-and-source">
    <group delimiter=" ">
      <group delimiter=", ">
        <group delimiter=" ">
          <group delimiter=", ">
            <choose>
              <if type="chapter" variable="container-title genre">
                <!-- 'introduction to', 'online appendix to' (cf. CMOS18 14.12, 14.14; 'introduction in', NHR 18.2.6) -->
                <group delimiter=" ">
                  <text macro="title-and-descriptions"/>
                  <text macro="source"/>
                </group>
              </if>
              <else-if type="article-journal" variable="container-title genre volume-title">
                <!-- introduction to a special issue or supplement -->
                <group delimiter=" ">
                  <text macro="title-and-descriptions"/>
                  <text macro="source"/>
                </group>
              </else-if>
              <else>
                <text macro="title-and-descriptions"/>
                <text macro="source"/>
              </else>
            </choose>
            <text macro="source-monographic-publication-unbracketed"/>
          </group>
          <text macro="source-monographic-publication-bracketed"/>
        </group>
        <choose>
          <!-- Locator for monographic types only; serial locator handled in `source-serial-locator` -->
          <!-- omit serial types -->
          <if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book"/>
          <else-if match="any" variable="collection-editor compiler editor editorial-director">
            <!-- monographic types -->
            <text macro="source-monographic-locator"/>
          </else-if>
          <!-- omit serial types -->
          <else-if match="any" type="interview paper-conference"/>
          <else>
            <!-- monographic types -->
            <text macro="source-monographic-locator"/>
          </else>
        </choose>
        <text macro="source-medium"/>
        <text macro="source-archive"/>
        <text prefix="doi:" variable="DOI"/>
      </group>
      <text macro="source-URL"/>
    </group>
  </macro>
  <!-- 3.1. Title -->
  <macro name="title">
    <choose>
      <if match="any" type="post webpage">
        <!-- Handle `container-title` on `post` or `webpage` in manner of `publisher` -->
        <text macro="title-and-part-filter-review"/>
      </if>
      <else-if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book">
        <!-- serial types -->
        <text macro="title-and-part-filter-review"/>
      </else-if>
      <else-if match="any" variable="collection-editor compiler editor editorial-director">
        <!-- monographic types -->
        <text macro="title-primary"/>
      </else-if>
      <else-if match="any" type="interview paper-conference">
        <!-- serial types -->
        <text macro="title-and-part-filter-review"/>
      </else-if>
      <else>
        <!-- monographic types -->
        <text macro="title-primary"/>
      </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-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>
            <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">
    <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"/>
          </if>
        </choose>
      </if>
      <else>
        <text macro="title-and-part-title"/>
      </else>
    </choose>
  </macro>
  <macro name="title-and-part-title">
    <group delimiter=", ">
      <text macro="title-primary"/>
      <text macro="label-part-number"/>
      <text macro="title-part"/>
    </group>
  </macro>
  <macro name="title-part">
    <choose>
      <if type="patent">
        <!-- No italics or quotes, sentence case -->
        <text form="short" text-case="capitalize-first" variable="part-title"/>
      </if>
      <else-if match="any" type="bill collection legislation regulation treaty">
        <!-- No italics or quotes, title case -->
        <text text-case="title" variable="part-title"/>
      </else-if>
      <else-if match="any" type="book classic graphic hearing map periodical">
        <!-- Italicized, title case (regardless of `container-title`) -->
        <text font-style="italic" text-case="title" variable="part-title"/>
      </else-if>
      <else-if type="entry-encyclopedia" variable="author container-title">
        <!-- Signed encyclopedia entry in quotes, title case (cf. CMOS18 14.132) -->
        <text quotes="true" text-case="title" variable="part-title"/>
      </else-if>
      <else-if type="entry-dictionary" variable="container-title">
        <!-- Quotes, sentence case -->
        <text quotes="true" variable="part-title"/>
      </else-if>
      <else-if type="entry-encyclopedia" variable="container-title">
        <!-- Quotes, sentence case -->
        <text quotes="true" variable="part-title"/>
      </else-if>
      <else-if type="post">
        <!-- Quotes, sentence case -->
        <text quotes="true" variable="part-title"/>
      </else-if>
      <!-- Other types are formatted based on presence of `container-title` -->
      <else-if variable="container-title">
        <choose>
          <if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book">
            <!-- Quotes, title case -->
            <text quotes="true" text-case="title" variable="part-title"/>
          </if>
          <else-if match="any" variable="collection-editor compiler editor editorial-director">
            <!-- monographic types -->
            <!-- Italics, title case -->
            <text font-style="italic" text-case="title" variable="part-title"/>
          </else-if>
          <else-if match="any" type="interview paper-conference">
            <!-- serial types -->
            <!-- Quotes, title case -->
            <text quotes="true" text-case="title" variable="part-title"/>
          </else-if>
          <else>
            <!-- monographic types -->
            <!-- Italics, title case -->
            <text font-style="italic" text-case="title" variable="part-title"/>
          </else>
        </choose>
      </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="part-title"/>
      </else-if>
      <else>
        <!-- Italicized, title case (default) -->
        <text font-style="italic" text-case="title" variable="part-title"/>
      </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 match="any" type="book classic graphic hearing map periodical">
        <!-- 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 (cf. 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 match="any" type="book classic graphic hearing map periodical">
        <!-- 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 (cf. 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>
  <macro name="title-volume">
    <group delimiter=", ">
      <text macro="label-volume"/>
      <text font-style="italic" text-case="title" variable="volume-title"/>
      <!-- `part-number` and `part-title` of monographic items refer to the source book/volume -->
      <text macro="label-part-number"/>
      <text macro="title-part"/>
    </group>
  </macro>
  <!-- 3.2. Description -->
  <macro name="description">
    <choose>
      <if match="any" type="interview" variable="interviewer">
        <text macro="description-interview"/>
      </if>
      <else-if match="any" type="review review-book" variable="reviewed-author reviewed-genre reviewed-title">
        <text macro="description-review"/>
      </else-if>
      <else-if type="personal_communication">
        <text macro="description-letter"/>
      </else-if>
      <else-if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book">
        <text macro="description-serial"/>
      </else-if>
      <else-if type="paper-conference">
        <text macro="description-paper-conference"/>
      </else-if>
      <else-if type="song" variable="composer">
        <text macro="description-song"/>
      </else-if>
      <!-- thesis type appears with university name (cf. CMOS18 14.113) -->
      <else-if type="thesis"/>
      <else-if match="none" variable="container-title">
        <!-- Other description -->
        <text macro="description-format"/>
      </else-if>
      <!-- For conference presentations/performances/events, chapters in reports/standards/generic documents, software, place description within the source element -->
      <else-if match="any" type="document report software standard"/>
      <else-if match="any" type="event paper-conference performance speech">
        <choose>
          <if match="any" variable="collection-editor compiler editor editorial-director issue page supplement-number volume">
            <text macro="description-format"/>
          </if>
        </choose>
      </else-if>
      <else>
        <text macro="description-format"/>
      </else>
    </choose>
  </macro>
  <macro name="description-short">
    <choose>
      <if match="any" type="interview" variable="interviewer">
        <choose>
          <if match="any" variable="archive archive-place container-title DOI number publisher references URL">
            <text macro="description-interview-short"/>
          </if>
          <else>
            <!-- for an inaccessible `interview`, give a full in-text description at the first citation -->
            <choose>
              <if position="first">
                <text macro="description-interview"/>
              </if>
              <else>
                <text macro="description-interview-short"/>
              </else>
            </choose>
          </else>
        </choose>
      </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">
        <!-- serial types -->
        <text macro="description-serial-short"/>
      </else-if>
      <else-if match="any" variable="collection-editor compiler editor editorial-director">
        <!-- monographic types -->
        <text macro="description-format-short"/>
      </else-if>
      <else-if type="paper-conference">
        <!-- serial types -->
        <text macro="description-serial-short"/>
      </else-if>
      <else>
        <!-- monographic types -->
        <text macro="description-format-short"/>
      </else>
    </choose>
  </macro>
  <!-- Description elements -->
  <macro name="description-format">
    <choose>
      <if variable="genre number"/>
      <else-if variable="genre">
        <text variable="genre"/>
      </else-if>
      <else-if variable="chapter-number title"/>
      <else-if variable="chapter-number">
        <text macro="label-chapter-number-long"/>
      </else-if>
      <else-if type="personal_communication">
        <choose>
          <if match="any" variable="archive archive-place container-title DOI number publisher references URL">
            <!-- 'letter' if no `genre` (MHRA 7.11) -->
            <text term="letter"/>
          </if>
          <else>
            <text term="personal-communication"/>
          </else>
        </choose>
      </else-if>
      <!-- generic labels if unpublished -->
      <else-if match="any" variable="archive archive-place container-title DOI number publisher references URL"/>
      <else-if type="manuscript">
        <!-- 'unpublished manuscript' if no `genre` (cf. CMOS18 14.114) -->
        <text term="manuscript"/>
      </else-if>
    </choose>
  </macro>
  <macro name="description-format-short">
    <group delimiter=" ">
      <choose>
        <if type="chapter" variable="container-title genre">
          <text form="short" variable="genre"/>
          <!-- untitled introductions: cf. abbreviated review model, which does not print `genre` on its own (MHRA 7.12) -->
          <text macro="source-monographic-preposition"/>
          <text font-style="italic" form="short" text-case="title" variable="container-title"/>
        </if>
        <else-if type="article-journal" variable="container-title genre volume-title">
          <text form="short" variable="genre"/>
          <!-- untitled introduction to a special issue or supplement -->
          <text macro="source-monographic-preposition"/>
          <text font-style="italic" form="short" text-case="title" variable="volume-title"/>
        </else-if>
        <else-if variable="genre">
          <text form="short" variable="genre"/>
        </else-if>
        <else-if variable="medium">
          <text form="short" variable="medium"/>
        </else-if>
        <else-if variable="chapter-number container-title">
          <text macro="label-chapter-number"/>
          <text macro="source-monographic-preposition"/>
          <text font-style="italic" form="short" text-case="title" variable="container-title"/>
        </else-if>
        <else-if variable="chapter-number">
          <text macro="label-chapter-number"/>
        </else-if>
        <!-- generic labels if unpublished -->
        <else-if match="any" variable="archive archive-place container-title DOI number publisher references URL"/>
        <else-if type="manuscript">
          <!-- 'unpublished manuscript' if no `genre` (cf. CMOS18 14.114) -->
          <text term="manuscript"/>
        </else-if>
        <else-if type="personal_communication">
          <!-- 'pers. comm.' if no `genre` (cf. CMOS18 14.111) -->
          <text form="short" term="personal-communication"/>
        </else-if>
      </choose>
    </group>
  </macro>
  <macro name="description-interview">
    <!-- list the interviewer as the author and the interviewee in the description (MHRA 7.11) -->
    <group delimiter=", ">
      <group delimiter=" ">
        <choose>
          <if variable="genre number interviewer">
            <!-- `genre` printed with `number` -->
            <text term="interview"/>
            <text form="verb" term="contributor"/>
            <choose>
              <if match="any" variable="container-title DOI issue number publisher publisher-place references URL volume">
                <!-- interviewee appears in the description of a published interview only (MHRA 7.11) -->
                <names variable="author"/>
              </if>
              <else>
                <names variable="interviewer"/>
              </else>
            </choose>
          </if>
          <else-if variable="genre interviewer">
            <text variable="genre"/>
            <text form="verb" term="contributor"/>
            <choose>
              <if match="any" variable="container-title DOI issue number publisher publisher-place references URL volume">
                <!-- interviewee appears in the description of a published interview only (MHRA 7.11) -->
                <names variable="author"/>
              </if>
              <else>
                <names variable="interviewer"/>
              </else>
            </choose>
          </else-if>
          <else-if variable="interviewer">
            <text term="interview"/>
            <text form="verb" term="contributor"/>
            <choose>
              <if match="any" variable="container-title DOI issue number publisher publisher-place references URL volume">
                <!-- interviewee appears in the description of a published interview only (MHRA 7.11) -->
                <names variable="author"/>
              </if>
              <else>
                <names variable="interviewer"/>
              </else>
            </choose>
          </else-if>
          <else>
            <text macro="description-format"/>
          </else>
        </choose>
      </group>
      <text macro="source-event-place-first"/>
    </group>
  </macro>
  <macro name="description-interview-short">
    <choose>
      <if disambiguate="true">
        <text term="interview"/>
        <text form="verb" term="contributor"/>
        <choose>
          <if match="any" variable="container-title DOI issue number publisher publisher-place references URL volume">
            <!-- interviewee appears in the description of a published interview only (MHRA 7.11) -->
            <names variable="author">
              <name form="short"/>
            </names>
          </if>
          <else>
            <names variable="interviewer">
              <name form="short"/>
            </names>
          </else>
        </choose>
      </if>
      <else-if match="any" variable="genre medium">
        <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="description-format-short"/>
          </if>
          <else>
            <!-- TODO: capitalize if no author or title? -->
            <text macro="description-format"/>
          </else>
        </choose>
      </else-if>
      <else>
        <!-- generic description for an unpublished interview (cf. CMOS18 14.108) -->
        <text term="interview"/>
      </else>
    </choose>
  </macro>
  <macro name="description-letter">
    <choose>
      <if variable="recipient">
        <group delimiter=", ">
          <choose>
            <if variable="genre number">
              <!-- `genre` appears with `number` -->
              <names variable="recipient">
                <label form="verb" suffix=" "/>
                <name/>
              </names>
            </if>
            <else>
              <group delimiter=" ">
                <text macro="description-format"/>
                <names variable="recipient">
                  <label form="verb" suffix=" "/>
                  <name/>
                </names>
              </group>
            </else>
          </choose>
          <text variable="event-place"/>
          <text macro="date-event-full"/>
        </group>
      </if>
      <else>
        <text macro="description-format"/>
      </else>
    </choose>
  </macro>
  <macro name="description-letter-short">
    <!-- shortened notes ideally give author, recipient, place, and date (cf. 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 form="short"/>
            </names>
          </group>
        </if>
        <else>
          <text macro="description-format-short"/>
        </else>
      </choose>
      <text variable="event-place"/>
      <choose>
        <if variable="event-date">
          <text macro="date-event-full"/>
        </if>
        <else>
          <text macro="date-issued-full"/>
        </else>
      </choose>
    </group>
  </macro>
  <macro name="description-paper-conference">
    <choose>
      <if match="any" variable="collection-editor compiler editor editorial-director">
        <!-- monographic types -->
        <text macro="description-format"/>
      </if>
      <else>
        <!-- serial types -->
        <group delimiter=", ">
          <text macro="description-serial"/>
          <text macro="source-event"/>
        </group>
      </else>
    </choose>
  </macro>
  <macro name="description-review">
    <group delimiter=", ">
      <group delimiter=" ">
        <choose>
          <if variable="genre">
            <!-- assume that `genre` is entered as 'Review of the book' or similar -->
            <text variable="genre"/>
          </if>
          <else>
            <text term="review-of"/>
          </else>
        </choose>
        <group delimiter=", ">
          <names variable="reviewed-author"/>
          <text macro="description-review-title"/>
          <text variable="reviewed-genre"/>
        </group>
        <text macro="source-event-place-first" prefix="(" suffix=")"/>
      </group>
      <text macro="label-section"/>
    </group>
  </macro>
  <macro name="description-review-short">
    <group delimiter=" ">
      <text term="review-of"/>
      <choose>
        <if variable="reviewed-author">
          <!-- cite under author if available (MHRA 7.12) -->
          <names variable="reviewed-author"/>
          <!-- use full name, not short -->
        </if>
        <else-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"/>
        </else-if>
        <else>
          <!-- Assume title is title of reviewed work -->
          <text font-style="italic" form="short" text-case="title" variable="title"/>
        </else>
      </choose>
    </group>
  </macro>
  <macro name="description-review-title">
    <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" 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-serial">
    <group delimiter=", ">
      <text macro="description-format"/>
      <!-- `section` provides magazine departments (cf. CMOS18 14.88) and newspaper column names (cf. CMOS18 14.93) -->
      <text macro="label-section"/>
    </group>
  </macro>
  <macro name="description-serial-short">
    <choose>
      <if variable="title"/>
      <else-if variable="genre">
        <text macro="description-format-short"/>
      </else-if>
      <else>
        <text form="short" text-case="title" variable="section"/>
      </else>
    </choose>
  </macro>
  <macro name="description-song">
    <!-- 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 variable="genre"/>
          <text form="verb" term="performer"/>
        </if>
      </choose>
      <names variable="author">
        <name delimiter-precedes-last="always"/>
        <substitute>
          <names variable="performer"/>
        </substitute>
      </names>
    </group>
  </macro>
  <!-- 3.3. Identifier (contributors) -->
  <macro name="identifier">
    <group delimiter=", ">
      <choose>
        <if type="patent">
          <text macro="identifier-patent"/>
        </if>
        <else-if type="report">
          <text macro="identifier-report"/>
        </else-if>
        <else-if match="any" type="post webpage">
          <!-- Handle `container-title` on `post` or `webpage` akin to `publisher` -->
          <text macro="identifier-number"/>
          <text macro="identifier-contributors"/>
        </else-if>
        <else-if variable="container-title">
          <choose>
            <if match="any" type="graphic map motion_picture">
              <!-- For audiovisual media, number information comes after `title`, not `container-title`; `song` places album catalogue `number` with `publisher` (cf. CMOS18 14.163-164) -->
              <!-- most styles would place `broadcast` in this position but here it is in `source-monographic-locator-volume` (MHRA 7.8.xiii) -->
              <text macro="identifier-number"/>
            </if>
          </choose>
          <text macro="identifier-contributors"/>
        </else-if>
        <else>
          <choose>
            <if match="none" type="broadcast song">
              <text macro="identifier-number"/>
            </if>
          </choose>
          <choose>
            <if match="any" variable="available-date part-title volume-title">
              <!-- if there is a volume or part, contributors except for the series editor follow the corresponding volume -->
              <names variable="collection-editor">
                <label form="verb-short" suffix=" "/>
                <name/>
              </names>
            </if>
            <else-if match="any" variable="number-of-volumes part-number volume">
              <choose>
                <if variable="collection-editor">
                  <names variable="collection-editor">
                    <label form="verb-short" suffix=" "/>
                    <name/>
                  </names>
                </if>
                <else>
                  <text macro="identifier-contributors"/>
                </else>
              </choose>
            </else-if>
            <else>
              <text macro="identifier-contributors"/>
            </else>
          </choose>
        </else>
      </choose>
    </group>
  </macro>
  <!-- Identifier elements -->
  <macro name="identifier-contributors">
    <choose>
      <if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book">
        <text macro="identifier-contributors-serial"/>
      </if>
      <else-if match="any" variable="collection-editor compiler editor editorial-director">
        <text macro="identifier-contributors-monographic"/>
      </else-if>
      <else-if match="any" type="interview paper-conference">
        <text macro="identifier-contributors-serial"/>
      </else-if>
      <else>
        <text macro="identifier-contributors-monographic"/>
      </else>
    </choose>
  </macro>
  <macro name="identifier-contributors-monographic">
    <group delimiter=", ">
      <choose>
        <if match="any" type="post webpage">
          <names variable="container-author">
            <label form="verb-short" suffix=" "/>
            <name/>
          </names>
          <names variable="editor-translator">
            <label form="verb-short" suffix=" "/>
            <name/>
          </names>
          <names delimiter=", " variable="editor translator">
            <label form="verb-short" suffix=" "/>
            <name/>
          </names>
          <names variable="editorial-director">
            <label form="verb-short" suffix=" "/>
            <name/>
          </names>
          <names variable="host">
            <label form="verb-short" suffix=" "/>
            <name/>
          </names>
          <names variable="guest">
            <label form="verb-short" suffix=" "/>
            <name/>
          </names>
          <names delimiter=", " variable="illustrator narrator">
            <label form="verb-short" suffix=" "/>
            <name/>
          </names>
          <names delimiter=", " variable="compiler chair organizer curator">
            <label form="verb-short" suffix=" "/>
            <name/>
          </names>
          <names delimiter=", " variable="series-creator executive-producer">
            <label form="verb" suffix=" "/>
            <name/>
          </names>
          <names variable="producer">
            <label form="verb-short" suffix=" "/>
            <name/>
          </names>
          <names variable="director">
            <label form="verb-short" suffix=" "/>
            <name/>
          </names>
          <names variable="performer">
            <label form="verb" suffix=" "/>
            <name/>
          </names>
          <choose>
            <if match="any" type="book broadcast chapter classic entry interview motion_picture musical_score pamphlet paper-conference report software"/>
            <else-if type="thesis"/>
            <else>
              <names variable="contributor">
                <label form="verb-short" suffix=" "/>
                <name/>
              </names>
            </else>
          </choose>
        </if>
        <else>
          <!-- Handle `container-title` on `post` or `webpage` akin to `publisher` -->
          <choose>
            <if match="none" variable="container-title">
              <names variable="container-author">
                <label form="verb-short" suffix=" "/>
                <name/>
              </names>
              <names variable="editor-translator">
                <label form="verb-short" suffix=" "/>
                <name/>
              </names>
              <names delimiter=", " variable="editor translator">
                <label form="verb-short" suffix=" "/>
                <name/>
              </names>
              <names variable="editorial-director">
                <label form="verb-short" suffix=" "/>
                <name/>
              </names>
              <names variable="host">
                <label form="verb-short" suffix=" "/>
                <name/>
              </names>
              <names variable="guest">
                <label form="verb-short" suffix=" "/>
                <name/>
              </names>
            </if>
          </choose>
          <names delimiter=", " variable="illustrator">
            <label form="verb-short" suffix=" "/>
            <name/>
          </names>
          <names delimiter=", " variable="narrator">
            <label form="verb-short" suffix=" "/>
            <name/>
          </names>
          <choose>
            <if match="none" variable="container-title">
              <names delimiter=", " variable="compiler chair organizer curator">
                <label form="verb-short" suffix=" "/>
                <name/>
              </names>
              <names delimiter=", " variable="series-creator executive-producer">
                <label form="verb" suffix=" "/>
                <name/>
              </names>
              <names variable="producer">
                <label form="verb-short" suffix=" "/>
                <name/>
              </names>
              <names variable="director">
                <label form="verb-short" suffix=" "/>
                <name/>
              </names>
              <names variable="performer">
                <label form="verb" suffix=" "/>
                <name/>
              </names>
              <choose>
                <if match="any" type="book broadcast chapter classic entry interview motion_picture musical_score pamphlet paper-conference report software"/>
                <else-if type="song"/>
                <else-if type="thesis"/>
                <else>
                  <names variable="contributor">
                    <label form="verb-short" suffix=" "/>
                    <name/>
                  </names>
                </else>
              </choose>
            </if>
          </choose>
          <choose>
            <if type="song">
              <!-- Song contributors attached to album (cf. CMOS18 14.163) -->
              <names variable="contributor">
                <label form="verb-short" suffix=" "/>
                <name/>
              </names>
            </if>
          </choose>
        </else>
      </choose>
    </group>
  </macro>
  <macro name="identifier-contributors-serial">
    <group delimiter=", ">
      <choose>
        <if type="periodical">
          <names variable="editor">
            <label form="verb-short" suffix=" "/>
            <name/>
          </names>
        </if>
      </choose>
      <names delimiter=", " variable="translator narrator">
        <label form="verb-short" suffix=" "/>
        <name/>
      </names>
      <names delimiter=", " variable="compiler chair organizer curator">
        <label form="verb-short" suffix=" "/>
        <name/>
      </names>
      <names delimiter=", " variable="series-creator executive-producer">
        <label form="verb" suffix=" "/>
        <name/>
      </names>
      <names variable="producer">
        <!-- not abbreviated (cf. CMOS18 14.168) -->
        <label form="verb" suffix=" "/>
        <name/>
      </names>
      <names variable="director">
        <label form="verb-short" suffix=" "/>
        <name/>
      </names>
      <names variable="performer">
        <label form="verb" suffix=" "/>
        <name/>
      </names>
    </group>
  </macro>
  <macro name="identifier-edition">
    <choose>
      <if variable="original-title">
        <text macro="label-edition"/>
      </if>
      <else-if variable="original-date"/>
      <else>
        <text macro="label-edition"/>
      </else>
    </choose>
  </macro>
  <macro name="identifier-number">
    <group delimiter=" ">
      <choose>
        <if type="thesis"/>
        <else-if is-numeric="number" type="broadcast" variable="genre">
          <text variable="genre"/>
          <text variable="number"/>
        </else-if>
        <else-if is-numeric="number" type="broadcast">
          <text value="episode"/>
          <text variable="number"/>
        </else-if>
        <else-if variable="number">
          <text variable="genre"/>
          <text macro="label-number"/>
        </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="genre">
            <text text-case="capitalize-first" variable="genre"/>
          </if>
          <else>
            <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 (cf. CMOS18 14.158) -->
        <text macro="date-issued-full"/>
      </group>
    </group>
  </macro>
  <macro name="identifier-report">
    <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"/>
        </if>
        <else-if variable="title">
          <text macro="identifier-number"/>
          <text macro="identifier-contributors"/>
        </else-if>
        <else>
          <!-- If there is no `title`, then `genre` and `number` are already printed as the title. -->
          <text macro="identifier-contributors"/>
        </else>
      </choose>
    </group>
  </macro>
  <!-- 4. Source -->
  <macro name="source">
    <choose>
      <if match="any" type="patent post webpage"/>
      <else-if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book">
        <text macro="source-serial"/>
      </else-if>
      <else-if match="any" variable="collection-editor compiler editor editorial-director">
        <text macro="source-monographic"/>
      </else-if>
      <else-if match="any" type="interview paper-conference">
        <text macro="source-serial"/>
      </else-if>
      <else>
        <text macro="source-monographic"/>
      </else>
    </choose>
  </macro>
  <!-- 4.1. Serial sources -->
  <macro name="source-serial">
    <group delimiter=", ">
      <text macro="source-serial-title-volume"/>
      <text macro="source-serial-title"/>
      <text macro="source-serial-identifier"/>
    </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">
    <group delimiter=" ">
      <choose>
        <!-- Journal special issues and supplements (MHRA 7.4) -->
        <if match="none" variable="container-title"/>
        <else-if match="none" type="periodical" variable="supplement-number volume-title"/>
        <!-- TODO: use `container-genre` here once available to allow a custom description of the journal volume -->
        <else-if variable="supplement-number volume-title">
          <text term="supplement"/>
          <text value="to"/>
        </else-if>
        <else-if type="periodical" variable="supplement-number title">
          <text term="supplement"/>
          <text value="to"/>
        </else-if>
        <else-if variable="volume-title">
          <text term="special-issue"/>
          <text value="of"/>
        </else-if>
        <else-if type="periodical" variable="title">
          <text term="special-issue"/>
          <text value="of"/>
        </else-if>
      </choose>
      <text macro="source-serial-name"/>
    </group>
  </macro>
  <macro name="source-serial-title-volume">
    <choose>
      <if variable="volume-title">
        <!-- Journal special issues (cf. CMOS18 14.77) and supplements (cf. CMOS18 14.78) -->
        <group delimiter=", ">
          <group delimiter=" ">
            <text macro="source-monographic-preposition"/>
            <text font-style="italic" text-case="title" variable="volume-title"/>
          </group>
          <text macro="source-monographic-identifier-contributors"/>
        </group>
      </if>
    </choose>
  </macro>
  <!-- Serial source identifier -->
  <macro name="source-serial-identifier">
    <group delimiter=", ">
      <text macro="source-serial-identifier-volume"/>
      <!-- periodical edition always capitalized (cf. CMOS18 14.89) -->
      <text macro="label-edition-capitalized"/>
      <text macro="source-serial-locator"/>
    </group>
  </macro>
  <macro name="source-serial-identifier-volume">
    <group delimiter=", ">
      <!-- `collection-title` is for any serial with multiple series (e.g. 'second series') -->
      <text variable="collection-title"/>
      <choose>
        <if type="article-newspaper">
          <!-- newspapers cited by date (MHRA 7.6) -->
          <text macro="source-serial-volume-status"/>
        </if>
        <else-if match="any" variable="issue supplement-number volume">
          <group delimiter=" ">
            <group delimiter=", ">
              <choose>
                <if variable="issue volume">
                  <group delimiter=".">
                    <text variable="volume"/>
                    <text variable="issue"/>
                  </group>
                </if>
                <else>
                  <text variable="volume"/>
                  <text macro="label-issue"/>
                </else>
              </choose>
              <text macro="label-supplement-number"/>
            </group>
            <text macro="source-date" prefix="(" suffix=")"/>
          </group>
        </else-if>
        <else-if type="paper-conference">
          <!-- with an unpublished conference paper, event place and date are bracketed in `source-event` (MHRA 7.10.vi) -->
          <choose>
            <if variable="page">
              <text macro="source-serial-volume-status"/>
            </if>
          </choose>
        </else-if>
        <else>
          <choose>
            <if type="interview">
              <!-- publisher possible with `interview` (cf. CMOS18 14.110) -->
              <text variable="publisher"/>
            </if>
          </choose>
          <text macro="source-serial-volume-status"/>
        </else>
      </choose>
    </group>
  </macro>
  <macro name="source-serial-volume-status">
    <group delimiter=", ">
      <choose>
        <if match="none" variable="issue number page supplement-number volume">
          <group delimiter=" ">
            <!-- article accepted for publication and available on publisher website (cf. 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"/>
        <text macro="source-date"/>
      </group>
    </group>
  </macro>
  <!-- Serial source locator -->
  <macro name="source-serial-locator">
    <choose>
      <if match="any" variable="number page">
        <group delimiter=" ">
          <group delimiter=", ">
            <text macro="label-page"/>
            <!-- `number` is an article ID (cf. CMOS18 14.71) -->
            <choose>
              <!-- if there is an `archive` with no other reference, `number` appears in `source-archive-database-number` -->
              <if match="any" variable="archive_collection archive_location archive-place">
                <text macro="label-number-article"/>
              </if>
              <else-if variable="archive"/>
              <else>
                <text macro="label-number-article"/>
              </else>
            </choose>
          </group>
          <text macro="label-locator" prefix="(" suffix=")"/>
        </group>
      </if>
      <else>
        <text macro="label-locator"/>
      </else>
    </choose>
  </macro>
  <!-- 4.2. Monographic sources -->
  <macro name="source-monographic">
    <group delimiter=", ">
      <!-- Monographic sources repeat main reference elements -->
      <choose>
        <if variable="container-title">
          <group delimiter=", ">
            <group delimiter=" ">
              <text macro="source-monographic-preposition"/>
              <group delimiter=", ">
                <names variable="container-author"/>
                <text font-style="italic" text-case="title" variable="container-title"/>
              </group>
            </group>
            <text macro="source-monographic-description"/>
            <text macro="source-monographic-identifier"/>
          </group>
        </if>
      </choose>
      <text macro="source-series"/>
      <text macro="source-event"/>
      <text macro="label-version"/>
      <text macro="identifier-edition"/>
      <text macro="label-number-of-volumes"/>
    </group>
  </macro>
  <macro name="source-monographic-preposition">
    <!-- MHRA does not define how to display a chapter number; this macro is based on CMOS -->
    <group delimiter=" ">
      <choose>
        <if match="any" type="broadcast entry entry-dictionary entry-encyclopedia motion_picture"/>
        <else-if type="chapter" variable="container-title genre">
          <!-- <https://www.mhra.org.uk/publications/Encounters-with-Albion/style-tutorial-2> appears to intend 'introduction to' (as CMOS18 14.12, 14.14) rather than 'introduction in' (NHR 18.2.6) -->
          <text value="to"/>
        </else-if>
        <else-if type="article-journal" variable="container-title genre volume-title">
          <text value="to"/>
        </else-if>
        <else-if type="song" variable="chapter-number title">
          <text macro="label-chapter-number"/>
          <text term="from"/>
        </else-if>
        <else-if type="song" variable="title">
          <text term="from"/>
        </else-if>
        <else-if variable="chapter-number page title">
          <text term="in"/>
        </else-if>
        <else-if variable="chapter-number title">
          <text macro="label-chapter-number"/>
          <text term="in"/>
        </else-if>
        <else>
          <text term="in"/>
        </else>
      </choose>
    </group>
  </macro>
  <!-- Monographic source description -->
  <macro name="source-monographic-description">
    <choose>
      <if match="any" type="document report software standard">
        <!-- place description after `container-title` -->
        <text macro="description-format"/>
      </if>
      <else-if match="any" variable="collection-editor compiler editor editorial-director issue page supplement-number volume"/>
      <else-if match="any" type="event paper-conference performance speech">
        <!-- unpublished conference presentations should describe the session -->
        <text macro="description-format"/>
      </else-if>
    </choose>
  </macro>
  <!-- Monographic source identifier -->
  <macro name="source-monographic-identifier">
    <!-- Based on `identifier` -->
    <choose>
      <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` (cf. CMOS18 14.163-164) -->
              <text macro="identifier-number"/>
            </if>
          </choose>
          <choose>
            <if match="any" variable="available-date part-title volume-title">
              <!-- if there is a volume or part, contributors except for the series editor follow the corresponding volume -->
              <names variable="collection-editor">
                <label form="verb-short" suffix=" "/>
                <name/>
              </names>
            </if>
            <else-if match="any" variable="number-of-volumes part-number volume">
              <choose>
                <if variable="collection-editor">
                  <names variable="collection-editor">
                    <label form="verb-short" suffix=" "/>
                    <name/>
                  </names>
                </if>
                <else>
                  <text macro="source-monographic-identifier-contributors"/>
                </else>
              </choose>
            </else-if>
            <else>
              <text macro="source-monographic-identifier-contributors"/>
            </else>
          </choose>
        </group>
      </if>
    </choose>
  </macro>
  <macro name="source-monographic-identifier-contributors">
    <group delimiter=", ">
      <names variable="editor-translator">
        <label form="verb-short" suffix=" "/>
        <name/>
      </names>
      <names delimiter=", " variable="editor translator">
        <label form="verb-short" suffix=" "/>
        <name/>
      </names>
      <names variable="host">
        <label form="verb-short" suffix=" "/>
        <name/>
      </names>
      <names variable="guest">
        <label form="verb-short" suffix=" "/>
        <name/>
      </names>
      <names delimiter=", " variable="chair organizer">
        <label form="verb-short" suffix=" "/>
        <name/>
      </names>
      <names delimiter=", " variable="illustrator narrator compiler curator">
        <label form="verb-short" suffix=" "/>
        <name/>
      </names>
      <names delimiter=", " variable="series-creator executive-producer">
        <label form="verb" suffix=" "/>
        <name/>
      </names>
      <names variable="producer">
        <label form="verb-short" suffix=" "/>
        <name/>
      </names>
      <names variable="editorial-director">
        <label form="verb-short" suffix=" "/>
        <name/>
      </names>
      <names variable="director">
        <label form="verb-short" suffix=" "/>
        <name/>
      </names>
      <names variable="performer">
        <label form="verb" suffix=" "/>
        <name/>
      </names>
      <choose>
        <if match="any" type="book broadcast chapter classic entry interview motion_picture musical_score pamphlet paper-conference report software"/>
        <else-if type="song"/>
        <else-if type="thesis"/>
        <else>
          <!-- Song contributors attached to album (cf. CMOS18 14.163) -->
          <names variable="contributor">
            <label form="verb-short" suffix=" "/>
            <name/>
          </names>
        </else>
      </choose>
    </group>
  </macro>
  <!-- Monographic source locator -->
  <macro name="source-monographic-locator">
    <group delimiter=", ">
      <text macro="source-monographic-locator-volume"/>
      <choose>
        <!-- archival locators appear after the shelfmark (MHRA 7.7) -->
        <if locator="column" variable="archive archive_location page"/>
        <else-if locator="folio" variable="archive archive_location page"/>
        <else-if locator="page" variable="archive archive_location page"/>
        <else-if variable="archive archive_location page">
          <text macro="label-locator"/>
        </else-if>
        <else-if variable="page">
          <group delimiter=" ">
            <text macro="label-page"/>
            <text macro="label-locator" prefix="(" suffix=")"/>
          </group>
        </else-if>
        <else-if locator="column" variable="archive archive_location"/>
        <else-if locator="folio" variable="archive archive_location"/>
        <else-if locator="page" variable="archive archive_location"/>
        <else>
          <text macro="label-locator"/>
        </else>
      </choose>
    </group>
  </macro>
  <macro name="source-monographic-locator-volume">
    <group delimiter=" ">
      <group delimiter=", ">
        <text macro="title-volume"/>
        <choose>
          <if type="broadcast">
            <text macro="identifier-number"/>
          </if>
        </choose>
        <choose>
          <if match="any" variable="available-date part-title volume-title">
            <text macro="source-monographic-identifier-contributors"/>
          </if>
          <else-if match="any" variable="number-of-volumes part-number volume">
            <choose>
              <if variable="collection-editor">
                <text macro="source-monographic-identifier-contributors"/>
              </if>
            </choose>
          </else-if>
        </choose>
      </group>
      <!-- remove volume `issued` date from this position in author-date -->
      <choose>
        <if variable="available-date issued volume">
          <text macro="date-issued-year" prefix="(" suffix=")"/>
        </if>
        <else-if variable="available-date issued part-number">
          <text macro="date-issued-year" prefix="(" suffix=")"/>
        </else-if>
        <else-if type="broadcast" variable="available-date issued number">
          <text macro="date-issued-year" prefix="(" suffix=")"/>
        </else-if>
      </choose>
    </group>
  </macro>
  <!-- 4.3. Series -->
  <macro name="source-series">
    <group delimiter=", ">
      <text text-case="title" variable="collection-title"/>
      <text variable="collection-number"/>
      <text macro="label-issue"/>
    </group>
  </macro>
  <!-- 4.4. Event -->
  <macro name="source-event">
    <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"/>
                  <text macro="source-event-unpublished-paper-conference"/>
                </if>
              </choose>
            </if>
            <else>
              <!-- For other item types, print event info even if published (e.g. collection catalogues, performance programmes). -->
              <text macro="source-event-status"/>
              <text macro="source-event-description"/>
            </else>
          </choose>
        </else-if>
      </choose>
    </group>
  </macro>
  <macro name="source-event-place-first">
    <!-- for descriptive elements for interviews, reviews, letters -->
    <choose>
      <if match="any" variable="event event-date event-title">
        <group delimiter=", ">
          <text variable="event-title"/>
          <text variable="event-place"/>
          <text macro="date-event-full"/>
        </group>
      </if>
    </choose>
  </macro>
  <macro name="source-event-status">
    <group delimiter=" ">
      <choose>
        <if type="broadcast" variable="status">
          <!-- 'aired', 'performed', etc. (cf. CMOS18 14.165) -->
          <text variable="status"/>
        </if>
        <else-if type="paper-conference">
          <choose>
            <if variable="genre">
              <text value="delivered"/>
            </if>
            <else>
              <text value="unpublished"/>
              <text form="short" term="paper-conference"/>
              <text value="delivered"/>
            </else>
          </choose>
          <choose>
            <if match="any" variable="event event-title">
              <text term="at"/>
            </if>
          </choose>
        </else-if>
        <else-if type="song">
          <text value="recorded"/>
          <choose>
            <if variable="event-title">
              <text term="at"/>
            </if>
          </choose>
        </else-if>
        <else-if variable="event-date issued"/>
        <else-if variable="issued"/>
        <else>
          <text variable="status"/>
        </else>
      </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-description">
    <group delimiter=", ">
      <text macro="source-event-title"/>
      <text macro="date-event-full"/>
      <text variable="event-place"/>
    </group>
  </macro>
  <macro name="source-event-unpublished-paper-conference">
    <!-- place and date are rendered in brackets for an unpublished conference paper (MHRA 7.10.vi) -->
    <group delimiter=" ">
      <text macro="source-event-title"/>
      <group delimiter=", " prefix="(" suffix=")">
        <text variable="event-place"/>
        <choose>
          <if variable="event-date">
            <text macro="date-event-full"/>
          </if>
          <else>
            <text macro="date-issued-full"/>
          </else>
        </choose>
      </group>
    </group>
  </macro>
  <!-- 4.5. Facts of publication -->
  <macro name="source-monographic-publication">
    <group delimiter="; ">
      <choose>
        <!-- `patent` date in identification (cf. CMOS18 14.158) -->
        <if type="patent"/>
        <!-- omit serial types -->
        <else-if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book"/>
        <else-if match="any" variable="collection-editor compiler editor editorial-director">
          <!-- monographic types -->
          <text macro="source-publication-and-date"/>
        </else-if>
        <!-- omit serial types -->
        <else-if match="any" type="interview paper-conference"/>
        <else>
          <!-- monographic types -->
          <text macro="source-publication-and-date"/>
        </else>
      </choose>
      <text macro="source-publication-original-title"/>
    </group>
  </macro>
  <macro name="source-monographic-publication-bracketed">
    <!-- Facts of publication with brackets for print monographic formats -->
    <choose>
      <if match="any" type="book broadcast chapter classic entry interview motion_picture musical_score pamphlet paper-conference report software song standard thesis">
        <text macro="source-monographic-publication" prefix="(" suffix=")"/>
      </if>
      <else-if type="article" variable="genre publisher">
        <!-- without brackets for a preprint in a repository (cf. CMOS18 14.76), with brackets for a working paper (cf. CMOS18 14.116) -->
        <text macro="source-monographic-publication" prefix="(" suffix=")"/>
      </else-if>
      <!-- dictionary/encyclopedia entries probably are bracketed only with publisher (MHRA 7.5) -->
      <else-if type="entry-dictionary" variable="publisher">
        <text macro="source-monographic-publication" prefix="(" suffix=")"/>
      </else-if>
      <else-if type="entry-encyclopedia" variable="publisher">
        <text macro="source-monographic-publication" prefix="(" suffix=")"/>
      </else-if>
      <else-if type="personal_communication">
        <choose>
          <if match="any" variable="collection-editor compiler editor editorial-director issue page supplement-number volume">
            <!-- in an edited collection -->
            <text macro="source-monographic-publication" prefix="(" suffix=")"/>
          </if>
        </choose>
      </else-if>
    </choose>
  </macro>
  <macro name="source-monographic-publication-unbracketed">
    <!-- Facts of publication without brackets -->
    <choose>
      <if match="any" type="book broadcast chapter classic entry interview motion_picture musical_score pamphlet paper-conference report software song standard thesis"/>
      <else-if type="article" variable="genre publisher"/>
      <else-if type="entry-dictionary" variable="publisher"/>
      <else-if type="entry-encyclopedia" variable="publisher"/>
      <else-if type="personal_communication">
        <choose>
          <if match="none" variable="collection-editor compiler editor editorial-director issue page supplement-number volume">
            <!-- not in an edited collection -->
            <text macro="source-monographic-publication"/>
          </if>
        </choose>
      </else-if>
      <else>
        <text macro="source-monographic-publication"/>
      </else>
    </choose>
  </macro>
  <macro name="source-monographic-publication-short-bracketed">
    <!-- mirrors `source-monographic-publication-bracketed` -->
    <group delimiter=", " prefix="(" suffix=")">
      <choose>
        <if disambiguate="true" match="none"/>
        <!-- Facts of publication with brackets for print monographic formats -->
        <else-if match="any" type="book chapter classic entry entry-dictionary entry-encyclopedia interview musical_score pamphlet paper-conference report thesis">
          <choose>
            <if disambiguate="true">
              <text macro="source-publication-publisher"/>
            </if>
          </choose>
          <text macro="source-date"/>
        </else-if>
        <else-if type="article" variable="genre publisher">
          <!-- without brackets for a preprint in a repository (cf. CMOS18 14.76), with brackets for a working paper (cf. CMOS18 14.116) -->
          <choose>
            <if disambiguate="true">
              <text macro="source-publication-publisher"/>
            </if>
          </choose>
          <text macro="source-date"/>
        </else-if>
        <else-if type="motion_picture" variable="publisher">
          <choose>
            <if disambiguate="true">
              <text macro="source-publication-publisher"/>
            </if>
          </choose>
          <text macro="source-date"/>
        </else-if>
        <else-if type="personal_communication">
          <choose>
            <if match="any" variable="collection-editor compiler editor editorial-director issue page supplement-number volume">
              <!-- in an edited collection -->
              <text macro="source-date"/>
            </if>
          </choose>
        </else-if>
      </choose>
    </group>
  </macro>
  <macro name="source-monographic-publication-short-unbracketed">
    <!-- mirrors `source-monographic-publication-unbracketed` -->
    <choose>
      <if disambiguate="true" match="none"/>
      <!-- Facts of publication without brackets -->
      <else-if match="any" type="book chapter classic entry entry-dictionary entry-encyclopedia interview musical_score pamphlet paper-conference report thesis"/>
      <else-if type="article" variable="genre publisher"/>
      <else-if type="motion_picture" variable="publisher"/>
      <else-if type="personal_communication">
        <choose>
          <if match="none" variable="collection-editor compiler editor editorial-director issue page supplement-number volume">
            <!-- not in an edited collection -->
            <text macro="source-date"/>
          </if>
        </choose>
      </else-if>
      <else>
        <text macro="source-date"/>
      </else>
    </choose>
  </macro>
  <macro name="source-publication-and-date">
    <group delimiter=", ">
      <choose>
        <if match="any" type="post webpage">
          <!-- `container-title` functions like a publisher with social media and website sources (cf. CMOS18 14.104-106) -->
          <text text-case="title" variable="container-title"/>
        </if>
      </choose>
      <text macro="source-publication-history"/>
      <group delimiter=" ">
        <text macro="source-date-status"/>
        <text macro="source-date"/>
      </group>
    </group>
  </macro>
  <!-- Facts of publication elements -->
  <macro name="source-publication-description">
    <choose>
      <if type="article" variable="genre"/>
      <else-if type="article">
        <!-- `preprint` term attached to repository name, but specific working paper descriptors appear in description (cf. CMOS18 14.76, 14.116) -->
        <text term="preprint"/>
      </else-if>
      <else-if type="thesis">
        <!-- thesis type appears with university name (MHRA 7.10) -->
        <group delimiter=" ">
          <text value="unpublished"/>
          <text variable="genre"/>
        </group>
      </else-if>
      <else-if match="any" variable="original-publisher original-publisher-place">
        <choose>
          <!-- `edition` provides an alternative label to `reprint` (cf. 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 value="repr."/>
          </else-if>
        </choose>
      </else-if>
    </choose>
  </macro>
  <macro name="source-publication-history">
    <group delimiter="; ">
      <choose>
        <if variable="original-title">
          <!-- `original-title` is covered in `source-publication-original-title-bib` -->
          <group delimiter=", ">
            <text macro="source-publication-description"/>
            <text macro="source-publication-publisher"/>
          </group>
        </if>
        <else-if match="any" variable="edition original-publisher original-publisher-place">
          <!-- semicolon to separate original date if `original-publisher` (cf. CMOS18 14.16) -->
          <group delimiter=", ">
            <text macro="source-publication-publisher-original"/>
            <text macro="source-date-original"/>
          </group>
          <group delimiter=", ">
            <choose>
              <if variable="issued original-date">
                <text macro="label-edition"/>
              </if>
            </choose>
            <group delimiter=", ">
              <text macro="source-publication-description"/>
              <text macro="source-publication-publisher"/>
            </group>
          </group>
        </else-if>
        <else>
          <!-- semicolon to separate original date if no publisher (cf. CMOS18 14.165) -->
          <text macro="source-date-original"/>
          <group delimiter=", ">
            <text macro="source-publication-description"/>
            <text macro="source-publication-publisher"/>
          </group>
        </else>
      </choose>
    </group>
  </macro>
  <macro name="source-publication-original-title">
    <!-- Work originally published under a different title (cf. CMOS18 13.101) -->
    <choose>
      <if variable="original-title">
        <group delimiter=" ">
          <text term="original-work-published"/>
          <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"/>
            <text macro="source-date-original"/>
          </group>
        </group>
      </if>
    </choose>
  </macro>
  <macro name="source-publication-publisher">
    <group delimiter=" ">
      <choose>
        <if type="thesis" variable="publisher">
          <text variable="publisher"/>
        </if>
        <else-if type="motion_picture" variable="publisher-place">
          <!-- prioritize the country of origin for films (MHRA 7.8) -->
          <text variable="publisher-place"/>
        </else-if>
        <else-if type="motion_picture" variable="event-place">
          <text variable="event-place"/>
        </else-if>
        <else-if variable="publisher">
          <group delimiter=": ">
            <!-- <text variable="publisher-place"/> -->
            <text 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 variable="publisher-place"/>
        </else>
      </choose>
      <choose>
        <if type="song">
          <!-- Album catalogue number follows label name (cf. CMOS18 14.163-164) -->
          <text variable="number"/>
        </if>
      </choose>
    </group>
  </macro>
  <macro name="source-publication-publisher-original">
    <choose>
      <if variable="original-publisher">
        <group delimiter=": ">
          <!-- <text variable="original-publisher-place"/> -->
          <text variable="original-publisher"/>
        </group>
      </if>
      <else>
        <text variable="original-publisher-place"/>
      </else>
    </choose>
  </macro>
  <!-- 4.6. Date -->
  <macro name="source-date">
    <choose>
      <if variable="available-date issued">
        <date date-parts="year" form="numeric" variable="available-date"/>
      </if>
      <else>
        <text macro="source-date-issued-or-status"/>
        <!-- for author-date: -->
        <!-- <text macro="source-date-issued-day-month"/> -->
      </else>
    </choose>
  </macro>
  <!-- Date elements -->
  <macro name="source-date-issued-full">
    <!-- Give full date for more ephemeral types; reflected in `date-sort` -->
    <!-- NB: any changes must also be applied to `source-date-original-full` -->
    <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="entry entry-dictionary entry-encyclopedia">
        <choose>
          <if match="any" variable="DOI URL">
            <!-- Online reference works use full dates (cf. CMOS18 14.131) -->
            <text macro="date-issued-full"/>
          </if>
          <else>
            <text macro="date-issued-year"/>
          </else>
        </choose>
      </else-if>
      <else-if match="any" type="article broadcast collection dataset document event graphic manuscript map patent performance personal_communication post software speech standard webpage">
        <text macro="date-issued-full"/>
      </else-if>
      <else-if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book">
        <!-- serial types -->
        <text macro="source-date-issued-full-serial"/>
      </else-if>
      <else-if match="any" variable="collection-editor compiler editor editorial-director">
        <!-- monographic types -->
        <text macro="date-issued-year"/>
      </else-if>
      <else-if match="any" type="interview paper-conference">
        <!-- serial types -->
        <text macro="source-date-issued-full-serial"/>
      </else-if>
      <else-if variable="issued">
        <text macro="date-issued-year"/>
      </else-if>
      <else-if variable="available-date">
        <!-- possible recourse for multivolume series (e.g. CMOS18 14.26) -->
        <date date-parts="year" form="numeric" variable="available-date"/>
      </else-if>
      <else-if variable="event-date">
        <text macro="date-event-year"/>
      </else-if>
    </choose>
  </macro>
  <macro name="source-date-issued-full-serial">
    <choose>
      <if type="article-newspaper">
        <text macro="date-issued-full"/>
      </if>
      <else-if match="any" variable="supplement-number volume">
        <text macro="date-issued-year"/>
      </else-if>
      <else-if variable="issue">
        <text macro="date-issued-year-month"/>
      </else-if>
      <else>
        <text macro="date-issued-full"/>
      </else>
    </choose>
  </macro>
  <macro name="source-date-issued-or-status">
    <choose>
      <if match="any" variable="event-date issued">
        <text macro="source-date-issued-full"/>
      </if>
      <else-if variable="status">
        <text text-case="lowercase" variable="status"/>
      </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">
            <!-- only give n.d. for accessible personal communication (cf. CMOS18 14.111)-->
            <text form="short" term="no date"/>
          </if>
        </choose>
      </else-if>
      <!-- no n.d. for `classic` (MHRA 7.3c) -->
      <else-if match="any" type="classic"/>
      <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"/>
          </if>
        </choose>
      </else-if>
      <else>
        <text form="short" term="no date"/>
      </else>
    </choose>
  </macro>
  <macro name="source-date-original">
    <text macro="source-date-original-full"/>
    <!-- for author-date: -->
    <!-- <text macro="source-date-original-day-month"/> -->
  </macro>
  <macro name="source-date-original-full">
    <!-- Give full date for more ephemeral types; reflected in `date-sort` -->
    <!-- Macro derived from `source-date-issued-full` -->
    <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="entry entry-dictionary entry-encyclopedia">
        <choose>
          <if match="any" variable="DOI URL">
            <!-- Online reference works use full dates (cf. CMOS18 14.131) -->
            <text macro="date-original-full"/>
          </if>
          <else>
            <text macro="date-original-year"/>
          </else>
        </choose>
      </else-if>
      <else-if match="any" type="article broadcast collection dataset document event graphic manuscript map patent performance personal_communication post software speech standard webpage">
        <text macro="date-original-full"/>
      </else-if>
      <else-if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book">
        <!-- serial types -->
        <text macro="source-date-original-full-serial"/>
      </else-if>
      <else-if match="any" variable="collection-editor compiler editor editorial-director">
        <!-- monographic types -->
        <text macro="date-original-year"/>
      </else-if>
      <else-if match="any" type="interview paper-conference">
        <!-- serial types -->
        <text macro="source-date-original-full-serial"/>
      </else-if>
      <else>
        <!-- monographic types -->
        <text macro="date-original-year"/>
      </else>
    </choose>
  </macro>
  <macro name="source-date-original-full-serial">
    <choose>
      <if type="article-newspaper">
        <text macro="date-original-full"/>
      </if>
      <else-if match="any" variable="supplement-number volume">
        <text macro="date-original-year"/>
      </else-if>
      <else-if variable="issue">
        <text macro="date-original-year-month"/>
      </else-if>
      <else>
        <text macro="date-original-full"/>
      </else>
    </choose>
  </macro>
  <macro name="source-date-status">
    <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` (cf. CMOS18 14.165) -->
      <else-if variable="issued status">
        <!-- `status` specifies date type, e.g. 'effective', 'last modified', 'approved' (cf. CMOS18 14.104 for `webpage`; CMOS18 14.159 for `standard`) -->
        <text variable="status"/>
      </else-if>
      <!-- 'published online' for a work available ahead of print (MHRA 7.4) -->
      <else-if match="any" variable="available-date collection-title issue number page status supplement-number volume volume-title"/>
      <else-if type="article-journal" variable="DOI issued">
        <text term="advance-online-publication"/>
      </else-if>
    </choose>
  </macro>
  <!-- 4.7. Locator (including page references) -->
  <macro name="source-locator-subsequent">
    <choose>
      <if match="any" type="article-journal article-magazine article-newspaper periodical post-weblog review review-book">
        <text macro="source-locator-subsequent-serial"/>
      </if>
      <else-if match="any" variable="collection-editor compiler editor editorial-director">
        <text macro="source-locator-subsequent-monographic"/>
      </else-if>
      <else-if match="any" type="interview paper-conference">
        <text macro="source-locator-subsequent-serial"/>
      </else-if>
      <else>
        <text macro="source-locator-subsequent-monographic"/>
      </else>
    </choose>
  </macro>
  <macro name="source-locator-subsequent-monographic">
    <choose>
      <if variable="container-title">
        <!-- Do not provide `volume` or `part-number` for defined section -->
        <text macro="label-locator"/>
      </if>
      <else>
        <group delimiter=", ">
          <text macro="label-volume"/>
          <text macro="label-part-number"/>
          <text macro="label-locator"/>
        </group>
      </else>
    </choose>
  </macro>
  <macro name="source-locator-subsequent-serial">
    <group delimiter=", ">
      <text macro="label-part-number"/>
      <text macro="label-locator"/>
    </group>
  </macro>
  <!-- 4.8. Medium -->
  <macro name="source-medium">
    <choose>
      <if match="none" type="book broadcast chapter motion_picture song">
        <!-- works of art give a medium (MHRA 7.9); but no ebook format (MHRA 7.3); no medium or duration for music, films, or television (MHRA 7.8) -->
        <group delimiter=", ">
          <text variable="medium"/>
          <text variable="scale"/>
          <text variable="dimensions"/>
        </group>
      </if>
    </choose>
  </macro>
  <!-- 4.9. Archival location -->
  <macro name="source-archive">
    <group delimiter=", ">
      <text variable="archive-place"/>
      <text variable="archive"/>
      <text variable="archive_collection"/>
      <text variable="archive_location"/>
      <choose>
        <!-- archival locators appear after the shelfmark (MHRA 7.7) -->
        <if locator="column" variable="archive archive_location page">
          <text macro="source-archive-locator-page"/>
        </if>
        <else-if locator="folio" variable="archive archive_location page">
          <text macro="source-archive-locator-page"/>
        </else-if>
        <else-if locator="page" variable="archive archive_location page">
          <text macro="source-archive-locator-page"/>
        </else-if>
        <else-if variable="archive archive_location page">
          <choose>
            <if is-numeric="page">
              <!-- TODO: remove this conditional when `page` parsing is fixed for different locator types -->
              <text macro="label-page"/>
            </if>
            <else>
              <text variable="page"/>
            </else>
          </choose>
        </else-if>
        <else-if locator="column" variable="archive archive_location">
          <text macro="label-locator"/>
        </else-if>
        <else-if locator="folio" variable="archive archive_location">
          <text macro="label-locator"/>
        </else-if>
        <else-if locator="page" variable="archive archive_location">
          <text macro="label-locator"/>
        </else-if>
      </choose>
      <choose>
        <!-- database identifier, if not included elsewhere (cf. CMOS18 14.113) -->
        <if match="any" variable="archive_collection archive_location archive-place"/>
        <else-if type="thesis">
          <text variable="number"/>
        </else-if>
        <else-if match="any" type="dataset entry song" variable="genre"/>
        <else-if variable="archive">
          <text variable="number"/>
        </else-if>
      </choose>
    </group>
  </macro>
  <macro name="source-archive-locator-page">
    <group delimiter=" ">
      <choose>
        <if is-numeric="page">
          <!-- TODO: remove this conditional when `page` parsing is fixed for different locator types -->
          <text macro="label-page"/>
        </if>
        <else>
          <text variable="page"/>
        </else>
      </choose>
      <text macro="label-locator" prefix="(" suffix=")"/>
    </group>
  </macro>
  <macro name="source-archive-short">
    <!-- shortened reference for an item consisting only of a shelfmark (MHRA 7.7) -->
    <group delimiter=", ">
      <choose>
        <if match="none" variable="archive_collection">
          <text form="short" variable="archive"/>
        </if>
      </choose>
      <text form="short" variable="archive_collection"/>
      <text form="short" variable="archive_location"/>
    </group>
  </macro>
  <!-- 4.10. DOI or URL -->
  <macro name="source-URL">
    <choose>
      <if variable="DOI"/>
      <else-if variable="URL">
        <group delimiter=" ">
          <text prefix="&lt;" suffix="&gt;" variable="URL"/>
          <!-- provide an access date for URLs but not DOIs (MHRA 6.1, 6.3, 7.4) -->
          <group delimiter=" " prefix="[" suffix="]">
            <text term="accessed"/>
            <date form="text" variable="accessed"/>
          </group>
        </group>
      </else-if>
    </choose>
  </macro>
  <!-- Citation -->
  <macro name="citation-notes-shortened-author-title-item">
    <group delimiter=" ">
      <group delimiter=", ">
        <text macro="author-short"/>
        <text macro="title-and-descriptions-short"/>
        <text macro="citation-notes-shortened-author-title-disambiguate"/>
        <choose>
          <!-- inaccessible `interview` or `personal_communication` uses in-text format (cf. NHR 17.3.2, CMOS18 14.111): give the date at the first citation in shortened notes -->
          <if match="any" variable="archive archive-place container-title DOI number publisher references URL"/>
          <else-if position="first" type="interview">
            <text macro="date-short"/>
            <text macro="source-medium"/>
          </else-if>
          <else-if position="first" type="personal_communication">
            <text macro="source-medium"/>
          </else-if>
        </choose>
        <text macro="source-monographic-publication-short-unbracketed"/>
      </group>
      <text macro="source-monographic-publication-short-bracketed"/>
    </group>
  </macro>
  <macro name="citation-notes-shortened-author-title-disambiguate">
    <!-- added dates, editors/translators, publisher, date -->
    <group delimiter=", ">
      <choose>
        <if disambiguate="true">
          <names variable="editor-translator">
            <label form="verb-short" suffix=" "/>
            <name form="short"/>
            <substitute>
              <names variable="editor"/>
              <names variable="translator"/>
            </substitute>
          </names>
          <choose>
            <if disambiguate="true">
              <text macro="label-version"/>
              <text macro="label-edition"/>
            </if>
          </choose>
        </if>
      </choose>
    </group>
  </macro>
  <citation disambiguate-add-givenname="true" disambiguate-add-names="true">
    <layout delimiter="; " suffix=".">
      <choose>
        <if position="subsequent">
          <group delimiter=", ">
            <text macro="citation-notes-shortened-author-title-item"/>
            <text macro="source-locator-subsequent"/>
          </group>
        </if>
        <else>
          <group delimiter=", ">
            <text macro="author-note"/>
            <text macro="title-and-source"/>
          </group>
        </else>
      </choose>
    </layout>
  </citation>
  <!-- Bibliography -->
  <macro name="bibliography-notes">
    <group delimiter=". ">
      <group delimiter=", ">
        <text macro="author-bib"/>
        <text macro="title-and-source"/>
      </group>
      <text variable="references"/>
    </group>
  </macro>
  <bibliography hanging-indent="true" subsequent-author-substitute="&#8212;&#8212;" subsequent-author-substitute-rule="partial-first">
    <sort>
      <key macro="author-bib"/>
      <key macro="title-and-descriptions"/>
      <key macro="source"/>
      <key variable="volume"/>
      <key variable="part-number"/>
      <key variable="event-date"/>
      <key variable="original-date"/>
      <key macro="source-date-issued-or-status"/>
      <key macro="source-archive"/>
    </sort>
    <layout>
      <!-- MHRA (8.3) does not provide specific guidance on excluding citations from the bibliography, but this seems to be the intent, as some of its examples are only usable in a note; the following draws on guidance from New Hart's Rules and Chicago. -->
      <choose>
        <if type="classic">
          <choose>
            <if match="any" variable="archive editor translator publisher">
              <text macro="bibliography-notes"/>
            </if>
          </choose>
        </if>
        <else-if match="any" type="entry entry-dictionary entry-encyclopedia">
          <choose>
            <if variable="author">
              <!-- Only signed reference entries appear in the bibliography: the MHRA model for an unsigned entry is only usable as a note (MHRA 7.5.ix) -->
              <text macro="bibliography-notes"/>
            </if>
          </choose>
        </else-if>
        <!-- social media content usually omitted from the bibliography (cf. CMOS18 14.106) -->
        <else-if type="post"/>
        <else-if match="any" variable="archive archive-place container-title DOI number publisher references URL">
          <text macro="bibliography-notes"/>
        </else-if>
        <!-- Personal communications only appear in the bibliography if the reader can retrieve them (cf. MHRA 7.11, NHR 17.3.2, CMOS18 14.13, 14.111) -->
        <else-if match="any" type="interview personal_communication"/>
        <!-- In note styles, the bibliography also omits inaccessible manuscripts (cf. CMOS18 14.114), conference papers (cf. CMOS18 14.115), and private documents (cf. CMOS18 14.118) -->
        <else-if match="any" type="document manuscript paper-conference speech"/>
        <else>
          <text macro="bibliography-notes"/>
        </else>
      </choose>
    </layout>
  </bibliography>
</style>
