diff options
| author | John MacFarlane <[email protected]> | 2022-01-13 08:41:05 -0800 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2022-01-13 08:41:05 -0800 |
| commit | e532bceb8a9b6ef1cd402deefd161573417d7e06 (patch) | |
| tree | 4a6e53aad01c1aa7885696e59275b7786269e0f9 | |
| parent | a9f6ed2f97045c0195780f41a32187493aaca85c (diff) | |
Add test for #7826 notes-after-punctuation.
| -rw-r--r-- | test/command/7826.md | 78 | ||||
| -rw-r--r-- | test/command/american-medical-association.csl | 279 |
2 files changed, 357 insertions, 0 deletions
diff --git a/test/command/7826.md b/test/command/7826.md new file mode 100644 index 000000000..425a04d69 --- /dev/null +++ b/test/command/7826.md @@ -0,0 +1,78 @@ +``` +% pandoc -t plain --citeproc +--- +bibliography: command/biblio.bib +suppress-bibliography: true +csl: command/american-medical-association.csl +notes-after-punctuation: true +--- + +In numerous recent works [@item1; @item2], statistician +Foo and Bar have criticized XXX. +^D +In numerous recent works,^(1,2) statistician Foo and Bar have criticized +XXX. +``` +``` +% pandoc -t plain --citeproc +--- +bibliography: command/biblio.bib +suppress-bibliography: true +csl: command/american-medical-association.csl +--- + +In numerous recent works [@item1; @item2], statistician +Foo and Bar have criticized XXX. +^D +In numerous recent works^(1,2), statistician Foo and Bar have criticized +XXX. +``` +``` +% pandoc -t plain --citeproc +--- +bibliography: command/biblio.bib +suppress-bibliography: true +csl: command/chicago-fullnote-bibliography.csl +notes-after-punctuation: false +--- + +In numerous recent works [@item1; @item2], statistician +Foo and Bar have criticized XXX. +^D +In numerous recent works[1], statistician Foo and Bar have criticized +XXX. + +[1] John Doe, First Book (Cambridge: Cambridge University Press, 2005); +John Doe, “Article,” Journal of Generic Studies 6 (2006): 33–34. +``` +``` +% pandoc -t plain --citeproc +--- +bibliography: command/biblio.bib +suppress-bibliography: true +csl: command/chicago-fullnote-bibliography.csl +--- + +In numerous recent works [@item1; @item2], statistician +Foo and Bar have criticized XXX. +^D +In numerous recent works,[1] statistician Foo and Bar have criticized +XXX. + +[1] John Doe, First Book (Cambridge: Cambridge University Press, 2005); +John Doe, “Article,” Journal of Generic Studies 6 (2006): 33–34. +``` +``` +% pandoc -t plain --citeproc +--- +bibliography: command/biblio.bib +suppress-bibliography: true +notes-after-punctuation: true +--- + +In numerous recent works [@item1; @item2], statistician +Foo and Bar have criticized XXX. +^D +In numerous recent works (Doe 2005, 2006), statistician Foo and Bar have +criticized XXX. +``` diff --git a/test/command/american-medical-association.csl b/test/command/american-medical-association.csl new file mode 100644 index 000000000..2ab4f4187 --- /dev/null +++ b/test/command/american-medical-association.csl @@ -0,0 +1,279 @@ +<?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="sort-only" page-range-format="expanded" default-locale="en-US"> + <info> + <title>American Medical Association 11th edition</title> + <title-short>AMA (11th ed.)</title-short> + <id>http://www.zotero.org/styles/american-medical-association</id> + <link href="http://www.zotero.org/styles/american-medical-association" rel="self"/> + <link href="http://www.zotero.org/styles/american-medical-association-10th-edition" rel="template"/> + <link href="https://westlibrary.txwes.edu/sites/default/files/pdf/AMACitationStyle.pdf" rel="documentation"/> + <link href="https://www.amamanualofstyle.com/fileasset/AMAMOS/aaaAMWA%20presentation%20Nov%202019%20FULL.pdf" rel="documentation"/> + <author> + <name>Julian Onions</name> + <email>[email protected]</email> + </author> + <contributor> + <name>Christian Pietsch</name> + <uri>http://purl.org/net/pietsch</uri> + </contributor> + <contributor> + <name>Daniel W Chan</name> + <email>[email protected]</email> + </contributor> + <contributor> + <name>Patrick O'Brien</name> + <email>[email protected]</email> + </contributor> + <category citation-format="numeric"/> + <category field="medicine"/> + <summary>The American Medical Association style as used in JAMA. Version 11 as per November-2019.</summary> + <updated>2020-04-23T13:38:04+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="page-range-delimiter">-</term> + </terms> + </locale> + <macro name="editor"> + <names variable="editor"> + <name name-as-sort-order="all" sort-separator=" " initialize-with="" delimiter=", " delimiter-precedes-last="always"/> + <label form="short" prefix=", "/> + </names> + </macro> + <macro name="author"> + <group suffix="."> + <names variable="author"> + <name name-as-sort-order="all" sort-separator=" " initialize-with="" delimiter=", " delimiter-precedes-last="always"/> + <label form="short" prefix=", "/> + <substitute> + <names variable="editor"/> + <text macro="title"/> + </substitute> + </names> + </group> + </macro> + <macro name="access"> + <choose> + <if type="article-newspaper" match="none"> + <choose> + <if variable="DOI"> + <text value="doi:"/> + <text variable="DOI"/> + </if> + <else-if variable="URL"> + <group delimiter=". "> + <choose> + <if type="webpage post post-weblog" match="any"> + <date variable="issued" prefix="Published " form="text"/> + </if> + </choose> + <group> + <text term="accessed" text-case="capitalize-first" suffix=" "/> + <date variable="accessed"> + <date-part name="month" suffix=" "/> + <date-part name="day" suffix=", "/> + <date-part name="year"/> + </date> + </group> + <text variable="URL"/> + </group> + </else-if> + </choose> + </if> + </choose> + </macro> + <macro name="title"> + <choose> + <if type="bill book graphic legal_case legislation motion_picture report song" match="any"> + <text variable="title" font-style="italic" text-case="title"/> + </if> + <else> + <text variable="title"/> + </else> + </choose> + </macro> + <macro name="publisher"> + <text variable="publisher"/> + </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" suffix="."/> + </else> + </choose> + </macro> + <citation collapse="citation-number"> + <sort> + <key variable="citation-number"/> + </sort> + <layout delimiter="," vertical-align="sup"> + <text variable="citation-number"/> + <group prefix="(" suffix=")"> + <label variable="locator" form="short" strip-periods="true"/> + <text variable="locator"/> + </group> + </layout> + </citation> + <bibliography hanging-indent="false" et-al-min="7" et-al-use-first="3" second-field-align="flush"> + <layout> + <text variable="citation-number" suffix=". "/> + <text macro="author"/> + <text macro="title" prefix=" " suffix="."/> + <choose> + <if type="bill book graphic legislation motion_picture report song" match="any"> + <group suffix="." prefix=" " delimiter=" "> + <group delimiter=" "> + <text term="volume" form="short" text-case="capitalize-first" strip-periods="true"/> + <text variable="volume" suffix="."/> + </group> + <text macro="edition"/> + <text macro="editor" prefix="(" suffix=")"/> + </group> + <text macro="publisher" prefix=" "/> + <group suffix="." prefix="; "> + <date variable="issued"> + <date-part name="year"/> + </date> + <text variable="page" prefix=":"/> + </group> + </if> + <else-if type="chapter paper-conference entry-dictionary entry-encyclopedia" match="any"> + <group prefix=" " delimiter=" "> + <text term="in" text-case="capitalize-first" suffix=":"/> + <text macro="editor"/> + <text variable="container-title" font-style="italic" suffix="." text-case="title"/> + <group delimiter=" "> + <text term="volume" form="short" text-case="capitalize-first" strip-periods="true"/> + <text variable="volume" suffix="."/> + </group> + <text macro="edition"/> + <text variable="collection-title" suffix="."/> + <group suffix="."> + <text macro="publisher"/> + <group suffix="." prefix="; "> + <date variable="issued"> + <date-part name="year"/> + </date> + <text variable="page" prefix=":"/> + </group> + </group> + </group> + </else-if> + <else-if type="article-newspaper"> + <text variable="container-title" font-style="italic" prefix=" " suffix=". "/> + <choose> + <if variable="URL"> + <group delimiter=". " suffix="."> + <text variable="URL"/> + <group prefix="Published "> + <date variable="issued"> + <date-part name="month" suffix=" "/> + <date-part name="day" suffix=", "/> + <date-part name="year"/> + </date> + </group> + <group> + <text term="accessed" text-case="capitalize-first" suffix=" "/> + <date variable="accessed"> + <date-part name="month" suffix=" "/> + <date-part name="day" suffix=", "/> + <date-part name="year"/> + </date> + </group> + </group> + </if> + <else> + <group delimiter=":" suffix="."> + <group> + <date variable="issued"> + <date-part name="month" suffix=" "/> + <date-part name="day" suffix=", "/> + <date-part name="year"/> + </date> + </group> + <text variable="page"/> + </group> + </else> + </choose> + </else-if> + <else-if type="legal_case"> + <group suffix="," prefix=" " delimiter=" "> + <text macro="editor" prefix="(" suffix=")"/> + </group> + <group prefix=" " delimiter=" "> + <text variable="container-title"/> + <text variable="volume"/> + </group> + <text variable="page" prefix=", " suffix=" "/> + <group prefix="(" suffix=")." delimiter=" "> + <text variable="authority"/> + <date variable="issued"> + <date-part name="year"/> + </date> + </group> + </else-if> + <else-if type="webpage post post-weblog" match="any"> + <text variable="container-title" prefix=" " suffix="."/> + </else-if> + <else-if type="speech"> + <group prefix=" " suffix=":"> + <choose> + <if variable="genre"> + <text variable="genre" suffix=" "/> + <text term="presented at"/> + </if> + <else> + <text term="presented at" text-case="capitalize-first"/> + </else> + </choose> + </group> + <group delimiter="; " prefix=" " suffix="."> + <text variable="event"/> + <group> + <date delimiter=" " variable="issued"> + <date-part name="month"/> + <date-part name="day" suffix=","/> + <date-part name="year"/> + </date> + </group> + <text variable="event-place"/> + </group> + </else-if> + <else> + <text macro="editor" prefix=" " suffix="."/> + <group prefix=" " suffix="."> + <text variable="container-title" font-style="italic" form="short" strip-periods="true" suffix="."/> + <group delimiter=";" prefix=" "> + <choose> + <if variable="issue volume" match="any"> + <date variable="issued"> + <date-part name="year"/> + </date> + </if> + <else> + <group delimiter=" "> + <text value="Published online"/> + <date form="text" date-parts="year-month-day" variable="issued"/> + </group> + </else> + </choose> + <group> + <text variable="volume"/> + <text variable="issue" prefix="(" suffix=")"/> + </group> + </group> + <text variable="page" prefix=":"/> + </group> + </else> + </choose> + <text prefix=" " macro="access"/> + </layout> + </bibliography> +</style> |
