citeproc 0.7 → 0.8
raw patch · 11 files changed
+1284/−218 lines, 11 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Citeproc.Types: SubstitutedVal :: Val a
Files
- CHANGELOG.md +21/−0
- citeproc.cabal +1/−1
- locales/fr-FR.xml +198/−195
- locales/hi-IN.xml +296/−3
- src/Citeproc/CaseTransform.hs +3/−3
- src/Citeproc/Eval.hs +10/−9
- src/Citeproc/Types.hs +4/−2
- test/Spec.hs +5/−5
- test/extra/issue_101.txt +247/−0
- test/extra/issue_107.txt +229/−0
- test/extra/issue_108.txt +270/−0
CHANGELOG.md view
@@ -1,5 +1,26 @@ # citeproc changelog +## 0.8++ * Add `SubstitutedVal` constructor for `Val` [API change] (#101, #108).+ This is used to track variables that are repressed due to substitution.+ (We can't just delete them, because they still count when we have+ "if" elements that check for a variable.)++ * Fix logic for including a group. A group with a text node and an+ empty variable should count as empty.++ * CaseTransform: don't change words that are a mix of uppercase+ and nonletters, like CRT1000.++ * Fix label with "page" variable (#107).++ * Fix error in test suite. We stripped indentation in the expected result+ in some cases.++ * Update fr-FR locale from upstream.++ ## 0.7 * Handle old term form `sub verbo` as if it is `sub-verbo` (the new form).
citeproc.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: citeproc-version: 0.7+version: 0.8 synopsis: Generates citations and bibliography from CSL styles. description: citeproc parses CSL style files and uses them to generate a list of formatted citations and bibliography
locales/fr-FR.xml view
@@ -4,6 +4,9 @@ <translator> <name>Grégoire Colly</name> </translator>+ <translator>+ <name>Collectif Zotero francophone</name>+ </translator> <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights> <updated>2012-07-04T23:31:02+00:00</updated> </info>@@ -19,33 +22,33 @@ <date-part name="year"/> </date> <terms>- <term name="advance-online-publication">advance online publication</term>+ <term name="advance-online-publication">publication en ligne anticipée</term> <term name="album">album</term>- <term name="audio-recording">audio recording</term>+ <term name="audio-recording">enregistrement audio</term> <term name="film">film</term>- <term name="henceforth">henceforth</term>- <term name="loc-cit">loc. cit.</term> <!-- like ibid., the abbreviated form is the regular form -->- <term name="no-place">no place</term>- <term name="no-place" form="short">n.p.</term>- <term name="no-publisher">no publisher</term> <!-- sine nomine -->- <term name="no-publisher" form="short">n.p.</term>- <term name="on">on</term>- <term name="op-cit">op. cit.</term> <!-- like ibid., the abbreviated form is the regular form -->- <term name="original-work-published">original work published</term>+ <term name="henceforth">désormais</term>+ <term name="loc-cit">loc. cit.</term> <!-- like ibid., the abbreviated form is the regular form -->+ <term name="no-place">sans lieu</term>+ <term name="no-place" form="short">s. l.</term>+ <term name="no-publisher">sans nom</term> <!-- sine nomine -->+ <term name="no-publisher" form="short">s. n.</term>+ <term name="on">sur</term>+ <term name="op-cit">op. cit.</term> <!-- like ibid., the abbreviated form is the regular form -->+ <term name="original-work-published">édition originale</term> <term name="personal-communication">communication personnelle</term> <term name="podcast">podcast</term>- <term name="podcast-episode">podcast episode</term>- <term name="preprint">preprint</term>- <term name="radio-broadcast">radio broadcast</term>- <term name="radio-series">radio series</term>- <term name="radio-series-episode">radio series episode</term>- <term name="special-issue">special issue</term>- <term name="special-section">special section</term>- <term name="television-broadcast">television broadcast</term>- <term name="television-series">television series</term>- <term name="television-series-episode">television series episode</term>- <term name="video">video</term>- <term name="working-paper">working paper</term>+ <term name="podcast-episode">épisode de podcast</term>+ <term name="preprint">prépublication</term>+ <term name="radio-broadcast">émission de radio</term>+ <term name="radio-series">série radiophonique</term>+ <term name="radio-series-episode">épisode de série radiophonique</term>+ <term name="special-issue">numéro spécial</term>+ <term name="special-section">section spéciale</term>+ <term name="television-broadcast">émission de télévision</term>+ <term name="television-series">série télévisée</term>+ <term name="television-series-episode">épisode de série télévisée</term>+ <term name="video">vidéo</term>+ <term name="working-paper">document de travail</term> <term name="accessed">consulté le</term> <term name="and">et</term> <term name="and others">et autres</term>@@ -88,74 +91,74 @@ <term name="version">version</term> <!-- LONG ITEM TYPE FORMS -->- <term name="article">preprint</term>- <term name="article-journal">journal article</term>- <term name="article-magazine">magazine article</term>- <term name="article-newspaper">newspaper article</term>- <term name="bill">bill</term>- <term name="book">book</term>- <term name="broadcast">broadcast</term>- <term name="chapter">book chapter</term>- <term name="classic">classic</term>+ <term name="article">article</term>+ <term name="article-journal">article de revue</term>+ <term name="article-magazine">article de magazine</term>+ <term name="article-newspaper">article de presse</term>+ <term name="bill">projet de loi</term>+ <term name="book">livre</term>+ <term name="broadcast">émission</term>+ <term name="chapter">chapitre de livre</term>+ <term name="classic">classique</term> <term name="collection">collection</term>- <term name="dataset">dataset</term>+ <term name="dataset">jeu de données</term> <term name="document">document</term>- <term name="entry">entry</term>- <term name="entry-dictionary">dictionary entry</term>- <term name="entry-encyclopedia">encyclopedia entry</term>- <term name="event">event</term>+ <term name="entry">entrée</term>+ <term name="entry-dictionary">entrée de dictionnaire</term>+ <term name="entry-encyclopedia">entrée d'encyclopédie</term>+ <term name="event">événement</term> <!-- figure is in the list of locator terms -->- <term name="graphic">graphic</term>- <term name="hearing">hearing</term>+ <term name="graphic">image</term>+ <term name="hearing">audience</term> <term name="interview">interview</term>- <term name="legal_case">legal case</term>- <term name="legislation">legislation</term>- <term name="manuscript">manuscript</term>- <term name="map">map</term>- <term name="motion_picture">video recording</term>- <term name="musical_score">musical score</term>+ <term name="legal_case">affaire</term>+ <term name="legislation">acte juridique</term>+ <term name="manuscript">manuscrit</term>+ <term name="map">carte</term>+ <term name="motion_picture">enregistrement vidéo</term>+ <term name="musical_score">partition</term> <term name="pamphlet">pamphlet</term>- <term name="paper-conference">conference paper</term>- <term name="patent">patent</term>- <term name="performance">performance</term>- <term name="periodical">periodical</term>+ <term name="paper-conference">article de colloque</term>+ <term name="patent">brevet</term>+ <term name="performance">interprétation</term>+ <term name="periodical">périodique</term> <term name="personal_communication">communication personnelle</term>- <term name="post">post</term>- <term name="post-weblog">blog post</term>- <term name="regulation">regulation</term>- <term name="report">report</term>- <term name="review">review</term>- <term name="review-book">book review</term>- <term name="software">software</term>- <term name="song">audio recording</term>- <term name="speech">presentation</term>- <term name="standard">standard</term>- <term name="thesis">thesis</term>- <term name="treaty">treaty</term>- <term name="webpage">webpage</term>+ <term name="post">billet</term>+ <term name="post-weblog">billet de blog</term>+ <term name="regulation">règlement</term>+ <term name="report">rapport</term>+ <term name="review">recension</term>+ <term name="review-book">recension de livre</term>+ <term name="software">logiciel</term>+ <term name="song">chanson</term>+ <term name="speech">présentation</term>+ <term name="standard">norme</term>+ <term name="thesis">thèse</term>+ <term name="treaty">traité</term>+ <term name="webpage">page web</term> <!-- SHORT ITEM TYPE FORMS -->- <term name="article-journal" form="short">journal art.</term>- <term name="article-magazine" form="short">mag. art.</term>- <term name="article-newspaper" form="short">newspaper art.</term>- <term name="book" form="short">bk.</term>- <term name="chapter" form="short">bk. chap.</term>+ <term name="article-journal" form="short">art. de revue</term>+ <term name="article-magazine" form="short">art. de mag.</term>+ <term name="article-newspaper" form="short">art. de presse</term>+ <term name="book" form="short">liv.</term>+ <term name="chapter" form="short">chap. de liv.</term> <term name="document" form="short">doc.</term> <!-- figure is in the list of locator terms --> <term name="graphic" form="short">graph.</term> <term name="interview" form="short">interv.</term>- <term name="manuscript" form="short">MS</term>- <term name="motion_picture" form="short">video rec.</term>- <term name="report" form="short">rep.</term>- <term name="review" form="short">rev.</term>- <term name="review-book" form="short">bk. rev.</term>- <term name="song" form="short">audio rec.</term>+ <term name="manuscript" form="short">ms</term>+ <term name="motion_picture" form="short">enr. vidéo</term>+ <term name="report" form="short">rap.</term>+ <term name="review" form="short">recens.</term>+ <term name="review-book" form="short">recens. de liv.</term>+ <term name="song" form="short">enr. audio</term> <!-- HISTORICAL ERA TERMS --> <term name="ad">apr. J.-C.</term> <term name="bc">av. J.-C.</term>- <term name="bce">BCE</term>- <term name="ce">CE</term>+ <term name="bce">av. n. è.</term>+ <term name="ce">n. è.</term> <!-- PUNCTUATION --> <term name="open-quote">« </term>@@ -163,15 +166,15 @@ <term name="open-inner-quote">“</term> <term name="close-inner-quote">”</term> <term name="page-range-delimiter">‑</term> <!-- non-breaking hyphen -->- <term name="colon">:</term>+ <term name="colon"> :</term> <term name="comma">,</term>- <term name="semicolon">;</term>+ <term name="semicolon"> ;</term> <!-- ORDINALS --> <term name="ordinal">ᵉ</term> <term name="ordinal-01" gender-form="feminine" match="whole-number">ʳᵉ</term> <term name="ordinal-01" gender-form="masculine" match="whole-number">ᵉʳ</term>- + <!-- LONG ORDINALS --> <term name="long-ordinal-01">premier</term> <term name="long-ordinal-02">deuxième</term>@@ -185,49 +188,49 @@ <term name="long-ordinal-10">dixième</term> <!-- LONG LOCATOR FORMS -->- <term name="act"> - <single>act</single>- <multiple>acts</multiple> + <term name="act">+ <single>acte</single>+ <multiple>actes</multiple> </term>- <term name="appendix"> - <single>appendix</single>- <multiple>appendices</multiple> + <term name="appendix">+ <single>appendice</single>+ <multiple>appendices</multiple> </term>- <term name="article-locator"> + <term name="article-locator"> <single>article</single>- <multiple>articles</multiple> + <multiple>articles</multiple> </term>- <term name="canon"> + <term name="canon"> <single>canon</single>- <multiple>canons</multiple> + <multiple>canons</multiple> </term>- <term name="elocation"> - <single>location</single>- <multiple>locations</multiple> + <term name="elocation">+ <single>emplacement</single>+ <multiple>emplacements</multiple> </term>- <term name="equation"> - <single>equation</single>- <multiple>equations</multiple> + <term name="equation">+ <single>équation</single>+ <multiple>équations</multiple> </term>- <term name="rule"> - <single>rule</single>- <multiple>rules</multiple> + <term name="rule">+ <single>règle</single>+ <multiple>règles</multiple> </term>- <term name="scene"> - <single>scene</single>- <multiple>scenes</multiple> + <term name="scene">+ <single>scène</single>+ <multiple>scènes</multiple> </term>- <term name="table"> - <single>table</single>- <multiple>tables</multiple> + <term name="table">+ <single>tableau</single>+ <multiple>tableaux</multiple> </term> <term name="timestamp"> <!-- generally blank --> <single></single>- <multiple></multiple> + <multiple></multiple> </term>- <term name="title-locator"> - <single>title</single>- <multiple>titles</multiple> + <term name="title-locator">+ <single>titre</single>+ <multiple>titres</multiple> </term> <term name="book"> <single>livre</single>@@ -299,41 +302,41 @@ </term> <!-- SHORT LOCATOR FORMS -->- <term name="appendix"> - <single>app.</single>- <multiple>apps.</multiple> + <term name="appendix">+ <single>append.</single>+ <multiple>append.</multiple> </term>- <term name="article-locator"> + <term name="article-locator"> <single>art.</single>- <multiple>arts.</multiple>+ <multiple>art.</multiple> </term>- <term name="elocation"> - <single>loc.</single>- <multiple>locs.</multiple>+ <term name="elocation">+ <single>emplact</single>+ <multiple>emplact</multiple> </term>- <term name="equation"> + <term name="equation"> <single>eq.</single>- <multiple>eqs.</multiple>+ <multiple>eq.</multiple> </term>- <term name="rule"> - <single>r.</single>- <multiple>rr.</multiple> + <term name="rule">+ <single>règle</single>+ <multiple>règles</multiple> </term>- <term name="scene"> + <term name="scene"> <single>sc.</single>- <multiple>scs.</multiple> + <multiple>sc.</multiple> </term>- <term name="table"> - <single>tbl.</single>- <multiple>tbls.</multiple> + <term name="table">+ <single>tab.</single>+ <multiple>tab.</multiple> </term> <term name="timestamp"> <!-- generally blank --> <single></single>- <multiple></multiple> + <multiple></multiple> </term>- <term name="title-locator"> + <term name="title-locator"> <single>tit.</single>- <multiple>tits.</multiple>+ <multiple>tit.</multiple> </term> <term name="book" form="short">liv.</term> <term name="chapter" form="short">chap.</term>@@ -386,56 +389,56 @@ <!-- LONG ROLE FORMS --> <term name="chair">- <single>chair</single>- <multiple>chairs</multiple>+ <single>président</single>+ <multiple>présidents</multiple> </term> <term name="compiler">- <single>compiler</single>- <multiple>compilers</multiple>+ <single>compilateur</single>+ <multiple>compilateurs</multiple> </term> <term name="contributor">- <single>contributor</single>- <multiple>contributors</multiple>+ <single>contributeur</single>+ <multiple>contributeurs</multiple> </term> <term name="curator">- <single>curator</single>- <multiple>curators</multiple>+ <single>commissaire</single>+ <multiple>commissaires</multiple> </term> <term name="executive-producer">- <single>executive producer</single>- <multiple>executive producers</multiple>+ <single>producteur exécutif</single>+ <multiple>producteurs exécutifs</multiple> </term> <term name="guest">- <single>guest</single>- <multiple>guests</multiple>+ <single>invité</single>+ <multiple>invités</multiple> </term> <term name="host">- <single>host</single>- <multiple>hosts</multiple>+ <single>hôte</single>+ <multiple>hôtes</multiple> </term> <term name="narrator">- <single>narrator</single>- <multiple>narrators</multiple>+ <single>narrateur</single>+ <multiple>narrateurs</multiple> </term> <term name="organizer">- <single>organizer</single>- <multiple>organizers</multiple>+ <single>organisateur</single>+ <multiple>organisateurs</multiple> </term> <term name="performer">- <single>performer</single>- <multiple>performers</multiple>+ <single>interprète</single>+ <multiple>interprètes</multiple> </term> <term name="producer">- <single>producer</single>- <multiple>producers</multiple>+ <single>producteur</single>+ <multiple>producteurs</multiple> </term> <term name="script-writer">- <single>writer</single>- <multiple>writers</multiple>+ <single>scénariste</single>+ <multiple>scénaristes</multiple> </term> <term name="series-creator">- <single>series creator</single>- <multiple>series creators</multiple>+ <single>créateur de série</single>+ <multiple>créateurs de série</multiple> </term> <term name="director"> <single>réalisateur</single>@@ -464,44 +467,44 @@ <!-- SHORT ROLE FORMS --> <term name="compiler" form="short">- <single>comp.</single>- <multiple>comps.</multiple>+ <single>compil.</single>+ <multiple>compil.</multiple> </term> <term name="contributor" form="short"> <single>contrib.</single>- <multiple>contribs.</multiple>+ <multiple>contrib.</multiple> </term> <term name="curator" form="short">- <single>cur.</single>- <multiple>curs.</multiple>+ <single>commiss.</single>+ <multiple>commiss.</multiple> </term> <term name="executive-producer" form="short">- <single>exec. prod.</single>- <multiple>exec. prods.</multiple>+ <single>prod. exé.</single>+ <multiple>prod. exé.</multiple> </term> <term name="narrator" form="short"> <single>narr.</single>- <multiple>narrs.</multiple>+ <multiple>narr.</multiple> </term> <term name="organizer" form="short"> <single>org.</single>- <multiple>orgs.</multiple>+ <multiple>org.</multiple> </term> <term name="performer" form="short">- <single>perf.</single>- <multiple>perfs.</multiple>+ <single>interpr.</single>+ <multiple>interpr.</multiple> </term> <term name="producer" form="short"> <single>prod.</single>- <multiple>prods.</multiple>+ <multiple>prod.</multiple> </term> <term name="script-writer" form="short">- <single>writ.</single>- <multiple>writs.</multiple>+ <single>scénar.</single>+ <multiple>scénar.</multiple> </term> <term name="series-creator" form="short">- <single>cre.</single>- <multiple>cres.</multiple>+ <single>créat.</single>+ <multiple>créat.</multiple> </term> <term name="director" form="short"> <single>réal.</single>@@ -529,19 +532,19 @@ </term> <!-- VERB ROLE FORMS -->- <term name="chair" form="verb">chaired by</term>- <term name="compiler" form="verb">compiled by</term>- <term name="contributor" form="verb">with</term>- <term name="curator" form="verb">curated by</term>- <term name="executive-producer" form="verb">executive produced by</term>- <term name="guest" form="verb">with guest</term>- <term name="host" form="verb">hosted by</term>- <term name="narrator" form="verb">narrated by</term>- <term name="organizer" form="verb">organized by</term>- <term name="performer" form="verb">performed by</term>- <term name="producer" form="verb">produced by</term>- <term name="script-writer" form="verb">written by</term>- <term name="series-creator" form="verb">created by</term>+ <term name="chair" form="verb">présidé par</term>+ <term name="compiler" form="verb">compilé par</term>+ <term name="contributor" form="verb">avec</term>+ <term name="curator" form="verb">organisé par</term>+ <term name="executive-producer" form="verb">production exécutive par</term>+ <term name="guest" form="verb">avec pour invité</term>+ <term name="host" form="verb">animé par</term>+ <term name="narrator" form="verb">lu par</term>+ <term name="organizer" form="verb">organisé par</term>+ <term name="performer" form="verb">interprété par</term>+ <term name="producer" form="verb">produit par</term>+ <term name="script-writer" form="verb">scénario de</term>+ <term name="series-creator" form="verb">créé par</term> <term name="container-author" form="verb">par</term> <term name="director" form="verb">réalisé par</term> <term name="editor" form="verb">édité par</term>@@ -554,18 +557,18 @@ <term name="editortranslator" form="verb">édité et traduit par</term> <!-- SHORT VERB ROLE FORMS -->- <term name="compiler" form="verb-short">comp. by</term>- <term name="contributor" form="verb-short">w.</term>- <term name="curator" form="verb-short">cur. by</term>- <term name="executive-producer" form="verb-short">exec. prod. by</term>- <term name="guest" form="verb-short">w. guest</term>- <term name="host" form="verb-short">hosted by</term>- <term name="narrator" form="verb-short">narr. by</term>- <term name="organizer" form="verb-short">org. by</term>- <term name="performer" form="verb-short">perf. by</term>- <term name="producer" form="verb-short">prod. by</term>- <term name="script-writer" form="verb-short">writ. by</term>- <term name="series-creator" form="verb-short">cre. by</term>+ <term name="compiler" form="verb-short">compil. par</term>+ <term name="contributor" form="verb-short">ac</term>+ <term name="curator" form="verb-short">org. par</term>+ <term name="executive-producer" form="verb-short">prod. exé. par</term>+ <term name="guest" form="verb-short">ac pr inv.</term>+ <term name="host" form="verb-short">anim. par</term>+ <term name="narrator" form="verb-short">lu par</term>+ <term name="organizer" form="verb-short">org. par</term>+ <term name="performer" form="verb-short">interpr. par</term>+ <term name="producer" form="verb-short">prod. par</term>+ <term name="script-writer" form="verb-short">scénar. de</term>+ <term name="series-creator" form="verb-short">créé par</term> <term name="director" form="verb-short">réal. par</term> <term name="editor" form="verb-short">éd. par</term> <term name="editorial-director" form="verb-short">ss la dir. de</term>
locales/hi-IN.xml view
@@ -20,6 +20,33 @@ <date-part name="year"/> </date> <terms>+ <term name="advance-online-publication">advance online publication</term>+ <term name="album">album</term>+ <term name="audio-recording">audio recording</term>+ <term name="film">film</term>+ <term name="henceforth">henceforth</term>+ <term name="loc-cit">loc. cit.</term> <!-- like ibid., the abbreviated form is the regular form -->+ <term name="no-place">no place</term>+ <term name="no-place" form="short">n.p.</term>+ <term name="no-publisher">no publisher</term> <!-- sine nomine -->+ <term name="no-publisher" form="short">n.p.</term>+ <term name="on">on</term>+ <term name="op-cit">op. cit.</term> <!-- like ibid., the abbreviated form is the regular form -->+ <term name="original-work-published">original work published</term>+ <term name="personal-communication">personal communication</term>+ <term name="podcast">podcast</term>+ <term name="podcast-episode">podcast episode</term>+ <term name="preprint">preprint</term>+ <term name="radio-broadcast">radio broadcast</term>+ <term name="radio-series">radio series</term>+ <term name="radio-series-episode">radio series episode</term>+ <term name="special-issue">special issue</term>+ <term name="special-section">special section</term>+ <term name="television-broadcast">television broadcast</term>+ <term name="television-series">television series</term>+ <term name="television-series-episode">television series episode</term>+ <term name="video">video</term>+ <term name="working-paper">working paper</term> <term name="accessed">अंतिम उपयोग</term> <term name="and">व</term> <term name="and others">व अन्य</term>@@ -61,9 +88,75 @@ <term name="scale">scale</term> <term name="version">संस्करण</term> - <!-- ANNO DOMINI; BEFORE CHRIST -->+ <!-- LONG ITEM TYPE FORMS -->+ <term name="article">preprint</term>+ <term name="article-journal">journal article</term>+ <term name="article-magazine">magazine article</term>+ <term name="article-newspaper">newspaper article</term>+ <term name="bill">bill</term>+ <term name="book">book</term>+ <term name="broadcast">broadcast</term>+ <term name="chapter">book chapter</term>+ <term name="classic">classic</term>+ <term name="collection">collection</term>+ <term name="dataset">dataset</term>+ <term name="document">document</term>+ <term name="entry">entry</term>+ <term name="entry-dictionary">dictionary entry</term>+ <term name="entry-encyclopedia">encyclopedia entry</term>+ <term name="event">event</term>+ <!-- figure is in the list of locator terms -->+ <term name="graphic">graphic</term>+ <term name="hearing">hearing</term>+ <term name="interview">interview</term>+ <term name="legal_case">legal case</term>+ <term name="legislation">legislation</term>+ <term name="manuscript">manuscript</term>+ <term name="map">map</term>+ <term name="motion_picture">video recording</term>+ <term name="musical_score">musical score</term>+ <term name="pamphlet">pamphlet</term>+ <term name="paper-conference">conference paper</term>+ <term name="patent">patent</term>+ <term name="performance">performance</term>+ <term name="periodical">periodical</term>+ <term name="personal_communication">personal communication</term>+ <term name="post">post</term>+ <term name="post-weblog">blog post</term>+ <term name="regulation">regulation</term>+ <term name="report">report</term>+ <term name="review">review</term>+ <term name="review-book">book review</term>+ <term name="software">software</term>+ <term name="song">audio recording</term>+ <term name="speech">presentation</term>+ <term name="standard">standard</term>+ <term name="thesis">thesis</term>+ <term name="treaty">treaty</term>+ <term name="webpage">webpage</term>++ <!-- SHORT ITEM TYPE FORMS -->+ <term name="article-journal" form="short">journal art.</term>+ <term name="article-magazine" form="short">mag. art.</term>+ <term name="article-newspaper" form="short">newspaper art.</term>+ <term name="book" form="short">bk.</term>+ <term name="chapter" form="short">bk. chap.</term>+ <term name="document" form="short">doc.</term>+ <!-- figure is in the list of locator terms -->+ <term name="graphic" form="short">graph.</term>+ <term name="interview" form="short">interv.</term>+ <term name="manuscript" form="short">MS</term>+ <term name="motion_picture" form="short">video rec.</term>+ <term name="report" form="short">rep.</term>+ <term name="review" form="short">rev.</term>+ <term name="review-book" form="short">bk. rev.</term>+ <term name="song" form="short">audio rec.</term>++ <!-- HISTORICAL ERA TERMS --> <term name="ad">CE</term> <term name="bc">BCE</term>+ <term name="bce">BCE</term>+ <term name="ce">CE</term> <!-- PUNCTUATION --> <term name="open-quote">“</term>@@ -71,6 +164,9 @@ <term name="open-inner-quote">‘</term> <term name="close-inner-quote">’</term> <term name="page-range-delimiter">–</term>+ <term name="colon">:</term>+ <term name="comma">,</term>+ <term name="semicolon">;</term> <!-- ORDINALS --> <term name="ordinal">वाँ</term>@@ -103,6 +199,50 @@ <term name="long-ordinal-10" gender-form="feminine">दसवीं</term> <!-- LONG LOCATOR FORMS -->+ <term name="act"> + <single>act</single>+ <multiple>acts</multiple> + </term>+ <term name="appendix"> + <single>appendix</single>+ <multiple>appendices</multiple> + </term>+ <term name="article-locator"> + <single>article</single>+ <multiple>articles</multiple> + </term>+ <term name="canon"> + <single>canon</single>+ <multiple>canons</multiple> + </term>+ <term name="elocation"> + <single>location</single>+ <multiple>locations</multiple> + </term>+ <term name="equation"> + <single>equation</single>+ <multiple>equations</multiple> + </term>+ <term name="rule"> + <single>rule</single>+ <multiple>rules</multiple> + </term>+ <term name="scene"> + <single>scene</single>+ <multiple>scenes</multiple> + </term>+ <term name="table"> + <single>table</single>+ <multiple>tables</multiple> + </term>+ <term name="timestamp"> <!-- generally blank -->+ <single></single>+ <multiple></multiple> + </term>+ <term name="title-locator"> + <single>title</single>+ <multiple>titles</multiple> + </term> <term name="book"> <single>पुस्तक</single> <multiple>पुस्तकें</multiple>@@ -159,7 +299,7 @@ <single>अनुभाग</single> <multiple>sections</multiple> </term>- <term name="sub verbo">+ <term name="sub-verbo"> <single>sub verbo</single> <multiple>sub verbis</multiple> </term>@@ -173,6 +313,42 @@ </term> <!-- SHORT LOCATOR FORMS -->+ <term name="appendix"> + <single>app.</single>+ <multiple>apps.</multiple> + </term>+ <term name="article-locator"> + <single>art.</single>+ <multiple>arts.</multiple>+ </term>+ <term name="elocation"> + <single>loc.</single>+ <multiple>locs.</multiple>+ </term>+ <term name="equation"> + <single>eq.</single>+ <multiple>eqs.</multiple>+ </term>+ <term name="rule"> + <single>r.</single>+ <multiple>rr.</multiple> + </term>+ <term name="scene"> + <single>sc.</single>+ <multiple>scs.</multiple> + </term>+ <term name="table"> + <single>tbl.</single>+ <multiple>tbls.</multiple> + </term>+ <term name="timestamp"> <!-- generally blank -->+ <single></single>+ <multiple></multiple> + </term>+ <term name="title-locator"> + <single>tit.</single>+ <multiple>tits.</multiple>+ </term> <term name="book" form="short"> <single>bk.</single> <multiple>bks.</multiple>@@ -229,7 +405,7 @@ <single>sec.</single> <multiple>secs.</multiple> </term>- <term name="sub verbo" form="short">+ <term name="sub-verbo" form="short"> <single>s.v.</single> <multiple>s.vv.</multiple> </term>@@ -253,6 +429,58 @@ </term> <!-- LONG ROLE FORMS -->+ <term name="chair">+ <single>chair</single>+ <multiple>chairs</multiple>+ </term>+ <term name="compiler">+ <single>compiler</single>+ <multiple>compilers</multiple>+ </term>+ <term name="contributor">+ <single>contributor</single>+ <multiple>contributors</multiple>+ </term>+ <term name="curator">+ <single>curator</single>+ <multiple>curators</multiple>+ </term>+ <term name="executive-producer">+ <single>executive producer</single>+ <multiple>executive producers</multiple>+ </term>+ <term name="guest">+ <single>guest</single>+ <multiple>guests</multiple>+ </term>+ <term name="host">+ <single>host</single>+ <multiple>hosts</multiple>+ </term>+ <term name="narrator">+ <single>narrator</single>+ <multiple>narrators</multiple>+ </term>+ <term name="organizer">+ <single>organizer</single>+ <multiple>organizers</multiple>+ </term>+ <term name="performer">+ <single>performer</single>+ <multiple>performers</multiple>+ </term>+ <term name="producer">+ <single>producer</single>+ <multiple>producers</multiple>+ </term>+ <term name="script-writer">+ <single>writer</single>+ <multiple>writers</multiple>+ </term>+ <term name="series-creator">+ <single>series creator</single>+ <multiple>series creators</multiple>+ </term> <term name="director"> <single>निर्देशक</single> <multiple>directors</multiple>@@ -279,6 +507,46 @@ </term> <!-- SHORT ROLE FORMS -->+ <term name="compiler" form="short">+ <single>comp.</single>+ <multiple>comps.</multiple>+ </term>+ <term name="contributor" form="short">+ <single>contrib.</single>+ <multiple>contribs.</multiple>+ </term>+ <term name="curator" form="short">+ <single>cur.</single>+ <multiple>curs.</multiple>+ </term>+ <term name="executive-producer" form="short">+ <single>exec. prod.</single>+ <multiple>exec. prods.</multiple>+ </term>+ <term name="narrator" form="short">+ <single>narr.</single>+ <multiple>narrs.</multiple>+ </term>+ <term name="organizer" form="short">+ <single>org.</single>+ <multiple>orgs.</multiple>+ </term>+ <term name="performer" form="short">+ <single>perf.</single>+ <multiple>perfs.</multiple>+ </term>+ <term name="producer" form="short">+ <single>prod.</single>+ <multiple>prods.</multiple>+ </term>+ <term name="script-writer" form="short">+ <single>writ.</single>+ <multiple>writs.</multiple>+ </term>+ <term name="series-creator" form="short">+ <single>cre.</single>+ <multiple>cres.</multiple>+ </term> <term name="director" form="short"> <single>dir.</single> <multiple>dirs.</multiple>@@ -305,6 +573,19 @@ </term> <!-- VERB ROLE FORMS -->+ <term name="chair" form="verb">chaired by</term>+ <term name="compiler" form="verb">compiled by</term>+ <term name="contributor" form="verb">with</term>+ <term name="curator" form="verb">curated by</term>+ <term name="executive-producer" form="verb">executive produced by</term>+ <term name="guest" form="verb">with guest</term>+ <term name="host" form="verb">hosted by</term>+ <term name="narrator" form="verb">narrated by</term>+ <term name="organizer" form="verb">organized by</term>+ <term name="performer" form="verb">performed by</term>+ <term name="producer" form="verb">produced by</term>+ <term name="script-writer" form="verb">written by</term>+ <term name="series-creator" form="verb">created by</term> <term name="container-author" form="verb">द्वारा</term> <term name="director" form="verb">निर्देशन</term> <term name="editor" form="verb">सम्पादन</term>@@ -317,6 +598,18 @@ <term name="editortranslator" form="verb">सम्पादन & अनुवाद</term> <!-- SHORT VERB ROLE FORMS -->+ <term name="compiler" form="verb-short">comp. by</term>+ <term name="contributor" form="verb-short">w.</term>+ <term name="curator" form="verb-short">cur. by</term>+ <term name="executive-producer" form="verb-short">exec. prod. by</term>+ <term name="guest" form="verb-short">w. guest</term>+ <term name="host" form="verb-short">hosted by</term>+ <term name="narrator" form="verb-short">narr. by</term>+ <term name="organizer" form="verb-short">org. by</term>+ <term name="performer" form="verb-short">perf. by</term>+ <term name="producer" form="verb-short">prod. by</term>+ <term name="script-writer" form="verb-short">writ. by</term>+ <term name="series-creator" form="verb-short">cre. by</term> <term name="director" form="verb-short">dir. by</term> <term name="editor" form="verb-short">ed. by</term> <term name="editorial-director" form="verb-short">ed. by</term>
src/Citeproc/CaseTransform.hs view
@@ -17,7 +17,7 @@ where import Data.Ord ()-import Data.Char (isUpper, isLower)+import Data.Char (isUpper, isLower, isLetter) import Data.Text (Text) import qualified Data.Text as T import Citeproc.Types (Lang(..))@@ -92,8 +92,8 @@ where go mblang st chunk | isMixedCase chunk = chunk- | T.all isUpper chunk = chunk -- spec doesn't say this but tests do- -- textcase_TitleCapitalization.txt+ | T.all (\c -> isUpper c || not (isLetter c)) chunk = chunk+ -- spec doesn't say this but tests do: textcase_TitleCapitalization.txt | st == StartSentence || st == Start = capitalizeText mblang $ Unicode.toLower mblang chunk | st == AfterWordEnd
src/Citeproc/Eval.hs view
@@ -1028,6 +1028,7 @@ Just . normalizeSortKey . mconcat . intersperse "," . map T.unwords <$> mapM getNamePartSortOrder ns Just (DateVal d) -> return $ Just [T.toLower $ dateToText d]+ Just SubstitutedVal -> return Nothing -- Note: we do a case-insensitive sort (using toCaseFold): normalizeSortKey :: Text -> [Text]@@ -1673,7 +1674,7 @@ modify $ \st -> -- delete variables so they aren't used again... st{ stateReference = let Reference id' type' d' m' = stateReference st- in Reference id' type' d' (foldr M.delete m' vars) }+ in Reference id' type' d' (foldr (\v -> M.insert v SubstitutedVal) m' vars) } -- Numbers with prefixes or suffixes are never ordinalized -- or rendered in roman numerals (e.g. “2E” remains “2E).@@ -1742,8 +1743,6 @@ | ". " `T.isPrefixOf` T.dropWhile isLetter loc -> return NullOutput | otherwise -> getTerm "page" (TextVal loc)- ("page", Just loc, _) ->- getTerm "page" (TextVal loc) _ -> case lookupVariable var' ref of Nothing -> return NullOutput Just x -> getTerm (fromVariable var) x@@ -2214,8 +2213,9 @@ then label ++ names'' else names'' ++ label -formatNames _ _ _ (var, Just _) = do- warn $ "ignoring non-name value for variable " <> fromVariable var+formatNames _ _ _ (var, Just x) = do+ when (x /= SubstitutedVal) $+ warn $ "ignoring non-name value for variable " <> fromVariable var return NullOutput formatNames _ _ _ (_, Nothing) = return NullOutput @@ -2504,14 +2504,15 @@ VarCount oldVars oldNonempty <- gets stateVarCount xs <- mconcat <$> mapM eElement els VarCount newVars newNonempty <- gets stateVarCount+ let isempty = newVars /= oldVars && newNonempty == oldNonempty+ -- see -- https://github.com/citation-style-language/documentation/blob/master/specification.rst#group -- "When a cs:group contains a child cs:macro, if the cs:macro is -- non-empty, it is treated as a non-empty variable for the purposes of -- determining suppression of the outer cs:group."- when (isMacro && not (all (== NullOutput) xs)) $- updateVarCount 1 1- return $ if oldVars == newVars || newNonempty > oldNonempty+ when (isMacro && not isempty) $ updateVarCount 1 1+ return $ if not isempty then formatted formatting xs else NullOutput @@ -2660,7 +2661,7 @@ askVariable v = do ref <- gets stateReference case lookupVariable v ref of- Just x | isNonEmpty x -> do+ Just x | isNonEmpty x && x /= SubstitutedVal -> do updateVarCount 1 1 return $ Just x _ -> do
src/Citeproc/Types.hs view
@@ -1081,8 +1081,9 @@ TextVal Text -- ^ Plain text value | FancyVal a -- ^ Formatted value with parameterized type | NumVal Int -- ^ Numerical value- | NamesVal [Name] -- ^ Structured names- | DateVal Date -- ^ Structured date+ | NamesVal [Name] -- ^ Structured names+ | DateVal Date -- ^ Structured date+ | SubstitutedVal -- ^ Value suppressed through substitution deriving (Show, Ord, Eq, Functor, Foldable, Traversable) instance ToJSON a => ToJSON (Val a) where@@ -1091,6 +1092,7 @@ toJSON (NumVal n) = toJSON n toJSON (NamesVal ns) = toJSON ns toJSON (DateVal d) = toJSON d+ toJSON SubstitutedVal = toJSON () valToText :: CiteprocOutput a => Val a -> Maybe Text valToText (TextVal x) = Just x
test/Spec.hs view
@@ -28,7 +28,7 @@ import Data.Aeson ((.:?), (.!=)) import Data.Text.Encoding (decodeUtf8) import System.FilePath-import Data.Maybe (fromMaybe)+import Data.Maybe (fromMaybe, isJust) import Text.Printf (printf) #if !MIN_VERSION_base(4,11,0) import Data.Semigroup@@ -177,9 +177,9 @@ -> Text -> StateT Counts IO TestResult compareTest test actual = do- let expected = case citations test of- Just _ -> removeCitationNums $ result test- Nothing -> result test+ let expected = if mode test == "citation" && isJust (citations test)+ then removeCitationNums $ result test+ else result test if actual == expected then do modify $ \st -> st{ passed = category test : passed st }@@ -340,7 +340,7 @@ (length (skipped counts)) case length (failed counts) + length (errored counts) of 0 -> exitSuccess- n | n <= 65 -> do+ n | n <= 64 -> do putStrLn "We have passed all the CSL tests we expect to..." exitSuccess | otherwise -> exitWith $ ExitFailure n
+ test/extra/issue_101.txt view
@@ -0,0 +1,247 @@+>>===== MODE =====>>+bibliography+<<===== MODE =====<<+++++>>===== RESULT =====>>+<div class="csl-bib-body">+ <div class="csl-entry">AUTHOR EDITOR Blockley, D. AUTHOR EDITOR, 2021. <i>Engineering: a very short introduction</i>. W.M. Haynes, ed. AUTHOR EDITOR. Oxford: Oxford University Press.</div>+ <div class="csl-entry">NO_AUTHOR EDITOR Haynes, W.M., ed. NO_AUTHOR EDITOR, 2014. <i>CRC handbook of chemistry and physics</i>. Boca Raton, Fla.: CRC Press/Taylor and Francis.</div>+</div>+<<===== RESULT =====<<+++>>===== CSL =====>>+<?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" default-locale="en-GB">+ <info>+ <title>Test Harvard</title>+ <id>http://www.zotero.org/styles/test-style</id>+ </info>+ <macro name="author">+ <group suffix=" " delimiter=" ">+ <choose>+ <if variable="author">+ <text value="AUTHOR"/>+ </if>+ <else>+ <text value="NO_AUTHOR"/>+ </else>+ </choose>+ <choose>+ <if variable="editor">+ <text value="EDITOR"/>+ </if>+ <else>+ <text value="NO_EDITOR"/>+ </else>+ </choose>+ </group>+ <names variable="author">+ <name and="text" delimiter-precedes-last="never" initialize-with="." name-as-sort-order="all"/>+ <label form="short" prefix=" " text-case="lowercase"/>+ <substitute>+ <names variable="editor">+ <name and="text" delimiter-precedes-last="never" initialize-with="." name-as-sort-order="all"/>+ <label form="short" prefix=", " text-case="lowercase"/>+ </names>+ <text macro="title-label"/>+ </substitute>+ </names>+ <group prefix=" " delimiter=" ">+ <choose>+ <if variable="author">+ <text value="AUTHOR"/>+ </if>+ <else>+ <text value="NO_AUTHOR"/>+ </else>+ </choose>+ <choose>+ <if variable="editor">+ <text value="EDITOR"/>+ </if>+ <else>+ <text value="NO_EDITOR"/>+ </else>+ </choose>+ </group>+ </macro>+ <macro name="author-short">+ <names variable="author">+ <name form="short" and="text" delimiter-precedes-last="never" initialize-with="."/>+ <substitute>+ <names variable="editor"/>+ <text macro="title-short"/>+ </substitute>+ </names>+ </macro>+ <macro name="editor">+ <names variable="editor">+ <name and="text" delimiter-precedes-last="never" initialize-with="."/>+ <label form="short" prefix=", " text-case="lowercase"/>+ </names>+ <group prefix=" " delimiter=" ">+ <choose>+ <if variable="author">+ <text value="AUTHOR"/>+ </if>+ <else>+ <text value="NO_AUTHOR"/>+ </else>+ </choose>+ <choose>+ <if variable="editor">+ <text value="EDITOR"/>+ </if>+ <else>+ <text value="NO_EDITOR"/>+ </else>+ </choose>+ </group>+ </macro>+ <macro name="title">+ <choose>+ <if type="bill book dataset graphic legal_case map motion_picture musical_score patent report song speech webpage thesis" match="any">+ <text variable="title" font-style="italic"/>+ </if>+ <else>+ <text variable="title"/>+ </else>+ </choose>+ </macro>+ <macro name="title-short">+ <choose>+ <if type="bill book dataset graphic legal_case map motion_picture musical_score patent report song speech webpage thesis" match="any">+ <text variable="title" form="short" font-style="italic"/>+ </if>+ <else>+ <text variable="title" form="short"/>+ </else>+ </choose>+ </macro>+ <macro name="title-label">+ <choose>+ <if type="bill book dataset graphic legal_case map motion_picture musical_score patent report song speech webpage thesis" match="any">+ <text variable="title" font-style="italic"/>+ </if>+ <else>+ <text variable="title"/>+ </else>+ </choose>+ </macro>+ <macro name="publisher">+ <group delimiter=": ">+ <text variable="publisher-place"/>+ <text variable="publisher"/>+ </group>+ </macro>+ <macro name="year-date">+ <choose>+ <if variable="issued">+ <date variable="issued">+ <date-part name="year"/>+ </date>+ </if>+ <else>+ <text term="no date" form="short"/>+ </else>+ </choose>+ </macro>+ <citation et-al-min="4" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true">+ <layout prefix="(" suffix=")" delimiter="; ">+ <group delimiter=", ">+ <text macro="author-short"/>+ <text macro="year-date"/>+ <group>+ <label variable="locator" form="short"/>+ <text variable="locator"/>+ </group>+ </group>+ </layout>+ </citation>+ <bibliography entry-spacing="1" hanging-indent="false">+ <sort>+ <key macro="author"/>+ <key variable="issued"/>+ <key variable="title"/>+ </sort>+ <layout>+ <text macro="author" suffix=","/>+ <group prefix=" " suffix="." delimiter=". ">+ <text macro="year-date"/>+ <text macro="title"/>+ <text macro="editor"/>+ <text macro="publisher"/>+ </group>+ </layout>+ </bibliography>+</style>+<<===== CSL =====<<+++>>===== CITATION-ITEMS =====>>+[ [ {"id":"haynes2014crc"}, {"id":"blockley2021evs"} ] ]+<<===== CITATION-ITEMS =====<<++++>>===== INPUT =====>>+[+ {+ "editor": [+ {+ "family": "Haynes",+ "given": "W. M."+ }+ ],+ "id": "haynes2014crc",+ "issued": {+ "date-parts": [+ [+ 2014+ ]+ ]+ },+ "publisher": "CRC Press/Taylor and Francis",+ "publisher-place": "Boca Raton, Fla.",+ "title": "CRC handbook of chemistry and physics",+ "type": "book"+ },+ {+ "author": [+ {+ "family": "Blockley",+ "given": "D."+ }+ ],+ "editor": [+ {+ "family": "Haynes",+ "given": "W. M."+ }+ ],+ "id": "blockley2021evs",+ "issued": {+ "date-parts": [+ [+ 2021+ ]+ ]+ },+ "publisher": "Oxford University Press",+ "publisher-place": "Oxford",+ "short-title": "Engineering",+ "title": "Engineering: a very short introduction",+ "type": "book"+ }+]+<<===== INPUT =====<<+++>>===== VERSION =====>>+1.0+<<===== VERSION =====<<+
+ test/extra/issue_107.txt view
@@ -0,0 +1,229 @@+>>===== MODE =====>>+citation+<<===== MODE =====<<+++++>>===== RESULT =====>>+pp. 3–17, at p. 15+pp. 120–154, at pp. 123–124+pp. 380–387, at p. 281+<<===== RESULT =====<<+++>>===== CSL =====>>+<?xml version="1.0" encoding="utf-8"?>+<style class="note" version="1.0" xmlns="http://purl.org/net/xbiblio/csl">+ <citation>+ <layout>+ <group delimiter=" " font-style="normal">+ <label variable="page" form="short" plural="contextual"/>+ <text variable="page"/>+ </group>+ <group>+ <label prefix=", at " suffix=" " variable="locator" plural="contextual" form="short"/>+ <text variable="locator"/>+ </group>+ </layout>+ </citation>+ <bibliography>+ <layout suffix=".">+ <text variable="title"/>+ </layout>+ </bibliography>+</style>+<<===== CSL =====<<+++>>===== CITATION-ITEMS =====>>+[ [ {"id":"latourette_community_1938", "locator":"15"} ],+ [ {"id":"oldham_responsible_1948", "locator":"123-124"} ],+ [ {"id":"barbour_justice_1979", "locator":"281"} ]+]+<<===== CITATION-ITEMS =====<<+++>>===== INPUT =====>>+[+ {+ "DOI": "10.1111/j.1758-6623.1979.tb02528.x",+ "ISSN": "130796",+ "URL": "http://libezproxy.open.ac.uk/login?url=https://search.ebscohost.com/login.aspx?direct=true&db=a9h&AN=6431771&site=ehost-live&scope=site",+ "accessed": {+ "date-parts": [+ [+ 2021,+ 1,+ 19+ ]+ ]+ },+ "author": [+ {+ "family": "Barbour",+ "given": "Ian G."+ }+ ],+ "citation-key": "barbour_justice_1979",+ "container-title": "Ecumenical Review",+ "container-title-short": "Ecumenical Review",+ "id": "barbour_justice_1979",+ "issue": "4",+ "issued": {+ "date-parts": [+ [+ 1979,+ 10+ ]+ ]+ },+ "language": "en-GB",+ "page": "380-387",+ "publisher": "Wiley-Blackwell",+ "source": "EBSCOhost",+ "title": "Justice, participation and sustainability at MIT",+ "title-short": "Justice, participation and sustainability",+ "type": "article-journal",+ "volume": "31"+ },+ {+ "author": [+ {+ "family": "Latourette",+ "given": "Kenneth S."+ }+ ],+ "citation-key": "latourette_community_1938",+ "collection-number": "5",+ "collection-title": "Church, community and state",+ "container-title": "Church and community",+ "editor": [+ {+ "family": "Latourette",+ "given": "Kenneth S."+ },+ {+ "family": "Barker",+ "given": "Ernest"+ },+ {+ "family": "Boegner",+ "given": "Marc"+ },+ {+ "family": "Lilje",+ "given": "Hanns"+ },+ {+ "family": "Björkquist",+ "given": "Manfred"+ },+ {+ "family": "Zankov",+ "given": "Stefan"+ },+ {+ "family": "Aubrey",+ "given": "Edwin E."+ },+ {+ "family": "Douglass",+ "given": "H. Paul"+ }+ ],+ "event-place": "Chicago",+ "id": "latourette_community_1938",+ "issued": {+ "date-parts": [+ [+ 1938+ ]+ ]+ },+ "language": "en-GB",+ "page": "3-17",+ "publisher": "Willett, Clark & Company",+ "publisher-place": "Chicago",+ "title": "Community and church: an historical survey and interpretation",+ "title-short": "Community and church",+ "type": "chapter"+ },+ {+ "author": [+ {+ "family": "Oldham",+ "given": "J. H."+ }+ ],+ "citation-key": "oldham_responsible_1948",+ "collection-number": "3",+ "collection-title": "Man’s disorder and God’s design",+ "container-title": "The church and the disorder of society",+ "editor": [+ {+ "family": "Bates",+ "given": "S."+ },+ {+ "family": "Bennett",+ "given": "J. C."+ },+ {+ "family": "Bliss",+ "given": "Kathleen"+ },+ {+ "family": "Brunner",+ "given": "Emil"+ },+ {+ "family": "Ellul",+ "given": "Jacques"+ },+ {+ "family": "Niebuhr",+ "given": "Reinhold"+ },+ {+ "family": "Oldham",+ "given": "J. H."+ },+ {+ "family": "Patijn",+ "given": "C. L."+ },+ {+ "family": "Thomas",+ "given": "M. M."+ },+ {+ "family": "Urwin",+ "given": "E. C."+ }+ ],+ "event-place": "London",+ "id": "oldham_responsible_1948",+ "issued": {+ "date-parts": [+ [+ 1948+ ]+ ]+ },+ "language": "en-GB",+ "page": "120-154",+ "publisher": "SCM Press",+ "publisher-place": "London",+ "title": "A responsible society",+ "title-short": "Responsible society",+ "type": "chapter"+ }+]+<<===== INPUT =====<<+++>>===== VERSION =====>>+1.0+<<===== VERSION =====<<+
+ test/extra/issue_108.txt view
@@ -0,0 +1,270 @@+>>===== MODE =====>>+bibliography+<<===== MODE =====<<++++>>===== RESULT =====>>+<div class="csl-bib-body">+ <div class="csl-entry"><i>Stanze in lode della donna brutta</i>. 1547.</div>+</div>+<<===== RESULT =====<<+++>>===== CITATIONS =====>>+[[ { "id":"stanze"} ]]+<<===== CITATIONS =====<<+++++>>===== CSL =====>>+<?xml version="1.0" encoding="utf-8"?>+<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="display-and-sort" page-range-format="chicago">+ <info>+ </info>+ <macro name="secondary-contributors">+ <choose>+ <if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="none">+ <group delimiter=". ">+ <names variable="editor translator" delimiter=". ">+ <label form="verb" text-case="capitalize-first" suffix=" "/>+ <name and="text" delimiter=", "/>+ </names>+ <names variable="director" delimiter=". ">+ <label form="verb" text-case="capitalize-first" suffix=" "/>+ <name and="text" delimiter=", "/>+ </names>+ </group>+ </if>+ </choose>+ </macro>+ <macro name="container-contributors">+ <choose>+ <if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">+ <group prefix=", " delimiter=", ">+ <names variable="container-author" delimiter=", ">+ <label form="verb" suffix=" "/>+ <name and="text" delimiter=", "/>+ </names>+ <names variable="editor translator" delimiter=", ">+ <label form="verb" suffix=" "/>+ <name and="text" delimiter=", "/>+ </names>+ </group>+ </if>+ </choose>+ </macro>+ <macro name="editor">+ <names variable="editor">+ <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>+ <label form="short" prefix=", "/>+ </names>+ </macro>+ <macro name="translator">+ <names variable="translator">+ <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>+ <label form="short" prefix=", "/>+ </names>+ </macro>+ <macro name="substitute-title">+ <choose>+ <if type="article-magazine article-newspaper review review-book" match="any">+ <text macro="container-title"/>+ </if>+ </choose>+ </macro>+ <macro name="contributors">+ <group delimiter=". ">+ <names variable="author">+ <name and="text" name-as-sort-order="first" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>+ <label form="short" prefix=", "/>+ <substitute>+ <names variable="editor"/>+ <names variable="translator"/>+ <names variable="director"/>+ <text macro="substitute-title"/>+ <text macro="title"/>+ </substitute>+ </names>+ </group>+ </macro>+ <macro name="contributors-short">+ <names variable="author">+ <name form="short" and="text" delimiter=", " initialize-with=". "/>+ <substitute>+ <names variable="editor"/>+ <names variable="translator"/>+ <names variable="director"/>+ <text macro="substitute-title"/>+ <text macro="title"/>+ </substitute>+ </names>+ </macro>+ <macro name="title">+ <choose>+ <if variable="title" match="none">+ <choose>+ <if type="personal_communication" match="none">+ <text variable="genre" text-case="capitalize-first"/>+ </if>+ </choose>+ </if>+ <else-if type="bill book graphic legislation motion_picture song" match="any">+ <text variable="title" text-case="title" font-style="italic"/>+ <group prefix=" (" suffix=")" delimiter=" ">+ <text term="version"/>+ <text variable="version"/>+ </group>+ </else-if>+ <else-if variable="reviewed-author">+ <choose>+ <if variable="reviewed-title">+ <group delimiter=". ">+ <text variable="title" text-case="title" quotes="true"/>+ <group delimiter=", ">+ <text variable="reviewed-title" text-case="title" font-style="italic" prefix="Review of "/>+ <names variable="reviewed-author">+ <label form="verb-short" text-case="lowercase" suffix=" "/>+ <name and="text" delimiter=", "/>+ </names>+ </group>+ </group>+ </if>+ <else>+ <group delimiter=", ">+ <text variable="title" text-case="title" font-style="italic" prefix="Review of "/>+ <names variable="reviewed-author">+ <label form="verb-short" text-case="lowercase" suffix=" "/>+ <name and="text" delimiter=", "/>+ </names>+ </group>+ </else>+ </choose>+ </else-if>+ <else-if type="legal_case interview patent" match="any">+ <text variable="title"/>+ </else-if>+ <else>+ <text variable="title" text-case="title" quotes="true"/>+ </else>+ </choose>+ </macro>+ <macro name="container-title">+ <choose>+ <if type="webpage">+ <text variable="container-title" text-case="title"/>+ </if>+ <else-if type="legal_case" match="none">+ <group delimiter=" ">+ <text variable="container-title" text-case="title" font-style="italic"/>+ <choose>+ <if type="post-weblog">+ <text value="(blog)"/>+ </if>+ </choose>+ </group>+ </else-if>+ </choose>+ </macro>+ <macro name="date">+ <choose>+ <if variable="issued">+ <group delimiter=" ">+ <date variable="original-date" form="text" date-parts="year" prefix="(" suffix=")"/>+ <date variable="issued">+ <date-part name="year"/>+ </date>+ </group>+ </if>+ <else-if variable="status">+ <text variable="status" text-case="capitalize-first"/>+ </else-if>+ <else>+ <text term="no date" form="short"/>+ </else>+ </choose>+ </macro>+ <macro name="date-in-text">+ <choose>+ <if variable="issued">+ <group delimiter=" ">+ <date variable="original-date" form="text" date-parts="year" prefix="[" suffix="]"/>+ <date variable="issued">+ <date-part name="year"/>+ </date>+ </group>+ </if>+ <else-if variable="status">+ <text variable="status"/>+ </else-if>+ <else>+ <text term="no date" form="short"/>+ </else>+ </choose>+ </macro>+ <citation et-al-min="4" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true" givenname-disambiguation-rule="primary-name" collapse="year" after-collapse-delimiter="; ">+ <layout prefix="(" suffix=")" delimiter="; ">+ <group delimiter=", ">+ <choose>+ <if variable="issued accessed" match="any">+ <group delimiter=" ">+ <text macro="contributors-short"/>+ <text macro="date-in-text"/>+ </group>+ </if>+ <else>+ <group delimiter=", ">+ <text macro="contributors-short"/>+ <text macro="date-in-text"/>+ </group>+ </else>+ </choose>+ </group>+ </layout>+ </citation>+ <bibliography hanging-indent="true" et-al-min="11" et-al-use-first="7" subsequent-author-substitute="———" entry-spacing="0">+ <sort>+ <key macro="contributors"/>+ <key variable="issued"/>+ <key variable="title"/>+ </sort>+ <layout suffix=".">+ <group delimiter=". ">+ <text macro="contributors"/>+ <text macro="date"/>+ <text macro="title"/>+ </group>+ <text macro="secondary-contributors" prefix=". "/>+ <text macro="container-title" prefix=". "/>+ <text macro="container-contributors"/>+ </layout>+ </bibliography>+</style>+<<===== CSL =====<<+++>>===== INPUT =====>>+[+ {+ "id": "stanze",+ "issued": {+ "date-parts": [+ [+ 1547+ ]+ ]+ },+ "language": "it-IT",+ "publisher-place": "Florence",+ "title": "Stanze in lode della donna brutta",+ "type": "book"+ }+]+<<===== INPUT =====<<+++>>===== VERSION =====>>+1.0+<<===== VERSION =====<<+