pandoc-citeproc 0.12.1 → 0.12.1.1
raw patch · 8 files changed
+520/−25 lines, 8 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- changelog +5/−0
- pandoc-citeproc.cabal +1/−1
- src/Text/CSL/Pandoc.hs +27/−15
- src/Text/CSL/Proc/Collapse.hs +6/−3
- stack.yaml +8/−6
- tests/issue152.expected.native +9/−0
- tests/issue152.in.native +4/−0
- tests/modern-language-association-7th-edition.csl +460/−0
changelog view
@@ -1,3 +1,8 @@+pandoc-citeproc (0.12.1.1)++ * Avoid double punctuation when citation ends with 'et al.' (#262).+ * Fix collapsing for items that lack an author (#152).+ pandoc-citeproc (0.12.1) * Fixed cases where we got plural instead of singular "issue"
pandoc-citeproc.cabal view
@@ -1,5 +1,5 @@ name: pandoc-citeproc-version: 0.12.1+version: 0.12.1.1 cabal-version: >= 1.12 synopsis: Supports using pandoc with citeproc
src/Text/CSL/Pandoc.hs view
@@ -31,7 +31,8 @@ import Control.Monad.State import System.FilePath import System.Directory (getAppUserDataDirectory)-import Text.CSL.Util (findFile, splitStrWhen, tr', parseRomanNumeral, trim)+import Text.CSL.Util (findFile, splitStrWhen, tr', parseRomanNumeral, trim,+ lastInline) import Text.CSL.Exception import System.IO.Error (isDoesNotExistError) import Data.Maybe (fromMaybe)@@ -262,23 +263,33 @@ isSpacy _ = False mvPunct :: Bool -> Style -> [Inline] -> [Inline]-mvPunct _ _ (x : Space : xs) | isSpacy x = x : xs-mvPunct moveNotes _ (s : x : ys) | isSpacy s, isNote x, startWithPunct ys =- if moveNotes- then Str (headInline ys) : x : tailInline ys- else x : ys-mvPunct moveNotes _ (Cite cs ils : ys) |- length ils > 1+mvPunct _ _ (x : Space : xs)+ | isSpacy x = x : xs+mvPunct moveNotes _ (s : x : ys)+ | isSpacy s+ , isNote x+ , startWithPunct ys+ = if moveNotes+ then Str (headInline ys) : x : tailInline ys+ else x : ys+mvPunct moveNotes _ (Cite cs ils : ys)+ | length ils > 1 , isNote (last ils) , startWithPunct ys , moveNotes- = Cite cs (init ils ++ [Str (headInline ys) | not (endWithPunct False (init ils))]+ = Cite cs (init ils+ ++ [Str (headInline ys) | not (endWithPunct False (init ils))] ++ [last ils]) : tailInline ys mvPunct moveNotes sty (q@(Quoted _ _) : w@(Str _) : x : ys)- | isNote x, isPunctuationInQuote sty, moveNotes =- mvPunctInsideQuote q w ++ (x : ys)+ | isNote x+ , isPunctuationInQuote sty+ , moveNotes+ = mvPunctInsideQuote q w ++ (x : ys) mvPunct _ _ (s : x : ys) | isSpacy s, isNote x = x : ys mvPunct _ _ (s : x@(Cite _ (Superscript _ : _)) : ys) | isSpacy s = x : ys+mvPunct _ _ (Cite cs ils : Str "." : ys)+ | lastInline ils == "."+ = Cite cs ils : ys mvPunct _ _ xs = xs endWithPunct :: Bool -> [Inline] -> Bool@@ -287,10 +298,11 @@ case reverse (stringify xs) of [] -> True -- covers .), .", etc.:- (d:c:_) | isPunctuation d && not onlyFinal- && isEndPunct c -> True- (c:_) | isEndPunct c -> True- | otherwise -> False+ (d:c:_) | isPunctuation d+ && not onlyFinal+ && isEndPunct c -> True+ (c:_) | isEndPunct c -> True+ | otherwise -> False where isEndPunct c = c `elem` (".,;:!?" :: String) startWithPunct :: [Inline] -> Bool
src/Text/CSL/Proc/Collapse.hs view
@@ -72,10 +72,11 @@ groupCites :: [(Cite, Output)] -> [(Cite, Output)] groupCites [] = []-groupCites (x:xs) = let equal = filter ((==) (namesOf $ snd x) . namesOf . snd) xs- notequal = filter ((/=) (namesOf $ snd x) . namesOf . snd) xs+groupCites (x:xs) = let equal = filter (hasSameNamesAs x) xs+ notequal = filter (not . hasSameNamesAs x) xs in x : equal ++ groupCites notequal where+ hasSameNamesAs w y = namesOf (snd w) == namesOf (snd y) contribsQ o | OContrib _ _ c _ _ <- o = [c] | otherwise = []@@ -138,7 +139,9 @@ | OContrib _ _ c _ _ <- o = [proc' rmHashAndGivenNames c] | otherwise = [] namesOf = query contribsQ- process = doCollapse . groupBy (\a b -> namesOf (snd a) == namesOf (snd b)) . groupCites+ hasSameNames a b = not (null (namesOf (snd a))) &&+ namesOf (snd a) == namesOf (snd b)+ process = doCollapse . groupBy hasSameNames . groupCites collapseYearSuf :: Bool -> String -> [(Cite,Output)] -> [Output] collapseYearSuf ranged ysd = process
stack.yaml view
@@ -9,17 +9,19 @@ packages: - '.' extra-deps:-- pandoc-2.0.1-- texmath-0.9.4.2-- hslua-0.9.2-- skylighting-0.4.2+- pandoc-2.0.5+- texmath-0.10+- hslua-0.9.3+- hslua-module-text-0.1.2.1+- skylighting-0.5 - cmark-gfm-0.1.1 - QuickCheck-2.10.0.1 - tasty-quickcheck-0.9.1+- tagsoup-0.14.2 - doctemplates-0.2.1 - haddock-library-1.4.3-- pandoc-types-1.17.2+- pandoc-types-1.17.3 # needed for now: - hs-bibutils-6.2.0.1 - rfc5051-0.1.0.3-resolver: lts-9.9+resolver: lts-9.14
+ tests/issue152.expected.native view
@@ -0,0 +1,9 @@+Pandoc (Meta {unMeta = fromList [("csl",MetaInlines [Str "tests/apa.csl"]),("references",MetaList [MetaMap (fromList [("URL",MetaInlines [Str "http://geekfeminism.wikia.com/wiki/Geek_Feminism"]),("accessed",MetaMap (fromList [("day",MetaString "10"),("month",MetaString "4"),("year",MetaString "2013")])),("container-title",MetaInlines [Str "Geek",Space,Str "Feminism"]),("custom2",MetaInlines [Str "ok.mm"]),("id",MetaInlines [Str "Feminism2013gf"]),("issued",MetaMap (fromList [("day",MetaString "10"),("month",MetaString "4"),("year",MetaString "2013")])),("keyword",MetaInlines [Str "gender"]),("title",MetaInlines [Str "Geek",Space,Str "Feminism"]),("type",MetaInlines [Str "webpage"])]),MetaMap (fromList [("URL",MetaInlines [Str "http://geekfeminism.wikia.com/wiki/Category:Communities"]),("accessed",MetaMap (fromList [("day",MetaString "19"),("month",MetaString "10"),("year",MetaString "2011")])),("container-title",MetaInlines [Str "Geek",Space,Str "Feminism"]),("custom2",MetaInlines [Str "gender.mm"]),("id",MetaInlines [Str "Feminism2011ces"]),("issued",MetaMap (fromList [("day",MetaString "14"),("month",MetaString "8"),("year",MetaString "2011")])),("keyword",MetaInlines [Str "gender"]),("title",MetaInlines [Str "Communities"]),("type",MetaInlines [Str "entry-encyclopedia"])])])]})+[Header 1 ("test",[],[]) [Str "Test"]+,Para [Str "I",Space,Str "have",Space,Str "two",Space,Str "citations",Space,Cite [Citation {citationId = "Feminism2013gf", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 1},Citation {citationId = "Feminism2011ces", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 2}] [Str "(",Str "\8220Communities,\8221",Space,Str "2011;",Space,Str "\8220Geek",Space,Str "Feminism,\8221",Space,Str "2013)"],Str "."]+,Header 1 ("references",["unnumbered"],[]) [Str "References"]+,Div ("refs",["references"],[])+ [Div ("ref-Feminism2011ces",[],[])+ [Para [Str "Communities.",Space,Str "(2011,",Space,Str "August",Space,Str "14).",Space,Str "In",Space,Emph [Str "Geek",Space,Str "Feminism"],Str ".",Space,Str "Retrieved",Space,Str "from",Space,Link ("",[],[]) [Str "http://geekfeminism.wikia.com/wiki/Category:Communities"] ("http://geekfeminism.wikia.com/wiki/Category:Communities","")]]+ ,Div ("ref-Feminism2013gf",[],[])+ [Para [Str "Geek",Space,Str "Feminism.",Space,Str "(2013,",Space,Str "April",Space,Str "10).",Space,Emph [Str "Geek",Space,Str "Feminism"],Str ".",Space,Str "Retrieved",Space,Str "April",Space,Str "10,",Space,Str "2013,",Space,Str "from",Space,Link ("",[],[]) [Str "http://geekfeminism.wikia.com/wiki/Geek_Feminism"] ("http://geekfeminism.wikia.com/wiki/Geek_Feminism","")]]]]
+ tests/issue152.in.native view
@@ -0,0 +1,4 @@+Pandoc (Meta {unMeta = fromList [("csl",MetaInlines [Str "tests/apa.csl"]),("references",MetaList [MetaMap (fromList [("URL",MetaInlines [Str "http://geekfeminism.wikia.com/wiki/Geek_Feminism"]),("accessed",MetaMap (fromList [("day",MetaString "10"),("month",MetaString "4"),("year",MetaString "2013")])),("container-title",MetaInlines [Str "Geek",Space,Str "Feminism"]),("custom2",MetaInlines [Str "ok.mm"]),("id",MetaInlines [Str "Feminism2013gf"]),("issued",MetaMap (fromList [("day",MetaString "10"),("month",MetaString "4"),("year",MetaString "2013")])),("keyword",MetaInlines [Str "gender"]),("title",MetaInlines [Str "Geek",Space,Str "Feminism"]),("type",MetaInlines [Str "webpage"])]),MetaMap (fromList [("URL",MetaInlines [Str "http://geekfeminism.wikia.com/wiki/Category:Communities"]),("accessed",MetaMap (fromList [("day",MetaString "19"),("month",MetaString "10"),("year",MetaString "2011")])),("container-title",MetaInlines [Str "Geek",Space,Str "Feminism"]),("custom2",MetaInlines [Str "gender.mm"]),("id",MetaInlines [Str "Feminism2011ces"]),("issued",MetaMap (fromList [("day",MetaString "14"),("month",MetaString "8"),("year",MetaString "2011")])),("keyword",MetaInlines [Str "gender"]),("title",MetaInlines [Str "Communities"]),("type",MetaInlines [Str "entry-encyclopedia"])])])]})+[Header 1 ("test",[],[]) [Str "Test"]+,Para [Str "I",Space,Str "have",Space,Str "two",Space,Str "citations",Space,Cite [Citation {citationId = "Feminism2013gf", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0},Citation {citationId = "Feminism2011ces", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [Str "[@Feminism2013gf;",Space,Str "@Feminism2011ces]"],Str "."]+,Header 1 ("references",[],[]) [Str "References"]]
+ tests/modern-language-association-7th-edition.csl view
@@ -0,0 +1,460 @@+<?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">+ <info>+ <title>Modern Language Association 7th edition</title>+ <title-short>MLA</title-short>+ <id>http://www.zotero.org/styles/modern-language-association-7th-edition</id>+ <link href="http://www.zotero.org/styles/modern-language-association-7th-edition" rel="self"/>+ <link href="http://owl.english.purdue.edu/owl/section/2/11/" rel="documentation"/>+ <author>+ <name>Ilouise S. Bradford</name>+ <email>isbradford@gmail.com</email>+ </author>+ <contributor>+ <name>Sarah Ficke</name>+ <email>sficke@email.unc.edu</email>+ </contributor>+ <contributor>+ <name>Sebastian Karcher</name>+ <email>karcher@u.northwestern.edu</email>+ </contributor>+ <contributor>+ <name>Christian Werthschulte</name>+ <email>Christian.Werthschulte@rub.de</email>+ </contributor>+ <contributor>+ <name>Simon Kornblith</name>+ <email>simon@simonster.com</email>+ </contributor>+ <contributor>+ <name>James Johnston</name>+ <email>thejamesjohnston@gmail.com</email>+ </contributor>+ <category citation-format="author"/>+ <category field="generic-base"/>+ <summary>This style adheres to the MLA 7th edition handbook and contains modifications to these types of sources: e-mail, forum posts, interviews, manuscripts, maps, presentations, TV broadcasts, and web pages.</summary>+ <updated>2017-04-27T18:03:35+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="month-01" form="short">Jan.</term>+ <term name="month-02" form="short">Feb.</term>+ <term name="month-03" form="short">Mar.</term>+ <term name="month-04" form="short">Apr.</term>+ <term name="month-05" form="short">May</term>+ <term name="month-06" form="short">June</term>+ <term name="month-07" form="short">July</term>+ <term name="month-08" form="short">Aug.</term>+ <term name="month-09" form="short">Sept.</term>+ <term name="month-10" form="short">Oct.</term>+ <term name="month-11" form="short">Nov.</term>+ <term name="month-12" form="short">Dec.</term>+ <term name="volume" form="short">+ <single>Vol.</single>+ <multiple>vols</multiple>+ </term>+ <term name="edition" form="short">ed</term>+ <term name="editor" form="verb-short">ed.</term>+ <term name="translator" form="verb-short">trans.</term>+ <term name="translator" form="short">trans.</term>+ </terms>+ </locale>+ <macro name="editor-translator">+ <names variable="editor translator" delimiter=". ">+ <label form="verb-short" text-case="capitalize-first" suffix=" "/>+ <name and="text" delimiter=", "/>+ </names>+ </macro>+ <macro name="author">+ <names variable="author">+ <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>+ <label form="short" prefix=", "/>+ <substitute>+ <names variable="editor"/>+ <names variable="translator"/>+ <text macro="title"/>+ </substitute>+ </names>+ </macro>+ <macro name="author-short">+ <names variable="author">+ <name form="short" and="text" delimiter=", " initialize-with=". "/>+ <substitute>+ <names variable="editor"/>+ <names variable="translator"/>+ <text macro="title-short"/>+ </substitute>+ </names>+ </macro>+ <macro name="access">+ <group delimiter=" ">+ <date variable="accessed">+ <date-part name="day" suffix=" "/>+ <date-part name="month" form="short" suffix=" "/>+ <date-part name="year"/>+ </date>+ </group>+ </macro>+ <macro name="issued-full-date">+ <choose>+ <if variable="issued">+ <date variable="issued">+ <date-part name="day" suffix=" "/>+ <date-part name="month" form="short" suffix=" " strip-periods="false"/>+ <date-part name="year"/>+ </date>+ </if>+ <else>+ <text term="no date" form="short"/>+ </else>+ </choose>+ </macro>+ <macro name="medium">+ <choose>+ <if type="motion_picture">+ <choose>+ <if variable="medium">+ <text variable="medium" prefix=" "/>+ </if>+ <else>+ <text value="Film" prefix=" "/>+ </else>+ </choose>+ </if>+ <else-if type="broadcast">+ <choose>+ <if variable="medium">+ <text variable="medium" prefix=" "/>+ </if>+ <else>+ <text value="Television" prefix=" "/>+ </else>+ </choose>+ </else-if>+ <else-if type="manuscript">+ <text value=""/>+ </else-if>+ <else-if type="personal_communication" match="any">+ <text value="" prefix=" "/>+ </else-if>+ <else-if type="speech" match="any">+ <text value=""/>+ </else-if>+ <else-if type="interview">+ <text variable="medium" prefix=" "/>+ </else-if>+ <else-if type="song">+ <choose>+ <if variable="medium">+ <text variable="medium" prefix=" "/>+ </if>+ <else>+ <text value="Audio Recording" prefix=" "/>+ </else>+ </choose>+ </else-if>+ <else-if type="graphic" variable="medium" match="all">+ <text variable="medium" prefix=" "/>+ </else-if>+ <else>+ <choose>+ <if variable="URL DOI" match="any">+ <text variable="source" prefix=" " suffix="." font-style="italic"/>+ <group>+ <text value="Web." prefix=" "/>+ </group>+ <text prefix=" " suffix="." macro="access"/>+ </if>+ <else>+ <text value="Print" prefix=" "/>+ </else>+ </choose>+ </else>+ </choose>+ </macro>+ <macro name="title">+ <choose>+ <if type="bill book graphic legal_case legislation manuscript motion_picture report song" match="any">+ <text variable="title" font-style="italic" text-case="title"/>+ </if>+ <else-if type="interview personal_communication" match="any">+ <text variable="title" text-case="title" quotes="false"/>+ </else-if>+ <else>+ <text variable="title" text-case="title" quotes="true"/>+ </else>+ </choose>+ </macro>+ <macro name="title-short">+ <choose>+ <if type="bill book graphic legal_case legislation manuscript motion_picture report song" match="any">+ <text variable="title" text-case="title" form="short" font-style="italic"/>+ </if>+ <else>+ <text variable="title" text-case="title" form="short" quotes="true"/>+ </else>+ </choose>+ </macro>+ <macro name="pages">+ <choose>+ <if variable="page">+ <text variable="page"/>+ </if>+ <else-if type="personal_communication interview" match="any">+ <text value=""/>+ </else-if>+ <else>+ <text value="n. pag"/>+ </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="volume">+ <choose>+ <if is-numeric="volume">+ <group delimiter=" ">+ <text term="volume" form="short" strip-periods="false"/>+ <number variable="volume"/>+ </group>+ </if>+ <else>+ <text variable="volume"/>+ </else>+ </choose>+ </macro>+ <macro name="number-of-volumes-only">+ <choose>+ <if variable="volume" match="none">+ <choose>+ <if is-numeric="number-of-volumes">+ <group delimiter=" ">+ <number variable="number-of-volumes"/>+ <text term="volume" form="short" plural="true" strip-periods="true"/>+ </group>+ </if>+ <else>+ <text variable="number-of-volumes"/>+ </else>+ </choose>+ </if>+ </choose>+ </macro>+ <macro name="number-of-volumes-optional">+ <choose>+ <if variable="volume">+ <choose>+ <if is-numeric="number-of-volumes">+ <group delimiter=" ">+ <number variable="number-of-volumes"/>+ <text term="volume" form="short" plural="true" strip-periods="true"/>+ </group>+ </if>+ <else>+ <text variable="number-of-volumes"/>+ </else>+ </choose>+ </if>+ </choose>+ </macro>+ <macro name="collection-title">+ <text variable="collection-title" text-case="title" prefix=" "/>+ </macro>+ <macro name="collection-number">+ <text variable="collection-number" prefix=" " suffix="."/>+ </macro>+ <macro name="publisher">+ <choose>+ <if variable="publisher">+ <text variable="publisher"/>+ </if>+ <else>+ <text value="N.p."/>+ </else>+ </choose>+ </macro>+ <macro name="publisher-year">+ <group delimiter=", ">+ <group delimiter=": ">+ <text variable="publisher-place"/>+ <text macro="publisher"/>+ </group>+ <date variable="issued">+ <date-part name="year"/>+ </date>+ </group>+ </macro>+ <citation et-al-min="2" et-al-use-first="1" disambiguate-add-names="true" disambiguate-add-givenname="true">+ <layout prefix="(" suffix=")" delimiter="; ">+ <group delimiter=" ">+ <choose>+ <if variable="author editor translator" match="any">+ <group delimiter=", ">+ <text macro="author-short"/>+ <choose>+ <if disambiguate="true">+ <text macro="title-short"/>+ </if>+ </choose>+ </group>+ </if>+ <else>+ <text macro="title-short"/>+ </else>+ </choose>+ <text variable="locator"/>+ </group>+ </layout>+ </citation>+ <bibliography hanging-indent="true" et-al-min="4" et-al-use-first="1" line-spacing="2" entry-spacing="0" subsequent-author-substitute="---">+ <sort>+ <key macro="author"/>+ <key variable="title"/>+ </sort>+ <layout suffix=".">+ <text macro="author" suffix="."/>+ <text macro="title" prefix=" " suffix="."/>+ <choose>+ <if type="bill book graphic legal_case legislation motion_picture report song" match="any">+ <text macro="editor-translator" prefix=" " suffix="."/>+ <text macro="edition" prefix=" " suffix="."/>+ <text macro="volume" prefix=" " suffix="."/>+ <text macro="number-of-volumes-only" prefix=" " suffix="."/>+ <text macro="publisher-year" prefix=" " suffix="."/>+ </if>+ <else-if type="chapter paper-conference" match="any">+ <group>+ <text variable="container-title" text-case="title" font-style="italic" prefix=" " suffix="."/>+ <text macro="editor-translator" prefix=" " suffix="."/>+ <text macro="edition" prefix=" " suffix="."/>+ <text macro="volume" prefix=" " suffix="."/>+ <text macro="number-of-volumes-only" prefix=" " suffix="."/>+ <text macro="publisher-year" prefix=" " suffix="."/>+ </group>+ <text variable="page" prefix=" " suffix="."/>+ </else-if>+ <else-if type="thesis">+ <text variable="genre" prefix=" " suffix="."/>+ <group delimiter=", ">+ <text macro="publisher" prefix=" "/>+ <date variable="issued" prefix=" " suffix=".">+ <date-part name="year"/>+ </date>+ </group>+ <text variable="archive_location" prefix=" " suffix="."/>+ </else-if>+ <else-if type="manuscript">+ <date variable="issued" prefix=" " suffix=".">+ <date-part name="year"/>+ </date>+ <text variable="genre" prefix=" " suffix="."/>+ <text variable="archive_location" prefix=" " suffix="."/>+ <text variable="publisher-place" prefix=" "/>+ </else-if>+ <else-if type="personal_communication">+ <date variable="issued" prefix=" " suffix=".">+ <date-part name="day" suffix=" "/>+ <date-part name="month" form="short" suffix=" "/>+ <date-part name="year"/>+ </date>+ <choose>+ <if variable="genre">+ <text prefix=" " suffix="." variable="genre"/>+ </if>+ <else>+ <text prefix=" " suffix="." value="E-mail"/>+ </else>+ </choose>+ </else-if>+ <else-if type="map">+ <text variable="genre" prefix=" " suffix="."/>+ <text variable="publisher-place" prefix=" " suffix=":"/>+ <text macro="publisher" prefix=" "/>+ <date variable="issued" prefix=" " suffix=",">+ <date-part name="year"/>+ </date>+ </else-if>+ <else-if type="speech">+ <text variable="event" prefix=" " suffix="."/>+ <text variable="publisher-place" prefix=" " suffix="."/>+ <date variable="issued" prefix=" " suffix=".">+ <date-part name="year"/>+ </date>+ <text variable="genre" prefix=" " suffix="."/>+ </else-if>+ <else-if type="webpage post-weblog" match="any">+ <text variable="genre" prefix=" " suffix="."/>+ <text variable="container-title" font-style="italic" prefix=" " suffix="."/>+ <group delimiter=", " prefix=" ">+ <text macro="publisher"/>+ <text macro="issued-full-date" suffix="."/>+ </group>+ </else-if>+ <else-if type="broadcast">+ <text variable="container-title" font-style="italic" prefix=" " suffix="."/>+ <text macro="publisher" prefix=" " suffix=","/>+ <date variable="issued" prefix=" " suffix=".">+ <date-part name="day" suffix=" "/>+ <date-part name="month" form="short" suffix=" " strip-periods="false"/>+ <date-part name="year"/>+ </date>+ </else-if>+ <else>+ <group prefix=" " suffix="." delimiter=": ">+ <group delimiter=" ">+ <text macro="editor-translator" suffix="."/>+ <text variable="container-title" font-style="italic"/>+ <choose>+ <if type="article-journal">+ <group delimiter=" ">+ <group delimiter=".">+ <text variable="volume"/>+ <text variable="issue"/>+ </group>+ <date variable="issued" prefix="(" suffix="):">+ <date-part name="year"/>+ </date>+ </group>+ <text macro="pages" prefix=" "/>+ </if>+ <else>+ <group>+ <date variable="issued">+ <date-part name="day" suffix=" "/>+ <date-part name="month" form="short" suffix=" " strip-periods="false"/>+ <date-part name="year"/>+ </date>+ <choose>+ <if variable="URL DOI" match="any">+ <text variable="page" prefix=": "/>+ </if>+ <else>+ <text macro="pages" prefix=": "/>+ </else>+ </choose>+ </group>+ </else>+ </choose>+ </group>+ </group>+ </else>+ </choose>+ <text macro="medium" suffix="."/>+ <text macro="number-of-volumes-optional" suffix="." prefix=" "/>+ <text macro="collection-title"/>+ <text macro="collection-number"/>+ </layout>+ </bibliography>+</style>