SpeciesFileGroup/taxonworks

View on GitHub
lib/vendor/styles/world_chalcidoidea_book.csl

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never">
  <!-- This style was edited with the Visual CSL Editor (https://editor.citationstyles.org/visualEditor/), and manually.  It is derived from work by Libor Ansorge (https://www.zotero.org/libora/)-->
  <info>
    <title>Chalcidoidea of the World (chaptered book format)</title>
    <title-short>ChalBook</title-short>
    <id>world_chalcidoidea_book</id>
    <link href="http://www.zotero.org/styles/apa-no-ampersand" rel="template"/>
    <link href="https://https://github.com/SpeciesFileGroup/taxonworks" rel="documentation"/>
    <author>
      <name>Rachel Winston</name>
    </author>
    <author>
      <name>Matt Yoder</name>
    </author>
    <category citation-format="author-date"/>
    <category field="taxonomy"/>
    <category field="evolution"/>
    <summary>Chalcidoidea of the World, based on CABI guidelines</summary>
    <updated>2021-09-14T00:51:07+00:00</updated>
    <rights license="http://creativecommons.org/publicdomain/zero/1.0">This work is marked with CC0 1.0 license.</rights>
  </info>
  <locale xml:lang="en">
    <terms>
      <term name="editortranslator" form="short">
        <single>ed. &amp; trans.</single>
        <multiple>eds &amp; trans.</multiple>
      </term>
      <term name="translator" form="short">trans.</term>
    </terms>
  </locale>
  <macro name="container-contributors">
    <choose>
      <if type="chapter paper-conference entry-dictionary entry-encyclopedia" match="any">
        <group delimiter=", ">
          <names variable="container-author" delimiter=", ">
            <name and="text" initialize-with="." delimiter=", "/>
            <label form="short" prefix=" (" text-case="title" suffix=")"/>
          </names>
          <names variable="editor translator" delimiter=", ">
            <name and="text" delimiter-precedes-last="never" et-al-min="5" initialize-with="." name-as-sort-order="all"/>
            <et-al font-style="italic"/>
            <label form="short" text-case="lowercase" strip-periods="true" prefix=" (" suffix=")"/>
          </names>
        </group>
      </if>
    </choose>
  </macro>
  <macro name="secondary-contributors">
    <choose>
      <if type="article-journal chapter paper-conference entry-dictionary entry-encyclopedia" match="none">
        <group delimiter=", " prefix=" (" suffix=")">
          <names variable="container-author" delimiter=", ">
            <name and="text" initialize-with="." delimiter=", "/>
            <label form="short" prefix=", " text-case="title"/>
          </names>
          <names variable="editor translator" delimiter=", ">
            <name and="text" initialize-with="." delimiter=", "/>
            <label form="short" prefix=", " text-case="title"/>
          </names>
        </group>
      </if>
    </choose>
  </macro>
  <macro name="author">
    <names variable="author">
      <name and="text" delimiter-precedes-last="never" et-al-min="5" initialize-with="." name-as-sort-order="all"/>
      <et-al font-style="italic"/>
      <label form="short" text-case="lowercase" prefix=" (" suffix=")"/>
      <substitute>
        <names variable="editor"/>
        <names variable="translator"/>
        <choose>
          <if type="webpage">
            <text macro="title" strip-periods="true"/>
          </if>
          <else>
            <text macro="title"/>
          </else>
        </choose>
      </substitute>
    </names>
  </macro>
  <macro name="author-short">
    <names variable="author">
      <name form="short" font-style="normal" and="text" initialize-with="."/>
      <et-al font-style="italic"/>
      <substitute>
        <names variable="editor"/>
        <names variable="translator"/>
        <choose>
          <if type="report">
            <text variable="title" form="short" font-style="italic"/>
          </if>
          <else-if type="legal_case">
            <text variable="title" font-style="italic"/>
          </else-if>
          <else-if type="book graphic  motion_picture song" match="any">
            <text variable="title" form="short" font-style="italic"/>
          </else-if>
          <else-if type="bill legislation" match="any">
            <text variable="title" form="short"/>
          </else-if>
          <else-if variable="reviewed-author">
            <choose>
              <if variable="reviewed-title" match="none">
                <text variable="title" form="short" font-style="italic" prefix="Review of "/>
              </if>
              <else>
                <text variable="title" form="short" quotes="true"/>
              </else>
            </choose>
          </else-if>
          <else>
            <text variable="title" form="short" quotes="false"/>
          </else>
        </choose>
      </substitute>
    </names>
  </macro>
  <macro name="access">
    <choose>
      <if type="article-journal" match="any">
        <choose>
          <if variable="DOI" match="any">
            <text variable="DOI" prefix="https://doi.org/"/>
          </if>
          <else>
            <group>
              <text term="retrieved" text-case="capitalize-first" suffix=" "/>
              <text term="from" suffix=" "/>
              <text variable="URL"/>
            </group>
          </else>
        </choose>
      </if>
      <else>
        <choose>
          <if type="webpage">
            <group delimiter=" ">
              <text term="available at" text-case="capitalize-first" strip-periods="false" suffix=":"/>
              <text variable="URL" suffix=" "/>
              <group>
                <date form="text" variable="accessed" prefix="(accessed " suffix=")."/>
              </group>
            </group>
          </if>
        </choose>
      </else>
    </choose>
  </macro>
  <macro name="title">
    <choose>
      <if type="book graphic manuscript motion_picture song speech" match="any">
        <choose>
          <if variable="volume" type="book" match="all">
            <text variable="title" text-case="title" font-style="italic"/>
          </if>
          <else>
            <text variable="title" text-case="title" font-style="italic"/>
          </else>
        </choose>
      </if>
      <else-if variable="reviewed-author">
        <choose>
          <if variable="reviewed-title">
            <group delimiter=" ">
              <text variable="title"/>
              <group delimiter=", " prefix="[" suffix="]">
                <text variable="reviewed-title" font-style="italic" prefix="Review of "/>
                <names variable="reviewed-author" delimiter=", ">
                  <label form="verb-short" suffix=" "/>
                  <name and="text" initialize-with="." delimiter=", "/>
                </names>
              </group>
            </group>
          </if>
          <else>
            <group delimiter=", " prefix="[" suffix="]">
              <text variable="title" font-style="italic" prefix="Review of "/>
              <names variable="reviewed-author" delimiter=", ">
                <label form="verb-short" suffix=" "/>
                <name and="text" initialize-with="." delimiter=", "/>
              </names>
            </group>
          </else>
        </choose>
      </else-if>
      <else-if type="report" match="any">
        <text variable="title" text-case="title"/>
      </else-if>
      <else>
        <text variable="title" text-case="capitalize-first" suffix="."/>
      </else>
    </choose>
  </macro>
  <macro name="title-plus-extra">
    <text macro="title"/>
    <choose>
      <if type="report thesis" match="any">
        <group delimiter=", " prefix=". ">
          <group delimiter=" ">
            <choose>
              <if variable="genre" match="any">
                <text variable="genre"/>
              </if>
            </choose>
            <text variable="number" prefix="No. "/>
          </group>
          <group delimiter=" ">
            <text term="version" text-case="capitalize-first"/>
            <text variable="version"/>
          </group>
          <text macro="edition"/>
        </group>
      </if>
      <else-if type="post-weblog webpage" match="any">
        <text variable="genre" prefix=" [" suffix="]"/>
      </else-if>
      <else-if variable="version">
        <group delimiter=" " prefix=" (" suffix=")">
          <text term="version" text-case="capitalize-first"/>
          <text variable="version"/>
        </group>
      </else-if>
    </choose>
    <text macro="format" prefix=" [" suffix="]"/>
  </macro>
  <macro name="format">
    <choose>
      <if match="any" variable="medium">
        <text variable="medium" text-case="capitalize-first"/>
      </if>
      <else-if type="dataset" match="any">
        <text value="Data set"/>
      </else-if>
    </choose>
  </macro>
  <macro name="publisher">
    <choose>
      <if type="chapter paper-conference" match="any">
        <group delimiter=", ">
          <text variable="publisher" text-case="title" prefix=". "/>
          <text variable="publisher-place" text-case="title" suffix=", "/>
        </group>
        <label suffix=" " variable="page" form="short"/>
        <text variable="page" suffix="."/>
      </if>
      <else-if type="thesis book" match="any">
        <group delimiter=", ">
          <text variable="publisher" text-case="title" prefix=". "/>
          <text variable="publisher-place" text-case="title"/>
          <text variable="number-of-pages" suffix=" pp."/>
        </group>
      </else-if>
    </choose>
  </macro>
  <macro name="event">
    <choose>
      <if variable="container-title" match="none">
        <choose>
          <if variable="event">
            <choose>
              <if variable="genre" match="none">
                <text term="presented at" text-case="capitalize-first" suffix=" "/>
                <text variable="event"/>
              </if>
              <else>
                <group delimiter=" ">
                  <text variable="genre" text-case="capitalize-first"/>
                  <text term="presented at"/>
                  <text variable="event"/>
                </group>
              </else>
            </choose>
          </if>
          <else-if type="speech">
            <text variable="genre" text-case="capitalize-first"/>
          </else-if>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="issued">
    <choose>
      <if type="bill legal_case legislation" match="none">
        <choose>
          <if variable="issued">
            <group prefix=" (" suffix=")">
              <date date-parts="year" variable="issued">
                <date-part name="year" strip-periods="false"/>
              </date>
              <text variable="year-suffix" strip-periods="false"/>
              <choose>
                <if type="speech" match="any">
                  <date variable="issued">
                    <date-part prefix=", " name="month"/>
                  </date>
                </if>
                <else-if type="article-journal bill book chapter graphic legal_case legislation motion_picture paper-conference report thesis dataset" match="none">
                  <date variable="issued">
                    <date-part name="month" strip-periods="true" prefix=", "/>
                    <date-part name="day" strip-periods="true" prefix=" "/>
                  </date>
                </else-if>
              </choose>
            </group>
          </if>
          <else-if variable="status">
            <group prefix=" (" suffix=")">
              <text variable="status" strip-periods="false"/>
              <text variable="year-suffix" strip-periods="false" prefix="-"/>
            </group>
          </else-if>
          <else>
            <group prefix=" (" suffix=")">
              <text term="no date" form="short" strip-periods="false"/>
              <text variable="year-suffix" strip-periods="false" prefix="-"/>
            </group>
          </else>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="issued-sort">
    <choose>
      <if type="article-journal bill book chapter graphic legal_case legislation motion_picture paper-conference report song dataset" match="none">
        <date variable="issued">
          <date-part name="year"/>
        </date>
      </if>
      <else>
        <date variable="issued">
          <date-part name="year"/>
        </date>
      </else>
    </choose>
  </macro>
  <macro name="issued-year">
    <choose>
      <if variable="issued">
        <group delimiter="/">
          <date variable="original-date" form="text"/>
          <group>
            <date variable="issued">
              <date-part name="year"/>
            </date>
            <text variable="year-suffix"/>
          </group>
        </group>
      </if>
      <else-if variable="status">
        <text variable="status"/>
        <text variable="year-suffix" prefix="-"/>
      </else-if>
      <else>
        <text term="no date" form="short"/>
        <text variable="year-suffix" prefix="-"/>
      </else>
    </choose>
  </macro>
  <macro name="edition">
    <choose>
      <if is-numeric="edition">
        <group delimiter=" ">
          <number variable="edition" form="ordinal"/>
          <text term="edition" form="short"/>
        </group>
      </if>
      <else>
        <text variable="edition"/>
      </else>
    </choose>
  </macro>
  <macro name="locators">
    <choose>
      <if type="article-journal article-magazine" match="any">
        <group prefix=", " delimiter=", ">
          <group>
            <text variable="volume" font-style="normal"/>
            <text variable="issue" prefix="(" suffix=")"/>
          </group>
          <text variable="page" suffix="."/>
        </group>
        <choose>
          <if variable="issued">
            <choose>
              <if variable="page issue" match="none">
                <text variable="status" prefix=". "/>
              </if>
            </choose>
          </if>
        </choose>
      </if>
      <else-if type="article-newspaper">
        <group delimiter=" " prefix=", ">
          <label variable="page" form="short"/>
          <text variable="page"/>
        </group>
      </else-if>
      <else-if type="book thesis motion_picture report song chapter paper-conference entry-encyclopedia entry-dictionary" match="any">
        <group prefix=", ">
          <choose>
            <if variable="volume" match="any">
              <group>
                <text term="volume" form="short" text-case="capitalize-first" font-style="italic" suffix=" "/>
                <number font-style="italic" variable="volume"/>
              </group>
            </if>
            <else>
              <group>
                <text term="volume" form="short" plural="true" text-case="capitalize-first" suffix=" "/>
                <number variable="number-of-volumes" form="numeric" prefix="1–"/>
              </group>
            </else>
          </choose>
        </group>
      </else-if>
      <else-if type="legal_case">
        <group prefix=" (" suffix=")" delimiter=" ">
          <text variable="authority"/>
          <choose>
            <if variable="container-title" match="any">
              <date variable="issued" form="numeric" date-parts="year"/>
            </if>
            <else>
              <date variable="issued" form="text"/>
            </else>
          </choose>
        </group>
      </else-if>
      <else-if type="bill legislation" match="any">
        <date variable="issued" prefix=" (" suffix=")">
          <date-part name="year"/>
        </date>
      </else-if>
    </choose>
  </macro>
  <macro name="citation-locator">
    <group>
      <choose>
        <if locator="chapter">
          <label variable="locator" form="long" text-case="capitalize-first"/>
        </if>
        <else>
          <label variable="locator" form="short"/>
        </else>
      </choose>
      <text variable="locator" prefix=" "/>
    </group>
  </macro>
  <macro name="container">
    <choose>
      <if type="post-weblog webpage" match="none">
        <group>
          <choose>
            <if type="chapter paper-conference entry-encyclopedia" match="any">
              <text term="in" text-case="capitalize-first" prefix=". " suffix=": "/>
            </if>
          </choose>
          <group delimiter=" ">
            <text macro="container-contributors"/>
            <text macro="secondary-contributors"/>
            <text macro="container-title"/>
          </group>
        </group>
      </if>
    </choose>
  </macro>
  <macro name="container-title">
    <choose>
      <if type="article article-journal article-magazine article-newspaper" match="any">
        <text variable="container-title" text-case="title" font-style="italic" prefix=". "/>
      </if>
      <else-if type="bill legal_case legislation" match="none">
        <text variable="container-title" text-case="title" font-style="italic"/>
      </else-if>
    </choose>
  </macro>
  <macro name="legal-cites">
    <choose>
      <if type="legal_case" match="any">
        <group prefix=", " delimiter=" ">
          <choose>
            <if variable="container-title">
              <text variable="volume"/>
              <text variable="container-title"/>
              <group delimiter=" ">
                <text term="section" form="symbol"/>
                <text variable="section"/>
              </group>
              <text variable="page"/>
            </if>
            <else>
              <text variable="number" prefix="No. "/>
            </else>
          </choose>
        </group>
      </if>
      <else-if type="bill legislation" match="any">
        <group delimiter=", " prefix=", ">
          <choose>
            <if variable="number">
              <text variable="number" prefix="Pub. L. No. "/>
              <group delimiter=" ">
                <text term="section" form="symbol"/>
                <text variable="section"/>
              </group>
              <group delimiter=" ">
                <text variable="volume"/>
                <text variable="container-title"/>
                <text variable="page-first"/>
              </group>
            </if>
            <else>
              <group delimiter=" ">
                <text variable="volume"/>
                <text variable="container-title"/>
                <text term="section" form="symbol"/>
                <text variable="section"/>
              </group>
            </else>
          </choose>
        </group>
      </else-if>
    </choose>
  </macro>
  <macro name="original-date">
    <choose>
      <if variable="original-date">
        <group prefix="(" suffix=")" delimiter=" ">
          <text value="Original work published"/>
          <date variable="original-date" form="text"/>
        </group>
      </if>
    </choose>
  </macro>
  <macro name="In line SORT">
    <group>
      <names variable="author"/>
      <date date-parts="year" form="text" variable="issued"/>
    </group>
  </macro>
  <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true" collapse="year" givenname-disambiguation-rule="primary-name">
    <sort>
      <key macro="issued-sort"/>
      <key macro="author"/>
    </sort>
    <layout prefix="(" suffix=")" delimiter="; ">
      <group delimiter=", ">
        <text macro="author-short"/>
        <text macro="issued-year"/>
        <text macro="citation-locator"/>
      </group>
    </layout>
  </citation>
  <bibliography hanging-indent="true" et-al-min="8" et-al-use-first="5" entry-spacing="0" line-spacing="1">
    <sort>
      <key macro="author" names-min="3"/>
      <key macro="issued-year"/>
    </sort>
    <layout>
      <group suffix=" ">
        <group>
          <text macro="author"/>
          <text macro="issued" suffix=" "/>
          <text macro="title-plus-extra"/>
          <text macro="container"/>
        </group>
        <text macro="legal-cites"/>
        <text macro="locators"/>
        <group delimiter=", ">
          <text macro="publisher"/>
        </group>
        <choose>
          <if type="report" match="any">
            <text variable="publisher" text-case="title" prefix=". "/>
            <text variable="publisher-place" text-case="title" prefix=", " suffix=", "/>
            <text variable="page" suffix=" pp."/>
          </if>
        </choose>
      </group>
      <text macro="access"/>
      <text macro="original-date" prefix=" "/>
    </layout>
  </bibliography>
</style>