aboutsummaryrefslogtreecommitdiff
path: root/test/command/archeologie-medievale.csl
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-09-06 16:25:16 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2020-09-21 10:15:50 -0700
commite0984a43a99231e72c02a0a716c8d0315de9abdf (patch)
tree8531ef58c2470d372ff2427a6ae09a6284461471 /test/command/archeologie-medievale.csl
parent89c577befb78b32a0884b6092e0415c0dcadab72 (diff)
downloadpandoc-e0984a43a99231e72c02a0a716c8d0315de9abdf.tar.gz
Add built-in citation support using new citeproc library.
This deprecates the use of the external pandoc-citeproc filter; citation processing is now built in to pandoc. * Add dependency on citeproc library. * Add Text.Pandoc.Citeproc module (and some associated unexported modules under Text.Pandoc.Citeproc). Exports `processCitations`. [API change] * Add data files needed for Text.Pandoc.Citeproc: default.csl in the data directory, and a citeproc directory that is just used at compile-time. Note that we've added file-embed as a mandatory rather than a conditional depedency, because of the biblatex localization files. We might eventually want to use readDataFile for this, but it would take some code reorganization. * Text.Pandoc.Loging: Add `CiteprocWarning` to `LogMessage` and use it in `processCitations`. [API change] * Add tests from the pandoc-citeproc package as command tests (including some tests pandoc-citeproc did not pass). * Remove instructions for building pandoc-citeproc from CI and release binary build instructions. We will no longer distribute pandoc-citeproc. * Markdown reader: tweak abbreviation support. Don't insert a nonbreaking space after a potential abbreviation if it comes right before a note or citation. This messes up several things, including citeproc's moving of note citations. * Add `csljson` as and input and output format. This allows pandoc to convert between `csljson` and other bibliography formats, and to generate formatted versions of CSL JSON bibliographies. * Add module Text.Pandoc.Writers.CslJson, exporting `writeCslJson`. [API change] * Add module Text.Pandoc.Readers.CslJson, exporting `readCslJson`. [API change] * Added `bibtex`, `biblatex` as input formats. This allows pandoc to convert between BibLaTeX and BibTeX and other bibliography formats, and to generated formatted versions of BibTeX/BibLaTeX bibliographies. * Add module Text.Pandoc.Readers.BibTeX, exporting `readBibTeX` and `readBibLaTeX`. [API change] * Make "standalone" implicit if output format is a bibliography format. This is needed because pandoc readers for bibliography formats put the bibliographic information in the `references` field of metadata; and unless standalone is specified, metadata gets ignored. (TODO: This needs improvement. We should trigger standalone for the reader when the input format is bibliographic, and for the writer when the output format is markdown.) * Carry over `citationNoteNum` to `citationNoteNumber`. This was just ignored in pandoc-citeproc. * Text.Pandoc.Filter: Add `CiteprocFilter` constructor to Filter. [API change] This runs the processCitations transformation. We need to treat it like a filter so it can be placed in the sequence of filter runs (after some, before others). In FromYAML, this is parsed from `citeproc` or `{type: citeproc}`, so this special filter may be specified either way in a defaults file (or by `citeproc: true`, though this gives no control of positioning relative to other filters). TODO: we need to add something to the manual section on defaults files for this. * Add deprecation warning if `upandoc-citeproc` filter is used. * Add `--citeproc/-C` option to trigger citation processing. This behaves like a filter and will be positioned relative to filters as they appear on the command line. * Rewrote the manual on citatations, adding a dedicated Citations section which also includes some information formerly found in the pandoc-citeproc man page. * Look for CSL styles in the `csl` subdirectory of the pandoc user data directory. This changes the old pandoc-citeproc behavior, which looked in `~/.csl`. Users can simply symlink `~/.csl` to the `csl` subdirectory of their pandoc user data directory if they want the old behavior. * Add support for CSL bibliography entry formatting to LaTeX, HTML, Ms writers. Added CSL-related CSS to styles.html.
Diffstat (limited to 'test/command/archeologie-medievale.csl')
-rw-r--r--test/command/archeologie-medievale.csl291
1 files changed, 291 insertions, 0 deletions
diff --git a/test/command/archeologie-medievale.csl b/test/command/archeologie-medievale.csl
new file mode 100644
index 000000000..1ac70696e
--- /dev/null
+++ b/test/command/archeologie-medievale.csl
@@ -0,0 +1,291 @@
+<?xml version="1.0" encoding="utf-8"?>
+<style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" class="note" demote-non-dropping-particle="display-and-sort" default-locale="fr-FR" page-range-format="expanded">
+ <info>
+ <title>Archéologie médiévale (French)</title>
+ <id>http://www.zotero.org/styles/archeologie-medievale</id>
+ <link href="http://www.zotero.org/styles/archeologie-medievale" rel="self"/>
+ <link href="http://www.unicaen.fr/crahm/archeomed/spip.php?article80" rel="documentation"/>
+ <author>
+ <name>Nicolas Monteix</name>
+ <email>nicolas.monteix@univ-rouen.fr</email>
+ </author>
+ <category citation-format="note"/>
+ <category field="history"/>
+ <category field="anthropology"/>
+ <issn>0153-9337</issn>
+ <summary>Style auteur-date en note pour Archéologie médiévale. NB: les sources éditées doivent être considérées comme des livres ayant un auteur (médiéval) et un éditeur (contemporain). Pour les sources éditées ne disposant pas d'auteur (médiéval), il est nécessaire de transformer le (dir.) en (éd.). Pour les archives (type=manuscrit), le "lieu" correspond au dépôt d'archives, l' "archive" au fonds, la "loc. dans l'archive" à la cote.</summary>
+ <updated>2014-08-17T23:30:36+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="fr">
+ <terms>
+ <term name="editor" form="short">dir.</term>
+ <term name="in">dans</term>
+ <term name="anonymous">anonyme</term>
+ <term name="anonymous" form="short">anon.</term>
+ <term name="accessed">consulté le</term>
+ <term name="no date">sans date</term>
+ <term name="no date" form="short">s.&#160;d.</term>
+ </terms>
+ </locale>
+ <macro name="author">
+ <names variable="author" delimiter=" ">
+ <name name-as-sort-order="all" font-variant="small-caps" sort-separator=" " initialize-with="." delimiter-precedes-last="never" and="text" delimiter=", "/>
+ <substitute>
+ <text macro="editor"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="editor">
+ <names variable="editor">
+ <name name-as-sort-order="all" font-variant="small-caps" sort-separator=" " initialize-with="." delimiter-precedes-last="never" and="text" delimiter=", "/>
+ <label form="short" font-variant="normal" text-case="lowercase" prefix=" (" suffix=")"/>
+ </names>
+ </macro>
+ <macro name="pages">
+ <group>
+ <text variable="page" prefix="p.&#160;"/>
+ </group>
+ </macro>
+ <macro name="author-short">
+ <names variable="author">
+ <name form="short" delimiter-precedes-last="never" and="text" delimiter=", "/>
+ <et-al font-variant="normal" font-style="italic"/>
+ <substitute>
+ <text macro="editor-short"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="editor-short">
+ <names variable="editor">
+ <name form="short" delimiter-precedes-last="never" and="text" delimiter=", "/>
+ <et-al font-variant="normal" font-style="italic"/>
+ </names>
+ </macro>
+ <macro name="URLaccess">
+ <group prefix="(" suffix=")">
+ <text variable="URL"/>
+ <text macro="access"/>
+ </group>
+ </macro>
+ <macro name="access">
+ <group prefix=" [" suffix="]">
+ <text term="accessed" suffix=" "/>
+ <date variable="accessed">
+ <date-part name="day" suffix=" "/>
+ <date-part name="month" suffix=" "/>
+ <date-part name="year"/>
+ </date>
+ </group>
+ </macro>
+ <macro name="editor-text">
+ <group>
+ <names variable="editor" suffix=" (éd.), ">
+ <name name-as-sort-order="all" font-variant="small-caps" sort-separator=" " initialize-with="." delimiter-precedes-last="never" and="text" delimiter=", "/>
+ </names>
+ <text macro="publisher" suffix=", "/>
+ <text macro="year-date"/>
+ </group>
+ </macro>
+ <macro name="editor-text-short">
+ <group>
+ <names variable="editor" suffix=" (éd.), ">
+ <name name-as-sort-order="all" form="short" font-variant="small-caps" delimiter-precedes-last="never" and="text" delimiter=", "/>
+ </names>
+ <text macro="year-date"/>
+ </group>
+ </macro>
+ <macro name="title">
+ <choose>
+ <if type="book" match="any">
+ <text variable="title" font-style="italic"/>
+ </if>
+ <else-if type="webpage" match="any">
+ <text variable="title"/>
+ </else-if>
+ <else-if variable="container-title" match="none">
+ <text variable="title" font-style="italic"/>
+ </else-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>
+ <choose>
+ <if is-numeric="edition">
+ <group vertical-align="sup">
+ <number variable="edition"/>
+ </group>
+ </if>
+ <else>
+ <text variable="edition"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="type-sorting">
+ <choose>
+ <if type="book" variable="editor author" match="all">
+ <text value="1"/>
+ </if>
+ <else-if type="manuscript">
+ <text value="2"/>
+ </else-if>
+ <else>
+ <text value="3"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="locator">
+ <choose>
+ <if locator="paragraph">
+ <text variable="locator" prefix=", § "/>
+ </if>
+ <else-if locator="folio">
+ <text variable="locator" prefix=",&#160;fol.&#160;"/>
+ </else-if>
+ <else>
+ <group prefix=",&#160;">
+ <label variable="locator" form="short" suffix=".&#160;"/>
+ <text variable="locator"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <citation et-al-min="4" et-al-use-first="3" delimiter-precedes-et-al="never" disambiguate-add-year-suffix="true">
+ <sort>
+ <key variable="issued"/>
+ </sort>
+ <layout delimiter="&#160;; ">
+ <choose>
+ <if position="ibid-with-locator">
+ <group>
+ <text term="ibid" text-case="capitalize-first" font-style="italic"/>
+ <text macro="locator"/>
+ </group>
+ </if>
+ <else-if position="ibid">
+ <text term="ibid" text-case="capitalize-first" font-style="italic"/>
+ </else-if>
+ <else-if type="book" variable="editor author" match="all">
+ <group suffix=".">
+ <text macro="author-short" font-variant="small-caps" suffix=", "/>
+ <text macro="title" suffix=", "/>
+ <text macro="editor-text-short"/>
+ <text macro="locator"/>
+ </group>
+ </else-if>
+ <else-if type="manuscript">
+ <group delimiter=", ">
+ <text variable="publisher-place"/>
+ <text variable="archive_location"/>
+ <text macro="locator"/>
+ </group>
+ </else-if>
+ <else>
+ <text macro="author-short" suffix="&#160;" font-variant="small-caps"/>
+ <text macro="year-date"/>
+ <text macro="locator"/>
+ </else>
+ </choose>
+ </layout>
+ </citation>
+ <bibliography subsequent-author-substitute="">
+ <sort>
+ <key macro="type-sorting"/>
+ <key macro="author"/>
+ <key variable="issued"/>
+ <key variable="title"/>
+ </sort>
+ <layout suffix=".">
+ <choose>
+ <if type="book" variable="editor author" match="all">
+ <group suffix=".">
+ <text macro="author" suffix=", "/>
+ <text macro="title" suffix=", "/>
+ <text macro="editor-text"/>
+ </group>
+ </if>
+ <else-if type="manuscript">
+ <group delimiter=", ">
+ <text variable="archive_location"/>
+ <text variable="archive"/>
+ <text variable="title" font-style="italic"/>
+ </group>
+ <group prefix=" (" suffix=")">
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </group>
+ </else-if>
+ <else>
+ <group display="block">
+ <text macro="author" suffix="&#9;"/>
+ </group>
+ <group display="left-margin">
+ <text macro="year-date" suffix=", "/>
+ <choose>
+ <if type="thesis">
+ <group delimiter=", " suffix=".">
+ <text macro="title" font-style="italic"/>
+ <text variable="genre"/>
+ <text variable="publisher"/>
+ <text variable="publisher-place"/>
+ </group>
+ </if>
+ <else-if type="webpage">
+ <group delimiter=" ">
+ <text macro="title" font-style="italic"/>
+ <text macro="URLaccess"/>
+ </group>
+ </else-if>
+ <else-if type="article-journal article-magazine article-newspaper broadcast personal_communication thesis entry-dictionary entry-encyclopedia" match="any">
+ <group delimiter=", " suffix=".">
+ <text macro="title" quotes="true"/>
+ <text variable="container-title" font-style="italic"/>
+ <text variable="volume"/>
+ <text variable="issue"/>
+ <text macro="pages"/>
+ </group>
+ </else-if>
+ <else-if type="book graphic" match="any">
+ <group suffix=".">
+ <text macro="title" suffix=", "/>
+ <text macro="publisher"/>
+ </group>
+ </else-if>
+ <else-if type="chapter paper-conference" match="any">
+ <text macro="title" quotes="true" suffix=", "/>
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <text term="in"/>
+ <text macro="editor"/>
+ </group>
+ <text variable="container-title" font-style="italic"/>
+ <text macro="publisher"/>
+ <text macro="pages"/>
+ </group>
+ </else-if>
+ </choose>
+ </group>
+ </else>
+ </choose>
+ </layout>
+ </bibliography>
+</style>