aboutsummaryrefslogtreecommitdiff
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
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.
-rw-r--r--.github/workflows/nightly.yml15
-rw-r--r--.github/workflows/release-candidate.yml6
-rw-r--r--.travis.yml7
-rw-r--r--MANUAL.txt530
-rw-r--r--cabal.project8
-rw-r--r--citeproc/biblatex-localization/.strings0
-rw-r--r--citeproc/biblatex-localization/UKenglish.lbx.strings0
-rw-r--r--citeproc/biblatex-localization/USenglish.lbx.strings0
-rw-r--r--citeproc/biblatex-localization/american.lbx.strings0
-rw-r--r--citeproc/biblatex-localization/australian.lbx.strings0
-rw-r--r--citeproc/biblatex-localization/austrian.lbx.strings1
-rw-r--r--citeproc/biblatex-localization/brazil.lbx.strings0
-rw-r--r--citeproc/biblatex-localization/brazilian.lbx.strings233
-rw-r--r--citeproc/biblatex-localization/british.lbx.strings3
-rw-r--r--citeproc/biblatex-localization/bulgarian.lbx.strings28
-rw-r--r--citeproc/biblatex-localization/canadian.lbx.strings0
-rw-r--r--citeproc/biblatex-localization/catalan.lbx.strings158
-rw-r--r--citeproc/biblatex-localization/croatian.lbx.strings214
-rw-r--r--citeproc/biblatex-localization/czech.lbx.strings91
-rw-r--r--citeproc/biblatex-localization/danish.lbx.strings106
-rw-r--r--citeproc/biblatex-localization/dutch.lbx.strings23
-rw-r--r--citeproc/biblatex-localization/english.lbx.strings254
-rw-r--r--citeproc/biblatex-localization/estonian.lbx.strings178
-rw-r--r--citeproc/biblatex-localization/finnish.lbx.strings254
-rw-r--r--citeproc/biblatex-localization/french.lbx.strings245
-rw-r--r--citeproc/biblatex-localization/galician.lbx.strings28
-rw-r--r--citeproc/biblatex-localization/german.lbx.strings28
-rw-r--r--citeproc/biblatex-localization/greek.lbx.strings9
-rw-r--r--citeproc/biblatex-localization/hungarian.lbx.strings0
-rw-r--r--citeproc/biblatex-localization/icelandic.lbx.strings7
-rw-r--r--citeproc/biblatex-localization/italian.lbx.strings9
-rw-r--r--citeproc/biblatex-localization/latvian.lbx.strings75
-rw-r--r--citeproc/biblatex-localization/lithuanian.lbx.strings31
-rw-r--r--citeproc/biblatex-localization/magyar.lbx.strings29
-rw-r--r--citeproc/biblatex-localization/naustrian.lbx.strings2
-rw-r--r--citeproc/biblatex-localization/newzealand.lbx.strings0
-rw-r--r--citeproc/biblatex-localization/ngerman.lbx.strings1
-rw-r--r--citeproc/biblatex-localization/norsk.lbx.strings98
-rw-r--r--citeproc/biblatex-localization/nswissgerman.lbx.strings2
-rw-r--r--citeproc/biblatex-localization/nynorsk.lbx.strings28
-rw-r--r--citeproc/biblatex-localization/polish.lbx.strings100
-rw-r--r--citeproc/biblatex-localization/portuges.lbx.strings0
-rw-r--r--citeproc/biblatex-localization/portuguese.lbx.strings95
-rw-r--r--citeproc/biblatex-localization/russian.lbx.strings102
-rw-r--r--citeproc/biblatex-localization/serbian.lbx.strings0
-rw-r--r--citeproc/biblatex-localization/serbianc.lbx.strings0
-rw-r--r--citeproc/biblatex-localization/slovak.lbx.strings82
-rw-r--r--citeproc/biblatex-localization/slovene.lbx.strings28
-rw-r--r--citeproc/biblatex-localization/slovenian.lbx.strings0
-rw-r--r--citeproc/biblatex-localization/spanish.lbx.strings190
-rw-r--r--citeproc/biblatex-localization/swedish.lbx.strings9
-rw-r--r--citeproc/biblatex-localization/swissgerman.lbx.strings1
-rw-r--r--citeproc/biblatex-localization/turkish.lbx.strings157
-rw-r--r--citeproc/biblatex-localization/ukrainian.lbx.strings102
-rw-r--r--data/default.csl648
-rw-r--r--data/templates/default.latex23
-rw-r--r--data/templates/styles.html24
-rw-r--r--linux/control.in2
-rw-r--r--linux/make_artifacts.sh20
-rw-r--r--macos/Makefile3
-rw-r--r--pandoc.cabal21
-rw-r--r--src/Text/Pandoc/App.hs27
-rw-r--r--src/Text/Pandoc/App/CommandLineOptions.hs6
-rw-r--r--src/Text/Pandoc/App/FormatHeuristics.hs1
-rw-r--r--src/Text/Pandoc/App/Opt.hs5
-rw-r--r--src/Text/Pandoc/Citeproc.hs492
-rw-r--r--src/Text/Pandoc/Citeproc/BibTeX.hs1237
-rw-r--r--src/Text/Pandoc/Citeproc/CslJson.hs37
-rw-r--r--src/Text/Pandoc/Citeproc/Data.hs31
-rw-r--r--src/Text/Pandoc/Citeproc/Locator.hs279
-rw-r--r--src/Text/Pandoc/Citeproc/MetaValue.hs252
-rw-r--r--src/Text/Pandoc/Citeproc/Util.hs70
-rw-r--r--src/Text/Pandoc/Class/PandocMonad.hs4
-rw-r--r--src/Text/Pandoc/Error.hs4
-rw-r--r--src/Text/Pandoc/Filter.hs15
-rw-r--r--src/Text/Pandoc/Logging.hs5
-rw-r--r--src/Text/Pandoc/Readers.hs8
-rw-r--r--src/Text/Pandoc/Readers/BibTeX.hs70
-rw-r--r--src/Text/Pandoc/Readers/CslJson.hs53
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs1
-rw-r--r--src/Text/Pandoc/Templates.hs1
-rw-r--r--src/Text/Pandoc/Writers.hs3
-rw-r--r--src/Text/Pandoc/Writers/CslJson.hs87
-rw-r--r--src/Text/Pandoc/Writers/Docx.hs12
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs79
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs43
-rw-r--r--src/Text/Pandoc/Writers/Ms.hs64
-rw-r--r--stack.yaml10
-rw-r--r--test/command/5541-localLink.md2
-rw-r--r--test/command/5541-nesting.md2
-rw-r--r--test/command/5541-urlLink.md2
-rw-r--r--test/command/5849-prefix.md11
-rw-r--r--test/command/6675.md2
-rw-r--r--test/command/advanced-optical-materials.csl155
-rw-r--r--test/command/annales.csl334
-rw-r--r--test/command/apa.csl474
-rw-r--r--test/command/archeologie-medievale.csl291
-rw-r--r--test/command/biblatex-266.md34
-rw-r--r--test/command/biblatex-aksin.md78
-rw-r--r--test/command/biblatex-almendro.md71
-rw-r--r--test/command/biblatex-angenendt.md66
-rw-r--r--test/command/biblatex-aristotle-anima.md62
-rw-r--r--test/command/biblatex-aristotle-physics.md63
-rw-r--r--test/command/biblatex-aristotle-poetics.md65
-rw-r--r--test/command/biblatex-aristotle-rhetoric.md80
-rw-r--r--test/command/biblatex-article.md128
-rw-r--r--test/command/biblatex-augustine.md56
-rw-r--r--test/command/biblatex-averroes-bland.md85
-rw-r--r--test/command/biblatex-averroes-hannes.md84
-rw-r--r--test/command/biblatex-averroes-hercz.md85
-rw-r--r--test/command/biblatex-baez-article.md76
-rw-r--r--test/command/biblatex-baez-online.md69
-rw-r--r--test/command/biblatex-basic.md69
-rw-r--r--test/command/biblatex-bertram.md66
-rw-r--r--test/command/biblatex-bibstring-resolution.md20
-rw-r--r--test/command/biblatex-book-averroes.md128
-rw-r--r--test/command/biblatex-book-coleridge.md59
-rw-r--r--test/command/biblatex-book-title-maintitle-series.md39
-rw-r--r--test/command/biblatex-book-vazques-de-parga.md48
-rw-r--r--test/command/biblatex-brandt.md88
-rw-r--r--test/command/biblatex-britannica.md85
-rw-r--r--test/command/biblatex-chiu.md77
-rw-r--r--test/command/biblatex-cicero.md82
-rw-r--r--test/command/biblatex-cms.md81
-rw-r--r--test/command/biblatex-coleridge.md86
-rw-r--r--test/command/biblatex-companion.md70
-rw-r--r--test/command/biblatex-cotton.md69
-rw-r--r--test/command/biblatex-crossref-inbook-mvbook.md58
-rw-r--r--test/command/biblatex-crossref-nested.md100
-rw-r--r--test/command/biblatex-ctan.md73
-rw-r--r--test/command/biblatex-dates.md162
-rw-r--r--test/command/biblatex-doody.md101
-rw-r--r--test/command/biblatex-edtf-date.md73
-rw-r--r--test/command/biblatex-escapedquotes.md51
-rw-r--r--test/command/biblatex-examples.bib1674
-rw-r--r--test/command/biblatex-formatting.md23
-rw-r--r--test/command/biblatex-gaonkar-in.md62
-rw-r--r--test/command/biblatex-gaonkar.md59
-rw-r--r--test/command/biblatex-geer.md70
-rw-r--r--test/command/biblatex-gerhardt.md64
-rw-r--r--test/command/biblatex-gillies.md70
-rw-r--r--test/command/biblatex-glashow.md51
-rw-r--r--test/command/biblatex-gonzalez.md62
-rw-r--r--test/command/biblatex-hammond.md63
-rw-r--r--test/command/biblatex-herrmann.md70
-rw-r--r--test/command/biblatex-hyman.md79
-rw-r--r--test/command/biblatex-iliad.md68
-rw-r--r--test/command/biblatex-inbook-title-booktitle-maintitle-series-2.md48
-rw-r--r--test/command/biblatex-inbook-title-booktitle-maintitle-series.md44
-rw-r--r--test/command/biblatex-inbook.md147
-rw-r--r--test/command/biblatex-incollection-2.md98
-rw-r--r--test/command/biblatex-incollection.md130
-rw-r--r--test/command/biblatex-inproceedings.md88
-rw-r--r--test/command/biblatex-issue288.md35
-rw-r--r--test/command/biblatex-itzhaki.md83
-rw-r--r--test/command/biblatex-jaffe.md82
-rw-r--r--test/command/biblatex-jcg.md54
-rw-r--r--test/command/biblatex-kant-kpv.md90
-rw-r--r--test/command/biblatex-kant-ku.md82
-rw-r--r--test/command/biblatex-kastenholz.md126
-rw-r--r--test/command/biblatex-knuth-ct-a.md78
-rw-r--r--test/command/biblatex-knuth-ct-b.md70
-rw-r--r--test/command/biblatex-knuth-ct-c.md69
-rw-r--r--test/command/biblatex-knuth-ct-d.md71
-rw-r--r--test/command/biblatex-knuth-ct-e.md66
-rw-r--r--test/command/biblatex-knuth-ct-related.md72
-rw-r--r--test/command/biblatex-knuth-ct.md66
-rw-r--r--test/command/biblatex-kowalik.md68
-rw-r--r--test/command/biblatex-kullback-related.md62
-rw-r--r--test/command/biblatex-kullback-reprint.md71
-rw-r--r--test/command/biblatex-kullback.md52
-rw-r--r--test/command/biblatex-laufenberg.md109
-rw-r--r--test/command/biblatex-loh.md65
-rw-r--r--test/command/biblatex-malinowski.md67
-rw-r--r--test/command/biblatex-manual.md51
-rw-r--r--test/command/biblatex-markey.md65
-rw-r--r--test/command/biblatex-maron.md70
-rw-r--r--test/command/biblatex-massa.md56
-rw-r--r--test/command/biblatex-moore-related.md66
-rw-r--r--test/command/biblatex-moore.md56
-rw-r--r--test/command/biblatex-moraux.md94
-rw-r--r--test/command/biblatex-murray.md104
-rw-r--r--test/command/biblatex-nietzsche-historie.md100
-rw-r--r--test/command/biblatex-nietzsche-ksa.md89
-rw-r--r--test/command/biblatex-nietzsche-ksa1.md95
-rw-r--r--test/command/biblatex-nussbaum.md63
-rw-r--r--test/command/biblatex-online.md64
-rw-r--r--test/command/biblatex-options-url-false-doi-false.md57
-rw-r--r--test/command/biblatex-padhye.md117
-rw-r--r--test/command/biblatex-patent.md158
-rw-r--r--test/command/biblatex-periodical.md30
-rw-r--r--test/command/biblatex-piccato.md59
-rw-r--r--test/command/biblatex-pines.md77
-rw-r--r--test/command/biblatex-quotes.md44
-rw-r--r--test/command/biblatex-reese.md71
-rw-r--r--test/command/biblatex-report.md119
-rw-r--r--test/command/biblatex-salam.md69
-rw-r--r--test/command/biblatex-sarfraz.md65
-rw-r--r--test/command/biblatex-shore.md66
-rw-r--r--test/command/biblatex-sigfridsson.md106
-rw-r--r--test/command/biblatex-sorace.md65
-rw-r--r--test/command/biblatex-spiegelberg.md74
-rw-r--r--test/command/biblatex-springer.md58
-rw-r--r--test/command/biblatex-strings.md46
-rw-r--r--test/command/biblatex-test-case-conversion.md73
-rw-r--r--test/command/biblatex-textnormal.md17
-rw-r--r--test/command/biblatex-thesis.md68
-rw-r--r--test/command/biblatex-title-and-shorttitle.md76
-rw-r--r--test/command/biblatex-vangennep-related.md69
-rw-r--r--test/command/biblatex-vangennep-trans.md69
-rw-r--r--test/command/biblatex-vangennep.md61
-rw-r--r--test/command/biblatex-vazques-de-parga-mvbook.md75
-rw-r--r--test/command/biblatex-vazques-de-parga.md74
-rw-r--r--test/command/biblatex-video.md19
-rw-r--r--test/command/biblatex-vizedom-related.md68
-rw-r--r--test/command/biblatex-wassenberg.md83
-rw-r--r--test/command/biblatex-weinberg.md52
-rw-r--r--test/command/biblatex-westfahl-frontier.md60
-rw-r--r--test/command/biblatex-westfahl-space.md106
-rw-r--r--test/command/biblatex-wilde.md65
-rw-r--r--test/command/biblatex-worman.md60
-rw-r--r--test/command/biblatex-yoon.md67
-rw-r--r--test/command/biblio.bib26
-rw-r--r--test/command/bibtex-basic.md71
-rw-r--r--test/command/bioethics.csl226
-rw-r--r--test/command/chicago-annotated-bibliography.csl1207
-rw-r--r--test/command/chicago-author-date-with-original-date-and-status.csl575
-rw-r--r--test/command/chicago-fullnote-bibliography.csl1182
-rw-r--r--test/command/chicago-note-bibliography.csl1005
-rw-r--r--test/command/chinese-gb7714-2005-numeric.csl213
-rw-r--r--test/command/citeproc-7a.md42
-rw-r--r--test/command/citeproc-7b.md36
-rw-r--r--test/command/din-1505-2.csl406
-rw-r--r--test/command/harvard-university-of-kent.csl253
-rw-r--r--test/command/ieee.csl339
-rw-r--r--test/command/issue160.csl28
-rw-r--r--test/command/issue437.csl26
-rw-r--r--test/command/issue58.csl553
-rw-r--r--test/command/jats.csl208
-rw-r--r--test/command/le-tapuscrit-note.csl496
-rw-r--r--test/command/locators.csl68
-rw-r--r--test/command/modern-humanities-research-association.csl445
-rw-r--r--test/command/oscola.csl680
-rw-r--r--test/command/pandoc-citeproc-118.md28
-rw-r--r--test/command/pandoc-citeproc-119.md39
-rw-r--r--test/command/pandoc-citeproc-13.md29
-rw-r--r--test/command/pandoc-citeproc-136.md23
-rw-r--r--test/command/pandoc-citeproc-14.md78
-rw-r--r--test/command/pandoc-citeproc-152.md65
-rw-r--r--test/command/pandoc-citeproc-160.md46
-rw-r--r--test/command/pandoc-citeproc-175.md45
-rw-r--r--test/command/pandoc-citeproc-197.md31
-rw-r--r--test/command/pandoc-citeproc-213.md34
-rw-r--r--test/command/pandoc-citeproc-25.md31
-rw-r--r--test/command/pandoc-citeproc-250.md21
-rw-r--r--test/command/pandoc-citeproc-27.md39
-rw-r--r--test/command/pandoc-citeproc-292.md43
-rw-r--r--test/command/pandoc-citeproc-301.md25
-rw-r--r--test/command/pandoc-citeproc-307.md31
-rw-r--r--test/command/pandoc-citeproc-31.md48
-rw-r--r--test/command/pandoc-citeproc-312.md171
-rw-r--r--test/command/pandoc-citeproc-320.md254
-rw-r--r--test/command/pandoc-citeproc-320a.md87
-rw-r--r--test/command/pandoc-citeproc-322.md35
-rw-r--r--test/command/pandoc-citeproc-325.md30
-rw-r--r--test/command/pandoc-citeproc-327.md51
-rw-r--r--test/command/pandoc-citeproc-338.md35
-rw-r--r--test/command/pandoc-citeproc-351.md27
-rw-r--r--test/command/pandoc-citeproc-356.md25
-rw-r--r--test/command/pandoc-citeproc-360.md35
-rw-r--r--test/command/pandoc-citeproc-361.md80
-rw-r--r--test/command/pandoc-citeproc-365.md39
-rw-r--r--test/command/pandoc-citeproc-371.md41
-rw-r--r--test/command/pandoc-citeproc-38.md29
-rw-r--r--test/command/pandoc-citeproc-386.md35
-rw-r--r--test/command/pandoc-citeproc-392.md29
-rw-r--r--test/command/pandoc-citeproc-399.md45
-rw-r--r--test/command/pandoc-citeproc-401.md59
-rw-r--r--test/command/pandoc-citeproc-408.md39
-rw-r--r--test/command/pandoc-citeproc-416.md61
-rw-r--r--test/command/pandoc-citeproc-437.md23
-rw-r--r--test/command/pandoc-citeproc-47.md113
-rw-r--r--test/command/pandoc-citeproc-51.md45
-rw-r--r--test/command/pandoc-citeproc-53.md54
-rw-r--r--test/command/pandoc-citeproc-57.md38
-rw-r--r--test/command/pandoc-citeproc-58.md33
-rw-r--r--test/command/pandoc-citeproc-61.md79
-rw-r--r--test/command/pandoc-citeproc-64.md24
-rw-r--r--test/command/pandoc-citeproc-65.md38
-rw-r--r--test/command/pandoc-citeproc-68.md56
-rw-r--r--test/command/pandoc-citeproc-7.md31
-rw-r--r--test/command/pandoc-citeproc-70.md73
-rw-r--r--test/command/pandoc-citeproc-75.md67
-rw-r--r--test/command/pandoc-citeproc-76.md64
-rw-r--r--test/command/pandoc-citeproc-77.md67
-rw-r--r--test/command/pandoc-citeproc-82.md40
-rw-r--r--test/command/pandoc-citeproc-87.md157
-rw-r--r--test/command/pandoc-citeproc-chicago-author-date.md111
-rw-r--r--test/command/pandoc-citeproc-chicago-fullnote-bibliography.md134
-rw-r--r--test/command/pandoc-citeproc-ieee.md115
-rw-r--r--test/command/pandoc-citeproc-locators-delimited.md127
-rw-r--r--test/command/pandoc-citeproc-locators-integrated.md159
-rw-r--r--test/command/pandoc-citeproc-move-period-inside-quote.md53
-rw-r--r--test/command/pandoc-citeproc-no-author.md73
-rw-r--r--test/command/pandoc-citeproc-number-of-volumes.md29
-rw-r--r--test/command/pandoc-citeproc-page-range.md32
-rw-r--r--test/command/sage-harvard.csl202
-rw-r--r--test/command/science.csl245
-rw-r--r--test/command/style399.csl12
-rw-r--r--test/command/vancouver.csl351
-rw-r--r--test/command/zeitschrift-fur-kunstgeschichte.csl346
-rw-r--r--windows/pandoc.wxs2
312 files changed, 31826 insertions, 303 deletions
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 4f6b2f68b..66e9857a8 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -18,19 +18,17 @@ jobs:
ghc --version
cabal --version
cabal v2-update
- cabal v2-build --dependencies-only . pandoc-citeproc
+ cabal v2-build --dependencies-only all
- name: Build
run: |
export PATH=/opt/cabal/3.2/bin:/opt/ghc/8.8.3/bin:$PATH
- cabal v2-install . pandoc-citeproc
+ cabal v2-install all
strip $HOME/.cabal/bin/pandoc
- strip $HOME/.cabal/bin/pandoc-citeproc
- name: Install artifact
run: |
export ARTIFACTS=nightly-linux/pandoc-nightly-linux-$(date +%Y-%m-%d)
mkdir -p ${ARTIFACTS}
cp $HOME/.cabal/bin/pandoc ${ARTIFACTS}/
- cp $HOME/.cabal/bin/pandoc-citeproc ${ARTIFACTS}/
cp COPYRIGHT ${ARTIFACTS}/
echo "Built from ${GITHUB_SHA}" > ${ARTIFACTS}/README.nightly.txt
- uses: actions/upload-artifact@master
@@ -51,14 +49,14 @@ jobs:
- name: Install dependencies
run: |
stack update
- stack build --dependencies-only pandoc pandoc-citeproc
+ stack build --dependencies-only pandoc
- name: Build artifacts
shell: cmd
run: |
for /f %%a in ('powershell -Command "Get-Date -format yyyy-MM-dd"') do set THEDATE=%%a
set ARTIFACTS=%CD%\nightly-windows\pandoc-nightly-windows-%THEDATE%
mkdir %ARTIFACTS%
- stack build pandoc pandoc-citeproc
+ stack build pandoc
forfiles /P .\.stack-work\install /M pandoc*.exe /S /C "cmd /C copy @path %%ARTIFACTS%%"
copy COPYRIGHT %ARTIFACTS%
ren %ARTIFACTS%\COPYRIGHT COPYRIGHT.txt
@@ -81,15 +79,14 @@ jobs:
- name: Install dependencies
run: |
./stack update
- ./stack build --dependencies-only pandoc pandoc-citeproc
+ ./stack build --dependencies-only pandoc
- name: Build artifacts
run: |
export ARTIFACTS=nightly-macos/pandoc-nightly-macos-$(date +%Y-%m-%d)
mkdir -p ${ARTIFACTS}
- ./stack build pandoc pandoc-citeproc
+ ./stack build pandoc
for f in $(find .stack-work/install -name 'pandoc*' -perm +001 -type f); do cp $f ${ARTIFACTS}/; done
mv ${ARTIFACTS}/pandoc ${ARTIFACTS}/pandoc
- mv ${ARTIFACTS}/pandoc-citeproc ${ARTIFACTS}/pandoc-citeproc
cp COPYRIGHT ${ARTIFACTS}/
echo "Built from ${GITHUB_SHA}" > ${ARTIFACTS}/README.nightly.txt
- uses: actions/upload-artifact@master
diff --git a/.github/workflows/release-candidate.yml b/.github/workflows/release-candidate.yml
index f71d71b8b..e4d2fffe9 100644
--- a/.github/workflows/release-candidate.yml
+++ b/.github/workflows/release-candidate.yml
@@ -48,12 +48,12 @@ jobs:
- name: Install dependencies
run: |
stack update
- stack build ${{ matrix.versions.stack_opts }} --dependencies-only pandoc pandoc-citeproc
+ stack build ${{ matrix.versions.stack_opts }} --dependencies-only pandoc
- name: Create windows package
shell: cmd
run: |
for /f %%a in ('powershell -Command "Get-Date -format yyyy-MM-dd"') do set THEDATE=%%a
- stack build ${{ matrix.versions.stack_opts }} pandoc pandoc-citeproc
+ stack build ${{ matrix.versions.stack_opts }} pandoc
for /f "tokens=1-2 delims= " %%a in ('stack exec pandoc -- --version') do (
@set VERSION=%%b
goto :next
@@ -67,7 +67,7 @@ jobs:
@set WINDOWS=%CD%\windows
@set RELEASE=%WINDOWS%\pandoc-%VERSION%
mkdir %RELEASE%
- forfiles /P .\.stack-work\install /M pandoc*.exe /S /C "cmd /C echo @path && echo %%WINDOWS%% && copy @path %%RELEASE%%"
+ forfiles /P .\.stack-work\install /M pandoc.exe /S /C "cmd /C echo @path && echo %%WINDOWS%% && copy @path %%RELEASE%%"
stack exec pandoc -- -s --toc MANUAL.txt -o %RELEASE%\MANUAL.html
stack exec pandoc -- -s COPYING.md -t rtf -o %RELEASE%\COPYING.rtf
copy %RELEASE%\COPYING.rtf %WINDOWS%
diff --git a/.travis.yml b/.travis.yml
index eeb68f5f5..0a1f2b8b6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -29,14 +29,11 @@ install:
mkdir -p ${RESOURCES}
mkdir -p ${DEST}/bin
mkdir -p ${DEST}/share/man/man1
- stack build --dependencies-only pandoc pandoc-citeproc
- stack build pandoc pandoc-citeproc
+ stack build --dependencies-only pandoc
+ stack build pandoc
for f in $(find .stack-work/install -name 'pandoc*' -perm +001 -type f); do cp $f ${DEST}/bin/; done
strip ${DEST}/bin/pandoc
- strip ${DEST}/bin/pandoc-citeproc
cp man/pandoc.1 ${DEST}/share/man/man1/pandoc.1
- ${DEST}/bin/pandoc-citeproc --man > \
- $DEST/share/man/man1/pandoc-citeproc.1
${DEST}/bin/pandoc -t html5 -s COPYING.md -Vpagetitle=License \
-o ${RESOURCES}/license.html
chown -R $ME:staff ${ROOT}
diff --git a/MANUAL.txt b/MANUAL.txt
index 7646958cb..e468c86da 100644
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -225,9 +225,12 @@ header when requesting a document from a URL:
: Specify input format. *FORMAT* can be:
::: {#input-formats}
+ - `bibtex` ([BibTeX] bibliography)
+ - `biblatex` ([BibLaTeX] bibliography)
- `commonmark` ([CommonMark] Markdown)
- `commonmark_x` ([CommonMark] Markdown with extensions)
- `creole` ([Creole 1.0])
+ - `csljson` ([CSL JSON] bibliography)
- `csv` ([CSV] table)
- `docbook` ([DocBook])
- `docx` ([Word docx])
@@ -280,6 +283,7 @@ header when requesting a document from a URL:
- `commonmark` ([CommonMark] Markdown)
- `commonmark_x` ([CommonMark] Markdown with extensions)
- `context` ([ConTeXt])
+ - `csljson` ([CSL JSON] bibliography)
- `docbook` or `docbook4` ([DocBook] 4)
- `docbook5` (DocBook 5)
- `docx` ([Word docx])
@@ -491,6 +495,9 @@ header when requesting a document from a URL:
[Muse]: https://amusewiki.org/library/manual
[PowerPoint]: https://en.wikipedia.org/wiki/Microsoft_PowerPoint
[Vimwiki]: https://vimwiki.github.io
+[CSL JSON]: https://citeproc-js.readthedocs.io/en/latest/csl-json/markup.html
+[BibTeX]: https://ctan.org/pkg/bibtex
+[BibLaTeX]: https://ctan.org/pkg/biblatex
## Reader options {.options}
@@ -1292,41 +1299,62 @@ header when requesting a document from a URL:
## Citation rendering {.options}
+`-C`, `--citeproc`
+
+: Process the citations in the file, replacing them with
+ rendered citations and adding a bibliography.
+ Citation processing will not take place unless bibliographic
+ data is supplied, either through an external file specified
+ using the `--bibliography` option or the `bibliography`
+ field in metadata, or via a `references` section in metadata
+ containing a list of citations in CSL YAML format with
+ Markdown formatting. The style is controlled by a [CSL]
+ stylesheet specified using the `--csl` option or the `csl`
+ field in metadata. (If no stylesheet is specified,
+ the `chicago-author-date` style will be used by default.)
+ The citation processing transformation may be applied before
+ or after filters or Lua filters (see `--filter`,
+ `--lua-filter`): these transformations are applied in the
+ order they appear on the command line. For more
+ information, see the section on [Citations].
+
`--bibliography=`*FILE*
: Set the `bibliography` field in the document's metadata to *FILE*,
- overriding any value set in the metadata, and process citations
- using `pandoc-citeproc`. (This is equivalent to
- `--metadata bibliography=FILE --filter pandoc-citeproc`.)
- If `--natbib` or `--biblatex` is also supplied, `pandoc-citeproc` is not
- used, making this equivalent to `--metadata bibliography=FILE`.
- If you supply this argument multiple times, each *FILE* will be added
- to bibliography.
+ overriding any value set in the metadata. If you supply
+ this argument multiple times, each *FILE* will be added to
+ bibliography.
`--csl=`*FILE*
: Set the `csl` field in the document's metadata to *FILE*,
overriding any value set in the metadata. (This is equivalent to
- `--metadata csl=FILE`.)
- This option is only relevant with `pandoc-citeproc`.
+ `--metadata csl=FILE`.) If *FILE* is a URL, it will be
+ fetched via HTTP. If *FILE* is not found relative to the
+ working directory, it will be sought in the resource path
+ and finally in the `csl` subdirectory of the
+ pandoc user data directory.
`--citation-abbreviations=`*FILE*
: Set the `citation-abbreviations` field in the document's metadata to
*FILE*, overriding any value set in the metadata. (This is equivalent to
`--metadata citation-abbreviations=FILE`.)
- This option is only relevant with `pandoc-citeproc`.
+ If *FILE* is a URL, it will be fetched via HTTP. If *FILE* is not
+ found relative to the working directory, it will be sought
+ in the resource path and finally in the `csl` subdirectory
+ of the pandoc user data directory.
`--natbib`
: Use [`natbib`] for citations in LaTeX output. This option is not for use
- with the `pandoc-citeproc` filter or with PDF output. It is intended for
+ with the `--citeproc` option or with PDF output. It is intended for
use in producing a LaTeX file that can be processed with [`bibtex`].
`--biblatex`
: Use [`biblatex`] for citations in LaTeX output. This option is not for use
- with the `pandoc-citeproc` filter or with PDF output. It is intended for
+ with the `--citeproc` option or with PDF output. It is intended for
use in producing a LaTeX file that can be processed with [`bibtex`] or [`biber`].
## Math rendering in HTML {.options}
@@ -1427,6 +1455,7 @@ Nonzero exit codes have the following meanings:
21 PandocUnknownReaderError
22 PandocUnknownWriterError
23 PandocUnsupportedExtensionError
+ 24 PandocCiteprocError
31 PandocEpubSubdirectoryError
43 PandocPDFError
47 PandocPDFProgramNotFoundError
@@ -1496,7 +1525,6 @@ resource-path: ["."]
# the .lua extension, and json filters otherwise. But
# the filter type can also be specified explicitly, as shown:
filters:
-- pandoc-citeproc
- wordcount.lua
- type: json
path: foo.lua
@@ -4738,118 +4766,17 @@ they cannot contain multiple paragraphs). The syntax is as follows:
Inline and regular footnotes may be mixed freely.
-## Citations
+## Citation syntax
#### Extension: `citations` ####
-Using an external filter, `pandoc-citeproc`, pandoc can automatically generate
-citations and a bibliography in a number of styles. Basic usage is
-
- pandoc --filter pandoc-citeproc myinput.txt
-
-In order to use this feature, you will need to specify a bibliography file
-using the `bibliography` metadata field in a YAML metadata section, or
-`--bibliography` command line argument. You can supply multiple `--bibliography`
-arguments or set `bibliography` metadata field to YAML array, if you want to
-use multiple bibliography files. The bibliography may have any of these
-formats:
-
- Format File extension
- ------------ --------------
- BibLaTeX .bib
- BibTeX .bibtex
- Copac .copac
- CSL JSON .json
- CSL YAML .yaml
- EndNote .enl
- EndNote XML .xml
- ISI .wos
- MEDLINE .medline
- MODS .mods
- RIS .ris
-
-Note that `.bib` can be used with both BibTeX and BibLaTeX files;
-use `.bibtex` to force BibTeX.
-
-Note that `pandoc-citeproc --bib2json` and `pandoc-citeproc --bib2yaml`
-can produce `.json` and `.yaml` files from any of the supported formats.
-
-In-field markup: In BibTeX and BibLaTeX databases,
-pandoc-citeproc parses a subset of LaTeX markup; in CSL YAML
-databases, pandoc Markdown; and in CSL JSON databases, an
-[HTML-like markup][CSL markup specs]:
-
-`<i>...</i>`
-: italics
-
-`<b>...</b>`
-: bold
-
-`<span style="font-variant:small-caps;">...</span>` or `<sc>...</sc>`
-: small capitals
-
-`<sub>...</sub>`
-: subscript
-
-`<sup>...</sup>`
-: superscript
-
-`<span class="nocase">...</span>`
-: prevent a phrase from being capitalized as title case
-
-`pandoc-citeproc -j` and `-y` interconvert the CSL JSON
-and CSL YAML formats as far as possible.
-
-As an alternative to specifying a bibliography file using `--bibliography`
-or the YAML metadata field `bibliography`, you can include
-the citation data directly in the `references` field of the
-document's YAML metadata. The field should contain an array of
-YAML-encoded references, for example:
-
- ---
- references:
- - type: article-journal
- id: WatsonCrick1953
- author:
- - family: Watson
- given: J. D.
- - family: Crick
- given: F. H. C.
- issued:
- date-parts:
- - - 1953
- - 4
- - 25
- title: 'Molecular structure of nucleic acids: a structure for deoxyribose
- nucleic acid'
- title-short: Molecular structure of nucleic acids
- container-title: Nature
- volume: 171
- issue: 4356
- page: 737-738
- DOI: 10.1038/171737a0
- URL: https://www.nature.com/articles/171737a0
- language: en-GB
- ...
-
-(`pandoc-citeproc --bib2yaml` can produce these from a bibliography file in one
-of the supported formats.)
-
-Citations and references can be formatted using any style supported by the
-[Citation Style Language], listed in the [Zotero Style Repository].
-These files are specified using the `--csl` option or the `csl` metadata field.
-By default, `pandoc-citeproc` will use the [Chicago Manual of Style] author-date
-format. The CSL project provides further information on [finding and editing styles].
-
-To make your citations hyperlinks to the corresponding bibliography
-entries, add `link-citations: true` to your YAML metadata.
-
-Citations go inside square brackets and are separated by semicolons.
-Each citation must have a key, composed of '@' + the citation
-identifier from the database, and may optionally have a prefix,
-a locator, and a suffix. The citation key must begin with a letter, digit,
-or `_`, and may contain alphanumerics, `_`, and internal punctuation
-characters (`:.#$%&-+?<>~/`). Here are some examples:
+Markdown citations go inside square brackets and are separated
+by semicolons. Each citation must have a key, composed of '@' +
+the citation identifier from the database, and may optionally
+have a prefix, a locator, and a suffix. The citation key must
+begin with a letter, digit, or `_`, and may contain
+alphanumerics, `_`, and internal punctuation characters
+(`:.#$%&-+?<>~/`). Here are some examples:
Blah blah [see @doe99, pp. 33-35; also @smith04, chap. 1].
@@ -4857,7 +4784,7 @@ characters (`:.#$%&-+?<>~/`). Here are some examples:
Blah blah [@smith04; @doe99].
-`pandoc-citeproc` detects locator terms in the [CSL locale files].
+`pandoc` detects locator terms in the [CSL locale files].
Either abbreviated or unabbreviated forms are accepted. In the `en-US`
locale, locator terms can be written in either singular or plural forms,
as `book`, `bk.`/`bks.`; `chapter`, `chap.`/`chaps.`; `column`,
@@ -4868,9 +4795,9 @@ as `book`, `bk.`/`bks.`; `chapter`, `chap.`/`chaps.`; `column`,
`verse`, `v.`/`vv.`; `volume`, `vol.`/`vols.`; `¶`/`¶¶`; `§`/`§§`. If no
locator term is used, "page" is assumed.
-`pandoc-citeproc` will use heuristics to distinguish the locator
+`pandoc` will use heuristics to distinguish the locator
from the suffix. In complex cases, the locator can be enclosed
-in curly braces (using `pandoc-citeproc` 0.15 and higher only):
+in curly braces:
[@smith{ii, A, D-Z}, with a suffix]
[@smith, {pp. iv, vi-xi, (xv)-(xvii)} with suffix here]
@@ -4887,68 +4814,14 @@ You can also write an in-text citation, as follows:
@smith04 [p. 33] says blah.
-If the style calls for a list of works cited, it will be placed
-in a div with id `refs`, if one exists:
-
- ::: {#refs}
- :::
-
-Otherwise, it will be placed at the end of the document.
-Generation of the bibliography can be suppressed by setting
-`suppress-bibliography: true` in the YAML metadata.
-
-If you wish the bibliography to have a section heading, you can
-set `reference-section-title` in the metadata, or put the heading
-at the beginning of the div with id `refs` (if you are using it)
-or at the end of your document:
-
- last paragraph...
-
- # References
-
-The bibliography will be inserted after this heading. Note that
-the `unnumbered` class will be added to this heading, so that the
-section will not be numbered.
-
-If you want to include items in the bibliography without actually
-citing them in the body text, you can define a dummy `nocite` metadata
-field and put the citations there:
-
- ---
- nocite: |
- @item1, @item2
- ...
-
- @item3
-
-In this example, the document will contain a citation for `item3`
-only, but the bibliography will contain entries for `item1`, `item2`, and
-`item3`.
-
-It is possible to create a bibliography with all the citations,
-whether or not they appear in the document, by using a wildcard:
-
- ---
- nocite: |
- @*
- ...
-
-For LaTeX output, you can also use [`natbib`] or [`biblatex`] to
-render the bibliography. In order to do so, specify bibliography
-files as outlined above, and add `--natbib` or `--biblatex`
-argument to `pandoc` invocation. Bear in mind that bibliography
-files have to be in respective format (either BibTeX or
-BibLaTeX).
-
-For more information, see the [pandoc-citeproc man page].
+[CSL]: https://docs.citationstyles.org/en/stable/specification.html
[CSL markup specs]: https://docs.citationstyles.org/en/1.0/release-notes.html#rich-text-markup-within-fields
[Chicago Manual of Style]: https://chicagomanualofstyle.org
[Citation Style Language]: https://citationstyles.org
[Zotero Style Repository]: https://www.zotero.org/styles
[finding and editing styles]: https://citationstyles.org/authors/
[CSL locale files]: https://github.com/citation-style-language/locales
-[pandoc-citeproc man page]: https://github.com/jgm/pandoc-citeproc/blob/master/man/pandoc-citeproc.1.md
## Non-pandoc extensions
@@ -5169,7 +5042,298 @@ commonmark. So, for example, `backtick_code_blocks`
does not appear as an extension, since it is enabled by
default and cannot be disabled.
-# Producing slide shows with pandoc
+# Citations
+
+When the `--citeproc` option is used, pandoc can automatically generate
+citations and a bibliography in a number of styles. Basic usage is
+
+ pandoc --citeproc myinput.txt
+
+To use this feature, you will need to have
+
+- a document containing citations (see [Extension: `citations`]);
+- a source of bibliographic data: either an external bibliography
+ file or a list of `references` in the document's YAML metadata
+- optionally, a [CSL] citation style.
+
+## Specifying bibliographic data
+
+You can specify an external bibliography using the
+`bibliography` metadata field in a YAML metadata section or the
+`--bibliography` command line argument. If you want to use
+multiple bibliography files, you can supply multiple
+`--bibliography` arguments or set `bibliography` metadata field
+to YAML array. A bibliography may have any of these formats:
+
+ Format File extension
+ ------------ --------------
+ BibLaTeX .bib
+ BibTeX .bibtex
+ CSL JSON .json
+ CSL YAML .yaml
+
+Note that `.bib` can be used with both BibTeX and BibLaTeX files;
+use the extension `.bibtex` to force interpretation as BibTeX.
+
+In BibTeX and BibLaTeX databases, pandoc parses LaTeX markup
+inside fields such as `title`; in CSL YAML databases, pandoc
+Markdown; and in CSL JSON databases, an [HTML-like markup][CSL
+markup specs]:
+
+`<i>...</i>`
+: italics
+
+`<b>...</b>`
+: bold
+
+`<span style="font-variant:small-caps;">...</span>` or `<sc>...</sc>`
+: small capitals
+
+`<sub>...</sub>`
+: subscript
+
+`<sup>...</sup>`
+: superscript
+
+`<span class="nocase">...</span>`
+: prevent a phrase from being capitalized as title case
+
+As an alternative to specifying a bibliography file using
+`--bibliography` or the YAML metadata field `bibliography`, you
+can include the citation data directly in the `references` field
+of the document's YAML metadata. The field should contain an
+array of YAML-encoded references, for example:
+
+ ---
+ references:
+ - type: article-journal
+ id: WatsonCrick1953
+ author:
+ - family: Watson
+ given: J. D.
+ - family: Crick
+ given: F. H. C.
+ issued:
+ date-parts:
+ - - 1953
+ - 4
+ - 25
+ title: 'Molecular structure of nucleic acids: a structure for
+ deoxyribose nucleic acid'
+ title-short: Molecular structure of nucleic acids
+ container-title: Nature
+ volume: 171
+ issue: 4356
+ page: 737-738
+ DOI: 10.1038/171737a0
+ URL: https://www.nature.com/articles/171737a0
+ language: en-GB
+ ...
+
+Note that `pandoc` can be used to produce such a YAML metadata
+section from a BibTeX, BibLaTeX, or CSL JSON bibliography:
+
+ pandoc chem.bib -s -t markdown
+ pandoc chem.json -s -t markdown
+
+
+### Capitalization in titles
+
+If you are using a bibtex or biblatex bibliography, then observe
+the following rules:
+
+ - English titles should be in title case. Non-English titles should
+ be in sentence case, and the `langid` field in biblatex should be
+ set to the relevant language. (The following values are treated
+ as English: `american`, `british`, `canadian`, `english`,
+ `australian`, `newzealand`, `USenglish`, or `UKenglish`.)
+
+ - As is standard with bibtex/biblatex, proper names should be
+ protected with curly braces so that they won't be lowercased
+ in styles that call for sentence case. For example:
+
+ title = {My Dinner with {Andre}}
+
+ - In addition, words that should remain lowercase (or camelCase)
+ should be protected:
+
+ title = {Spin Wave Dispersion on the {nm} Scale}
+
+ Though this is not necessary in bibtex/biblatex, it is necessary
+ with citeproc, which stores titles internally in sentence case,
+ and converts to title case in styles that require it. Here we
+ protect "nm" so that it doesn't get converted to "Nm" at this stage.
+
+If you are using a CSL bibliography (either JSON or YAML), then observe
+the following rules:
+
+ - All titles should be in sentence case.
+
+ - Use the `language` field for non-English titles to prevent their
+ conversion to title case in styles that call for this. (Conversion
+ happens only if `language` begins with `en` or is left empty.)
+
+ - Protect words that should not be converted to title case using
+ this syntax:
+
+ Spin wave dispersion on the <span class="nocase">nm</span> scale
+
+### Conference Papers, Published vs. Unpublished
+
+For a formally published conference paper, use the biblatex entry type
+`inproceedings` (which will be mapped to CSL `paper-conference`).
+
+For an unpublished manuscript, use the biblatex entry type
+`unpublished` without an `eventtitle` field (this entry type
+will be mapped to CSL `manuscript`).
+
+For a talk, an unpublished conference paper, or a poster
+presentation, use the biblatex entry type `unpublished` with an
+`eventtitle` field (this entry type will be mapped to CSL
+`speech`). Use the biblatex `type` field to indicate the type,
+e.g. "Paper", or "Poster". `venue` and `eventdate` may be useful
+too, though `eventdate` will not be rendered by most CSL styles.
+Note that `venue` is for the event's venue, unlike `location`
+which describes the publisher's location; do not use the latter
+for an unpublished conference paper.
+
+
+## Specifying a citation style
+
+Citations and references can be formatted using any style supported by the
+[Citation Style Language], listed in the [Zotero Style Repository].
+These files are specified using the `--csl` option or the `csl`
+(or `citation-style`) metadata field. By default, pandoc will
+use the [Chicago Manual of Style] author-date format. (You can
+override this default by copying a CSL style of your choice
+to `default.csl` in your user data directory.)
+The CSL project provides further information on [finding and
+editing styles].
+
+The `--citation-abbreviations` option (or the
+`citation-abbreviations` metadata field) may be used to
+specify a JSON file containing abbreviations of journals
+that should be used in formatted bibliographies when
+`form="short"` is specified. The format of the file
+can be illustrated with an example:
+
+
+ { "default": {
+ "container-title": {
+ "Lloyd's Law Reports": "Lloyd's Rep",
+ "Estates Gazette": "EG",
+ "Scots Law Times": "SLT"
+ }
+ }
+ }
+
+## Raw content in a style
+
+To include raw content in a prefix, suffix, delimiter, or term,
+surround it with these tags indicating the format:
+
+ {{jats}}&lt;ref&gt;{{/jats}}
+
+Without the tags, the string will be interpreted as a string
+and escaped in the output, rather than being passed through raw.
+
+This feature allows stylesheets to be customized to give
+different output for different output formats. However,
+stylesheets customized in this way will not be useable
+by other CSL implementations.
+
+
+
+## Placement of the bibliography
+
+If the style calls for a list of works cited, it will be placed
+in a div with id `refs`, if one exists:
+
+ ::: {#refs}
+ :::
+
+Otherwise, it will be placed at the end of the document.
+Generation of the bibliography can be suppressed by setting
+`suppress-bibliography: true` in the YAML metadata.
+
+If you wish the bibliography to have a section heading, you can
+set `reference-section-title` in the metadata, or put the heading
+at the beginning of the div with id `refs` (if you are using it)
+or at the end of your document:
+
+ last paragraph...
+
+ # References
+
+The bibliography will be inserted after this heading. Note that
+the `unnumbered` class will be added to this heading, so that the
+section will not be numbered.
+
+## Including uncited items in the bibliography
+
+If you want to include items in the bibliography without actually
+citing them in the body text, you can define a dummy `nocite` metadata
+field and put the citations there:
+
+ ---
+ nocite: |
+ @item1, @item2
+ ...
+
+ @item3
+
+In this example, the document will contain a citation for `item3`
+only, but the bibliography will contain entries for `item1`, `item2`, and
+`item3`.
+
+It is possible to create a bibliography with all the citations,
+whether or not they appear in the document, by using a wildcard:
+
+ ---
+ nocite: |
+ @*
+ ...
+
+For LaTeX output, you can also use [`natbib`] or [`biblatex`] to
+render the bibliography. In order to do so, specify bibliography
+files as outlined above, and add `--natbib` or `--biblatex`
+argument to `pandoc` invocation. Bear in mind that bibliography
+files have to be in either BibTeX (for `--natbib`)
+or BibLaTeX (for `--biblatex`) format.
+
+## Other relevant metadata fields
+
+A few other metadata fields affect bibliography formatting:
+
+`link-citation`
+: If true, citations will be
+ hyperlinked to the corresponding bibliography entries
+ (for author-date and numerical styles only).
+
+`lang`
+: The `lang` field will affect how the style is localized,
+ for example in the translation of labels and the use
+ of quotation marks. (For backwards compatibility,
+ `locale` may be used instead of `lang`, but this use
+ is deprecated.)
+
+`notes-after-punctuation`
+: If true (the default), pandoc will put footnote citations
+ after following punctuation. For example, if the source
+ contains `blah blah [@jones99].`, the result will look like
+ `blah blah.[^1]`, with the note moved after the period and
+ the space collapsed. If false, the space will still be
+ collapsed, but the footnote will not be moved after the
+ punctuation.
+
+
+
+
+
+
+
+
+# Slide shows
You can use pandoc to produce an HTML + JavaScript slide presentation
that can be viewed via a web browser. There are five ways to do this,
@@ -5511,7 +5675,7 @@ Slide 1 has background_image.png as its background.
Slide 2 has a special image for its background, even though the heading has no content.
```
-# Creating EPUBs with pandoc
+# EPUBs
## EPUB Metadata
@@ -5674,7 +5838,7 @@ with the `src` attribute. For example:
</source>
</audio>
-# Creating Jupyter notebooks with pandoc
+# Jupyter notebooks
When creating a [Jupyter notebook], pandoc will try to infer the
notebook structure. Code blocks with the class `code` will be
diff --git a/cabal.project b/cabal.project
index 09ecd5075..cc3f0fe4d 100644
--- a/cabal.project
+++ b/cabal.project
@@ -4,13 +4,9 @@ package pandoc
flags: +embed_data_files -trypandoc
ghc-options: -j +RTS -A64m -RTS
-package pandoc-citeproc
- flags: +embed_data_files +bibutils -unicode_collation -test_citeproc -debug
- ghc-options: -j +RTS -A64m -RTS
-
source-repository-package
type: git
- location: https://github.com/jgm/pandoc-citeproc
- tag: 159bbb566858c0bc522e6404eb989671cd7236fd
+ location: https://github.com/jgm/citeproc
+ tag: e3695de4f34f33e32c6d3c33e8cdcf3fa96f6a5b
constraints: base16-bytestring < 1
diff --git a/citeproc/biblatex-localization/.strings b/citeproc/biblatex-localization/.strings
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/citeproc/biblatex-localization/.strings
diff --git a/citeproc/biblatex-localization/UKenglish.lbx.strings b/citeproc/biblatex-localization/UKenglish.lbx.strings
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/citeproc/biblatex-localization/UKenglish.lbx.strings
diff --git a/citeproc/biblatex-localization/USenglish.lbx.strings b/citeproc/biblatex-localization/USenglish.lbx.strings
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/citeproc/biblatex-localization/USenglish.lbx.strings
diff --git a/citeproc/biblatex-localization/american.lbx.strings b/citeproc/biblatex-localization/american.lbx.strings
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/citeproc/biblatex-localization/american.lbx.strings
diff --git a/citeproc/biblatex-localization/australian.lbx.strings b/citeproc/biblatex-localization/australian.lbx.strings
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/citeproc/biblatex-localization/australian.lbx.strings
diff --git a/citeproc/biblatex-localization/austrian.lbx.strings b/citeproc/biblatex-localization/austrian.lbx.strings
new file mode 100644
index 000000000..033e3d25c
--- /dev/null
+++ b/citeproc/biblatex-localization/austrian.lbx.strings
@@ -0,0 +1 @@
+january|J\"anner|J\"an\adddot
diff --git a/citeproc/biblatex-localization/brazil.lbx.strings b/citeproc/biblatex-localization/brazil.lbx.strings
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/citeproc/biblatex-localization/brazil.lbx.strings
diff --git a/citeproc/biblatex-localization/brazilian.lbx.strings b/citeproc/biblatex-localization/brazilian.lbx.strings
new file mode 100644
index 000000000..19812fdbe
--- /dev/null
+++ b/citeproc/biblatex-localization/brazilian.lbx.strings
@@ -0,0 +1,233 @@
+bibliography|Bibliografia|Bibliografia
+references|Refer\^encias|Refer\^encias
+shorthands|Lista de abreviaturas|Abreviaturas
+editor|editor|ed\adddot
+editors|editores|ed\adddot
+compiler|compilador|comp\adddot
+compilers|compiladores|comp\adddot
+redactor|redator|red\adddot
+redactors|redatores|red\adddot
+reviser|revisor|rev\adddot
+revisers|revisores|rev\adddot
+founder|fundador|fund\adddot
+founders|fundadores|fund\adddot
+continuator|continuador|cont\adddot
+continuators|continuadores|cont\adddot
+collaborator|colaborador|colab\adddot
+collaborators|colaboradores|colab\adddot
+translator|tradutor|trad\adddot
+translators|tradutores|trad\adddot
+commentator|coment\'ario|coment\adddot
+commentators|coment\'ario|coment\adddot
+annotator|notas|notas
+annotators|notas|notas
+commentary|coment\'ario|coment\adddot
+annotations|notas|notas
+foreword|pref\'acio|pref\adddot
+afterword|posf\'acio|posf\adddot
+organizer|organizador|org\adddot
+organizers|organizadores|org\adddot
+byauthor|por|por
+byeditor|editado por|ed\adddotspace por
+bycompiler|compilado por|comp\adddotspace por
+byredactor|redigido por|red\adddotspace por
+byreviser|revisado por|rev\adddotspace por
+byreviewer|resenhado por|res\adddotspace por
+byfounder|fundado por|fund\adddotspace por
+bycontinuator|continuado por|cont\adddotspace por
+bytranslator|traduzido \lbx@lfromlang\ por|trad\adddot\ \lbx@sfromlang\ por
+bycommentator|comentado por|coment\adddot\ por
+byannotator|anotado por|anot\adddot\ por
+byorganizer|organizado por|org\adddotspace por
+withcommentator|com coment\'ario de|com coment\adddot\ de
+withannotator|com notas de|com notas de
+withforeword|com pref\'acio de|com pref\adddot\ de
+withafterword|com posf\'acio de|com posf\adddot\ de
+and|e|e
+andothers|et\addabbrvspace al\adddot|et\addabbrvspace al\adddot
+andmore|et\addabbrvspace al\adddot|et\addabbrvspace al\adddot
+volume|volume|vol\adddot
+volumes|volumes|vol\adddot
+involumes|em|em
+jourvol|volume|v\adddot
+jourser|s\'erie|s\'er\adddot
+book|livro|livro
+part|parte|parte
+issue|n\'umero|n\'um\adddot
+newseries|nova s\'erie|nova s\'er\adddot
+oldseries|s\'erie antiga|s\'er\adddot\ antiga
+reprint|reimpress\~ao|reimpr\adddot
+reprintof|reimpress\~ao de|reimpr\adddotspace de
+reprintas|reimpresso como|reimpr\adddotspace como
+reprintfrom|reimpresso de|reimpr\adddotspace de
+translationas|traduzido como|trad\adddotspace como
+translationfrom|traduzido do|trad\adddotspace do
+reviewof|resenha de|res\adddotspace de
+origpubas|originalmente publicado como|orig\adddotspace pub\adddotspace como
+origpubin|originalmente publicado em|orig\adddotspace pub\adddotspace em
+astitle|como|como
+bypublisher|por|por
+nodate|sem\space data|s\adddot d\adddot
+page|p\'agina|p\adddot
+pages|p\'aginas|pp\adddot
+column|coluna|col\adddot
+columns|colunas|col\adddot
+line|linha|l\adddot
+lines|linhas|ll\adddot
+verse|verso|v\adddot
+verses|versos|vv\adddot
+paragraph|par\'agrafo|par\adddot
+paragraphs|par\'agrafos|par\adddot
+pagetotal|p\'agina|p\adddot
+pagetotals|p\'aginas|pp\adddot
+columntotal|coluna|col\adddot
+columntotals|colunas|col\adddot
+linetotal|linha|l\adddot
+linetotals|linhas|ll\adddot
+versetotal|verso|v\adddot
+versetotals|versos|vv\adddot
+paragraphtotal|par\'agrafo|par\adddot
+paragraphtotals|par\'agrafos|par\adddot
+in|em|em
+inseries|em|em
+ofseries|de|de
+number|n\'umero|n\adddot
+chapter|cap\'\i tulo|cap\adddot
+bathesis|trabalho de conclus\~ao|trab\adddotspace de conc\adddot
+phdthesis|tese de doutorado|tese de dout\adddot
+candthesis||
+resreport|relat\'orio de pesquisa|rel\adddotspace de pesq\adddot
+techreport|relat\'orio t\'ecnico|rel\adddotspace t\'ecn\adddot
+software|software|software
+datacd|CD-ROM|CD-ROM
+audiocd|CD de \'audio|CD de \'audio
+version|vers\~ao|vers\~ao
+urlfrom|dispon\'ivel em|disp\adddotspace em
+urlseen|acesso em|acesso em
+submitted|submetido|submetido
+inpress|no prelo|no prelo
+prepublished|pr\'e-publicado|pr\'e-publicado
+citedas|doravante citado como|doravante citado como
+thiscite|especialmente|esp\adddot
+seenote|ver nota|ver nota
+quotedin|apud|apud
+idem|idem|idem
+idemsm|idem|idem
+idemsf|eadem|eadem
+idemsn|idem|idem
+idempm|eidem|eidem
+idempf|eaedem|eaedem
+idempn|eadem|eadem
+idempp|eidem|eidem
+ibidem|ibidem|ibid\adddot
+opcit|op\adddotspace cit\adddot|op\adddotspace cit\adddot
+loccit|loc\adddotspace cit\adddot|loc\adddotspace cit\adddot
+confer|cf\adddot|cf\adddot
+sequens|sq\adddot|sq\adddot
+sequentes|sqq\adddot|sqq\adddot
+passim|passim|passim
+see|ver|ver
+seealso|ver tamb\'em|ver tamb\'em
+backrefpage|ver p\'agina|ver p\adddot
+backrefpages|ver p\'aginas|ver pp\adddot
+january|janeiro|jan\adddot
+february|fevereiro|fev\adddot
+april|abril|abr\adddot
+may|maio|mai\adddot
+june|junho|jun\adddot
+july|julho|jul\adddot
+august|agosto|ago\adddot
+september|setembro|set\adddot
+october|outubro|out\adddot
+november|novembro|nov\adddot
+december|dezembro|dez\adddot
+langamerican|ingl\^es|ingl\^es
+langbulgarian|b\'ulgaro|b\'ulgaro
+langcatalan|catal\~ao|catal\~ao
+langcroatian|croata|croata
+langczech|tcheco|tcheco
+langdanish|dinamarqu\^es|dinamarqu\^es
+langenglish|ingl\^es|ingl\^es
+langfinnish|finland\^es|finland\^es
+langestonian|estoniano|estoniano
+langfrench|franc\^es|franc\^es
+langgalician|galego|galego
+langgerman|alem\~ao|alem\~ao
+langgreek|grego|grego
+langhungarian|h\'ungaro|h\'ungaro
+langitalian|italiano|italiano
+langjapanese|japon\^es|japon\^es
+langlatin|latim|latim
+langlatvian|let\~ao|let\~ao
+langlithuanian|lituano|lituano
+langnorwegian|noruegu\^es|noruegu\^es
+langpolish|polon\^es|polon\^es
+langrussian|russo|russo
+langserbian|s\'ervio|s\'ervio
+langslovak|eslovaco|eslovaco
+langslovene|esloveno|esloveno
+langspanish|espanhol|espanhol
+langswedish|sueco|sueco
+langturkish|turco|turco
+langukrainian|ucraniano|ucraniano
+fromamerican|do ingl\^es|do ingl\^es
+frombulgarian|do b\'ulgaro|do b\'ulgaro
+fromcatalan|do catal\~ao|do catal\~ao
+fromcroatian|do croata|do croata
+fromczech|do tcheco|do tcheco
+fromdanish|do dinamarqu\^es|do dinamarqu\^es
+fromenglish|do ingl\^es|do ingl\^es
+fromestonian|do estoniano|do estoniano
+fromfinnish|do finland\^es|do finland\^es
+fromfrench|do franc\^es|do franc\^es
+fromgalician|do galego|do galego
+fromgerman|do alem\~ao|do alem\~ao
+fromgreek|do grego|do grego
+fromhungarian|do h\'ungaro|do h\'ungaro
+fromitalian|do italiano|do italiano
+fromjapanese|do japon\^es|do japon\^es
+fromlatin|do latim|do latim
+fromlatvian|do let\~ao|do let\~ao
+fromlithuanian|do lituano|do lituano
+fromnorwegian|do noruegu\^es|do noruegu\^es
+frompolish|do polon\^es|do polon\^es
+fromrussian|do russo|do russo
+fromserbian|do s\'ervio|do s\'ervio
+fromslovak|do eslovaco|do eslovaco
+fromslovene|do esloveno|do esloveno
+fromspanish|do espanhol|do espanhol
+fromswedish|do sueco|do sueco
+fromturkish|do turco|do turco
+fromukrainian|do ucraniano|do ucraniano
+countryde|Alemanha|DE
+countryeu|Uni\~ao Europeia|EU
+countryep|Uni\~ao Europeia|EP
+countryuk|Reino Unido|GB
+countryus|Estados Unidos|US
+patent|patente|pat\adddot
+patentde|patente alem\~a|pat\adddot\ alem\~a
+patenteu|patente europeia|pat\adddot\ europeia
+patentfr|patente francesa|pat\adddot\ francesa
+patentuk|patente brit\^anica|pat\adddot\ brit\^anica
+patentus|patente americana|pat\adddot\ americana
+patreq|pedido de patente|ped\adddot\ de pat\adddot
+patreqde|pedido de patente alem\~a|ped\adddot\ de pat\adddot\ alem\~a
+patreqeu|pedido de patente europeia|ped\adddot\ de pat\adddot\ europeia
+patreqfr|pedido de patente francesa|ped\adddot\ de pat\adddot\ francesa
+patrequk|pedido de patente brit\^anica|ped\adddot\ de pat\adddot\ brit\^anica
+patrequs|pedido de patente americana|ped\adddot\ de pat\adddot\ americana
+file|arquivo|arquivo
+library|biblioteca|biblioteca
+abstract|resumo|resumo
+annotation|notas|notas
+commonera|Era Comum|EC
+beforecommonera|antes da Era Comum|AEC
+annodomini|depois de Cristo|d\adddot C\adddot
+beforechrist|antes de Cristo|a\adddot C\adddot
+circa|circa|ca\adddot
+spring|primavera|primavera
+summer|ver\~ao|ver\~ao
+autumn|outono|outono
+winter|inverno|inverno
+am|AM|AM
+pm|PM|PM
diff --git a/citeproc/biblatex-localization/british.lbx.strings b/citeproc/biblatex-localization/british.lbx.strings
new file mode 100644
index 000000000..7ac73e023
--- /dev/null
+++ b/citeproc/biblatex-localization/british.lbx.strings
@@ -0,0 +1,3 @@
+organizer|organiser|org\adddot
+organizers|organisers|orgs\adddot
+byorganizer|organised by|org\adddotspace by
diff --git a/citeproc/biblatex-localization/bulgarian.lbx.strings b/citeproc/biblatex-localization/bulgarian.lbx.strings
new file mode 100644
index 000000000..502b9299b
--- /dev/null
+++ b/citeproc/biblatex-localization/bulgarian.lbx.strings
@@ -0,0 +1,28 @@
+bibliography|Библиография|Библиография
+references|Литература|Литература
+shorthands|Списък на съкращенията|Съкращения
+editor|редактор|ред\adddot
+editors|редактори|ред\adddot
+compiler|съставител|съст\adddot
+compilers|съставители|съст\adddot
+redactor|редактор|ред\adddot
+redactors|редактори|ред\adddot
+reviser|коректор|кор\adddotspace кор\adddot
+revisers|коректор|кор\adddotspace кор\adddot
+founder|основател|осн\adddot
+founders|основатели|осн\adddot
+continuator|продължител|прод\adddot
+continuators|продължител|прод\adddot
+collaborator|участник|участ\adddot
+collaborators|участници|участ\adddot
+translator|преводач|прев\adddot
+translators|преводачи|прев\adddot
+commentator|коментатор|комент\adddot
+commentators|коментатори|комент\adddot
+annotator|бележки|бел\adddot
+annotators|бележки|бел\adddot
+commentary|комментар|комент\adddot
+annotations|бележки|бел\adddot
+introduction|уводна статия|ув\adddotspace ст\adddot
+foreword|предговор|предг\adddot
+afterword|послеслов|послесл\adddot
diff --git a/citeproc/biblatex-localization/canadian.lbx.strings b/citeproc/biblatex-localization/canadian.lbx.strings
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/citeproc/biblatex-localization/canadian.lbx.strings
diff --git a/citeproc/biblatex-localization/catalan.lbx.strings b/citeproc/biblatex-localization/catalan.lbx.strings
new file mode 100644
index 000000000..1337888c7
--- /dev/null
+++ b/citeproc/biblatex-localization/catalan.lbx.strings
@@ -0,0 +1,158 @@
+bibliography|Bibliografia|Bibliografia
+references|Refer\`encies|Refer\`encies
+shorthands|Llista d'abreviatures|Abreviatures
+editor|editor|ed\adddot
+editors|editors|ed\adddot
+compiler|compilador|comp\adddot
+compilers|compiladors|comp\adddot
+redactor|redactor|red\adddot
+redactors|redactors|red\adddot
+reviser|revisor|rev\adddot
+revisers|revisors|rev\adddot
+founder|fundador|fund\adddot
+founders|fundadors|fund\adddot
+continuator|continuador|cont\adddot
+continuators|continuadors|cont\adddot
+collaborator|co\l.laborador|co\l.l\adddot
+collaborators|co\l.laboradors|co\l.l\adddot
+translator|traductor|trad\adddot
+translators|traductors|trad\adddot
+commentator|comentarista|com\adddot
+commentators|comentaristes|com\adddot
+annotator|anotador|anot\adddot
+annotators|anotadors|anot\adddot
+commentary|comentari|com\adddot
+annotations|notes|n\adddot
+introduction|introducci\'o|intr\adddot
+foreword|pr\`oleg|pr\`ol\adddot
+editortr|editor i traductor|ed\adddotspace i trad\adddot
+editorstr|editors i traductors|ed\adddotspace i trad\adddot
+editorco|editor i comentarista|ed\adddotspace i com\adddot
+editorsco|editors i comentaristes|ed\adddotspace i com\adddot
+editoran|editor i anotador|ed\adddotspace i anot\adddot
+editorsan|editors i anotadors|ed\adddotspace i anot\adddot
+organizer|organitzador|org\adddot
+organizers|organitzadors|org\adddot
+byorganizer|organitzat per|org\adddotspace per
+byauthor|per|per
+byeditor|edici\'o a cura \smartof|ed\adddotspace\smartof
+bycompiler|compilaci\'o a cura \smartof|comp\adddotspace\smartof
+byredactor|redacci\'o a cura \smartof|red\adddotspace\smartof
+byreviser|revisi\'o a cura \smartof|rev\adddotspace\smartof
+byreviewer|ressenya a cura \smartof|ress\adddotspace\smartof
+byfounder|fundat per|fund\adddotspace per
+bycontinuator|continuat per|cont\adddotspace per
+bycollaborator|amb la co\l.laboraci\'o \smartof|amb la co\l.l\adddotspace\smartof
+bytranslator|traducci\'o \lbx@fromlang\ a cura \smartof|trad\adddotspace\lbx@fromlang\ \smartof
+bycommentator|comentari a cura \smartof|com\adddotspace\smartof
+byannotator|notes a cura \smartof|n\adddotspace\smartof
+withcommentator|amb un comentari a cura \smartof|amb un com\adddotspace\smartof
+withannotator|amb notes a cura \smartof|amb n\adddotspace\smartof
+withintroduction|amb una introducci\'o a cura \smartof|amb una intr\adddotspace\smartof
+withforeword|amb un pr\`oleg a cura \smartof|amb un pr\`ol\adddotspace\smartof
+and|i|i
+andothers|et al\adddot|et al\adddot
+andmore|i m\'es|i m\'es
+volume|volum|vol\adddot
+volumes|volums|vol\adddot
+involumes|en|en
+jourvol|volum|vol\adddot
+jourser|s\`erie|s\`er\adddot
+book|llibre|llib\adddot
+part|part|part
+issue|n\'umero|n\'um\adddot
+newseries|s\`erie nova|s\`erie nova
+oldseries|s\`erie antiga|s\`erie ant\adddot
+edition|edici\'o|ed\adddot
+reprint|reimpressi\'o|reimpr\adddot
+reprintof|reimpressi\'o \smartof|reimpr\adddotspace\smartof
+reprintas|reimpr\`es com|reimpr\adddotspace com
+reprintfrom|reimpr\`es \smartof|reimpr\adddotspace\smartof
+reviewof|ressenya \smartof|ress\adddotspace\smartof
+translationof|traducci\'o \smartof|trad\adddotspace\smartof
+origpubas|publicat origin\`ariament com|pub\adddotspace orig\adddotspace com
+origpubin|publicat origin\`ariament el|pub\adddotspace orig\adddotspace el
+astitle|com|com
+bypublisher|per|per
+page|p\`agina|p\`ag\adddot
+pages|p\`agines|p\`ag\adddot
+column|columna|col\adddot
+columns|columnes|cols\adddot
+nodate|sine data|s\adddotspace d\adddot
+verse|vers|v\adddot
+verses|versos|v\adddot
+section|apartat|\S
+sections|apartats|\S
+paragraph|par\`agraf|\P
+paragraphs|par\`agrafs|\P
+pagetotal|p\`agina|p\`ag\adddot
+pagetotals|p\`agines|p\`ag\adddot
+columntotal|columna|col\adddot
+columntotals|columnes|col\adddot
+versetotal|vers|v\adddot
+versetotals|versos|v\adddot
+sectiontotal|secci\'o|\S
+sectiontotals|seccions|\S
+paragraphtotal|par\`agrafs|\P
+paragraphtotals|par\`agrafs|\P
+in|a|a
+inseries|a|a
+ofseries|\smartof|\smartof
+number|n\'umero|n\'um\adddot
+bathesis|treball final de grau|treb\adddotspace fin\adddotspace de gr\adddot
+mathesis|treball final de m\`aster|treb\adddotspace fin\adddotspace de m\`ast\adddot
+phdthesis|tesi doctoral|tesi doct\adddot
+candthesis|tesi de candidatura|tesi de cand\adddot
+resreport|informe de recerca|inf\adddotspace de rec\adddot
+techreport|informe t\`ecnic|inf\adddotspace t\`ec\adddot
+software|programari|prog\adddot
+datacd|CD de dades|CD de dades
+audiocd|CD d'\`audio|CD d'\`audio
+version|versi\'o|vers\adddot
+urlfrom|disponible a|disp\adddotspace a
+urlseen|consultat|cons\adddot
+inpreparation|en preparaci\'o|en prep\adddot
+inpress|a impremta|a impr\adddot
+prepublished|pre-publicat|pre-publicat
+submitted|enviat a publicar|env\adddotspace a pub\adddot
+forthcoming|properament|prop\adddot
+citedas|d'ara endavant citat com|d'ara end\adddotspace cit\adddotspace com
+thiscite|concretament|concr\adddot
+seenote|vegeu la nota|v\adddotspace la n\adddot
+quotedin|citat a|cit\adddotspace a
+opcit|\`op\adddotspace cit\adddot|\`op\adddotspace cit\adddot
+loccit|loc\adddotspace cit\adddot|loc\adddotspace cit\adddot
+confer|cf\adddot|cf\adddot
+sequens|seq\adddot|seq\adddot
+sequentes|et seq\adddot|et seq\adddot
+passim|p\`assim|p\`assim
+see|vegeu|v\adddot
+seealso|vegeu tamb\'e|v\adddotspace tamb\'e
+backrefpage|vegeu la p\`agina|v\adddotspace la p\`ag\adddot
+backrefpages|vegeu les p\`agines|v\adddotspace les p\`ag\adddot
+january|gener|gen\adddot
+february|febrer|febr\adddot
+april|abril|abr\adddot
+may|maig|maig
+june|juny|juny
+july|juliol|jul\adddot
+august|agost|ag\adddot
+september|setembre|set\adddot
+october|octubre|oct\adddot
+november|novembre|nov\adddot
+december|desembre|des\adddot
+langamerican|angl\`es americ\`a|ang\adddotspace amer\adddot
+langbrazilian|portugu\`es brasiler|port\adddotspace bras\adddot
+langbulgarian|b\'ulgar|b\'ulg\adddot
+langcatalan|catal\`a|cat\adddot
+langczech|txec|txec
+langcroatian|croat|croat
+langdanish|dan\`es|dan\adddot
+langdutch|neerland\`es|neerl\adddot
+langenglish|angl\`es|ang\adddot
+langestonian|estoni\`a|eston\adddot
+langfinnish|fin\`es|fin\adddot
+langfrench|franc\`es|fr\adddot
+langgalician|gallec|gal\adddot
+langgerman|alemany|al\adddot
+langgreek|grec|grec
diff --git a/citeproc/biblatex-localization/croatian.lbx.strings b/citeproc/biblatex-localization/croatian.lbx.strings
new file mode 100644
index 000000000..c6ac8d98b
--- /dev/null
+++ b/citeproc/biblatex-localization/croatian.lbx.strings
@@ -0,0 +1,214 @@
+bibliography|Bibliografija|Bibliografija
+references|Literatura|Literatura
+shorthands|Popis kratica|Kratice
+editor|urednik|ur\adddot
+editors|urednici|ur\adddot
+redactor|redaktor|redaktor
+redactors|redaktori|redaktori
+reviser|korektor|korektor
+revisers|korektori|korektori
+collaborator|suradnik|sur\adddot
+collaborators|suradnici|sur\adddot
+translator|prijevod|prev\adddot
+translators|prijevod|prev\adddot
+commentator|komentator|komentator
+commentators|komentatori|komentatori
+commentary|komentar|komentar
+introduction|uvod|uvod
+foreword|predgovor|predgovor
+afterword|pogovor|pogovor
+editortr|prijevod i obrada|ur\adddotspace i prev\adddot
+editorstr|prijevod i obrada|ur\adddotspace i prev\adddot
+organizer|organizacija|organizacija
+organizers|organizacija|organizacija
+byorganizer|organizacija|organizacija
+byauthor|autor|autor
+byeditor|obrada|ur\adddot
+byredactor|redaktura|red\adddot
+byreviser|korektura|kor\adddot
+byreviewer|recenzija|recenzija
+bycontinuator|nastavio|nastavio
+bycollaborator|u suradnji s|u sur\adddotspace s
+bycommentator|komentari|komentari
+withcommentator|komentari|komentari
+withintroduction|uvod|uvod
+withforeword|predgovor|predgovor
+withafterword|pogovor|pogovor
+and|i|i
+andothers|i drugi|i dr\adddot
+andmore|i drugi|i dr\adddot
+volume|sv\adddot|sv\adddot
+volumes|sv\adddot|sv\adddot
+involumes|u|u
+jourvol|sv\adddot|sv\adddot
+jourser|serija|serija
+book|knjiga|knj\adddot
+part|dio|dio
+issue|izd\adddot|izd\adddot
+newseries|nova serija|nova serija
+oldseries|stara serija|stara serija
+edition|izdanje|izdanje
+reprint|pretisak|pretisak
+reprintof|pretisak|pretisak
+reprintas|iznova otisnuto kao|iznova otisnuto kao
+reprintfrom|iznova otisnut|iznova otisnut
+translationof|prijevod|prijevod
+translationas|prev\adddotspace kao|prev\adddotspace kao
+translationfrom|prijevod|prijevod
+reviewof|osvrt na|osvrt na
+origpubas|izvorno obj\adddotspace kao|izv\adddotspace obj\adddotspace kao
+origpubin|izvorno obj\adddot|izv\adddotspace obj\adddot
+astitle|kao|kao
+bypublisher||
+nodate|bez datuma|bez datuma
+page|stranica|str\adddot
+pages|stranice|str\adddot
+column|stupac|stupac
+columns|stupci|stupci
+line|linija|l\adddot
+lines|linije|ll\adddot
+verse|stih|stih
+verses|stihovi|stihovi
+section|odjeljak|\S
+sections|odjeljci|\S\S
+paragraph|stavak|st\adddot
+paragraphs|stavci|st\adddot
+pagetotal|str\adddot|str\adddot
+pagetotals|str\adddot|str\adddot
+columntotal|stupac|stupac
+columntotals|stupaca|stupaca
+linetotal|linija|lin\adddot
+linetotals|linija|lin\adddot
+versetotal|stih|st\adddot
+versetotals|stihova|st\adddot
+sectiontotal|odjeljak|odj\adddot
+sectiontotals|odjeljaka|odj\adddot
+paragraphtotal|stavak|st\adddot
+paragraphtotals|stavaka|st\adddot
+in||
+inseries|u seriji|u seriji
+ofseries|iz serije|iz serije
+number|broj|br\adddot
+chapter|poglavlje|pogl\adddot
+bathesis|diplomski rad|dipl\adddotspace rad
+mathesis|magistarski rad|mag\adddotspace rad
+phdthesis|doktorska disertacija|disertacija
+software|softver|softver
+datacd|CD-ROM|CD-ROM
+audiocd|audio CD|audio CD
+version|verzija|verzija
+url|adresa|adresa
+urlfrom|dostupno na|dost\adddotspace na
+urlseen|pogledano|pogledano
+inpreparation|u pripremi|u pripremi
+submitted|predan|predan
+inpress|u tisku|u tisku
+prepublished|pred objavom|pred obj\adddot
+citedas|dalje citirano kao|dalje citirano kao
+thiscite|napose|napose
+quotedin|citirano u|citirano u
+idem|idem|idem
+idemsm|idem|idem
+idemsf|eadem|eadem
+idemsn|idem|idem
+idempm|eidem|eidem
+idempf|eaedem|eaedem
+idempn|eadem|eadem
+idempp|eidem|eidem
+ibidem|ibidem|ibid\adddot
+opcit|op\adddotspace cit\adddot|op\adddotspace cit\adddot
+loccit|loc\adddotspace cit\adddot|loc\adddotspace cit\adddot
+confer|usporedi|usp\adddot
+sequens|sq\adddot|sq\adddot
+sequentes|sqq\adddot|sqq\adddot
+passim|passim|pass\adddot
+see|vidi|v\adddot
+seealso|pogledaj i|pogl\adddotspace i
+backrefpage|citirano na stranci|cit\adddotspace na str\adddot
+backrefpages|cited on pages|cit\adddotspace na str\adddot
+april|travanj|travanj
+may|svibanj|svibanj
+june|lipanj|lipanj
+july|srpanj|srpanj
+august|kolovoz|kolovoz
+september|rujan|rujan
+october|listopad|listopad
+november|studeni|studeni
+december|prosinac|prosinac
+dateapril|travnja|travnja
+datemay|svibnja|svibnja
+datejune|lipnja|lipnja
+datejuly|srpnja|srpnja
+dateaugust|kolovoza|kolovoza
+dateseptember|rujna|rujna
+dateoctober|listopada|listopada
+datenovember|studenoga|studenoga
+datedecember|prosinca|prosinca
+langamerican|engleski|engleski
+langbrazilian|portugalski|portugalski
+langbulgarian|bugarski|bugarski
+langcatalan|katalonski|katalonski
+langcroatian|hrvatski|hrvatski
+langdanish|danski|danski
+langdutch|nizozemski|nizozemski
+langenglish|engleski|engleski
+langestonian|estonski|estonski
+langfinnish|finski|finski
+langfrench|francuski|francuski
+langgalician|galicijski|galicijski
+langhungarian|ma\dj arski|ma\dj arski
+langitalian|talijanski|talijanski
+langjapanese|japanski|japanski
+langlatin|latinski|latinski
+langlatvian|letonski|letonski
+langpolish|poljski|poljski
+langportuguese|portugalski|portugalski
+langrussian|ruski|ruski
+langslovene|slovenski|slovenski
+langukrainian|ukrajinski|ukrajinski
+fromamerican|s engleskog|s engleskog
+frombrazilian|s portugalskog|s portugalskog
+frombulgarian|s bugarskog|s bugarskog
+fromcatalan|s katalonskog|s katalonskog
+fromcroatian|s hrvatskog|s hrvatskog
+fromdanish|s danskog|s danskog
+fromdutch|s nizozemskog|s nizozemskog
+fromenglish|s engleskog|s engleskog
+fromestonian|s estonskog|s estonskog
+fromfinnish|s finskog|s finskog
+fromfrench|s francuskog|s francuskog
+fromgalician|s galicijskog|s galicijskog
+fromhungarian|s ma\dj arskog|s ma\dj arskog
+fromitalian|s talijanskog|s talijanskog
+fromjapanese|s japanskog|s japanskog
+fromlatin|s latinskog|s latinskog
+fromlatvian|s letonskog|s letonskog
+frompolish|s poljskog|s poljskog
+fromportuguese|s portugalskog|s portugalskog
+fromrussian|s ruskog|s ruskog
+fromslovene|sa slovenskog|sa slovenskog
+fromukrainian|s ukrajinskog|s ukrajinskog
+countryeu|Europska unija|EU
+countryep|Europska unija|EP
+countryfr|Francuska|FR
+countryuk|Velika Britanija|GB
+patent|patent|pat\adddot
+patenteu|europski patent|europski pat\adddot
+patentfr|francuski patent|francuski pat\adddot
+patentuk|britanski patent|britanski pat\adddot
+patentus|US patent|US pat\adddot
+patreq|patentni zahtjev|pat\adddot\ zahtjev
+patreqeu|europski patentni zahtjev|EU pat\adddotspace zahtjev
+patrequs|US patentni zahtjev|US pat\adddot\ zahtjev
+file|datoteka|datoteka
+library|biblioteka|biblioteka
+commonera|n\adddotspace e\adddot|n\adddotspace e\adddot
+beforecommonera|pr\adddotspace n\adddotspace e\adddot|pr\adddotspace n\adddotspace e\adddot
+annodomini|poslije Krista|p\adddotspace Kr\adddot
+beforechrist|prije Krista|pr\adddotspace Kr\adddot
+circa|oko|cca\adddot
+summer|ljeto|ljeto
+autumn|jesen|jesen
+winter|zima|zima
+am|prije podne|AM
+pm|poslije podne|PM
diff --git a/citeproc/biblatex-localization/czech.lbx.strings b/citeproc/biblatex-localization/czech.lbx.strings
new file mode 100644
index 000000000..15377aca9
--- /dev/null
+++ b/citeproc/biblatex-localization/czech.lbx.strings
@@ -0,0 +1,91 @@
+bibliography|Bibliografie|Bibliografie
+references|Odkazy|Odkazy
+shorthands|Seznam zkratek|Zkratky
+editor|editor|ed\adddot
+compiler|sestavil|sest\adddot
+compilers|sestavili|sest\adddot
+redactor|redaktor|red\adddot
+reviser|korektor|kor\adddot
+founder|zakladatel|zakl\adddot
+annotations|anotace|anot\adddot
+afterword|doslov|dosl\adddot
+byauthor||
+bycompiler|sestaveno|sest\adddot
+withannotator|s\addnbspace anotacemi od|s\addnbspace anot\adddot\ od
+withafterword|s\addnbspace doslovem od|s\addnbspace dosl\adddot\ od
+and|a|a
+andothers|et\addabbrvspace al\adddot|et\addabbrvspace al\adddot
+andmore|et\addabbrvspace al\adddot|et\addabbrvspace al\adddot
+volume|svazek|sv\adddot
+volumes|svazky|sv\adddot
+involumes|in|in
+book|kniha|kniha
+reprint|dotisk|dotisk
+reprintof|dotisk|dotisk
+reprintas|dotisknuto jako|dotisknuto jako
+reprintfrom|dotisknuto z\addnbspace|dotisknuto z\addnbspace
+reviewof|recenze|recenz\adddot
+astitle|jako|jako
+bypublisher||
+page|strana|s\adddot
+pages|strany|s\adddot
+column|sloupec|sl\adddot
+columns|sloupce|sl\adddot
+section|sekce|\S
+sections|sekce|\S\S
+paragraph|odstavec|ods\adddot
+paragraphs|odstavce|ods\adddot
+pagetotal|strana|s\adddot
+pagetotals|strany|s\adddot
+columntotal|sloupec|sl\adddot
+columntotals|sloupce|sl\adddot
+sectiontotal|sekce|\S
+sectiontotals|sekce|\S\S
+paragraphtotal|odstavec|ods\adddot
+paragraphtotals|odstavce|ods\adddot
+in|in|in
+inseries|in|in
+ofseries|z|z
+chapter|kapitola|kap\adddot
+datacd|CD-ROM|CD-ROM
+audiocd|audio CD|audio CD
+version|verze|ver\adddot
+url|URL|URL
+inpress|v\addnbspace tisku|v\addnbspace tisku
+idem|idem|idem
+idemsm|idem|idem
+idemsf|eadem|eadem
+idemsn|idem|idem
+idempm|eidem|eidem
+idempf|eaedem|eaedem
+idempn|eadem|eadem
+idempp|eidem|eidem
+ibidem|ibidem|ibid\adddot
+opcit|op\adddotspace cit\adddot|op\adddotspace cit\adddot
+loccit|loc\adddotspace cit\adddot|loc\adddotspace cit\adddot
+confer|cf\adddot|cf\adddot
+sequens|sq\adddot|sq\adddot
+sequentes|sqq\adddot|sqq\adddot
+passim|passim|pass\adddot
+see|viz|viz
+january|leden|led\adddot
+april|duben|dub\adddot
+august|srpen|srp\adddot
+november|listopad|lis\adddot
+december|prosinec|pros\adddot
+langlatin|latina|lat\adddot
+fromlatin|z\addnbspace latiny|z\addnbspace lat\adddot
+countryfr|Francie|FR
+patent|patent|pat\adddot
+patentus|US patent|US pat\adddot
+file|soubor|soub\adddot
+library|knihovna|knih\adddot
+abstract|abstrakt|abst\adddot
+annotation|anotace|anot\adddot
+annodomini|po Kristu|po Kr\adddot
+circa|cirka|ca\adddot
+spring|jaro|jaro
+autumn|podzim|podzim
+winter|zima|zima
+am|AM|AM
+pm|PM|PM
diff --git a/citeproc/biblatex-localization/danish.lbx.strings b/citeproc/biblatex-localization/danish.lbx.strings
new file mode 100644
index 000000000..cedfc337b
--- /dev/null
+++ b/citeproc/biblatex-localization/danish.lbx.strings
@@ -0,0 +1,106 @@
+bibliography|Bibliografi|Bibliografi
+references|Litteraturhenvisninger|Litteratur
+shorthands|Forkortelser|Forkortelser
+editor|redakt\o r|red\adddot
+editors|redakt\o rer|red\adddot
+compiler|kompilator|kompilator
+compilers|kompilatorer|kompilatorer
+redactor|medredakt\o r|medred\adddot
+redactors|medredakt\o rer|medred\adddot
+reviser|revision|rev\adddot
+revisers|revision|rev\adddot
+founder|stifter|stifter
+founders|stiftere|stiftere
+continuator|videref\o rer|videref\adddot
+continuators|videref\o rere|videref\adddot
+collaborator|medarbejder|medarb\adddot
+collaborators|medarbejdere|medarb\adddot
+translator|overs\ae tter|overs\adddot
+translators|overs\ae ttere|overs\adddot
+commentator|kommentator|komm\adddot
+commentators|kommentatorer|komm\adddot
+annotator|kommentator|komm\adddot
+annotators|kommentatorer|komm\adddot
+commentary|kommentar|komm\adddot
+annotations|annoteringer|ann\adddot
+introduction|indledning|indl\adddot
+foreword|forord|forord
+afterword|efterord|efterord
+organizer|organisator|org\adddot
+organizers|organisatorer|org\adddot
+byorganizer|organiseret af|org\adddotspace av
+byauthor|af|af
+byeditor|redigeret af|red\adddotspace af
+bycompiler|kompileret af|komp\adddotspace af
+byredactor|bearbejdet af|bearb\adddotspace af
+byreviser|revideret af|rev\adddotspace af
+byreviewer|bed\o mt af|bed\adddotspace af
+byfounder|stiftet af|stiftet af
+bycontinuator|videref\o rt af|videref\adddotspace af
+bycollaborator|i samarbejde med|i samarb\adddotspace m\adddot
+bycommentator|kommenteret af|komm\adddot\ af
+byannotator|annoteret af|ann\adddot\ af
+withcommentator|med kommentarer af|m\adddotspace komm\adddot\ af
+withannotator|med annoteringer af|m\adddotspace ann\adddot\ af
+withintroduction|med indledning af|m\adddotspace indl\adddot\ af
+withforeword|med forord af|m\adddotspace forord af
+withafterword|med efterord af|m\adddotspace efterord af
+and|og|og
+andothers|med flere|m.fl\adddot
+andmore|med mere|m.m\adddot
+volume|bind|bd\adddot
+volumes|bind|bd\adddot
+involumes|i|i
+jourvol|\aa rgang|\aa rg\adddot
+jourser|r\ae kke|rk\adddot
+book|bog|bog
+part|del|del
+issue|nummer|nr\adddot
+newseries|ny r\ae kke|ny rk\adddot
+oldseries|gammel r\ae kke|gl. rk\adddot
+edition|udgave|udg\adddot
+reprint|genoptryk|genoptr\adddot
+reprintof|genoptryk af|genoptr\adddot\ af
+reprintas|genoptryk under titlen|genoptr\adddot\ under titlen
+reprintfrom|genoptryk fra|genoptr\adddot\ fra
+translationof|overs\ae ttelse af|overs\adddot\ af
+translationas|oversat under titlen|overs\adddotspace\ under titlen
+translationfrom|oversat fra|overs\adddotspace\ fra
+reviewof|bed\o mmelse af|bed\adddotspace af
+origpubas|oprindeligt udgivet som|opr\adddot\ udg\adddot\ som
+origpubin|oprindeligt udgivet i|opr\adddot\ udg\adddot\ i
+astitle|under titlen|under titlen
+bypublisher|af|af
+nodate|uden \aa rstal|u.\aa\adddot
+page|side|s\adddot
+pages|sider|s\adddot
+column|spalte|sp\adddot
+columns|spalter|sp\adddot
+line|linje|l\adddot
+lines|linjer|l\adddot
+verse|vers|v\adddot
+verses|vers|v\adddot
+section|paragraf|par\adddot
+sections|paragraffer|par\adddot
+paragraph|afsnit|afsn\adddot
+paragraphs|afsnit|afsn\adddot
+pagetotal|side|s\adddot
+pagetotals|sider|s\adddot
+columntotal|spalte|sp\adddot
+columntotals|spalter|sp\adddot
+line|linje|l\adddot
+lines|linjer|l\adddot
+verse|vers|v\adddot
+verses|vers|v\adddot
+linetotal|linje|l\adddot
+linetotals|linje|l\adddot
+versetotal|vers|v\adddot
+versetotals|vers|v\adddot
+sectiontotal|paragraf|par\adddot
+sectiontotals|paragraffer|par\adddot
+paragraphtotal|afsnit|afsn\adddot
+paragraphtotals|afsnit|afsn\adddot
+in|i|i
+inseries|i r\ae kken|i rk\adddot
+ofseries|fra r\ae kken|fra rk\adddot
+number|nummer|nr\adddot
diff --git a/citeproc/biblatex-localization/dutch.lbx.strings b/citeproc/biblatex-localization/dutch.lbx.strings
new file mode 100644
index 000000000..9d4cee166
--- /dev/null
+++ b/citeproc/biblatex-localization/dutch.lbx.strings
@@ -0,0 +1,23 @@
+bibliography|Bibliografie|Bibliografie
+references|Referenties|Referenties
+shorthands|Lijst van afkortingen|Afkortingen
+editor|redacteur|red\adddot
+editors|redacteurs|red\adddot
+compiler|samensteller|samenst\adddot
+compilers|samenstellers|samenst\adddot
+founder|oprichter|opr\adddot
+founders|oprichters|opr\adddot
+continuator|opvolger|opv\adddot
+continuators|opvolgers|opv\adddot
+redactor|redacteur|red\adddot
+redactors|redacteuren|red\adddot
+reviser|revisor|rev\adddot
+revisers|revisors|rev\adddot
+collaborator|medewerker|med\adddot
+collaborators|medewerkers|med\adddot
+translator|vertaler|vert\adddot
+translators|vertalers|vert\adddot
+commentator|commentator|comm\adddot
+commentators|commentatoren|comm\adddot
+annotator|annotator|annot\adddot
+annotators|annotatoren|annot\adddot
diff --git a/citeproc/biblatex-localization/english.lbx.strings b/citeproc/biblatex-localization/english.lbx.strings
new file mode 100644
index 000000000..67a1cb877
--- /dev/null
+++ b/citeproc/biblatex-localization/english.lbx.strings
@@ -0,0 +1,254 @@
+bibliography|Bibliography|Bibliography
+references|References|References
+shorthands|List of Abbreviations|Abbreviations
+editor|editor|ed\adddot
+editors|editors|eds\adddot
+compiler|compiler|comp\adddot
+compilers|compilers|comp\adddot
+redactor|redactor|red\adddot
+redactors|redactors|red\adddot
+reviser|reviser|rev\adddot
+revisers|revisers|rev\adddot
+founder|founder|found\adddot
+founders|founders|found\adddot
+continuator|continued|cont\adddot
+continuators|continued|cont\adddot
+collaborator|collaborator|collab\adddot
+collaborators|collaborators|collab\adddot
+translator|translator|trans\adddot
+translators|translators|trans\adddot
+commentator|commentator|comm\adddot
+commentators|commentators|comm\adddot
+annotator|annotator|annot\adddot
+annotators|annotators|annot\adddot
+commentary|commentary|comm\adddot
+annotations|annotations|annot\adddot
+introduction|introduction|intro\adddot
+foreword|foreword|forew\adddot
+afterword|afterword|afterw\adddot
+organizer|organizer|org\adddot
+organizers|organizers|orgs\adddot
+byorganizer|organized by|org\adddotspace by
+byauthor|by|by
+byeditor|edited by|ed\adddotspace by
+bycompiler|compiled by|comp\adddotspace by
+byredactor|redacted by|red\adddotspace by
+byreviser|revised by|rev\adddotspace by
+byreviewer|reviewed by|rev\adddotspace by
+byfounder|founded by|found\adddotspace by
+bycontinuator|continued by|cont\adddotspace by
+bycollaborator|in collaboration with|in collab\adddotspace with
+bytranslator|translated \lbx@lfromlang\ by|trans\adddot\ \lbx@sfromlang\ by
+bycommentator|commented by|comm\adddot\ by
+byannotator|annotated by|annot\adddot\ by
+withcommentator|with a commentary by|with a comment\adddot\ by
+withannotator|with annotations by|with annots\adddot\ by
+withintroduction|with an introduction by|with an intro\adddot\ by
+withforeword|with a foreword by|with a forew\adddot\ by
+withafterword|with an afterword by|with an afterw\adddot\ by
+and|and|and
+andothers|et\addabbrvspace al\adddot|et\addabbrvspace al\adddot
+andmore|et\addabbrvspace al\adddot|et\addabbrvspace al\adddot
+volume|volume|vol\adddot
+volumes|volumes|vols\adddot
+involumes|in|in
+jourvol|volume|vol\adddot
+jourser|series|ser\adddot
+book|book|book
+part|part|part
+issue|issue|issue
+newseries|new series|new ser\adddot
+oldseries|old series|old ser\adddot
+edition|edition|ed\adddot
+reprint|reprint|repr\adddot
+reprintof|reprint of|repr\adddotspace of
+reprintas|reprinted as|rpt\adddotspace as
+reprintfrom|reprinted from|repr\adddotspace from
+reviewof|review of|rev\adddotspace of
+translationof|translation of|trans\adddotspace of
+translationas|translated as|trans\adddotspace as
+translationfrom|translated from|trans\adddotspace from
+origpubas|originally published as|orig\adddotspace pub\adddotspace as
+origpubin|originally published in|orig\adddotspace pub\adddotspace in
+astitle|as|as
+bypublisher|by|by
+nodate|no date|n\adddot d\adddot
+page|page|p\adddot
+pages|pages|pp\adddot
+column|column|col\adddot
+columns|columns|cols\adddot
+line|line|l\adddot
+lines|lines|ll\adddot
+verse|verse|v\adddot
+verses|verses|vv\adddot
+section|section|\S
+sections|sections|\S\S
+paragraph|paragraph|par\adddot
+paragraphs|paragraphs|par\adddot
+pagetotal|page|p\adddot
+pagetotals|pages|pp\adddot
+columntotal|column|col\adddot
+columntotals|columns|cols\adddot
+linetotal|line|l\adddot
+linetotals|lines|ll\adddot
+versetotal|verse|v\adddot
+versetotals|verses|vv\adddot
+sectiontotal|section|\S
+sectiontotals|sections|\S\S
+paragraphtotal|paragraph|par\adddot
+paragraphtotals|paragraphs|par\adddot
+in|in|in
+inseries|in|in
+ofseries|of|of
+number|number|no\adddot
+chapter|chapter|chap\adddot
+bathesis|Bachelor's thesis|BA\addabbrvspace thesis
+mathesis|Master's thesis|MA\addabbrvspace thesis
+phdthesis|PhD\addabbrvspace thesis|PhD\addabbrvspace thesis
+candthesis|Candidate thesis|Cand\adddotspace thesis
+resreport|research report|research rep\adddot
+techreport|technical report|tech\adddotspace rep\adddot
+software|computer software|comp\adddotspace software
+datacd|CD-ROM|CD-ROM
+audiocd|audio CD|audio CD
+version|version|version
+url|address|address
+urlfrom|available from|available from
+urlseen|visited on|visited on
+inpreparation|in preparation|in preparation
+submitted|submitted|submitted
+forthcoming|forthcoming|forthcoming
+inpress|in press|in press
+prepublished|pre-published|pre-published
+citedas|henceforth cited as|henceforth cited as
+thiscite|especially|esp\adddot
+seenote|see note|see n\adddot
+quotedin|quoted in|qtd\adddotspace in
+idem|idem|idem
+idemsm|idem|idem
+idemsf|eadem|eadem
+idemsn|idem|idem
+idempm|eidem|eidem
+idempf|eaedem|eaedem
+idempn|eadem|eadem
+idempp|eidem|eidem
+ibidem|ibidem|ibid\adddot
+opcit|op\adddotspace cit\adddot|op\adddotspace cit\adddot
+loccit|loc\adddotspace cit\adddot|loc\adddotspace cit\adddot
+confer|cf\adddot|cf\adddot
+sequens|sq\adddot|sq\adddot
+sequentes|sqq\adddot|sqq\adddot
+passim|passim|pass\adddot
+see|see|see
+seealso|see also|see also
+backrefpage|cited on page|cit\adddotspace on p\adddot
+backrefpages|cited on pages|cit\adddotspace on pp\adddot
+january|January|Jan\adddot
+february|February|Feb\adddot
+march|March|Mar\adddot
+april|April|Apr\adddot
+may|May|May
+june|June|June
+july|July|July
+august|August|Aug\adddot
+september|September|Sept\adddot
+october|October|Oct\adddot
+november|November|Nov\adddot
+december|December|Dec\adddot
+langamerican|American|American
+langbrazilian|Brazilian|Brazilian
+langbulgarian|Bulgarian|Bulgarian
+langcatalan|Catalan|Catalan
+langcroatian|Croatian|Croatian
+langczech|Czech|Czech
+langdanish|Danish|Danish
+langdutch|Dutch|Dutch
+langenglish|English|English
+langestonian|Estonian|Estonian
+langfinnish|Finnish|Finnish
+langfrench|French|French
+langgalician|Galician|Galician
+langgerman|German|German
+langgreek|Greek|Greek
+langhungarian|Hungarian|Hungarian
+langitalian|Italian|Italian
+langjapanese|Japanese|Japanese
+langlatin|Latin|Latin
+langlatvian|Latvian|Latvian
+langlithuanian|Lithuanian|Lithuanian
+langnorwegian|Norwegian|Norwegian
+langpolish|Polish|Polish
+langportuguese|Portuguese|Portuguese
+langrussian|Russian|Russian
+langserbian|Serbian|Serbian
+langslovak|Slovak|Slovak
+langslovene|Slovene|Slovene
+langspanish|Spanish|Spanish
+langswedish|Swedish|Swedish
+langturkish|Turkish|Turkish
+langukrainian|Ukrainian|Ukrainian
+fromamerican|from the American|from the American
+frombrazilian|from the Brazilian|from the Brazilian
+frombulgarian|from the Bulgarian|from the Bulgarian
+fromcatalan|from the Catalan|from the Catalan
+fromcroatian|from the Croatian|from the Croatian
+fromczech|from the Czech|from the Czech
+fromdanish|from the Danish|from the Danish
+fromdutch|from the Dutch|from the Dutch
+fromenglish|from the English|from the English
+fromestonian|from the Estonian|from the Estonian
+fromfinnish|from the Finnish|from the Finnish
+fromfrench|from the French|from the French
+fromgalician|from the Galician|from the Galician
+fromgerman|from the German|from the German
+fromgreek|from the Greek|from the Greek
+fromhungarian|from the Hungarian|from the Hungarian
+fromitalian|from the Italian|from the Italian
+fromjapanese|from the Japanese|from the Japanese
+fromlatin|from the Latin|from the Latin
+fromlatvian|from the Latvian|from the Latvian
+fromlithuanian|from the Lithuanian|from the Lithuanian
+fromnorwegian|from the Norwegian|from the Norwegian
+frompolish|from the Polish|from the Polish
+fromportuguese|from the Portuguese|from the Portuguese
+fromrussian|from the Russian|from the Russian
+fromserbian|from the Serbian|from the Serbian
+fromslovak|from the Slovak|from the Slovak
+fromslovene|from the Slovene|from the Slovene
+fromspanish|from the Spanish|from the Spanish
+fromswedish|from the Swedish|from the Swedish
+fromturkish|from the Turkish|from the Turkish
+fromukrainian|from the Ukrainian|from the Ukrainian
+countryde|Germany|DE
+countryeu|European Union|EU
+countryep|European Union|EP
+countryfr|France|FR
+countryuk|United Kingdom|GB
+countryus|United States of America|US
+patent|patent|pat\adddot
+patentde|German patent|German pat\adddot
+patenteu|European patent|European pat\adddot
+patentfr|French patent|French pat\adddot
+patentuk|British patent|British pat\adddot
+patentus|U.S\adddotspace patent|U.S\adddotspace pat\adddot
+patreq|patent request|pat\adddot\ req\adddot
+patreqde|German patent request|German pat\adddot\ req\adddot
+patreqeu|European patent request|European pat\adddot\ req\adddot
+patreqfr|French patent request|French pat\adddot\ req\adddot
+patrequk|British patent request|British pat\adddot\ req\adddot
+patrequs|U.S\adddotspace patent request|U.S\adddotspace pat\adddot\ req\adddot
+file|file|file
+library|library|library
+abstract|abstract|abstract
+annotation|annotations|annotations
+commonera|Common Era|CE
+beforecommonera|Before Common Era|BCE
+annodomini|Anno Domini|AD
+beforechrist|Before Christ|BC
+circa|circa|ca\adddot
+spring|Spring|Spr\adddot
+summer|Summer|Sum\adddot
+autumn|Autumn|Aut\adddot
+winter|Winter|Win\adddot
+am|AM|AM
+pm|PM|PM
diff --git a/citeproc/biblatex-localization/estonian.lbx.strings b/citeproc/biblatex-localization/estonian.lbx.strings
new file mode 100644
index 000000000..8646704f4
--- /dev/null
+++ b/citeproc/biblatex-localization/estonian.lbx.strings
@@ -0,0 +1,178 @@
+bibliography|bibliograafia|bibliograafia
+references|viited|viited
+editor|toimetaja|toim\adddot
+editors|toimetajad|toim\adddot
+compiler|koostaja|koost\adddot
+compilers|koostajad|koost\adddot
+redactor|toimetaja|toim\adddot
+redactors|toimetajad|toim\adddot
+reviser|toimetaja|toim\adddot
+revisers|toimetajad|toim\adddot
+founder|asutaja|asutaja
+founders|asutajad|asutajad
+commentator|kommenteerija|kommenteerija
+commentators|kommenteerijad|kommenteerijad
+annotator|kommenteerija|kommenteerija
+annotators|kommenteerijad|kommenteerijad
+commentary|kommentaarid|kommentaarid
+annotations|kommentaarid|kommentaarid
+introduction|sissejuhatus|sissejuhatus
+organizer|korraldaja|korraldaja
+organizers|korraldajad|korraldajad
+byorganizer|korraldanud|korraldanud
+byauthor|kirjutanud|kirj\adddot
+byeditor|toimetanud|toim\adddot
+bycompiler|koostanud|koost\adddot
+byredactor|toimetanud|toim\adddot
+byreviewer|vaadanud|vaadanud
+byfounder|asutanud|asutanud
+bycommentator|kommenteerinud|kommenteerinud
+byannotator|kommenteerinud|kommenteerinud
+withcommentator|koos kommentaaridega|koos kommentaaridega
+withannotator|koos kommentaaridega|koos kommentaaridega
+withintroduction|koos tutvustusega|koos tutvustusega
+and|ja|ja
+involumes|osas|osas
+jourser|seeria|seeria
+book|raamat|raamat
+part|osa|osa
+issue|number|nr\adddot
+newseries|uus seerias|uus seer\adddot
+oldseries|vana seeria|vana seer\adddot
+reviewof|arvustus teosest|arvustus teosest
+origpubas|algselt avaldatud kui|algselt avaldatud kui
+origpubin|algselt avaldatud aastal|algselt avaldatud aastal
+astitle|pealkirjaga|pealkirjaga
+column|veerg|veerg
+columns|veerud|veerud
+line|rida|rida
+lines|read|read
+verse|salm|salm
+verses|salmid|salmid
+section|jagu|jagu
+sections|jaod|jaod
+columntotal|veerge kokku|veerge kokku
+columntotals|veergusid kokku|veergusid kokku
+linetotal|ridu kokku|ridu kokku
+linetotals|ridasid kokku|ridasid kokku
+versetotal|salmi kokku|salmi kokku
+versetotals|salmesid kokku|salmesid kokku
+sectiontotal|jagusid kokku|jagusid kokku
+sectiontotals|jagusid kokku|jagusid kokku
+in|teoses|teoses
+inseries|sarjas|sarjas
+ofseries|sarjast|sarjast
+number|number|nr
+resreport|uuringuraport|uuringuraport
+techreport|tehniline raport|tehniline raport
+software|tarkvara|tarkvara
+datacd|CD-ROM|CD-ROM
+audiocd|audioplaat|audioplaat
+version|versioon|versioon
+url|aadress|aadress
+urlfrom|saadaval|saadaval
+urlseen|vaadatud|vaadatud
+inpreparation|koostamisel|koostamisel
+submitted|esitatud|esitatud
+forthcoming|tulevases|tulevases
+citedas|edaspidi viidatud kui|edaspidi viidatud kui
+thiscite|eriti|eriti
+quotedin|noteeritud|noteeritud
+see|vaata|vt
+seealso|vaata ka|vt ka
+backrefpage|viidatud lehel|viidatud lehel
+january|jaanuar|jaanuar
+february|veebruar|veebruar
+april|aprill|aprill
+may|mai|mai
+june|juuni|juuni
+july|juuli|juuli
+august|august|august
+september|september|september
+october|oktoober|oktoober
+november|november|november
+december|detsember|detsember
+langamerican|Ameerika inglise keel|Ameerika inglise keel
+langbrazilian|brasiilia keel|brasiilia keel
+langbulgarian|bulgaaria keel|bulgaaria keel
+langcatalan|katalaani keel|katalaani keel
+langcroatian|horvaadi keel|horvaadi keel
+langdanish|taani keel|taani keel
+langdutch|hollandi keel|hollandi keel
+langenglish|inglise keel|inglise keel
+langestonian|eesti keel|eesti keel
+langfinnish|soome keel|soome keel
+langfrench|prantsuse keel|prantsuse keel
+langgalician|galeegi keel|galeegi keel
+langgerman|saksa keel|saksa keel
+langgreek|kreeka keel|kreeka keel
+langhungarian|ungari keel|ungari keel
+langitalian|itaalia keel|itaalia keel
+langjapanese|jaapani keel|jaapani keel
+langlatin|ladina keel|ladina keel
+langnorwegian|norra keel|norra keel
+langpolish|poola keel|poola keel
+langportuguese|portugali keel|portugali keel
+langrussian|vene keel|vene keel
+langslovak|slovakia keel|slovakia keel
+langslovene|sloveeni keel|sloveeni keel
+langspanish|hispaania keel|hispaania keel
+langswedish|rootsi keel|rootsi keel
+langukrainian|ukraina keel|ukraina keel
+fromamerican|Ameerika inglise keelest|Ameerika inglise keelest
+frombrazilian|brasiilia keelest|brasiilia keelest
+frombulgarian|bulgaaria keelest|bulgaaria keelest
+fromcatalan|katalani keelest|kalatalani keelest
+fromcroatian|horvaadi keelest|horvaadi keelest
+fromdanish|taani keelest|taani keelest
+fromdutch|hollandi keelest|hollandi keelest
+fromenglish|inglise keelest|inglise keelest
+fromestonian|eesti keelest|eesti keelest
+fromfinnish|soome keelest|soome keelest
+fromfrench|prantsuse keelest|prantsuse keelest
+fromgalician|galeegi keelest|galeegi keelest
+fromgerman|saksa keelest|saksa keelest
+fromgreek|kreeka keelest|kreeka keelest
+fromhungarian|ungari keelest|ungari keelest
+fromitalian|itaalia keelest|itaalia keelest
+fromjapanese|jaapani keelest|jaapani keelest
+fromlatin|ladina keelest|ladina keelest
+fromnorwegian|norra keelest|norra keelest
+fromportuguese|portugali keelest|portugali keelest
+fromrussian|vene keelest|vene keelest
+fromslovak|slovakia keelest|slovakia keelest
+fromslovene|sloveenia keelest|sloveenia keelest
+fromspanish|hispaania keelest|hispaania keelest
+fromswedish|rootsi keelest|rootsi keelest
+fromukrainian|ukraina keelest|ukraina keelest
+countryde|Saksamaa|DE
+countryeu|Euroopa Liit|EL
+countryep|Euroopa Parlament|EP
+countryfr|Prantsusmaa|FR
+countryuk|Suurbritannia|GB
+countryus|Ameerika|US
+patent|patent|pat\adddot
+patentde|Saksa patent|Saksa pat\adddot
+patenteu|Euroopa patent|Euroopa pat\adddot
+patentfr|Prantsuse patent|Prantsuse pat\adddot
+patentuk|Briti patent|Briti pat\adddot
+patentus|U.S\adddotspace patent|U.S\adddotspace pat\adddot
+patreq|patendi taotlus|pat\adddotspace taotl\adddot
+patreqde|Saksa patendi taotlus|Saksa pat\adddotspace taotl\adddot
+patreqeu|Euroopa patendi taotlus|Euroopa pat\adddotspace taotl\adddot
+patreqfr|Prantsuse patendi taotlus|Prantsuse pat\adddotspace taotl\adddot
+patrequk|Briti patendi taotlus|Briti pat\adddotspace taotl\adddot
+patrequs|U.S\adddotspace patendi taotlus.|U.S\adddotspace pat\adddotspace taotl\adddot
+file|fail|fail
+library|raamatukogu|raamatukogu
+abstract|teesid|teesid
+annotation|kommentaarid|kommentaarid
+commonera|meie ajaarvamise j\"argi|m\adddot a\adddot j
+beforecommonera|enne meie ajaarvamist|e\adddot m\adddot a
+annodomini|p\"arast Kristust|pKr
+beforechrist|enne Kristust|eKr
+spring|kevadel|kevadel
+summer|suvel|suvel
+winter|talvel|talvel
+am|AM|AM
+pm|PM|PM
diff --git a/citeproc/biblatex-localization/finnish.lbx.strings b/citeproc/biblatex-localization/finnish.lbx.strings
new file mode 100644
index 000000000..86120c07d
--- /dev/null
+++ b/citeproc/biblatex-localization/finnish.lbx.strings
@@ -0,0 +1,254 @@
+bibliography|Kirjallisuusluettelo|Kirjallisuus
+references|Viitteet|Viitteet
+shorthands|Lyhenteet|Lyhenteet
+editor|toimittanut|toim\adddot
+editors|toimittaneet|toim\adddot
+compiler|koontanut|koontanut
+compilers|koontaneet|koontaneet
+redactor|toimittanut|toim\adddot
+redactors|toimittaneet|toim\adddot
+reviser|toimittanut|toim\adddot
+revisers|toimittaneet|toim\adddot
+founder|perustaja|perustaja
+founders|perustajat|perustajat
+continuator|jatkaja|jatkaja
+continuators|jatkajat|jatkajat
+collaborator|avustaja|avustaja
+collaborators|avustajat|avustajat
+translator|k\"a\"ant\"anyt|k\"a\"ant\adddot
+translators|k\"a\"ant\"anyt|k\"a\"ant\adddot
+commentator|kommentaarin kirjoittanut|kommentaarin kirjoittanut
+commentators|kommentaarin kirjoittaneet|kommentaarin kirjoittaneet
+annotator|selityksin varustanut|selityksin varustanut
+annotators|selityksin varustaneet|selityksin varustaneet
+commentary|kommentaari|kommentaari
+annotations|selitykset|selitykset
+introduction|johdanto|johdanto
+foreword|esipuhe|esipuhe
+afterword|j\"alkisanat|j\"alkisanat
+organizer|toimittanut|toim\adddot
+organizers|toimittaneet|toim\adddot
+byorganizer|toimittanut|toim\adddot
+byauthor|kirjoittanut|kirj\adddot
+byeditor|toimittanut|toim\adddot
+bycompiler|koontanut|koontanut
+byredactor|toimittanut|toim\adddot
+byreviser|toimittanut|toim\adddot
+byreviewer|toimittanut|toim\adddot
+byfounder|perustanut|perustanut
+bycontinuator|jatkanut|jatkanut
+bycollaborator|yhteisty\"oss\"a|yhteisty\"oss\"a
+bytranslator|\lbx@lfromlang k\"a\"ant\"anyt|\lbx@sfromlang k\"a\"ant\adddot
+bycommentator|kommentaarin kirjoittanut|kommentaarin kirjoittanut
+byannotator|selityksin varustanut|selityksin varustanut
+withcommentator|kommentaarin kirjoittanut|kommentaarin kirjoittanut
+withannotator|selityksin varustanut|selityksin varustanut
+withintroduction|johdannon kirjottanut|johdannon kirjottanut
+withforeword|esipuheen kirjoittanut|esipuheen kirjoittanut
+withafterword|j\"alkisanat kirjoittanut|j\"alkisanat kirjoittanut
+and|ja|ja
+andothers|et\addabbrvspace al\adddot|et\addabbrvspace al\adddot
+andmore|jne\adddot|jne\adddot
+volume|volyymi|vol\adddot
+volumes|volyymit|vol\adddot
+involumes||
+jourvol|volyymi|vol\adddot
+jourser|sarja|sarja
+book|kirja|kirja
+part|osa|osa
+issue|numero|numero
+newseries|uusi sarja|uusi sarja
+oldseries|vanha sarja|vanha sarja
+edition|painos|painos
+reprint|j\"alkipainos|j\"alkipainos
+reprintof|julkaistu aiemmin nimell\"a|julkaistu aiemmin nimell\"a
+reprintas|julkaistu uudelleen nimell\"a|julkaistu uudelleen nimell\"a
+reprintfrom|julkaistu aiemmin nimell\"a|julkaistu aiemmin nimell\"a
+translationof|k\"a\"ann\"os teoksesta|k\"a\"ann\"os teoksesta
+translationas|k\"a\"annetty nimell\"a|k\"a\"annetty nimell\"a
+translationfrom|k\"a\"annetty kielest\"a|k\"a\"annetty kielest\"a
+reviewof|arvostelu teoksesta|arvostelu teoksesta
+origpubas|julkaistu ensi kerran nimell\"a|julkaistu ensi kerran nimell\"a
+origpubin|julkaistu ensi kerran vuonna|julkaistu ensi kerran vuonna
+astitle|nimell\"a|nimell\"a
+bypublisher|julkaissut|julkaissut
+page|sivu|s\adddot
+pages|sivut|s\adddot
+column|palsta|palsta
+columns|palstat|palstat
+line|rivi|rivi
+lines|rivit|rivit
+nodate|ei julkaisup\"aiv\"a\"a|ei julkaisup\"aiv\"a\"a
+verse|s\"ae|s\"ae
+verses|s\"akeet|s\"akeet
+section|kohta|kohta
+sections|kohdat|kohdat
+paragraph|kappale|kappale
+paragraphs|kappaleet|kappaleet
+pagetotal|sivu|s\adddot
+pagetotals|sivut|s\adddot
+columntotal|palsta|palsta
+columntotals|palstat|palstat
+linetotal|rivi|rivi
+linetotals|rivit|rivit
+versetotal|s\"ae|s\"ae
+versetotals|s\"akeet|s\"akeet
+sectiontotal|kohta|kohta
+sectiontotals|kohdat|kohdat
+paragraphtotal|kappale|kappale
+paragraphtotals|kappaleet|kappaleet
+in|teoksessa|teoksessa
+inseries|sarjassa|sarjassa
+ofseries|sarjassa|sarjassa
+number|numero|nro
+chapter|luku|luku
+bathesis|tutkielma|tutkielma
+mathesis|tutkielma|tutkielma
+phdthesis|tohtorinv\"ait\"oskirja|tohtorinv\"ait\"oskirja
+candthesis|kanditaatintutkielma|kanditaatintutkielma
+resreport|tutkimusraportti|tutkimusraportti
+techreport|tekninen raportti|tekninen raportti
+software|ohjelmisto|ohjelmisto
+datacd|data-CD|data-CD
+audiocd|\"a\"ani-CD|\"a\"ani-CD
+version|versio|versio
+url|url|url
+urlfrom|saatavilla osoitteesta|saatavilla osoitteesta
+urlseen|viitattu|viitattu
+inpreparation|valmisteilla|valmisteilla
+submitted|l\"ahetetty|l\"ahetetty
+forthcoming|hyv\"aksytty julkaistavaksi|hyv\"aksytty julkaistavaksi
+inpress|painossa|painossa
+prepublished|esijulkaistu|esijulkaistu
+citedas|jatkossa|jatkossa
+thiscite|sama|sama
+seenote|katso viite|katso viite
+quotedin|lainattu teoksessa|lainattu teoksessa
+idem|idem|id\adddot
+idemsf|idem|id\adddot
+idemsm|idem|id\adddot
+idemsn|idem|id\adddot
+idempf|idem|id\adddot
+idempm|idem|id\adddot
+idempn|idem|id\adddot
+idempp|idem|id\adddot
+ibidem|ibidem|ibid\adddot
+opcit|op\adddotspace cit\adddot|op\adddotspace cit\adddot
+loccit|loc\adddotspace cit\adddot|loc\adddotspace cit\adddot
+confer|cf\adddot|cf\adddot
+sequens|sq\adddot|sq\adddot
+sequentes|sqq\adddot|sqq\adddot
+passim|passim|pass\adddot
+see|katso|ks\adddot
+seealso|katso my\"os|katso my\"os
+backrefpage|katso sivu|ks\adddotspace s\adddot
+backrefpages|katso sivut|ks\adddotspace s\adddot
+january|tammikuuta|tammikuuta
+february|helmikuuta|helmikuuta
+march|maaliskuuta|maaliskuuta
+april|huhtikuuta|huhtikuuta
+may|toukokuuta|toukokuuta
+june|kes\"akuuta|kes\"akuuta
+july|hein\"akuuta|hein\"akuuta
+august|elokuuta|elokuuta
+september|syyskuuta|syyskuuta
+october|lokakuuta|lokakuuta
+november|marraskuuta|marraskuuta
+december|joulukuuta|joulukuuta
+basicjanuary|tammikuu|tammikuu
+basicfebruary|helmikuu|helmikuu
+basicmarch|maaliskuu|maaliskuu
+basicapril|huhtikuu|huhtikuu
+basicmay|toukokuu|toukokuu
+basicjune|kes\"akuu|kes\"akuu
+basicjuly|hein\"akuu|hein\"akuu
+basicaugust|elokuu|elokuu
+basicseptember|syyskuu|syyskuu
+basicoctober|lokakuu|lokakuu
+basicnovember|marraskuu|marraskuu
+basicdecember|joulukuu|joulukuu
+langamerican|amerikanenglanti|amerikanenglanti
+langbrazilian|brasilianportugali|brasilianportugali
+langbulgarian|bulgaria|bulgaria
+langcatalan|katalonia|katalonia
+langcroatian|kroatia|kroatia
+langdanish|tanska|tanska
+langdutch|hollanti|hollanti
+langenglish|englanti|englanti
+langestonian|viro|viro
+langfinnish|suomi|suomi
+langfrench|ranska|ranska
+langgalician|galicia|galicia
+langgerman|saksa|saksa
+langgreek|kreikka|kreikka
+langhungarian|unkari|unkari
+langitalian|italia|italia
+langlatin|latina|latina
+langlatvian|latvia|latvia
+langnorwegian|norja|norja
+langpolish|puola|puola
+langportuguese|portugali|portugali
+langrussian|ven\"aj\"a|ven\"aj\"a
+langslovak|slovakia|slovakia
+langslovene|slovenia|slovenia
+langspanish|espanja|espanja
+langswedish|ruotsi|ruotsi
+fromamerican|englannin kielest\"a|englannin kielest\"a
+frombrazilian|portugalin kielest\"a|portugalin kielest\"a
+frombulgarian|bulgarian kielest\"a|bulgarian kielest\"a
+fromcatalan|katalonian kielest\"a|katalonian kielest\"a
+fromcroatian|kroatian kielest\"a|kroatian kielest\"a
+fromdanish|tanskan kielest\"a|tanskan kielest\"a
+fromdutch|hollannin kielest\"a|hollannin kielest\"a
+fromenglish|englannin kielest\"a|englannin kielest\"a
+fromestonian|viron kielest\"a|viron kielest\"a
+fromfinnish|suomen kielest\"a|suomen kielest\"a
+fromfrench|ranskan kielest\"a|ranskan kielest\"a
+fromgalician|galician kielest\"a|galician kielest\"a
+fromgerman|saksan kielest\"a|saksan kielest\"a
+fromgreek|kreikan kielest\"a|kreikan kielest\"a
+fromhungarian|unkarin kielest\"a|unkarin kielest\"a
+fromitalian|italian kielest\"a|italian kielest\"a
+fromlatin|latinan kielest\"a|latinan kielest\"a
+fromlatvian|latvian kielest\"a|latvian kielest\"a
+fromnorwegian|norjan kielest\"a|norjan kielest\"a
+frompolish|puolan kielest\"a|puolan kielest\"a
+fromportuguese|portugalin kielest\"a|portugalin kielest\"a
+fromrussian|ven\"aj\"an kielest\"a|ven\"aj\"an kielest\"a
+fromslovak|slovakian kielest\"a|slovakian kielest\"a
+fromslovene|slovenian kielest\"a|slovenian kielest\"a
+fromspanish|espanjan kielest\"a|espanjan kielest\"a
+fromswedish|ruotsin kielest\"a|ruotsin kielest\"a
+countryde|Saksa|DE
+countryeu|Euroopan Unioni|EU
+countryep|Euroopan Unioni|EP
+countryfr|Ranska|FR
+countryuk|Iso-Britannia|GB
+countryus|Yhdysvallat|US
+patent|patentti|pat\adddot
+patentde|saksalainen patentti|saksalainen pat\adddot
+patenteu|Euroopan Unionin patentti|Euroopan Unionin pat\adddot
+patentfr|ranskalainen patentti|ranskalainen pat\adddot
+patentuk|isobritannialainen patentti|isobritannialainen pat\adddot
+patentus|yhdysvaltalainen patentti|yhdysvaltalainen pat\adddot
+patreq|patenttihakemus|pat\adddot\ hak\adddot
+patreqde|saksalainen patenttihakemus|saksalainen pat\adddot\ hak\adddot
+patreqeu|Euroopan Unionin patenttihakemus|Euroopan Unionin pat\adddot\ hak\adddot
+patreqfr|ranskalainen patenttihakemus|ranskalainen pat\adddot\ hak\adddot
+patrequk|isobritannialainen patenttihakemus|isobritannialainen pat\adddot\ hak\adddot
+patrequs|yhdysvaltalainen patenttihakemus|yhdysvaltalainen pat\adddot\ hak\adddot
+file|tiedosto|tiedosto
+library|kirjasto|kirjasto
+abstract|tiivistelm\"a|tiivistelm\"a
+annotation|selitykset|selitykset
+commonera|j\"alkeen ajanlaskun alun|jaa\adddot
+beforecommonera|ennen ajanlaskun alkua|eaa\adddot
+annodomini|j\"alkeen Kristuksen syntym\"an|jKr\adddot
+beforechrist|ennen Kristuksen syntym\"a\"a|eKr\adddot
+circa|noin|n\adddot
+spring|kev\"at|kev\"at
+summer|kes\"a|kes\"a
+autumn|syksy|syksy
+winter|talvi|talvi
+am|ap\adddot|ip\adddot
+pm|ip\adddot|ip\adddot
diff --git a/citeproc/biblatex-localization/french.lbx.strings b/citeproc/biblatex-localization/french.lbx.strings
new file mode 100644
index 000000000..d05abf511
--- /dev/null
+++ b/citeproc/biblatex-localization/french.lbx.strings
@@ -0,0 +1,245 @@
+bibliography|Bibliographie|Bibliographie
+references|R\'ef\'erences|R\'ef\'erences
+shorthands|Liste des abr\'eviations|Abr\'eviations
+editor|\'editeur|\'ed\adddot
+editors|\'editeurs|\'ed\adddot
+compiler|compilateur|comp\adddot
+compilers|compilateurs|comp\adddot
+redactor|r\'edacteur|r\'ed\adddot
+redactors|r\'edacteurs|r\'ed\adddot
+reviser|r\'eviseur|r\'ev\adddot
+revisers|r\'eviseurs|r\'ev\adddot
+founder|fondateur|fond\adddot
+founders|fondateurs|fond\adddot
+continuator|continuateur|cont\adddot
+continuators|continuateurs|cont\adddot
+collaborator|collaborateur|coll\adddot
+collaborators|collaborateurs|coll\adddot
+translator|traducteur|trad\adddot
+translators|traducteurs|trad\adddot
+commentator|commentateur|comm\adddot
+commentators|commentateurs|comm\adddot
+annotator|annotateur|annot\adddot
+annotators|annotateurs|annot\adddot
+commentary|commentaires|comment\adddot
+annotations|annotations|annot\adddot
+introduction|introduction|introd\adddot
+foreword|pr\'eface|pr\'ef\adddot
+afterword|postface|postf\adddot
+editortr|\'editeur et traducteur|\'ed\adddotspace et trad\adddot
+editorstr|\'editeurs et traducteurs|\'ed\adddotspace et trad\adddot
+organizer|organisateur|org\adddot
+organizers|organisateurs|org\adddot
+byorganizer|organis\'e par|org\adddotspace par
+byauthor|par|par
+byeditor|sous la direction \smartof|sous la dir\adddotspace\smartof
+bycompiler|compil\'e par|comp\adddotspace par
+byredactor|r\'edig\'e par|r\'ed\adddotspace par
+byreviser|r\'evis\'e par|r\'ev\adddotspace par
+byreviewer|examin\'e par|ex\adddotspace par
+byfounder|d\'ecouvert par|d\'ecouv\adddotspace par
+bycontinuator|continu\'e par|cont\adddotspace par
+bytranslator|traduit \lbx@lfromlang\ par|trad\adddotspace \lbx@sfromlang\ par
+bycommentator|comment\'e par|comm\adddotspace par
+byannotator|annot\'e par|annot\adddotspace par
+withcommentator|avec des commentaires \smartof|avec des comment\adddotspace\smartof
+withannotator|avec des annotations \smartof|avec des annot\adddotspace\smartof
+withintroduction|avec une introduction \smartof|avec une introd\adddotspace\smartof
+withforeword|avec une pr\'eface \smartof|avec une pr\'ef\adddotspace\smartof
+withafterword|avec une postface \smartof|avec une postf\adddotspace\smartof
+and|et|et
+andothers|et\addabbrvspace al\adddot|et\addabbrvspace al\adddot
+andmore|et\addabbrvspace al\adddot|et\addabbrvspace al\adddot
+volume|tome|t\adddot
+volumes|tomes|t\adddot
+involumes|en|en
+jourvol|tome|t\adddot
+jourser|s\'erie|s\'er\adddot
+book|livre|livre
+part|partie|partie
+issue|\'edition|\'ed\adddot
+newseries|nouvelle s\'erie|nouv\adddotspace s\'er\adddot
+oldseries|ancienne s\'erie|anc\adddotspace s\'er\adddot
+edition|\'edition|\'ed\adddot
+reprint|r\'eimpression|r\'eimpr\adddot
+reprintof|r\'eimpression de|r\'eimpr\adddotspace de
+reprintas|r\'eimpression sous le titre|r\'eimpr\adddotspace sous le titre
+reprintfrom|r\'eimpression \`a partir \smartof|r\'eimpr\adddotspace \`a part\adddotspace\smartof
+translationof|traduction de|trad\adddotspace de
+translationas|traduit sous le titre|trad\adddotspace sous le titre
+translationfrom|traduit de|trad\adddotspace de
+reviewof|critique de|crit.\adddotspace de
+origpubas|publi\'e \`a l'origine sous le titre|pub\adddotspace \`a l'orig\adddotspace sous le titre
+origpubin|publi\'e \`a l'origine en|pub\adddotspace \`a l'orig\adddotspace en
+astitle|sous le titre|sous le titre
+bypublisher|par|par
+page|page|p\adddot
+pages|pages|p\adddot
+column|colonne|col\adddot
+columns|colonnes|col\adddot
+line|ligne|l\adddot
+lines|lignes|l\adddot
+verse|vers|v\adddot
+verses|vers|v\adddot
+section|section|sect\adddot
+sections|sections|sect\adddot
+paragraph|paragraphe|\S
+paragraphs|paragraphes|\S
+pagetotal|page|p\adddot
+pagetotals|pages|p\adddot
+columntotal|colonne|col\adddot
+columntotals|colonnes|col\adddot
+linetotal|ligne|l\adddot
+linetotals|lignes|l\adddot
+versetotal|vers|v\adddot
+versetotals|vers|v\adddot
+sectiontotal|section|sect\adddot
+sectiontotals|sections|sect\adddot
+paragraphtotal|paragraphe|\S
+paragraphtotals|paragraphes|\S
+in|in|in
+inseries|in|in
+ofseries|de|de
+number|num\'ero|n\textsuperscript{o
+chapter|chapitre|chap\adddot
+bathesis|m\'emoire de bachelor|m\'em\adddotspace de bach\adddot
+mathesis|m\'emoire de master|m\'em\adddotspace de mast\adddot
+phdthesis|th\`ese de doctorat|th\`ese de doct\adddot
+candthesis|th\`ese de candidature|th\`ese de cand\adddot
+resreport|rapport scientifique|rapp\adddotspace scient\adddot
+techreport|rapport technique|rapp\adddotspace tech\adddot
+software|logiciel|logiciel
+datacd|c\'ed\'erom|c\'ed\'erom
+audiocd|disque compact audio|CD
+version|version|version
+url|adresse|adresse
+urlfrom|disponible \`a l'adresse|disp\adddotspace \`a l'adr\adddot
+urlseen|visit\'e le|visit\'e le
+inpreparation|en pr\'eparation|en pr\'ep\adddot
+submitted|soumis|soumis
+inpress|sous presse|sous presse
+prepublished|pr\'epubli\'e|pr\'epubl\adddot
+citedas|d\'esign\'e ci-apr\`es par|ci-apr\`es
+thiscite|sp\'ecialement|sp\'ec\adddot
+seenote|voir note|cf\adddotspace note
+quotedin|cit\'e dans|cit\'e dans
+idem|idem|idem
+idemsm|idem|idem
+idemsf|eadem|eadem
+idemsn|idem|idem
+idempm|eidem|eidem
+idempf|eaedem|eaedem
+idempn|eadem|eadem
+idempp|eidem|eidem
+ibidem|ibidem|ibid\adddot
+opcit|op\adddotspace cit\adddot|op\adddotspace cit\adddot
+loccit|loc\adddotspace cit\adddot|loc\adddotspace cit\adddot
+confer|cf\adddot|cf\adddot
+sequens|sq\adddot|sq\adddot
+sequentes|sqq\adddot|sqq\adddot
+passim|passim|pass\adddot
+see|cf\adddot|cf\adddot
+seealso|cf\adddotspace aussi|cf\adddotspace aussi
+backrefpage|cf\adddotspace page|cf\adddotspace p\adddot
+backrefpages|cf\adddotspace pages|cf\adddotspace p\adddot
+january|janvier|jan\adddot
+february|f\'evrier|f\'ev\adddot
+march|mars|mars
+april|avril|avr\adddot
+may|mai|mai
+june|juin|juin
+july|juillet|juill\adddot
+august|ao\^ut|ao\^ut
+september|septembre|sept\adddot
+october|octobre|oct\adddot
+november|novembre|nov\adddot
+december|d\'ecembre|d\'ec\adddot
+langamerican|am\'ericain|am\'ericain
+langbrazilian|br\'esilien|br\'esilien
+langbulgarian|bulgare|bulgare
+langcatalan|catalan|catalan
+langcroatian|croate|croate
+langczech|tch\`eque|tch\`eque
+langdanish|danois|danois
+langdutch|n\'eerlandais|n\'eerlandais
+langenglish|anglais|anglais
+langestonian|estonien|estonien
+langfinnish|finnois|finnois
+langgalician|galicien|galicien
+langgerman|allemand|allemand
+langgreek|grec|grec
+langhungarian|hongrois|hongrois
+langitalian|italien|italien
+langjapanese|japonais|japonais
+langlatin|latin|latin
+langlatvian|letton|letton
+langnorwegian|norv\'egien|norv\'egien
+langpolish|polonais|polonais
+langportuguese|portugais|portugais
+langrussian|russe|russe
+langserbian|serbe|serbe
+langslovak|slovaque|slovaque
+langslovene|slov\`ene|slov\`ene
+langspanish|espagnol|espagnol
+langswedish|su\'edois|su\'edois
+langukrainian|ukrainien|ukrainien
+fromamerican|de l'am\'ericain|de l'am\'ericain
+frombrazilian|du br\'esilien|du br\'esilien
+frombulgarian|du bulgare|du bulgare
+fromcatalan|du catalan|du catalan
+fromcroatian|du croate|du croate
+fromczech|du tch\`eque|du tch\`eque
+fromdanish|du danois|du danois
+fromdutch|du n\'eerlandais|du n\'eerlandais
+fromenglish|de l'anglais|de l'anglais
+fromestonian|de l'estonien|de l'estonien
+fromfinnish|du finnois|du finnois
+fromgalician|du galicien|du galicien
+fromgerman|de l'allemand|de l'allemand
+fromgreek|du grec|du grec
+fromhungarian|du hongrois|du hongrois
+fromitalian|de l'italien|de l'italien
+fromjapanese|du japonais|du japonais
+fromlatin|du latin|du latin
+fromlatvian|du letton|du letton
+fromnorwegian|du norv\'egien|du norv\'egien
+frompolish|du polonais|du polonais
+fromportuguese|du portugais|du portugais
+fromrussian|du russe|du russe
+fromserbian|du serbe|du serbe
+fromslovak|du slovaque|du slovaque
+fromslovene|du slov\`ene|du slov\`ene
+fromspanish|de l'espagnol|de l'espagnol
+fromswedish|du su\'edois|du su\'edois
+fromukrainian|de l'ukrainien|de l'ukrainien
+countryde|Allemagne|DE
+countryeu|Union europ\'eenne|EU
+countryep|Union europ\'eenne|EP
+countryfr|France|FR
+countryuk|Royaume-Uni|GB
+countryus|\'Etats-Unis|US
+patent|brevet|brev\adddot
+patentde|brevet allemand|brev\adddotspace allem\adddot
+patenteu|brevet europ\'een|brev\adddotspace europ\adddot
+patentuk|brevet britannique|brev\adddotspace brit\adddot
+patentus|brevet am\'ericain|brev\adddotspace am\'er\adddot
+patreq|demande de brevet|demande de brev\adddot
+patreqde|demande de brevet allemand|demande de brev\adddotspace allem\adddot
+patreqeu|demande de brevet europ\'een|demande de brev\adddotspace europ\adddot
+patrequk|demande de brevet britannique|demande de brev\adddotspace brit\adddot
+patrequs|demande de brevet am\'ericain|demande de brev\adddotspace am\'er\adddot
+file|fichier|fichier
+library|biblioth\`eque|biblioth\adddot
+abstract|r\'esum\'e|r\'es\adddot
+annotation|annotations|annotations
+commonera|de l'\`ere commune|EC
+beforecommonera|avant l'\`ere commune|AEC
+annodomini|apr\`es J\'esus-Christ|apr\adddotspace J\adddot-C\adddot
+beforechrist|avant J\'esus-Christ|av\adddotspace J\adddot-C\adddot
+circa|vers|vers
+spring|printemps|printemps
+summer|\'et\'e|\'et\'e
+autumn|automne|automne
+winter|hiver|hiver
+am|AM|AM
+pm|PM|PM
diff --git a/citeproc/biblatex-localization/galician.lbx.strings b/citeproc/biblatex-localization/galician.lbx.strings
new file mode 100644
index 000000000..329b35828
--- /dev/null
+++ b/citeproc/biblatex-localization/galician.lbx.strings
@@ -0,0 +1,28 @@
+bibliography|Bibliograf\'ia|Bibliograf\'ia
+references|Referencias|Referencias
+shorthands|Lista de abreviaturas|Abreviaturas
+editor|editor|ed\adddot
+editors|editores|eds\adddot
+compiler|compilador|comp\adddot
+compilers|compiladores|comp\adddot
+redactor|redactor|red\adddot
+redactors|redactores|red\adddot
+reviser|revisor|rev\adddot
+revisers|revisores|revs\adddot
+founder|fundador|fund\adddot
+founders|fundadores|fund\adddot
+continuator|continuador|cont\adddot
+continuators|continuadores|cont\adddot
+collaborator|colaborador|col\adddot
+collaborators|colaboradores|cols\adddot
+translator|tradutor|trad\adddot
+translators|tradutores|trads\adddot
+commentator|comentador|coment\adddot
+commentators|comentadores|coments\adddot
+annotator|anotador|anot\adddot
+annotators|anotadores|anots\adddot
+commentary|comentario|coment\adddot
+annotations|notas|notas
+introduction|introduci\'on|introd\adddot
+foreword|prefacio|pref\adddot
+afterword|posfacio|posf\adddot
diff --git a/citeproc/biblatex-localization/german.lbx.strings b/citeproc/biblatex-localization/german.lbx.strings
new file mode 100644
index 000000000..e5ba3b0c9
--- /dev/null
+++ b/citeproc/biblatex-localization/german.lbx.strings
@@ -0,0 +1,28 @@
+bibliography|Literaturverzeichnis|Literatur
+references|Literaturverzeichnis|Literatur
+shorthands|Sigelverzeichnis|Sigel
+editor|Herausgeber|Hrsg\adddot
+editors|Herausgeber|Hrsg\adddot
+compiler|Kompilator|Komp\adddot
+compilers|Kompilatoren|Komp\adddot
+redactor|Bearbeiter|Bearb\adddot
+redactors|Bearbeiter|Bearb\adddot
+reviser|\"Uberarbeiter|\"Uberarb\adddot
+revisers|\"Uberarbeiter|\"Uberarb\adddot
+founder|Begr\"under|Begr\adddot
+founders|Begr\"under|Begr\adddot
+continuator|Fortf\"uhrer|Fortf\adddot
+continuators|Fortf\"uhrer|Fortf\adddot
+collaborator|Mitarbeiter|Mitarb\adddot
+collaborators|Mitarbeiter|Mitarb\adddot
+translator|\"Ubersetzer|\"Ubers\adddot
+translators|\"Ubersetzer|\"Ubers\adddot
+commentator|Kommentator|Komm\adddot
+commentators|Kommentatoren|Komm\adddot
+annotator|Kommentator|Komm\adddot
+annotators|Kommentatoren|Komm\adddot
+commentary|Kommentar|Komm\adddot
+annotations|Erl\"auterungen|Erl\"aut\adddot
+introduction|Einleitung|Einl\adddot
+foreword|Vorwort|Vorw\adddot
+afterword|Nachwort|Nachw\adddot
diff --git a/citeproc/biblatex-localization/greek.lbx.strings b/citeproc/biblatex-localization/greek.lbx.strings
new file mode 100644
index 000000000..eeb9e6af0
--- /dev/null
+++ b/citeproc/biblatex-localization/greek.lbx.strings
@@ -0,0 +1,9 @@
+bibliography|Βιβλιογραφία|Βιβλιογραφία
+references|Αναφορές|Αναφορές
+shorthands|Κατάλογος συντμήσεων|Συντμήσεις
+editor|επιμελητής|επιμελητής
+editors|επιμελητές|επιμελητές
+compiler|συντάκτης|συντάκτης
+compilers|συντάκτες|συντάκτες
+redactor|συντάκτης|συντάκτης
+redactors|συντάκτες|συντάκτες
diff --git a/citeproc/biblatex-localization/hungarian.lbx.strings b/citeproc/biblatex-localization/hungarian.lbx.strings
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/citeproc/biblatex-localization/hungarian.lbx.strings
diff --git a/citeproc/biblatex-localization/icelandic.lbx.strings b/citeproc/biblatex-localization/icelandic.lbx.strings
new file mode 100644
index 000000000..6f18a0600
--- /dev/null
+++ b/citeproc/biblatex-localization/icelandic.lbx.strings
@@ -0,0 +1,7 @@
+bibliography|Heimildaskr\'a|Heimildaskr\'a
+references|Heimildir|Heimildir
+shorthands|Listi yfir skammstafanir|Skammstafanir
+editor|ristj\'ori|ritstj\adddot
+editors|ritstj\'orar|ritstj\adddot
+compiler|samantekt|samantekt
+compilers|samantekt|samantekt
diff --git a/citeproc/biblatex-localization/italian.lbx.strings b/citeproc/biblatex-localization/italian.lbx.strings
new file mode 100644
index 000000000..162fc614f
--- /dev/null
+++ b/citeproc/biblatex-localization/italian.lbx.strings
@@ -0,0 +1,9 @@
+bibliography|Bibliografia|Bibliografia
+references|Riferimenti bibliografici|Riferimenti bibliografici
+shorthands|Elenco delle sigle|Sigle
+editor|curatore|cur\adddot
+editors|curatori|cur\adddot
+compiler|compilatore|comp\adddot
+compilers|compilatori|comp\adddot
+redactor|redattore|red\adddot
+redactors|redattori|red\adddot
diff --git a/citeproc/biblatex-localization/latvian.lbx.strings b/citeproc/biblatex-localization/latvian.lbx.strings
new file mode 100644
index 000000000..af6e434ed
--- /dev/null
+++ b/citeproc/biblatex-localization/latvian.lbx.strings
@@ -0,0 +1,75 @@
+redactor|redaktors|redakt\adddot
+redactors|redaktori|radakt\adddot
+reviser|revidents|revid\adddot
+revisers|revidenti|revid\adddot
+introduction|ievads|ievads
+byeditor|izdevis|izdevis
+bytranslator|tulkojis|tulk\adddot
+withintroduction|ar ievadu no|ar ievadu no
+byeditortr|izdevis un tulkojis|izdev\adddotspace un tulk\adddot
+and|un|un
+andothers|un citi|u\adddotspace c\adddot
+jourvol|izdevums|izdev\adddot
+issue|izdevums|izdev\adddot
+edition|izdevums|izdev\adddot
+translationof|tulkojums no|tulk\adddotspace no
+translationfrom|tulkots no|tulk\adddotspace no
+reviewof|recenzija|recenz\adddot
+bypublisher|no|no
+nodate|bez datuma|bez dat\adddot
+page|lappuse|lpp\adddot
+pages|lappuses|lpp\adddot
+column|sleja|sleja
+columns|slejas|slejas
+line|rinda|rinda
+lines|rindas|rindas
+verse|pants|pants
+verses|panti|panti
+paragraph|rindkopa|rindk\adddot
+paragraphs|rindkopas|rindk\adddot
+pagetotal|lappuse|lpp\adddot
+pagetotals|lappuses|lpp\adddot
+columntotal|sleja|sleja
+columntotals|slejas|slejas
+linetotal|rinda|rinda
+linetotals|rindas|rindas
+versetotal|pants|pants
+versetotals|panti|panti
+paragraphtotal|rindkopa|rindk\adddot
+paragraphtotals|rindkopas|rindk\adddot
+in||
+number|numurs|nr\adddot
+datacd|datu CD|datu CD
+audiocd|audio CD|audio CD
+version|versija|versija
+url|pieejams|pieejams
+urlfrom|pieejams no|pieejams no
+inpreparation|tiek gatavots|tiek gatavots
+submitted|iesniegts|iesniegts
+march|marts|marts
+may|maijs|maijs
+august|augusts|aug\adddot
+september|septembris|sept\adddot
+october|oktobris|okt\adddot
+november|novembris|nov\adddot
+december|decembris|dec\adddot
+langfinnish|somu|somu
+langrussian|krievu|krievu
+langswedish|zviedru|zviedru
+fromfinnish|no somu|no somu
+fromrussian|no krievu|no krievu
+fromswedish|no zviedru|no zviedru
+countryep|Eiropas Parlaments|EP
+countryfr|Francija|FR
+patent|patents|patents
+patenteu|Eiropas patents|Eiropas pat\adddot
+patentus|ASV patents|ASV pat\adddot
+file|fails|fails
+circa|ap|ap
+spring|pavasaris|pav\adddot
+summer|vasara|vas\adddot
+autumn|rudens|rud\adddot
+winter|ziema|ziema
+am|AM|AM
+pm|PM|PM
+dateyear|gada|g\adddot
diff --git a/citeproc/biblatex-localization/lithuanian.lbx.strings b/citeproc/biblatex-localization/lithuanian.lbx.strings
new file mode 100644
index 000000000..d7fcc9bc1
--- /dev/null
+++ b/citeproc/biblatex-localization/lithuanian.lbx.strings
@@ -0,0 +1,31 @@
+bibliography|Bibliografija|Bibliografija
+references|Literatūros sąrašas|Literatūra
+shorthands|Santrumpų sąrašas|Santrumpos
+editor|sudarytojas|sud\adddot
+editors|sudarytojai|sud\adddot
+compiler|parengėjas|pareng\adddot
+compilers|parengėjai|pareng\adddot
+redactor|redaktorius|red\adddot
+redactors|redaktoriai|red\adddot
+reviser|korektorius|kor\adddot
+revisers|korektoriai|kor\adddot
+founder|pradininkas|prad\adddot
+founders|pradininkai|prad\adddot
+continuator|tęsėjas|tęs\adddot
+continuators|tęsėjai|tęs\adddot
+collaborator|bendradarbis|bendr\adddot
+collaborators|bendradarbiai|bendr\adddot
+translator|vertėjas|vert\adddot
+translators|vertėjai|vert\adddot
+commentator|komentarų autorius|koment\adddotspace aut\adddot
+commentators|komentarų autoriai|koment\adddotspace aut\adddot
+annotator|paaiškinimų autorius|paaišk\adddotspace aut\adddot
+annotators|paaiškinimų autoriai|paaišk\adddotspace aut\adddot
+commentary|komentarai|koment\adddot
+annotations|paaiškinimai|paaišk\adddot
+introduction|įvadas|įv\adddot
+foreword|pratarmė|prat\adddot
+afterword|pabaigos žodis|pab\adddotspace žodis
+organizer|organizatorius|org\adddot
+organizers|organizatoriai|org\adddot
+byorganizer|organizavo|org\adddot
diff --git a/citeproc/biblatex-localization/magyar.lbx.strings b/citeproc/biblatex-localization/magyar.lbx.strings
new file mode 100644
index 000000000..a52ff9ef9
--- /dev/null
+++ b/citeproc/biblatex-localization/magyar.lbx.strings
@@ -0,0 +1,29 @@
+bibliography|Irodalomjegyz\'ek|Irodalom
+references|Hivatkoz\'asok|Hivatkoz\'asok
+shorthands|R\"ovid\'it\'esek jegyz\'eke|R\"ovid\'it\'esek
+compiler|\"ossze\'all\'it\'o|\"ossze\'all\adddot
+compilers|\"ossze\'all\'it\'ok|\"ossze\'all\adddot
+reviser|korrektor|korr\adddot
+revisers|korrektorok|korr\adddot
+founder|alap\'it\'o|alap\adddot
+founders|alap\'it\'ok|alap\adddot
+%continuator||
+%continuators||
+translator|ford\'it\'o|ford\adddot
+translators|ford\'it\'ok|ford\adddot
+commentator|komment\'ator|komm\adddot
+commentators|komment\'atorok|komm\adddot
+annotator|jegyzetek \'ir\'oja|jegyz\adddot
+annotators|jegyzetek \'ir\'oi|jegyz\adddot
+commentary|komment\'ar|komm\adddot
+annotations|jegyzetek|jegyz\adddot
+introduction|bevezet\'es|bev\adddot
+afterword|ut\'osz\'o|ut\'osz\'o
+byorganizer|szervezte|szerv\adddot
+byauthor|\'irta|\'irta
+byeditor|szerkesztette|szerk\adddot
+bycompiler|\"ossze\'all\'itotta|\"ossze\'all\adddot
+byredactor|sajt\'o al\'a rendezte|kiad\adddot
+byreviser|jav\'itotta|jav\adddot
+byreviewer|b\'ir\'alta|b\'ir\adddot
+byfounder|alap\'itotta|alap\adddot
diff --git a/citeproc/biblatex-localization/naustrian.lbx.strings b/citeproc/biblatex-localization/naustrian.lbx.strings
new file mode 100644
index 000000000..c15752415
--- /dev/null
+++ b/citeproc/biblatex-localization/naustrian.lbx.strings
@@ -0,0 +1,2 @@
+citedas|im Folgenden zitiert als|im Folgenden zit\adddotspace als
+january|J\"anner|J\"an\adddot
diff --git a/citeproc/biblatex-localization/newzealand.lbx.strings b/citeproc/biblatex-localization/newzealand.lbx.strings
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/citeproc/biblatex-localization/newzealand.lbx.strings
diff --git a/citeproc/biblatex-localization/ngerman.lbx.strings b/citeproc/biblatex-localization/ngerman.lbx.strings
new file mode 100644
index 000000000..3cecb1f08
--- /dev/null
+++ b/citeproc/biblatex-localization/ngerman.lbx.strings
@@ -0,0 +1 @@
+citedas|im Folgenden zitiert als|im Folgenden zit\adddotspace als
diff --git a/citeproc/biblatex-localization/norsk.lbx.strings b/citeproc/biblatex-localization/norsk.lbx.strings
new file mode 100644
index 000000000..8e1097973
--- /dev/null
+++ b/citeproc/biblatex-localization/norsk.lbx.strings
@@ -0,0 +1,98 @@
+bibliography|Bibliografi|Bibliografi
+references|Referanser|Referanser
+shorthands|Forkortelser|Forkortelser
+compiler|kompilator|komp\adddot
+compilers|kompilatorer|komp\adddot
+redactor|bearbeidelse|bearb\adddot
+redactors|bearbeidelse|bearb\adddot
+reviser|revisjon|rev\adddot
+revisers|revisjon|rev\adddot
+founder|grunnlegger|grunnl\adddot
+founders|grunnleggere|grunnl\adddot
+collaborator|samarbeid|samarb\adddot
+collaborators|samarbeid|samarb\adddot
+translator|oversetter|overs\adddot
+translators|oversettere|overs\adddot
+commentator|kommentarer|komm\adddot
+commentators|kommentarer|komm\adddot
+annotator|forklaringer|forkl\adddot
+annotators|forklaringer|forkl\adddot
+commentary|kommentarer|komm\adddot
+annotations|forklaringer|forkl\adddot
+introduction|innledning|innl\adddot
+foreword|forord|forord
+afterword|etterord|etterord
+organizer|organisator|org\adddot
+organizers|organisatorer|org\adddot
+byorganizer|organisert av|org\adddotspace av
+byauthor|av|av
+byeditor|redigert av|red\adddotspace av
+bycompiler|kompilert av|komp\adddotspace av
+byredactor|bearbeidet av|bearb\adddotspace av
+byreviser|revidert av|rev\adddotspace av
+byreviewer|kritikk ved|krit\adddotspace ved
+byfounder|grunnlagt av|grunnl\adddotspace av
+bycollaborator|i samarbeid med|i samarb\adddotspace med
+bytranslator|oversatt \lbx@lfromlang\ av|overs\adddot\ \lbx@sfromlang\ av
+bycommentator|kommentert av|komm\adddot\ av
+byannotator|forklart av|forkl\adddot\ av
+withcommentator|med kommentarer av|med komm\adddot\ av
+withannotator|med forklaringer av|med forkl\adddot\ av
+withintroduction|med innledning av|med innl\adddot\ av
+withforeword|med forord av|med forord av
+withafterword|med etterord av|med etterord av
+and|og|og
+andothers|med flere|mfl\adddot
+andmore|med mer|m.m\adddot
+volume|bind|bd\adddot
+volumes|bind|bd\adddot
+involumes|i|i
+jourser|serie|ser\adddot
+book|bok|bok
+part|del|del
+issue|nummer|nr\adddot
+newseries|ny serie|ny ser\adddot
+oldseries|gammel serie|gl\adddotspace ser\adddot
+edition|utgave|utg\adddot
+reprint|opptrykk|opptr\adddot
+reprintof|opptrykk av|opptr\adddotspace av
+reprintas|trykt om som|tr\adddotspace om som
+reprintfrom|opptrykk fra|opptr\adddotspace fra
+translationof|oversettelse av|overs\adddotspace av
+translationas|oversatt som|overs\adddotspace som
+translationfrom|oversatt fra|overs\adddotspace fra
+reviewof|kritikk av|krit\adddotspace av
+origpubas|opprinnelig utgitt som|oppr\adddot\ utg\adddot\ som
+origpubin|opprinnelig utgitt i|oppr\adddot\ utg\adddot\ i
+astitle|som|som
+bypublisher|av|av
+nodate|udatert|udatert
+page|side|s\adddot
+pages|sider|s\adddot
+column|spalte|sp\adddot
+columns|spalter|sp\adddot
+line|linje|l\adddot
+lines|linjer|l\adddot
+verse|vers|v\adddot
+verses|vers|v\adddot
+section|avsnitt|avsn\adddot
+sections|avsnitt|avsn\adddot
+paragraph|avsnitt|avsn\adddot
+paragraphs|avsnitt|avsn\adddot
+pagetotal|side|s\adddot
+pagetotals|sider|s\adddot
+columntotal|spalte|sp\adddot
+columntotals|spalter|sp\adddot
+linetotal|linje|l\adddot
+linetotals|linjer|l\adddot
+versetotal|vers|v\adddot
+versetotals|vers|v\adddot
+sectiontotal|avsnitt|avsn\adddot
+sectiontotals|avsnitt|avsn\adddot
+paragraphtotal|avsnitt|avsn\adddot
+paragraphtotals|avsnitt|avsn\adddot
+in|i|i
+inseries|i|i
+ofseries|av|av
+number|nummer|nr\adddot
+chapter|kapittel|kap\adddot
diff --git a/citeproc/biblatex-localization/nswissgerman.lbx.strings b/citeproc/biblatex-localization/nswissgerman.lbx.strings
new file mode 100644
index 000000000..673b031b7
--- /dev/null
+++ b/citeproc/biblatex-localization/nswissgerman.lbx.strings
@@ -0,0 +1,2 @@
+citedas|im Folgenden zitiert als|im Folgenden zit\adddotspace als
+countryuk|Grossbritannien|GB
diff --git a/citeproc/biblatex-localization/nynorsk.lbx.strings b/citeproc/biblatex-localization/nynorsk.lbx.strings
new file mode 100644
index 000000000..4edef3cad
--- /dev/null
+++ b/citeproc/biblatex-localization/nynorsk.lbx.strings
@@ -0,0 +1,28 @@
+references|Referansar|Referansar
+shorthands|Forkortingar|Forkortingar
+compilers|kompilatorar|komp\adddot
+redactor|omarbeiding|omarb\adddot
+redactors|omarbeiding|omarb\adddot
+founder|grunnleggjar|grunnl\adddot
+founders|grunnleggjarar|grunnl\adddot
+translator|omsetjar|oms\adddot
+translators|omsetjarar|oms\adddot
+commentator|kommentarar|komm\adddot
+commentators|kommentarar|komm\adddot
+annotator|forklaringar|forkl\adddot
+annotators|forklaringar|forkl\adddot
+commentary|kommentarar|komm\adddot
+annotations|forklaringar|forkl\adddot
+introduction|innleiing|innl\adddot
+organizers|organisatorar|org\adddot
+byredactor|omarbeidd av|omarb\adddotspace av
+withcommentator|med kommentarar av|med komm\adddot\ av
+withannotator|med forklaringar av|med forkl\adddot\ av
+withintroduction|med innleiing av|med innl\adddot\ av
+andothers|med fleire|mfl\adddot
+andmore|med meir|m.m\adddot
+oldseries|gamal serie|gl\adddotspace ser\adddot
+translationof|omsetjing av|oms\adddotspace av
+translationas|omsett som|oms\adddotspace som
+origpubas|opphavleg utgitt som|opph\adddot\ utg\adddot\ som
+origpubin|opphavleg utgitt i|opph\adddot\ utg\adddot\ i
diff --git a/citeproc/biblatex-localization/polish.lbx.strings b/citeproc/biblatex-localization/polish.lbx.strings
new file mode 100644
index 000000000..22d4e9f30
--- /dev/null
+++ b/citeproc/biblatex-localization/polish.lbx.strings
@@ -0,0 +1,100 @@
+bibliography|Bibliografia|Bibliografia
+references|Bibliografia|Bibliografia
+editor|redaktor|red\adddot
+editors|redaktorzy|red\adddot
+compiler|redaktor|red\adddot
+compilers|redaktorzy|red\adddot
+redactor|redaktor|red\adddot
+redactors|redaktorzy|red\adddot
+reviser|korektor|kor\adddot
+revisers|korektorzy|kor\adddot
+collaborator|uczestnik|ucz\adddot
+collaborators|uczestnicy|ucz\adddot
+translator|t\l umacz|t\l um\adddot
+translators|t\l umacze|t\l um\adddot
+commentator|komentator|kom\adddot
+commentators|komentatorzy|kom\adddot
+annotator|uwaga|uw\adddot
+annotators|uwagi|uw\adddot
+commentary|komentarz|kom\adddot
+annotations|komentarze|kom\adddot
+foreword|przedmowa|przedm\adddot
+afterword|pos\l owie|pos\l \adddot
+editortr|redaktor i t\l umacz|red\adddotspace i per\adddot
+editorstr|redaktorzy i t\l umacze|red\adddotspace i per\adddot
+editorco|redaktor i komentator|red\adddotspace i kom\adddot
+translatorco|t\l umacz i komentator|t\l um\adddotspace i kom\adddot
+translatorsco|t\l umacze i komentatorzy|t\l um\adddotspace i kom\adddot
+organizer|organizator|org\adddot
+organizers|organizatorzy|org\adddot
+byorganizer|organizowane|org\adddot
+byauthor|autorstwo|aut\adddot
+byeditor|redagowa\l|red\adddot
+byredactor|zredagowano|zred\adddot
+byreviser|poprawione|popr\adddot
+byreviewer|recenzja|rec\adddot
+bytranslator|t\l umaczenie \lbx@lfromlang|t\l um\adddotspace \lbx@sfromlang
+bycommentator|skomentowane przez|skom\adddot
+byannotator|uwagi od|uw\adddot
+withcommentator|komentarze|kom\adddot
+withannotator|uwagi|uw\adddot
+withforeword|przedmowa|przedm\adddot
+withafterword|pos\l owie|pos\l \adddot
+byeditoran|zredagowany i z uwagami|zredag\adddotspace i z uw\adddot
+byeditoraf|zredagowany, z pos\l owiem|zred., z pos\l \adddot
+byeditorcofo|zredagowany, komentarze i przedmowa|zred., kom\adddotspace i przedm\adddot
+byeditorcoaf|zredagowany, komentarze i pos\l owie|zred., kom\adddotspace i pos\l \adddot
+byeditoranfo|zredagowany, uwagi i przedmowa|zred., uw\adddotspace i przedm\adddot
+byeditoranaf|zredagowany, uwagi i pos\l owie|zred., uw\adddotspace i pos\l \adddot
+and|i|i
+andothers|i inni|i in\adddot
+andmore|i inni|i in\adddot
+volume|tom|t\adddot
+volumes|tomy|t\adddot
+involumes|w|w
+jourvol|tom|t\adddot
+jourser|seria|ser\adddot
+issue|wydanie|wyd\adddot
+newseries|nowa seria|now\adddotspace ser\adddot
+oldseries|stara seria|star\adddotspace ser\adddot
+edition|wydruk|wyd\adddot
+reprint|przedruk|przedr\adddot
+reprintof|przedruk|przedr\adddot
+reprintas|przedrukowano jako|przedr\adddotspace jako
+reprintfrom|przedrukowano z|przedr\adddotspace z
+translationof|t\l umaczenie|t\l um\adddot
+translationas|t\l umaczenie jako|t\l um\adddotspace jako
+translationfrom|t\l umaczenie z|t\l um\adddotspace z
+reviewof|recenzja na\addcolon|rec\adddotspace na\addcolon
+origpubin|pierwodruk wydano w|pierw\adddotspace wyd\adddotspace w
+astitle|pod tytu\l em|pod tyt\adddot
+page|strona|s\adddot
+pages|strony|s\adddot
+column|kolumna|kol\adddot
+columns|kolumny|kol\adddot
+line|linijka|l\adddot
+lines|linijki|l\adddot
+nodate|bez daty|b\adddot d\adddot
+verse|werset|wer\adddot
+verses|wersety|wer\adddot
+section|paragraf|par\adddot
+sections|paragrafy|par\adddot
+paragraph|akapit|akap\adddot
+paragraphs|akapity|akap\adddot
+pagetotal|strona|s\adddot
+pagetotals|strony|s\adddot
+columntotal|kolumna|kol\adddot
+columntotals|kolumny|kol\adddot
+linetotal|wers|wer\adddot
+linetotals|wersy|wer\adddot
+versetotal|wiersz|wier\adddot
+versetotals|wiersze|wier\adddot
+sectiontotal|paragraf|par\adddot
+sectiontotals|paragrafy|par\adddot
+paragraphtotal|akapit|akap\adddot
+paragraphtotals|akapit|akap\adddot
+in|w|w
+inseries|w|w
+ofseries|z|z
+number|numer|nr\adddot
+chapter|rozdzia\l |rozd\adddot
diff --git a/citeproc/biblatex-localization/portuges.lbx.strings b/citeproc/biblatex-localization/portuges.lbx.strings
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/citeproc/biblatex-localization/portuges.lbx.strings
diff --git a/citeproc/biblatex-localization/portuguese.lbx.strings b/citeproc/biblatex-localization/portuguese.lbx.strings
new file mode 100644
index 000000000..adc10cf1e
--- /dev/null
+++ b/citeproc/biblatex-localization/portuguese.lbx.strings
@@ -0,0 +1,95 @@
+bibliography|Bibliografia|Bibliografia
+references|Refer\^encias|Refer\^encias
+shorthands|Lista de Abreviaturas|Abreviaturas
+editor|editor|ed\adddot
+editors|editores|eds\adddot
+compiler|compilador|comp\adddot
+compilers|compiladores|comp\adddot
+redactor|redator|red\adddot
+redactors|redatores|red\adddot
+reviser|revisor|rev\adddot
+revisers|revisores|rev\adddot
+founder|fundador|fund\adddot
+founders|fundadores|fund\adddot
+continuator|continuador|cont\adddot
+continuators|continuadores|cont\adddot
+collaborator|colaborador|col\adddot
+collaborators|colaboradores|col\adddot
+translator|tradutor|trad\adddot
+translators|tradutores|trad\adddot
+commentator|comentador|coment\adddot
+commentators|comentadores|coment\adddot
+annotator|anotador|anot\adddot
+annotators|anotadores|anot\adddot
+commentary|coment\'ario|coment\adddot
+annotations|notas|notas
+foreword|pref\'acio|pref\adddot
+afterword|posf\'acio|posf\adddot
+organizer|organizador|org\adddot
+organizers|organizadores|orgs\adddot
+byorganizer|organizado por|org\adddotspace por
+byauthor|por|por
+byeditor|editado por|ed\adddotspace por
+bycompiler|compilado por|comp\adddotspace por
+byredactor|redigido por|red\adddotspace por
+byreviser|revisto por|rev\adddotspace por
+byreviewer|resenhado por|res\adddotspace por
+byfounder|fundado por|fund\adddotspace por
+bycontinuator|continuado por|cont\adddotspace por
+bytranslator|traduzido \lbx@lfromlang\ por|trad\adddot\ \lbx@sfromlang\ por
+bycommentator|comentado por|coment\adddot\ por
+byannotator|notas de|notas de
+withcommentator|com coment\'arios de|com coment\adddot\ de
+withannotator|com notas de|com notas de
+withforeword|com pref\'acio de|com pref\adddot\ de
+withafterword|com posf\'acio de|com posf\adddot\ de
+and|e|e
+andothers|et\addabbrvspace al\adddot|et\addabbrvspace al\adddot
+andmore|et\addabbrvspace al\adddot|et\addabbrvspace al\adddot
+volume|volume|vol\adddot
+volumes|volumes|vols\adddot
+involumes|em|em
+jourvol|volume|vol\adddot
+jourser|s\'erie|s\'er\adddot
+book|livro|livro
+part|parte|parte
+issue|n\'umero|n\'umero
+newseries|nova s\'erie|nova s\'er\adddot
+oldseries|s\'erie antiga|s\'er\adddot\ antiga
+reprint|reimpress\~ao|reimpr\adddot
+reprintof|reimpress\~ao de|reimpr\adddotspace de
+reprintas|reimpresso como|reimpr\adddotspace como
+reprintfrom|reimpresso|reimpr\adddot
+translationas|traduzido como|trad\adddotspace como
+translationfrom|traduzido do|trad\adddotspace do
+reviewof|resenha de|res\adddotspace de
+origpubas|originalmente publicado como|orig\adddotspace pub\adddotspace como
+origpubin|originalmente publicado em|orig\adddotspace pub\adddotspace em
+astitle|como|como
+bypublisher|por|por
+nodate|sem data|s\adddot d\adddot
+page|p\'agina|p\adddot
+pages|p\'aginas|pp\adddot
+column|coluna|col\adddot
+columns|colunas|cols\adddot
+line|linha|l\adddot
+lines|linhas|ll\adddot
+verse|verso|v\adddot
+verses|versos|vv\adddot
+paragraph|par\'agrafo|par\adddot
+paragraphs|par\'agrafo|par\adddot
+pagetotal|p\'agina|p\adddot
+pagetotals|p\'aginas|pp\adddot
+columntotal|coluna|col\adddot
+columntotals|colunas|cols\adddot
+linetotal|linha|l\adddot
+linetotals|linhas|ll\adddot
+versetotal|verso|v\adddot
+versetotals|versos|vv\adddot
+paragraphtotal|par\'agrafo|par\adddot
+paragraphtotals|par\'agrafo|par\adddot
+in|em|em
+inseries|em|em
+ofseries|de|de
+number|n\'umero|n\adddot\textordmasculine
+chapter|cap\'\i tulo|cap\adddot
diff --git a/citeproc/biblatex-localization/russian.lbx.strings b/citeproc/biblatex-localization/russian.lbx.strings
new file mode 100644
index 000000000..f25be9360
--- /dev/null
+++ b/citeproc/biblatex-localization/russian.lbx.strings
@@ -0,0 +1,102 @@
+bibliography|Список литературы|Список литературы
+references|Список литературы|Список литературы
+shorthands|Список сокращений|Сокращения
+editor|редактор|ред\adddot
+editors|редакторы|ред\adddot
+compiler|составитель|сост\adddot
+compilers|составители|сост\adddot
+redactor|редактор|ред\adddot
+redactors|редакторы|ред\adddot
+reviser|ревизионный корректор|ревиз\adddotspace кор\adddot
+revisers|ревизионные корректоры|ревиз\adddotspace кор\adddot
+founder|основатель|осн\adddot
+founders|основатели|осн\adddot
+continuator|продолжатель|прод\adddot
+continuators|продолжатели|прод\adddot
+collaborator|участник|участ\adddot
+collaborators|участники|участ\adddot
+translator|переводчик|пер\adddot
+translators|переводчики|пер\adddot
+commentator|комментатор|коммент\adddot
+commentators|комментаторы|коммент\adddot
+annotator|примечания|примеч\adddot
+annotators|примечания|примеч\adddot
+commentary|комментарий|коммент\adddot
+annotations|примечания|примеч\adddot
+introduction|вступительная статья|вступ\adddotspace ст\adddot
+foreword|предисловие|предисл\adddot
+afterword|послесловие|послесл\adddot
+organizer|организатор|орг\adddot
+organizers|организаторы|орг\adddot
+byorganizer|организатор|орг\adddot
+byauthor||
+byeditor|под редакцией|под\addabbrvspace ред\adddot
+bycompiler|составитель|сост\adddot
+byredactor|под редакцией|под\addabbrvspace ред\adddot
+byreviser|исправлено|испр\adddot
+byreviewer|рецензия|рец\adddot
+byfounder|учредитель|учр\adddot
+bycontinuator|продолжение|продолж\adddot
+bycollaborator|при участии|при\addabbrvspace уч\adddot
+bytranslator|перевод \lbx@lfromlang|пер\adddot\ \lbx@sfromlang
+bycommentator|комментарии|коммент\adddot
+byannotator|примечания|примеч\adddot
+withcommentator|комментарии|коммент\adddot
+withannotator|примечания|примеч\adddot
+withintroduction|вступительная статья|вступ\adddotspace ст\adddot
+withforeword|предисловие|предисл\adddot
+withafterword|послесловие|послесл\adddot
+and|и|и
+andothers|и\addabbrvspace др\adddot|и\addabbrvspace др\adddot
+andmore|и\addabbrvspace др\adddot|и\addabbrvspace др\adddot
+volume|том|т\adddot
+volumes|томах|т\adddot
+involumes|в|в
+jourvol|том|т\adddot
+jourser|серия|сер\adddot
+book|книга|кн\adddot
+part|часть|ч\adddot
+issue|выпуск|вып\adddot
+newseries|новая серия|нов\adddotspace сер\adddot
+oldseries|старая серия|стар\adddotspace сер\adddot
+edition|издание|изд\adddot
+reprint|переиздание|переизд\adddot
+reprintof|переиздание|переизд\adddot
+reprintas|переиздано как|переизд\adddotspace как
+reprintfrom|переиздано с|переизд\adddotspace с
+translationof|перевод по изданию\addcolon|пер\adddotspace по изд\adddot\addcolon
+translationas|перевод\addcolon|пер\adddot\addcolon
+translationfrom|перевод с|пер\adddotspace с
+reviewof|рецензия на\addcolon|рец\adddotspace на\addcolon
+astitle|\addcolon|\addcolon
+bypublisher|\addcomma|\addcomma
+nodate|б\adddot г\adddot|б\adddot г\adddot
+page|страница|с\adddot
+pages|страницы|с\adddot
+column|колонка|кол\adddot
+columns|колонки|кол\adddot
+line|строка|строка
+lines|строки|строка
+verse|стих|стих
+verses|стихи|стихи
+section|параграф|\S
+sections|параграфы|\S\S
+paragraph|абзац|абз\adddot
+paragraphs|абзацы|абз\adddot
+pagetotal|страница|с\adddot
+pagetotals|страницы|с\adddot
+columntotal|колонка|кол\adddot
+columntotals|колонки|кол\adddot
+linetotal|строка|строка
+linetotals|строки|строка
+versetotal|стих|стих
+versetotals|стихи|стихи
+sectiontotal|параграф|\S
+sectiontotals|параграфы|\S\S
+paragraphtotal|абзац|абз\adddot
+paragraphtotals|абзацы|абз\adddot
+in|в|в
+inseries|в|в
+ofseries|из|из
+number|номер|№
+chapter|глава|гл\adddot
diff --git a/citeproc/biblatex-localization/serbian.lbx.strings b/citeproc/biblatex-localization/serbian.lbx.strings
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/citeproc/biblatex-localization/serbian.lbx.strings
diff --git a/citeproc/biblatex-localization/serbianc.lbx.strings b/citeproc/biblatex-localization/serbianc.lbx.strings
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/citeproc/biblatex-localization/serbianc.lbx.strings
diff --git a/citeproc/biblatex-localization/slovak.lbx.strings b/citeproc/biblatex-localization/slovak.lbx.strings
new file mode 100644
index 000000000..5afad9510
--- /dev/null
+++ b/citeproc/biblatex-localization/slovak.lbx.strings
@@ -0,0 +1,82 @@
+references|Referencie|Referencie
+shorthands|Zoznam skratiek|Skratky
+editor|editor|ed\adddot
+editors|editori|ed\adddot
+compilers|zostavovatelia|zost\adddot
+redactor|redaktor|red\adddot
+redactors|redaktori|red\adddot
+reviser|korektor|kor\adddot
+revisers|korektori|kor\adddot
+founders|zakladatelia|zakl\adddot
+translators|prekladatelia|prekl\adddot
+foreword|predhovor|predh\adddot
+afterword|doslov|dosl\adddot
+byauthor||
+withforeword|s\addnbspace predhovorom od|s\addnbspace predh\adddot\ od
+withafterword|s\addnbspace doslovom od|s\addnbspace dosl\adddot\ od
+and|a|a
+andothers|et\addabbrvspace al\adddot|et\addabbrvspace al\adddot
+andmore|et\addabbrvspace al\adddot|et\addabbrvspace al\adddot
+involumes|in|in
+book|kniha|kniha
+edition|vydanie|vyd\adddot
+reviewof|recenzia|recenz\adddot
+translationof|preklad|prekl\adddot
+astitle|ako|ako
+bypublisher||
+page|strana|s\adddot
+pages|strany|s\adddot
+line|riadok|r\adddot
+lines|riadky|r\adddot
+section|sekcia|\S
+sections|sekcie|\S\S
+paragraph|odsek|ods\adddot
+paragraphs|odseky|ods\adddot
+pagetotal|strana|s\adddot
+pagetotals|strany|s\adddot
+linetotal|riadok|r\adddot
+linetotals|riadky|r\adddot
+sectiontotal|sekcia|\S
+sectiontotals|sekcie|\S\S
+paragraphtotal|odsek|ods\adddot
+paragraphtotals|odseky|ods\adddot
+in|in|in
+inseries|in|in
+ofseries|z|z
+chapter|kapitola|kap\adddot
+datacd|CD-ROM|CD-ROM
+audiocd|audio CD|audio CD
+version|verzia|ver\adddot
+url|URL|URL
+idem|idem|idem
+idemsm|idem|idem
+idemsf|eadem|eadem
+idemsn|idem|idem
+idempm|eidem|eidem
+idempf|eaedem|eaedem
+idempn|eadem|eadem
+idempp|eidem|eidem
+ibidem|ibidem|ibid\adddot
+opcit|op\adddotspace cit\adddot|op\adddotspace cit\adddot
+loccit|loc\adddotspace cit\adddot|loc\adddotspace cit\adddot
+confer|cf\adddot|cf\adddot
+sequens|sq\adddot|sq\adddot
+sequentes|sqq\adddot|sqq\adddot
+passim|passim|pass\adddot
+march|marec|mar\adddot
+august|august|aug\adddot
+september|september|sept\adddot
+november|november|nov\adddot
+december|december|dec\adddot
+countryde|Nemecko|DE
+patent|patent|pat\adddot
+patentus|US patent|US pat\adddot
+abstract|abstrakt|abst\adddot
+annodomini|po Kristovi|po Kr\adddot
+beforechrist|pred Kristom|pred Kr\adddot
+circa|cirka|ca\adddot
+spring|jar|jar
+summer|leto|leto
+winter|zima|zima
+am|AM|AM
+pm|PM|PM
diff --git a/citeproc/biblatex-localization/slovene.lbx.strings b/citeproc/biblatex-localization/slovene.lbx.strings
new file mode 100644
index 000000000..838a91294
--- /dev/null
+++ b/citeproc/biblatex-localization/slovene.lbx.strings
@@ -0,0 +1,28 @@
+bibliography|Literatura|Literatura
+references|Literatura|Literatura
+shorthands|Kratice|Kratice
+editor|urednik|ur\adddot
+editors|uredniki|ur\adddot
+compiler|sestavljalec|sest\adddot
+compilers|sestavljalci|sest\adddot
+redactor|redaktor|redaktor
+redactors|redaktorji|redaktorji
+reviser|korektor|korektor
+revisers|korektorji|korektorji
+founder|snovalec|snovalec
+founders|snovalci|snovalci
+continuator|nadaljevalec|nadaljevalec
+continuators|nadaljevalci|nadaljevalci
+collaborator|sodelavec|sod\adddot
+collaborators|sodelavci|sod\adddot
+translator|prevajalec|prev\adddot
+translators|prevajalci|prev\adddot
+commentator|komentator|komentator
+commentators|komentatorji|komentatorji
+annotator|anotator|anotator
+annotators|anotatorji|anotatorji
+commentary|komentar|komentar
+annotations|opombe|op\adddot
+introduction|uvod|uvod
+foreword|predgovor|predg\adddot
+afterword|spremna beseda|spr\adddotspace b\adddot
diff --git a/citeproc/biblatex-localization/slovenian.lbx.strings b/citeproc/biblatex-localization/slovenian.lbx.strings
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/citeproc/biblatex-localization/slovenian.lbx.strings
diff --git a/citeproc/biblatex-localization/spanish.lbx.strings b/citeproc/biblatex-localization/spanish.lbx.strings
new file mode 100644
index 000000000..116ed42a7
--- /dev/null
+++ b/citeproc/biblatex-localization/spanish.lbx.strings
@@ -0,0 +1,190 @@
+references|Referencias|Referencias
+shorthands|Lista de abreviaturas|Abreviaturas
+editor|edici\'on|ed\adddot
+editors|edici\'on|eds\adddot
+commentator|comentario|com\adddot
+commentators|comentarios|coms\adddot
+annotator|anotaciones|anot\adddot
+annotators|anotaciones|anots\adddot
+commentary|comentario|com\adddot
+annotations|notas|notas
+introduction|introducci\'on|intr\adddot
+foreword|pr\'ologo|pr\'ol\adddot
+organizer|organizaci\'on|org\adddot
+organizers|organizaci\'on|orgs\adddot
+byorganizer|organizado por|org\adddotspace por
+byauthor|de|de
+byeditor|editado por|ed\adddotspace por
+bycompiler|compilado por|comp\adddotspace por
+byredactor|redacci\'on de|red\adddotspace de
+byreviser|revisado por|rev\adddotspace por
+byfounder|fundado por|fund\adddotspace por
+bycontinuator|continuado por|cont\adddotspace por
+bytranslator|traducido \lbx@lfromlang\ por|trad\adddot \lbx@sfromlang\ por
+bycommentator|comentado por|com\adddotspace por
+byannotator|anotado por|anot\adddotspace por
+withcommentator|con comentario de|con com\adddotspace de
+withannotator|con notas de|con notas de
+withintroduction|con introduci\'on de|con intr\adddotspace de
+withforeword|con pr\'ologo de|con pr\'ol\adddotspace de
+and|y|y
+andothers|y~col\adddot|y~col\adddot
+andmore|et\adddotspace al\adddot|et\adddotspace al\adddot
+volume|volumen|vol\adddot
+volumes|vol\'umenes|vols\adddot
+involumes|en|en
+jourvol|volumen|vol\adddot
+jourser|\'epoca|\'ep\adddot
+book|libro|libro
+part|parte|parte
+issue|n\'umero|n\'um\adddot
+newseries|nueva \'epoca|n\adddotspace \'ep\adddot
+oldseries|antigua \'epoca|ant\adddotspace \'ep\adddot
+edition|edici\'on|ed\adddot
+reprintas|reimpreso como|reimp\adddotspace como
+translationas|traducido como|trad\adddotspace como
+translationfrom|traducido del|trad\adddotspace del
+origpubas|publicado originalmente como|pub\adddotspace orig\adddotspace como
+origpubin|publicado originalmente en|pub\adddot orig\adddot en
+bypublisher|por la editorial|por la ed\adddot
+page|p\'agina|p\'ag\adddot
+pages|p\'aginas|p\'ags\adddot
+column|columna|col\adddot
+columns|columnas|cols\adddot
+verse|verso|v\adddot
+verses|versos|vv\adddot
+sections|secciones|secs\adddot
+pagetotal|p\'agina|p\'ag\adddot
+pagetotals|p\'aginas|p\'ags\adddot
+columntotal|columna|col\adddot
+columntotals|columnas|cols\adddot
+versetotal|verso|v\adddot
+versetotals|versos|vv\adddot
+sectiontotals|secciones|secs\adddot
+in|en|en
+inseries|en|en
+ofseries|de|de
+number|n\'umero|n\sptext{o
+chapter|cap\'itulo|cap\adddot
+bathesis|Tesis de licenciatura|Tesis de lic\adddot
+phdthesis|Tesis doctoral|Tesis doct\adddot
+candthesis|Tesis de candidatura doctoral|Tesis de cand\adddotspace doct\adddot
+techreport|informe t\'ecnico|inf\adddotspace t\'ec\adddot
+software|programa|prog\adddot
+datacd|disco de datos|CD de datos
+audiocd|disco de audio|CD de audio
+version|versi\'on|ver\adddot
+url|direcci\'on|direcci\'on
+urlfrom|disponible desde|disp\adddotspace desde
+urlseen|visitado|visitado
+submitted|enviado|enviado
+forthcoming|pr\'oximamente|prox\adddot
+inpress|en prensa|en prensa
+prepublished|previamente publicado|prepublicado
+citedas|citado en adelante como|cit\adddotspace en adelante como
+thiscite|especialmente|esp\adddot
+seenote|ver nota|ver n\adddot
+quotedin|citado en|cit\adddotspace en
+loccit|loc\adddotspace cit\adddot|loc\adddot cit\adddot
+confer|cf\adddot|cf\adddot
+sequens|s\adddot|s\adddot
+sequentes|ss\adddot|ss\adddot
+passim|p\'assim|p\'assim
+see|v\'ease|vid\adddot
+seealso|v\'ease tambi\'en|vid\adddotspace tambi\'en
+backrefpage|v\'ease p\'agina|vid\adddotspace p\'ag\adddot
+backrefpages|v\'eanse p\'aginas|vid\adddotspace p\'ags\adddot
+january|enero|ene\adddot
+february|febrero|feb\adddot
+march|marzo|mar\adddot
+april|abril|abr\adddot
+may|mayo|mayo
+june|junio|jun\adddot
+july|julio|jul\adddot
+august|agosto|ago\adddot
+september|septiembre|sep\adddot
+october|octubre|oct\adddot
+november|noviembre|nov\adddot
+december|diciembre|dic\adddot
+langbrazilian|brasile\~no|brasile\~no
+langbulgarian|b\'ulgaro|b\'ulgaro
+langcroatian|croata|croata
+langczech|checo|checo
+langdanish|dan\'es|dan\'es
+langdutch|neerland\'es|neerland\'es
+langenglish|ingl\'es|ingl\'es
+langestonian|estonio|estonio
+langfrench|franc\'es|franc\'es
+langgalician|gallego|gallego
+langgerman|alem\'an|alem\'an
+langgreek|griego|griego
+langhungarian|h\'ungaro|h\'ungaro
+langitalian|italiano|italiano
+langjapanese|japon\'es|japon\'es
+langlatvian|lituano|lituano
+langnorwegian|noruego|noruego
+langpolish|polaco|polaco
+langportuguese|portugu\'es|portugu\'es
+langrussian|ruso|ruso
+langslovak|eslovaco|eslovaco
+langslovene|esloveno|esloveno
+langspanish|espa\~nol|espa\~nol
+langswedish|sueco|sueco
+langukrainian|ucraniano|ucraniano
+frombrazilian|del brasile\~no|del brasile\~no
+frombulgarian|del b\'ulgaro|del b\'ulgaro
+fromcroatian|del croata|del croata
+fromczech|del checo|del checo
+fromdanish|del dan\'es|del dan\'es
+fromdutch|del neerland\'es|del neerland\'es
+fromenglish|del ingl\'es|del ingl\'es
+fromestonian|del estonio|del estonio
+fromfrench|del franc\'es|del franc\'es
+fromgalician|del gallego|del gallego
+fromgerman|del alem\'an|del alem\'an
+fromgreek|del griego|del griego
+fromhungarian|del h\'ungaro|del h\'ungaro
+fromitalian|del italiano|del italiano
+fromjapanese|del japon\'es|del japon\'es
+fromlatvian|del lituano|del lituano
+fromnorwegian|del noruego|del noruego
+frompolish|del polaco|del polaco
+fromportuguese|del portugu\'es|del portugu\'es
+fromrussian|del ruso|del ruso
+fromslovak|del eslovaco|del eslovaco
+fromslovene|del esloveno|del esloveno
+fromspanish|del espa\~nol|del espa\~nol
+fromswedish|del sueco|del sueco
+fromukrainian|del ucraniano|del ucraniano
+countryde|Alemania|DE
+countryeu|Uni\'on Europea|EU
+countryep|Uni\'on Europea|EP
+countryfr|Francia|FR
+countryuk|Reino Unido|GB
+countryus|Estados Unidos|US
+patent|patente|pat\adddot
+patentde|patente alemana|pat\adddotspace alemana
+patenteu|patente europea|pat\adddotspace europea
+patentfr|patente francesa|pat\adddotspace francesa
+patentuk|patente brit\'anica|pat\adddotspace brit\'anica
+patentus|patente estadounidense|pat\adddotspace estadounidense
+patreq|solicitud de patente|sol\adddotspace de pat\adddot
+patreqde|solicitud de patente alemana|sol\adddotspace de pat\adddot alemana
+patreqeu|solicitud de patente europea|sol\adddotspace de pat\adddot europea
+patreqfr|solicitud de patente francesa|sol\adddotspace de pat\adddot francesa
+patrequk|solicitud de patente brit\'anica|sol\adddotspace de pat\adddot brit\'anica
+patrequs|solicitud de patente estadounidense|sol\adddotspace de pat\adddot estadounidense
+file|archivo|archivo
+library|biblioteca|bibl\adddot
+abstract|resumen|resumen
+commonera|era com\'un|e\adddotspace c\adddot
+beforecommonera|antes de la era com\'un|a\adddotspace e\adddotspace c\adddot
+annodomini|despu\'es de Cristo|d\adddotspace C\adddot
+beforechrist|antes de Cristo|a\adddotspace C\adddot
+circa|circa|ca\adddot
+spring|primavera|prim\adddot
+summer|verano|ver\adddot
+autumn|oto\~no|ot\adddot
+winter|invierno|inv\adddot
+am|a\adddotspace m\adddot|a\adddot m\adddot
+pm|p\adddotspace m\adddot|p\adddot m\adddot
diff --git a/citeproc/biblatex-localization/swedish.lbx.strings b/citeproc/biblatex-localization/swedish.lbx.strings
new file mode 100644
index 000000000..4d5a559e2
--- /dev/null
+++ b/citeproc/biblatex-localization/swedish.lbx.strings
@@ -0,0 +1,9 @@
+bibliography|Litteraturf\"orteckning|Litteratur
+references|Referenser|Referenser
+shorthands|F\"orkortningar|F\"orkortningar
+editor|utgivare|utg\adddot
+editors|utgivare|utg\adddot
+compiler|sammanst\"allare|sammanst\adddot
+compilers|sammanst\"allare|sammanst\adddot
+redactor|redakt\"or|red\adddot
+redactors|redakt\"orer|red\adddot
diff --git a/citeproc/biblatex-localization/swissgerman.lbx.strings b/citeproc/biblatex-localization/swissgerman.lbx.strings
new file mode 100644
index 000000000..064a32464
--- /dev/null
+++ b/citeproc/biblatex-localization/swissgerman.lbx.strings
@@ -0,0 +1 @@
+countryuk|Grossbritannien|GB
diff --git a/citeproc/biblatex-localization/turkish.lbx.strings b/citeproc/biblatex-localization/turkish.lbx.strings
new file mode 100644
index 000000000..36f2a7600
--- /dev/null
+++ b/citeproc/biblatex-localization/turkish.lbx.strings
@@ -0,0 +1,157 @@
+references|Kaynaklar|Kaynaklar
+shorthands|K\i saltmalar dizini|K\i saltmalar
+compiler|derleyen|der\adddot
+compilers|derleyenler|der\adddot
+redactor|yay\i na haz\i rlayan|yay\adddot\ haz\adddot
+redactors|yay\i na haz\i rlayanlar|yay\adddot\ haz\adddot
+reviser|tashih eden|tashih\adddot
+revisers|tashih edenler|tashih\adddot
+founder|kurucu|kur\adddot
+founders|kurucular|kur\adddot
+continuator|tamamlayan|tam\adddot
+continuators|tamamlayanlar|tam\adddot
+collaborator|ortak|ortak
+collaborators|ortaklar|ortaklar
+commentator|yorumlayan|yrm\adddot
+commentators|yorumlayanlar|yrm\adddot
+commentary|yorum|yrm\adddot
+byauthor|yazar|yazar
+bycompiler|derleyen|der\adddot
+byredactor|yay\i na haz\i rlayan|yay\adddot\ haz\adddot
+byreviser|tashih|tashih
+byfounder|kurucu|kur\adddot
+bycontinuator|tamamlayan|tam\adddot
+bycommentator|yorumlayan|yrm\adddot
+withcommentator|yorumlar\i yla katk\i da bulunan|yrm\adddot\ kat\adddot\ bul\adddot
+and|ve|ve
+volume|cilt|c\adddot
+volumes|cilt|c\adddot
+jourvol|cilt|c\adddot
+jourser|seri|seri
+book|kitap|kitap
+part|k\i s\i m|k\i s\i m
+issue|say\i|say\i
+newseries|yeni seri|yeni seri
+oldseries|eski seri|eski seri
+edition|bask\i|bs\adddot
+reprint|yeni bask\i s\i|yeni bask\i s\i
+reprintof|yeni bask\i s\i|yeni bask\i s\i
+reprintas|yeni bask\i s\i|yeni bask\i s\i
+reprintfrom|yeni bask\i s\i|yeni bask\i s\i
+reviewof|derlenen eser|der\adddot\ eser
+origpubas|as\i l eser|as\i l eser
+origpubin|as\i l eser yay\i n tarihi|as\i l eser yay\i n tarihi
+bypublisher|yay\i n evi|yay\i n evi
+nodate|tarih yok|t\adddot y\adddot
+page|sayfa|s\adddot
+pages|sayfalar|ss\adddot
+line|sat\i r|sat\adddot
+lines|sat\i rlar|sat\adddot
+verse|m\i sra|m\i s\adddot
+verses|m\i sralar|m\i s\adddot
+paragraph|paragraf|par\adddot
+paragraphs|paragraflar|par\adddot
+pagetotal|toplam sayfa|s\adddot
+pagetotals|toplam sayfalar|ss\adddot
+linetotal|toplam sat\i r|sat\adddot
+linetotals|toplam sat\i rlar|sat\adddot
+versetotal|toplam m\i sra|m\i s\adddot
+versetotals|toplam m\i sralar|m\i s\adddot
+paragraphtotal|toplam paragraf|par\adddot
+paragraphtotals|toplam paragraflar|par\adddot
+inseries|serilerde|serilerde
+ofseries|serilerde|serilerde
+number|numara|no\adddot
+bathesis|lisans tezi|lis\adddot\ tezi
+phdthesis|doktora tezi|dok\adddot\ tezi
+candthesis|aday tezi|aday tezi
+techreport|teknik rapor|tek\adddot\ rap\adddot
+software|bilgisayar yaz\i l\i m\i|bilg\adddot\ yaz\adddot
+datacd|CD|CD
+audiocd|ses CD'si|ses CD'si
+version|versiyon|ver\adddot
+forthcoming|yak\i nda|yak\i nda
+prepublished|taslak bas\i m\i|taslak bas\i m\i
+citedas|at\i f olarak|at\i f olarak
+seenote|nota bak\i n\i z|nota bkz\adddot
+quotedin|al\i nt\i|al\i nt\i
+idem|ayn\i|ayn\i
+idemsm|ayn\i|ayn\i
+idemsf|ayn\i|ayn\i
+idemsn|ayn\i|ayn\i
+idempm|ayn\i lar\i|ayn\i lar\i
+idempf|ayn\i lar\i|ayn\i lar\i
+idempn|ayn\i lar\i|ayn\i lar\i
+idempp|ayn\i lar\i|ayn\i lar\i
+loccit|at\i f yap\i lan yer|at\i f yap\adddot\ yer
+sequens|takip eden|takip eden
+sequentes|takip eden|takip eden
+passim|rastgele|rastgele
+see|bak\i n\i z|bkz\adddot
+seealso|ayr\i ca bak\i n\i z|ayr\i ca bkz\adddot
+january|Ocak|Ocak
+march|Mart|Mar\adddot
+april|Nisan|Nis\adddot
+may|May\i s|May\adddot
+june|Haziran|Haz\adddot
+july|Temmuz|Tem\adddot
+october|Ekim|Ekim
+november|Kas\i m|Kas\adddot
+december|Aral\i k|Ara\adddot
+langamerican|Amerikanca|Amerikanca
+langbrazilian|Brezilyanca|Brezilyanca
+langbulgarian|Bulgarca|Bulgarca
+langcatalan|Katalanca|Katalanca
+langdanish|Danimarkanca|Danimarkanca
+langestonian|Estonca|Estonca
+langfinnish|Fince|Fince
+langfrench|Frans\i zca|Frans\i zca
+langgalician|Galce|Galce
+langgerman|Almanca|Almanca
+langgreek|Yunanca|Yunanca
+langhungarian|Macarca|Macarca
+langjapanese|Japonca|Japonca
+langlatin|Latince|Latince
+langlatvian|Letonca|Letonca
+langlithuanian|Litvanca|Litvanca
+langpolish|Polonyaca|Polonyaca
+langportuguese|Portekizce|Portekizce
+langslovene|Slovence|Slovence
+langukrainian|Ukraynaca|Ukraynaca
+fromamerican|Amerikanca'dan|Amerikanca'dan
+frombrazilian|Brezilyanca'dan|Brezilyanca'dan
+frombulgarian|Bulgarca'dan|Bulgarca'dan
+fromcatalan|Katalanca'dan|Katalanca'dan
+fromdanish|Danimarkanca'dan|Danimarkanca'dan
+fromestonian|Estonyaca'dan|Estonyaca'dan
+fromfinnish|Fince'den|Fince'den
+fromfrench|Frans\i zca'dan|Frans\i zca'dan
+fromgalician|Galyaca'dan|Galyaca'dan
+fromgerman|Almanca'dan|Almanca'dan
+fromgreek|Yunanca'dan|Yunanca'dan
+fromhungarian|Macarca'dan|Macarca'dan
+fromjapanese|Japonca'dan|Japonca'dan
+fromlatin|Latince'den|Latince'den
+fromlatvian|Latvianca'dan|Latvianca'dan
+fromlithuanian|Litvanca'dan|Litvanca'dan
+frompolish|Polonyaca'dan|Polonyaca'dan
+fromportuguese|Portekizce'den|Portekizce'den
+fromslovene|Slovence'den|Slovence'den
+fromukrainian|Ukraynaca'dan|Ukraynaca'dan
+countryde|Almanya|DE
+countryfr|Fransa|FR
+patent|patent|pat\adddot
+patentde|Alman patenti|Alman pat\adddot
+patenteu|Avrupa patenti|Avrupa pat\adddot
+patentfr|Frans\i z patenti|Frans\i z pat\adddot
+patentus|Amerika patenti|Amerika pat\adddot
+patreq|patent beklemede|pat\adddot\ bek\adddot
+patreqde|Alman patenti beklemede|Alman pat\adddot\ bek\adddot
+patreqeu|Avrupa patenti beklemede|Avrupa pat\adddot\ bek\adddot
+patreqfr|Frans\i z patenti beklemede|Frans\i z pat\adddot\ bek\adddot
+patrequs|Amerika patenti beklemede|Amerika pat\adddot\ bek\adddot
+file|dosya|dosya
+commonera|milattan sonra|MS
+annodomini|milattan sonra|MS
+summer|Yaz|Yaz
+autumn|Sonbahar|Sonbahar
diff --git a/citeproc/biblatex-localization/ukrainian.lbx.strings b/citeproc/biblatex-localization/ukrainian.lbx.strings
new file mode 100644
index 000000000..14d4bb098
--- /dev/null
+++ b/citeproc/biblatex-localization/ukrainian.lbx.strings
@@ -0,0 +1,102 @@
+bibliography|Перелік літератури|Література
+references|Перелік літератури|Література
+shorthands|Перелік скорочень|Скорочення
+editor|редактор|ред\adddot
+editors|редактори|ред\adddot
+compiler|укладач|уклад\adddot
+compilers|укладачі|уклад\adddot
+redactor|редактор|ред\adddot
+redactors|редактори|ред\adddot
+reviser|ревізійний коректор|ревіз\adddotspace кор\adddot
+revisers|ревізійні коректори|ревіз\adddotspace кор\adddot
+founder|засновник|засн\adddot
+founders|засновник|засн\adddot
+continuator|продовжувач|прод\adddot
+continuators|продовжувачі|прод\adddot
+collaborator|учасник|учас\adddot
+collaborators|учасники|учас\adddot
+translator|перекладач|пер\adddot
+translators|перекладачі|пер\adddot
+commentator|коментатор|комент\adddot
+commentators|коментатори|комент\adddot
+annotator|примітки|прим\adddot
+annotators|примітки|прим\adddot
+commentary|коментар|комент\adddot
+annotations|примітки|прим\adddot
+introduction|вступна стаття|вступ\adddotspace ст\adddot
+foreword|передмова|передм\adddot
+afterword|післямова|післям\adddot
+organizer|організатор|орг\adddot
+organizers|організатори|орг\adddot
+byorganizer|організатор|орг\adddot
+byauthor|згідно автора|згідн\adddot авт\adddot
+byeditor|за редакцією|за\addabbrvspace ред\adddot
+bycompiler|укладач|уклад\adddot
+byredactor|за редакцією|за\addabbrvspace ред\adddot
+byreviser|виправлено|випр\adddot
+byreviewer|рецензія|рец\adddot
+byfounder|засновник|засн\adddot
+bycontinuator|продовження|продовж\adddot
+bycollaborator|за участю|за\addabbrvspace уч\adddot
+bytranslator|переклад \lbx@lfromlang|пер\adddot\ \lbx@sfromlang
+bycommentator|коментарі|комент\adddot
+byannotator|примітки|прим\adddot
+withcommentator|коментарі|комент\adddot
+withannotator|примітки|прим\adddot
+withintroduction|вступна стаття|вступ\adddotspace ст\adddot
+withforeword|передмовие|передм\adddot
+withafterword|післямовие|післям\adddot
+and|та|та
+andothers|та\addabbrvspace ін\adddot|та\addabbrvspace ін\adddot
+andmore|та\addabbrvspace ін\adddot|та\addabbrvspace ін\adddot
+volume|том|т\adddot
+volumes|томах|т\adddot
+involumes|в|в
+jourvol|том|т\adddot
+jourser|серія|сер\adddot
+book|книга|кн\adddot
+part|частина|ч\adddot
+issue|випуск|вип\adddot
+newseries|нова серія|нов\adddotspace сер\adddot
+oldseries|стара серія|стар\adddotspace сер\adddot
+edition|видання|вид\adddot
+reprint|перевидання|перевид\adddot
+reprintof|перевидання|перевид\adddot
+reprintas|перевидано як|перевид\adddotspace як
+reprintfrom|перевидано з|перевид\adddotspace з
+translationof|переклад по виданню\addcolon|пер\adddotspace по вид\adddot\addcolon
+translationas|переклад\addcolon|пер\adddot\addcolon
+translationfrom|переклад з|пер\adddotspace з
+reviewof|рецензія на\addcolon|рец\adddotspace на\addcolon
+astitle|\addcolon|\addcolon
+bypublisher|\addcomma|\addcomma
+nodate|б\adddot р\adddot|б\adddot р\adddot
+page|сторінка|с\adddot
+pages|сторінки|с\adddot
+column|колонка|кол\adddot
+columns|колонки|кол\adddot
+line|рядок|рядок
+lines|рядки|рядки
+verse|вірш|вірш
+verses|вірші|вірші
+section|параграф|\S
+sections|параграфи|\S\S
+paragraph|абзац|абз\adddot
+paragraphs|абзаци|абз\adddot
+pagetotal|сторінка|с\adddot
+pagetotals|сторінки|с\adddot
+columntotal|колонка|кол\adddot
+columntotals|колонки|кол\adddot
+linetotal|рядок|рядок
+linetotals|рядки|рядки
+versetotal|вірш|вірш
+versetotals|вірші|вірші
+sectiontotal|параграф|\S
+sectiontotals|параграфи|\S\S
+paragraphtotal|абзац|абз\adddot
+paragraphtotals|абзаци|абз\adddot
+in|в|в
+inseries|в|в
+ofseries|із|із
+number|номер|№
+chapter|глава|гл\adddot
diff --git a/data/default.csl b/data/default.csl
new file mode 100644
index 000000000..32d0cab05
--- /dev/null
+++ b/data/default.csl
@@ -0,0 +1,648 @@
+<?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>
+ <title>Chicago Manual of Style 17th edition (author-date)</title>
+ <id>http://www.zotero.org/styles/chicago-author-date</id>
+ <link href="http://www.zotero.org/styles/chicago-author-date" rel="self"/>
+ <link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
+ <author>
+ <name>Julian Onions</name>
+ <email>julian.onions@gmail.com</email>
+ </author>
+ <contributor>
+ <name>Sebastian Karcher</name>
+ </contributor>
+ <contributor>
+ <name>Richard Karnesky</name>
+ <email>karnesky+zotero@gmail.com</email>
+ <uri>http://arc.nucapt.northwestern.edu/Richard_Karnesky</uri>
+ </contributor>
+ <contributor>
+ <name>Andrew Dunning</name>
+ <email>andrew.dunning@utoronto.ca</email>
+ <uri>https://orcid.org/0000-0003-0464-5036</uri>
+ </contributor>
+ <contributor>
+ <name>Matthew Roth</name>
+ <email>matthew.g.roth@yale.edu</email>
+ <uri> https://orcid.org/0000-0001-7902-6331</uri>
+ </contributor>
+ <category citation-format="author-date"/>
+ <category field="generic-base"/>
+ <summary>The author-date variant of the Chicago style</summary>
+ <updated>2018-01-24T12:00:00+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="editor" form="verb-short">ed.</term>
+ <term name="container-author" form="verb">by</term>
+ <term name="translator" form="verb-short">trans.</term>
+ <term name="editortranslator" form="verb">edited and translated by</term>
+ <term name="translator" form="short">trans.</term>
+ </terms>
+ </locale>
+ <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="recipient">
+ <choose>
+ <if type="personal_communication">
+ <choose>
+ <if variable="genre">
+ <text variable="genre" text-case="capitalize-first"/>
+ </if>
+ <else>
+ <text term="letter" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ <names variable="recipient" delimiter=", ">
+ <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </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>
+ <text macro="recipient"/>
+ </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="interviewer">
+ <names variable="interviewer" delimiter=", ">
+ <label form="verb" prefix=" " text-case="capitalize-first" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="archive">
+ <group delimiter=". ">
+ <text variable="archive_location" text-case="capitalize-first"/>
+ <text variable="archive"/>
+ <text variable="archive-place"/>
+ </group>
+ </macro>
+ <macro name="access">
+ <group delimiter=". ">
+ <choose>
+ <if type="graphic report" match="any">
+ <text macro="archive"/>
+ </if>
+ <else-if type="article-journal bill book chapter legal_case legislation motion_picture paper-conference" match="none">
+ <text macro="archive"/>
+ </else-if>
+ </choose>
+ <choose>
+ <if type="webpage post-weblog" match="any">
+ <date variable="issued" form="text"/>
+ </if>
+ </choose>
+ <choose>
+ <if variable="issued" match="none">
+ <group delimiter=" ">
+ <text term="accessed" text-case="capitalize-first"/>
+ <date variable="accessed" form="text"/>
+ </group>
+ </if>
+ </choose>
+ <choose>
+ <if type="legal_case" match="none">
+ <choose>
+ <if variable="DOI">
+ <text variable="DOI" prefix="https://doi.org/"/>
+ </if>
+ <else>
+ <text variable="URL"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </group>
+ </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="edition">
+ <choose>
+ <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <choose>
+ <if is-numeric="edition">
+ <group delimiter=" " prefix=". ">
+ <number variable="edition" form="ordinal"/>
+ <text term="edition" form="short" strip-periods="true"/>
+ </group>
+ </if>
+ <else>
+ <text variable="edition" text-case="capitalize-first" prefix=". "/>
+ </else>
+ </choose>
+ </if>
+ <else-if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">
+ <choose>
+ <if is-numeric="edition">
+ <group delimiter=" " prefix=", ">
+ <number variable="edition" form="ordinal"/>
+ <text term="edition" form="short"/>
+ </group>
+ </if>
+ <else>
+ <text variable="edition" prefix=", "/>
+ </else>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="locators">
+ <choose>
+ <if type="article-journal">
+ <choose>
+ <if variable="volume">
+ <text variable="volume" prefix=" "/>
+ <group prefix=" (" suffix=")">
+ <choose>
+ <if variable="issue">
+ <text variable="issue"/>
+ </if>
+ <else>
+ <date variable="issued">
+ <date-part name="month"/>
+ </date>
+ </else>
+ </choose>
+ </group>
+ </if>
+ <else-if variable="issue">
+ <group delimiter=" " prefix=", ">
+ <text term="issue" form="short"/>
+ <text variable="issue"/>
+ <date variable="issued" prefix="(" suffix=")">
+ <date-part name="month"/>
+ </date>
+ </group>
+ </else-if>
+ <else>
+ <date variable="issued" prefix=", ">
+ <date-part name="month"/>
+ </date>
+ </else>
+ </choose>
+ </if>
+ <else-if type="legal_case">
+ <text variable="volume" prefix=", "/>
+ <text variable="container-title" prefix=" "/>
+ <text variable="page" prefix=" "/>
+ </else-if>
+ <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <group prefix=". " delimiter=". ">
+ <group>
+ <text term="volume" form="short" text-case="capitalize-first" suffix=" "/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ <group>
+ <number variable="number-of-volumes" form="numeric"/>
+ <text term="volume" form="short" prefix=" " plural="true"/>
+ </group>
+ </group>
+ </else-if>
+ <else-if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">
+ <choose>
+ <if variable="page" match="none">
+ <group prefix=". ">
+ <text term="volume" form="short" text-case="capitalize-first" suffix=" "/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ </if>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="locators-chapter">
+ <choose>
+ <if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">
+ <choose>
+ <if variable="page">
+ <group prefix=", ">
+ <text variable="volume" suffix=":"/>
+ <text variable="page"/>
+ </group>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-article">
+ <choose>
+ <if type="article-newspaper">
+ <group prefix=", " delimiter=", ">
+ <group delimiter=" ">
+ <text variable="edition"/>
+ <text term="edition"/>
+ </group>
+ <group>
+ <text term="section" form="short" suffix=" "/>
+ <text variable="section"/>
+ </group>
+ </group>
+ </if>
+ <else-if type="article-journal">
+ <choose>
+ <if variable="volume issue" match="any">
+ <text variable="page" prefix=": "/>
+ </if>
+ <else>
+ <text variable="page" prefix=", "/>
+ </else>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="point-locators">
+ <choose>
+ <if variable="locator">
+ <choose>
+ <if locator="page" match="none">
+ <choose>
+ <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <choose>
+ <if variable="volume">
+ <group>
+ <text term="volume" form="short" suffix=" "/>
+ <number variable="volume" form="numeric"/>
+ <label variable="locator" form="short" prefix=", " suffix=" "/>
+ </group>
+ </if>
+ <else>
+ <label variable="locator" form="short" suffix=" "/>
+ </else>
+ </choose>
+ </if>
+ <else>
+ <label variable="locator" form="short" suffix=" "/>
+ </else>
+ </choose>
+ </if>
+ <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <number variable="volume" form="numeric" suffix=":"/>
+ </else-if>
+ </choose>
+ <text variable="locator"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="container-prefix">
+ <text term="in" text-case="capitalize-first"/>
+ </macro>
+ <macro name="container-title">
+ <choose>
+ <if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">
+ <text macro="container-prefix" suffix=" "/>
+ </if>
+ </choose>
+ <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="publisher">
+ <group delimiter=": ">
+ <text variable="publisher-place"/>
+ <text variable="publisher"/>
+ </group>
+ </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>
+ <macro name="day-month">
+ <date variable="issued">
+ <date-part name="month"/>
+ <date-part name="day" prefix=" "/>
+ </date>
+ </macro>
+ <macro name="collection-title">
+ <choose>
+ <if match="none" type="article-journal">
+ <choose>
+ <if match="none" is-numeric="collection-number">
+ <group delimiter=", ">
+ <text variable="collection-title" text-case="title"/>
+ <text variable="collection-number"/>
+ </group>
+ </if>
+ <else>
+ <group delimiter=" ">
+ <text variable="collection-title" text-case="title"/>
+ <text variable="collection-number"/>
+ </group>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="collection-title-journal">
+ <choose>
+ <if type="article-journal">
+ <group delimiter=" ">
+ <text variable="collection-title"/>
+ <text variable="collection-number"/>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="event">
+ <group>
+ <text term="presented at" suffix=" "/>
+ <text variable="event"/>
+ </group>
+ </macro>
+ <macro name="description">
+ <choose>
+ <if type="interview">
+ <group delimiter=". ">
+ <text macro="interviewer"/>
+ <text variable="medium" text-case="capitalize-first"/>
+ </group>
+ </if>
+ <else-if type="patent">
+ <group delimiter=" " prefix=". ">
+ <text variable="authority"/>
+ <text variable="number"/>
+ </group>
+ </else-if>
+ <else>
+ <text variable="medium" text-case="capitalize-first" prefix=". "/>
+ </else>
+ </choose>
+ <choose>
+ <if variable="title" match="none"/>
+ <else-if type="thesis personal_communication speech" match="any"/>
+ <else>
+ <group delimiter=" " prefix=". ">
+ <text variable="genre" text-case="capitalize-first"/>
+ <choose>
+ <if type="report">
+ <text variable="number"/>
+ </if>
+ </choose>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="issue">
+ <choose>
+ <if type="legal_case">
+ <text variable="authority" prefix=". "/>
+ </if>
+ <else-if type="speech">
+ <group prefix=". " delimiter=", ">
+ <group delimiter=" ">
+ <text variable="genre" text-case="capitalize-first"/>
+ <text macro="event"/>
+ </group>
+ <text variable="event-place"/>
+ <text macro="day-month"/>
+ </group>
+ </else-if>
+ <else-if type="article-newspaper article-magazine personal_communication" match="any">
+ <date variable="issued" form="text" prefix=", "/>
+ </else-if>
+ <else-if type="patent">
+ <group delimiter=", " prefix=", ">
+ <group delimiter=" ">
+ <!--Needs Localization-->
+ <text value="filed"/>
+ <date variable="submitted" form="text"/>
+ </group>
+ <group delimiter=" ">
+ <choose>
+ <if variable="issued submitted" match="all">
+ <text term="and"/>
+ </if>
+ </choose>
+ <!--Needs Localization-->
+ <text value="issued"/>
+ <date variable="issued" form="text"/>
+ </group>
+ </group>
+ </else-if>
+ <else-if type="article-journal" match="any"/>
+ <else>
+ <group prefix=". " delimiter=", ">
+ <choose>
+ <if type="thesis">
+ <text variable="genre" text-case="capitalize-first"/>
+ </if>
+ </choose>
+ <text macro="publisher"/>
+ </group>
+ </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>
+ <!---comma before forthcoming and n.d.-->
+ <else>
+ <group delimiter=", ">
+ <text macro="contributors-short"/>
+ <text macro="date-in-text"/>
+ </group>
+ </else>
+ </choose>
+ <text macro="point-locators"/>
+ </group>
+ </layout>
+ </citation>
+ <bibliography hanging-indent="true" et-al-min="11" et-al-use-first="7" subsequent-author-substitute="&#8212;&#8212;&#8212;" 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="description"/>
+ <text macro="secondary-contributors" prefix=". "/>
+ <text macro="container-title" prefix=". "/>
+ <text macro="container-contributors"/>
+ <text macro="edition"/>
+ <text macro="locators-chapter"/>
+ <text macro="collection-title-journal" prefix=", " suffix=", "/>
+ <text macro="locators"/>
+ <text macro="collection-title" prefix=". "/>
+ <text macro="issue"/>
+ <text macro="locators-article"/>
+ <text macro="access" prefix=". "/>
+ </layout>
+ </bibliography>
+</style>
diff --git a/data/templates/default.latex b/data/templates/default.latex
index d6cca9c98..31327c1d8 100644
--- a/data/templates/default.latex
+++ b/data/templates/default.latex
@@ -368,10 +368,25 @@ $endif$
$if(csl-refs)$
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
-\newenvironment{cslreferences}%
- {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}%
- \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}%
- {\par}
+\newlength{\csllabelwidth}
+\setlength{\csllabelwidth}{3em}
+\newenvironment{CSLReferences}[3] % #1 hanging-ident, #2 entry sp
+ {% don't indent paragraphs
+ \setlength{\parindent}{0pt}
+ % turn on hanging indent if param 1 is 1
+ \ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi
+ % set line spacing
+ % set entry spacing
+ \ifnum #2 > 0
+ \setlength{\parskip}{#3\baselineskip}
+ \fi
+ }%
+ {}
+\usepackage{calc} % for \widthof, \maxof
+\newcommand{\CSLBlock}[1]{#1\hfill\break}
+\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\maxof{\widthof{#1}}{\csllabelwidth}}{#1}}
+\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth}{#1}}
+\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
$endif$
$if(title)$
diff --git a/data/templates/styles.html b/data/templates/styles.html
index b179d4871..3d7ebb55d 100644
--- a/data/templates/styles.html
+++ b/data/templates/styles.html
@@ -121,3 +121,27 @@ $endif$
$if(displaymath-css)$
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
$endif$
+$if(csl-css)$
+div.csl-bib-body { }
+div.csl-entry {
+ clear: both;
+$if(csl-entry-spacing)$
+ margin-bottom: $csl-entry-spacing$;
+$endif$
+}
+.hanging div.csl-entry {
+ margin-left:2em;
+ text-indent:-2em;
+}
+div.csl-left-margin {
+ min-width:2em;
+ float:left;
+}
+div.csl-right-inline {
+ margin-left:2em;
+ padding-left:1em;
+}
+div.csl-indent {
+ margin-left: 2em;
+}
+$endif$
diff --git a/linux/control.in b/linux/control.in
index de0be6c58..0c1aab426 100644
--- a/linux/control.in
+++ b/linux/control.in
@@ -5,7 +5,7 @@ Priority: optional
Architecture: ARCHITECTURE
Installed-Size: INSTALLED_SIZE
Depends: libc6 (>= 2.13), libgmp10, zlib1g (>= 1:1.1.4)
-Replaces: pandoc-data, pandoc-citeproc
+Replaces: pandoc-data
Suggests: texlive-latex-recommended, texlive-xetex,
texlive-fonts-recommended
Maintainer: John MacFarlane <jgm@berkeley.edu>
diff --git a/linux/make_artifacts.sh b/linux/make_artifacts.sh
index 3cb892a8e..ffbfe4697 100644
--- a/linux/make_artifacts.sh
+++ b/linux/make_artifacts.sh
@@ -16,10 +16,10 @@ ghc --version
cabal v2-update
cabal v2-clean
-cabal v2-configure --enable-tests -f-export-dynamic -fstatic -fembed_data_files -fbibutils --enable-executable-static --ghc-options '-optc-Os -optl=-pthread -split-sections' . pandoc-citeproc
-cabal v2-build . pandoc-citeproc
-cabal v2-test -j1 . pandoc-citeproc
-for f in $(find dist-newstyle -name 'pandoc*' -type f -perm /400); do cp $f /artifacts/; done
+cabal v2-configure --enable-tests -f-export-dynamic -fstatic -fembed_data_files -fbibutils --enable-executable-static --ghc-options '-optc-Os -optl=-pthread -split-sections' pandoc
+cabal v2-build
+cabal v2-test -j1
+for f in $(find dist-newstyle -name 'pandoc' -type f -perm /400); do cp $f /artifacts/; done
# make deb
@@ -35,21 +35,14 @@ mkdir -p $DEST/bin
mkdir -p $DEST/share/man/man1
mkdir -p $DEST/share/doc/pandoc
-mkdir -p $DEST/share/doc/pandoc-citeproc
find $DIST -type d | xargs chmod 755
cp $ARTIFACTS/pandoc $DEST/bin/
-cp $ARTIFACTS/pandoc-citeproc $DEST/bin/
strip $DEST/bin/pandoc
-strip $DEST/bin/pandoc-citeproc
cp /mnt/man/pandoc.1 $DEST/share/man/man1/pandoc.1
-$ARTIFACTS/pandoc-citeproc --man > $DEST/share/man/man1/pandoc-citeproc.1
gzip -9 $DEST/share/man/man1/pandoc.1
-gzip -9 $DEST/share/man/man1/pandoc-citeproc.1
cp /mnt/COPYRIGHT $COPYRIGHT
echo "" >> $COPYRIGHT
-echo "pandoc-citeproc" >> $COPYRIGHT
-$ARTIFACTS/pandoc-citeproc --license >> $COPYRIGHT
INSTALLED_SIZE=$(du -k -s $DEST | awk '{print $1}')
mkdir $DIST/DEBIAN
@@ -70,13 +63,10 @@ cd $ARTIFACTS
rm -rf $TARGET
mkdir $TARGET
mkdir $TARGET/bin $TARGET/share $TARGET/share/man $TARGET/share/man/man1
-./pandoc-citeproc --man > $TARGET/share/man/man1/pandoc-citeproc.1
cp /mnt/man/pandoc.1 $TARGET/share/man/man1
-mv pandoc pandoc-citeproc $TARGET/bin
+mv pandoc $TARGET/bin
strip $TARGET/bin/pandoc
-strip $TARGET/bin/pandoc-citeproc
gzip -9 $TARGET/share/man/man1/pandoc.1
-gzip -9 $TARGET/share/man/man1/pandoc-citeproc.1
tar cvzf $TARGET-linux-amd64.tar.gz $TARGET
rm -r $TARGET
diff --git a/macos/Makefile b/macos/Makefile
index bc9d98c8a..25fa7cc6d 100644
--- a/macos/Makefile
+++ b/macos/Makefile
@@ -6,9 +6,8 @@ ALL=$(BASE)-macOS.pkg $(BASE)-macOS.zip
all: $(ALL) notarize
signed.txt: $(DEST)
- chmod +x $(DEST)/bin/pandoc $(DEST)/bin/pandoc-citeproc
+ chmod +x $(DEST)/bin/pandoc
codesign --force --options runtime -s "5U2WKE6DES" $(DEST)/bin/pandoc
- codesign --force --options runtime -s "5U2WKE6DES" $(DEST)/bin/pandoc-citeproc
echo "SIGNED" > signed.txt
pandoc.pkg: signed.txt
diff --git a/pandoc.cabal b/pandoc.cabal
index a6e277283..619712160 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -180,6 +180,9 @@ data-files:
data/bash_completion.tpl
-- jats csl
data/jats.csl
+ -- citeproc
+ data/default.csl
+ citeproc/biblatex-localization/*.lbx.strings
-- documentation
MANUAL.txt, COPYRIGHT
extra-source-files:
@@ -201,6 +204,9 @@ extra-source-files:
test/bodybg.gif
test/*.native
test/command/*.md
+ test/command/*.csl
+ test/command/biblio.bib
+ test/command/biblatex-examples.bib
test/command/A.txt
test/command/B.txt
test/command/C.txt
@@ -397,6 +403,7 @@ library
blaze-markup >= 0.8 && < 0.9,
bytestring >= 0.9 && < 0.11,
case-insensitive >= 1.2 && < 1.3,
+ citeproc >= 0.0 && < 0.1,
commonmark >= 0.1.0.2 && < 0.2,
commonmark-extensions >= 0.2 && < 0.3,
commonmark-pandoc >= 0.2 && < 0.3,
@@ -409,6 +416,7 @@ library
doctemplates >= 0.8.2 && < 0.9,
emojis >= 0.1 && < 0.2,
exceptions >= 0.8 && < 0.11,
+ file-embed >= 0.0 && < 0.1,
filepath >= 1.1 && < 1.5,
haddock-library >= 1.8 && < 1.10,
hslua >= 1.1 && < 1.3,
@@ -457,7 +465,6 @@ library
build-depends: unix >= 2.4 && < 2.8
if flag(embed_data_files)
cpp-options: -DEMBED_DATA_FILES
- build-depends: file-embed >= 0.0 && < 0.1
other-modules: Text.Pandoc.Data
if os(windows)
cpp-options: -D_WINDOWS
@@ -495,6 +502,8 @@ library
Text.Pandoc.Readers.Markdown,
Text.Pandoc.Readers.CommonMark,
Text.Pandoc.Readers.Creole,
+ Text.Pandoc.Readers.BibTeX,
+ Text.Pandoc.Readers.CslJson,
Text.Pandoc.Readers.MediaWiki,
Text.Pandoc.Readers.Vimwiki,
Text.Pandoc.Readers.RST,
@@ -553,6 +562,7 @@ library
Text.Pandoc.Writers.FB2,
Text.Pandoc.Writers.TEI,
Text.Pandoc.Writers.Muse,
+ Text.Pandoc.Writers.CslJson,
Text.Pandoc.Writers.Math,
Text.Pandoc.Writers.Shared,
Text.Pandoc.Writers.OOXML,
@@ -572,7 +582,8 @@ library
Text.Pandoc.Emoji,
Text.Pandoc.ImageSize,
Text.Pandoc.BCP47,
- Text.Pandoc.Class
+ Text.Pandoc.Class,
+ Text.Pandoc.Citeproc
other-modules: Text.Pandoc.App.CommandLineOptions,
Text.Pandoc.App.FormatHeuristics,
Text.Pandoc.App.Opt,
@@ -651,6 +662,12 @@ library
Text.Pandoc.Translations,
Text.Pandoc.Slides,
Text.Pandoc.Image,
+ Text.Pandoc.Citeproc.BibTeX,
+ Text.Pandoc.Citeproc.CslJson,
+ Text.Pandoc.Citeproc.Data,
+ Text.Pandoc.Citeproc.Locator,
+ Text.Pandoc.Citeproc.MetaValue,
+ Text.Pandoc.Citeproc.Util,
Paths_pandoc
autogen-modules: Paths_pandoc
buildable: True
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs
index aa75436a4..58f605a19 100644
--- a/src/Text/Pandoc/App.hs
+++ b/src/Text/Pandoc/App.hs
@@ -76,15 +76,6 @@ convertWithOpts opts = do
mapM_ (UTF8.hPutStrLn stdout) (fromMaybe ["-"] $ optInputFiles opts)
exitSuccess
- let isPandocCiteproc (JSONFilter f) = takeBaseName f == "pandoc-citeproc"
- isPandocCiteproc _ = False
- -- --bibliography implies -F pandoc-citeproc for backwards compatibility:
- let needsCiteproc = isJust (lookupMeta "bibliography"
- (optMetadata opts)) &&
- optCiteMethod opts `notElem` [Natbib, Biblatex] &&
- not (any isPandocCiteproc filters)
- let filters' = filters ++ [ JSONFilter "pandoc-citeproc" | needsCiteproc ]
-
let sources = case optInputFiles opts of
Just xs | not (optIgnoreArgs opts) -> xs
_ -> ["-"]
@@ -170,7 +161,14 @@ convertWithOpts opts = do
let writerName = outputWriterName outputSettings
let writerOptions = outputWriterOptions outputSettings
- let standalone = optStandalone opts || not (isTextFormat format) || pdfOutput
+ let bibOutput = writerName == "bibtex" ||
+ writerName == "biblatex" ||
+ writerName == "csljson"
+
+ let standalone = optStandalone opts ||
+ not (isTextFormat format) ||
+ pdfOutput ||
+ bibOutput
-- We don't want to send output to the terminal if the user
-- does 'pandoc -t docx input.txt'; though we allow them to
@@ -272,6 +270,13 @@ convertWithOpts opts = do
setNoCheckCertificate (optNoCheckCertificate opts)
+ let isPandocCiteproc (JSONFilter f) = takeBaseName f == "pandoc-citeproc"
+ isPandocCiteproc _ = False
+
+ when (any isPandocCiteproc filters) $
+ report $ Deprecated "pandoc-citeproc filter"
+ "Use --citeproc instead."
+
doc <- sourceToDoc sources >>=
( (if isJust (optExtractMedia opts)
then fillMediaBag
@@ -279,7 +284,7 @@ convertWithOpts opts = do
>=> return . adjustMetadata (metadataFromFile <>)
>=> return . adjustMetadata (<> metadata)
>=> applyTransforms transforms
- >=> applyFilters readerOpts filters' [T.unpack format]
+ >=> applyFilters readerOpts filters [T.unpack format]
>=> maybe return extractMedia (optExtractMedia opts)
)
diff --git a/src/Text/Pandoc/App/CommandLineOptions.hs b/src/Text/Pandoc/App/CommandLineOptions.hs
index 99dba4613..36b024ba7 100644
--- a/src/Text/Pandoc/App/CommandLineOptions.hs
+++ b/src/Text/Pandoc/App/CommandLineOptions.hs
@@ -656,6 +656,12 @@ options =
"all|none|best")
"" -- "Starting number for sections, subsections, etc."
+ , Option "C" ["citeproc"]
+ (NoArg
+ (\opt -> return opt { optFilters =
+ optFilters opt ++ [CiteprocFilter] }))
+ "" -- "Process citations"
+
, Option "" ["bibliography"]
(ReqArg
(\arg opt -> return opt{ optMetadata =
diff --git a/src/Text/Pandoc/App/FormatHeuristics.hs b/src/Text/Pandoc/App/FormatHeuristics.hs
index 97eebe3b6..155b7e586 100644
--- a/src/Text/Pandoc/App/FormatHeuristics.hs
+++ b/src/Text/Pandoc/App/FormatHeuristics.hs
@@ -74,5 +74,6 @@ formatFromFilePath x =
".xhtml" -> Just "html"
".ipynb" -> Just "ipynb"
".csv" -> Just "csv"
+ ".bib" -> Just "biblatex"
['.',y] | y `elem` ['1'..'9'] -> Just "man"
_ -> Nothing
diff --git a/src/Text/Pandoc/App/Opt.hs b/src/Text/Pandoc/App/Opt.hs
index 5c39f4ab6..3da6a936b 100644
--- a/src/Text/Pandoc/App/Opt.hs
+++ b/src/Text/Pandoc/App/Opt.hs
@@ -294,6 +294,11 @@ doOpt (k',v) = do
parseYAML v >>= \x -> return (\o -> o{ optColumns = x })
"filters" ->
parseYAML v >>= \x -> return (\o -> o{ optFilters = optFilters o <> x })
+ "citeproc" ->
+ parseYAML v >>= \x ->
+ if x
+ then return (\o -> o{ optFilters = CiteprocFilter : optFilters o })
+ else return id
"email-obfuscation" ->
parseYAML v >>= \x -> return (\o -> o{ optEmailObfuscation = x })
"identifier-prefix" ->
diff --git a/src/Text/Pandoc/Citeproc.hs b/src/Text/Pandoc/Citeproc.hs
new file mode 100644
index 000000000..9fb0e2f0b
--- /dev/null
+++ b/src/Text/Pandoc/Citeproc.hs
@@ -0,0 +1,492 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE ViewPatterns #-}
+{-# LANGUAGE StrictData #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE DeriveFunctor #-}
+{-# LANGUAGE DeriveFoldable #-}
+{-# LANGUAGE DeriveTraversable #-}
+module Text.Pandoc.Citeproc
+ ( processCitations )
+where
+
+import Citeproc as Citeproc
+import Citeproc.Pandoc ()
+import Text.Pandoc.Citeproc.Locator (parseLocator)
+import Text.Pandoc.Citeproc.CslJson (cslJsonToReferences)
+import Text.Pandoc.Citeproc.BibTeX (readBibtexString, Variant(..))
+import Text.Pandoc.Citeproc.MetaValue (metaValueToReference, metaValueToText)
+import Data.ByteString (ByteString)
+import qualified Data.ByteString.Lazy as L
+import Text.Pandoc.Definition as Pandoc
+import Text.Pandoc.Walk
+import Text.Pandoc.Builder as B
+import Text.Pandoc (PandocMonad(..), PandocError(..), readMarkdown,
+ readDataFile, ReaderOptions(..), pandocExtensions,
+ report, LogMessage(..), fetchItem)
+import Text.Pandoc.Shared (stringify, ordNub, blocksToInlines)
+import qualified Text.Pandoc.UTF8 as UTF8
+import Data.Aeson (eitherDecode)
+import Data.Default
+import Data.Ord ()
+import qualified Data.Map as M
+import qualified Data.Set as Set
+import Data.Char (isPunctuation)
+import Data.Text (Text)
+import qualified Data.Text as T
+import Control.Monad.State
+import qualified Data.Sequence as Seq
+import qualified Data.Foldable as Foldable
+import System.FilePath
+import Control.Applicative
+import Control.Monad.Except
+import Data.Maybe (mapMaybe, fromMaybe)
+import Safe (lastMay, initSafe)
+-- import Debug.Trace as Trace (trace, traceShowId)
+
+
+processCitations :: PandocMonad m => Pandoc -> m Pandoc
+processCitations (Pandoc meta bs) = do
+ let cslfile = (lookupMeta "csl" meta <|> lookupMeta "citation-style" meta)
+ >>= metaValueToText
+
+ let getFile fp = catchError (fst <$> fetchItem fp)
+ (\e -> catchError (readDataFile
+ (T.unpack $ "csl/" <> fp))
+ (\_ -> throwError e))
+
+ let getCslDefault = readDataFile "default.csl"
+
+ cslContents <- UTF8.toText <$> maybe getCslDefault getFile cslfile
+
+ let abbrevFile = lookupMeta "citation-abbreviations" meta >>= metaValueToText
+
+ mbAbbrevs <- case abbrevFile of
+ Nothing -> return Nothing
+ Just fp -> do
+ rawAbbr <- getFile fp
+ case eitherDecode (L.fromStrict rawAbbr) of
+ Left err -> throwError $ PandocCiteprocError $
+ CiteprocParseError $
+ "Could not parse abbreviations file " <> fp
+ <> "\n" <> T.pack err
+ Right abbr -> return $ Just abbr
+
+ let getParentStyle url = UTF8.toText . fst <$> fetchItem url
+
+ -- TODO check .csl directory if not found
+ styleRes <- Citeproc.parseStyle getParentStyle cslContents
+ style <-
+ case styleRes of
+ Left err -> throwError $ PandocAppError $ prettyCiteprocError err
+ Right style -> return style{ styleAbbreviations = mbAbbrevs }
+ let mblang = parseLang <$>
+ ((lookupMeta "lang" meta <|> lookupMeta "locale" meta) >>= metaValueToText)
+ let locale = Citeproc.mergeLocales mblang style
+ let getCiteId (Cite cs _) = Set.fromList $ map B.citationId cs
+ getCiteId _ = mempty
+ let metanocites = lookupMeta "nocite" meta
+ let meta' = deleteMeta "nocite" meta
+ let nocites = maybe mempty (query getCiteId) metanocites
+ let citeIds = query getCiteId (Pandoc meta bs)
+ let idpred = if "*" `Set.member` nocites
+ then const True
+ else (\c -> c `Set.member` citeIds ||
+ c `Set.member` nocites)
+ refs <- map (linkifyVariables . legacyDateRanges) <$>
+ case lookupMeta "references" meta of
+ Just (MetaList rs) -> return $ mapMaybe metaValueToReference rs
+ _ ->
+ case lookupMeta "bibliography" meta of
+ Just (MetaList xs) ->
+ mconcat <$>
+ mapM (getRefsFromBib locale idpred)
+ (mapMaybe metaValueToText xs)
+ Just x ->
+ case metaValueToText x of
+ Just fp -> getRefsFromBib locale idpred fp
+ Nothing -> return []
+ Nothing -> return []
+ let otherIdsMap = foldr (\ref m ->
+ case T.words . extractText <$>
+ M.lookup "other-ids" (referenceVariables ref) of
+ Nothing -> m
+ Just ids -> foldr
+ (\id' ->
+ M.insert id' (referenceId ref)) m ids)
+ M.empty refs
+ -- TODO: issue warning if no refs defined
+ let citations = getCitations locale otherIdsMap $ Pandoc meta' bs
+ let linkCites = maybe False truish $ lookupMeta "link-citations" meta
+ let opts = defaultCiteprocOptions{ linkCitations = linkCites }
+ let result = Citeproc.citeproc opts style (localeLanguage locale)
+ refs citations
+ mapM_ (report . CiteprocWarning) (resultWarnings result)
+ let sopts = styleOptions style
+ let classes = "references" : -- TODO remove this or keep for compatibility?
+ "csl-bib-body" :
+ ["hanging-indent" | styleHangingIndent sopts]
+ let refkvs = (case styleEntrySpacing sopts of
+ Just es | es > 0 -> (("entry-spacing",T.pack $ show es):)
+ _ -> id) .
+ (case styleLineSpacing sopts of
+ Just ls | ls > 1 -> (("line-spacing",T.pack $ show ls):)
+ _ -> id) $ []
+ let bibs = mconcat $ map (\(ident, out) ->
+ B.divWith ("ref-" <> ident,["csl-entry"],[]) . B.para $
+ walk (convertQuotes locale) out)
+ (resultBibliography result)
+ let moveNotes = maybe True truish $
+ lookupMeta "notes-after-punctuation" meta
+ let cits = map (walk (convertQuotes locale)) $
+ resultCitations result
+
+ let fixQuotes = case localePunctuationInQuote locale of
+ Just True ->
+ B.toList . movePunctuationInsideQuotes . B.fromList
+ _ -> id
+
+ let Pandoc meta'' bs' =
+ maybe id (setMeta "nocite") metanocites $
+ walk (fixQuotes . mvPunct moveNotes locale) $ walk deNote $
+ evalState (walkM insertResolvedCitations $ Pandoc meta' bs)
+ $ cits
+ return $ Pandoc meta'' $ insertRefs refkvs classes meta'' (B.toList bibs) bs'
+
+getRefsFromBib :: PandocMonad m
+ => Locale -> (Text -> Bool) -> Text -> m [Reference Inlines]
+getRefsFromBib locale idpred t = do
+ let fp = T.unpack t
+ raw <- readFileStrict fp
+ case formatFromExtension fp of
+ Just f -> getRefs locale f idpred raw
+ Nothing -> throwError $ PandocAppError $
+ "Could not deterine bibliography format for " <> t
+
+getRefs :: PandocMonad m
+ => Locale
+ -> BibFormat
+ -> (Text -> Bool)
+ -> ByteString
+ -> m [Reference Inlines]
+getRefs locale format idpred raw =
+ case format of
+ Format_bibtex ->
+ either (throwError . PandocAppError . T.pack . show) return .
+ readBibtexString Bibtex locale idpred . UTF8.toText $ raw
+ Format_biblatex ->
+ either (throwError . PandocAppError . T.pack . show) return .
+ readBibtexString Biblatex locale idpred . UTF8.toText $ raw
+ Format_json ->
+ either (throwError . PandocAppError . T.pack)
+ (return . filter (idpred . unItemId . referenceId)) .
+ cslJsonToReferences $ raw
+ Format_yaml -> do
+ Pandoc meta _ <-
+ readMarkdown
+ def{ readerExtensions = pandocExtensions }
+ (UTF8.toText raw)
+ case lookupMeta "references" meta of
+ Just (MetaList rs) ->
+ return $ filter (idpred . unItemId . referenceId)
+ $ mapMaybe metaValueToReference rs
+ _ -> throwError $ PandocAppError "No references field"
+
+-- localized quotes
+convertQuotes :: Locale -> Inline -> Inline
+convertQuotes locale (Quoted qt ils) =
+ case (M.lookup openterm terms, M.lookup closeterm terms) of
+ (Just ((_,oq):_), Just ((_,cq):_)) ->
+ Span ("",[],[]) (Str oq : ils ++ [Str cq])
+ _ -> Quoted qt ils
+ where
+ terms = localeTerms locale
+ openterm = case qt of
+ DoubleQuote -> "open-quote"
+ SingleQuote -> "open-inner-quote"
+ closeterm = case qt of
+ DoubleQuote -> "close-quote"
+ SingleQuote -> "close-inner-quote"
+convertQuotes _ x = x
+
+-- assumes we walk in same order as query
+insertResolvedCitations :: Inline -> State [Inlines] Inline
+insertResolvedCitations (Cite cs ils) = do
+ resolved <- get
+ case resolved of
+ [] -> return (Cite cs ils)
+ (x:xs) -> do
+ put xs
+ return $ Cite cs (B.toList x)
+insertResolvedCitations x = return x
+
+getCitations :: Locale
+ -> M.Map Text ItemId
+ -> Pandoc
+ -> [Citeproc.Citation Inlines]
+getCitations locale otherIdsMap = Foldable.toList . query getCitation
+ where
+ getCitation (Cite cs _fallback) = Seq.singleton $
+ Citeproc.Citation { Citeproc.citationId = Nothing
+ , Citeproc.citationNoteNumber =
+ case cs of
+ [] -> Nothing
+ (Pandoc.Citation{ Pandoc.citationNoteNum = n }:
+ _) | n > 0 -> Just n
+ | otherwise -> Nothing
+ , Citeproc.citationItems =
+ fromPandocCitations locale otherIdsMap cs
+ }
+ getCitation _ = mempty
+
+fromPandocCitations :: Locale
+ -> M.Map Text ItemId
+ -> [Pandoc.Citation]
+ -> [CitationItem Inlines]
+fromPandocCitations locale otherIdsMap = concatMap go
+ where
+ go c =
+ let (loclab, suffix) = parseLocator locale (citationSuffix c)
+ (mblab, mbloc) = case loclab of
+ Just (loc, lab) -> (Just loc, Just lab)
+ Nothing -> (Nothing, Nothing)
+ cit = CitationItem
+ { citationItemId = fromMaybe
+ (ItemId $ Pandoc.citationId c)
+ (M.lookup (Pandoc.citationId c) otherIdsMap)
+ , citationItemLabel = mblab
+ , citationItemLocator = mbloc
+ , citationItemType = NormalCite
+ , citationItemPrefix = case citationPrefix c of
+ [] -> Nothing
+ ils -> Just $ B.fromList ils <>
+ B.space
+ , citationItemSuffix = case suffix of
+ [] -> Nothing
+ ils -> Just $ B.fromList ils
+ }
+ in if Pandoc.citationId c == "*"
+ then []
+ else
+ case citationMode c of
+ AuthorInText -> [ cit{ citationItemType = AuthorOnly
+ , citationItemSuffix = Nothing }
+ , cit{ citationItemType =
+ Citeproc.SuppressAuthor
+ , citationItemPrefix = Nothing } ]
+ NormalCitation -> [ cit ]
+ Pandoc.SuppressAuthor
+ -> [ cit{ citationItemType =
+ Citeproc.SuppressAuthor } ]
+
+
+
+data BibFormat =
+ Format_biblatex
+ | Format_bibtex
+ | Format_json
+ | Format_yaml
+ deriving (Show, Eq, Ord)
+
+formatFromExtension :: FilePath -> Maybe BibFormat
+formatFromExtension fp = case dropWhile (== '.') $ takeExtension fp of
+ "biblatex" -> Just Format_biblatex
+ "bibtex" -> Just Format_bibtex
+ "bib" -> Just Format_biblatex
+ "json" -> Just Format_json
+ "yaml" -> Just Format_yaml
+ _ -> Nothing
+
+
+isNote :: Inline -> Bool
+isNote (Note _) = True
+isNote (Cite _ [Note _]) = True
+ -- the following allows citation styles that are "in-text" but use superscript
+ -- references to be treated as if they are "notes" for the purposes of moving
+ -- the citations after trailing punctuation (see <https://github.com/jgm/pandoc-citeproc/issues/382>):
+isNote (Cite _ [Superscript _]) = True
+isNote _ = False
+
+isSpacy :: Inline -> Bool
+isSpacy Space = True
+isSpacy SoftBreak = True
+isSpacy _ = False
+
+
+mvPunct :: Bool -> Locale -> [Inline] -> [Inline]
+mvPunct moveNotes locale (x : xs)
+ | isSpacy x = x : mvPunct moveNotes locale xs
+-- 'x [^1],' -> 'x,[^1]'
+mvPunct moveNotes locale (q : s : x : ys)
+ | isSpacy s
+ , isNote x
+ = let spunct = T.takeWhile isPunctuation $ stringify ys
+ in if moveNotes
+ then if T.null spunct
+ then q : x : mvPunct moveNotes locale ys
+ else q : Str spunct : x : mvPunct moveNotes locale
+ (B.toList
+ (dropTextWhile isPunctuation (B.fromList ys)))
+ else q : x : mvPunct moveNotes locale ys
+-- 'x[^1],' -> 'x,[^1]'
+mvPunct moveNotes locale (Cite cs ils : ys)
+ | not (null ils)
+ , isNote (last ils)
+ , startWithPunct ys
+ , moveNotes
+ = let s = stringify ys
+ spunct = T.takeWhile isPunctuation s
+ in Cite cs (init ils
+ ++ [Str spunct | not (endWithPunct False (init ils))]
+ ++ [last ils]) :
+ mvPunct moveNotes locale
+ (B.toList (dropTextWhile isPunctuation (B.fromList ys)))
+mvPunct moveNotes locale (s : x : ys) | isSpacy s, isNote x =
+ x : mvPunct moveNotes locale ys
+mvPunct moveNotes locale (s : x@(Cite _ (Superscript _ : _)) : ys)
+ | isSpacy s = x : mvPunct moveNotes locale ys
+mvPunct moveNotes locale (Cite cs ils : Str "." : ys)
+ | "." `T.isSuffixOf` (stringify ils)
+ = Cite cs ils : mvPunct moveNotes locale ys
+mvPunct moveNotes locale (x:xs) = x : mvPunct moveNotes locale xs
+mvPunct _ _ [] = []
+
+endWithPunct :: Bool -> [Inline] -> Bool
+endWithPunct _ [] = False
+endWithPunct onlyFinal xs@(_:_) =
+ case reverse (T.unpack $ stringify xs) of
+ [] -> True
+ -- covers .), .", etc.:
+ (d:c:_) | isPunctuation d
+ && not onlyFinal
+ && isEndPunct c -> True
+ (c:_) | isEndPunct c -> True
+ | otherwise -> False
+ where isEndPunct c = c `elem` (".,;:!?" :: String)
+
+
+
+startWithPunct :: [Inline] -> Bool
+startWithPunct ils =
+ case T.uncons (stringify ils) of
+ Just (c,_) -> c `elem` (".,;:!?" :: [Char])
+ Nothing -> False
+
+truish :: MetaValue -> Bool
+truish (MetaBool t) = t
+truish (MetaString s) = isYesValue (T.toLower s)
+truish (MetaInlines ils) = isYesValue (T.toLower (stringify ils))
+truish (MetaBlocks [Plain ils]) = isYesValue (T.toLower (stringify ils))
+truish _ = False
+
+isYesValue :: Text -> Bool
+isYesValue "t" = True
+isYesValue "true" = True
+isYesValue "yes" = True
+isYesValue _ = False
+
+-- if document contains a Div with id="refs", insert
+-- references as its contents. Otherwise, insert references
+-- at the end of the document in a Div with id="refs"
+insertRefs :: [(Text,Text)] -> [Text] -> Meta -> [Block] -> [Block] -> [Block]
+insertRefs _ _ _ [] bs = bs
+insertRefs refkvs refclasses meta refs bs =
+ if isRefRemove meta
+ then bs
+ else case runState (walkM go bs) False of
+ (bs', True) -> bs'
+ (_, False)
+ -> case refTitle meta of
+ Nothing ->
+ case reverse bs of
+ Header lev (id',classes,kvs) ys : xs ->
+ reverse xs ++
+ [Header lev (id',addUnNumbered classes,kvs) ys,
+ Div ("refs",refclasses,refkvs) refs]
+ _ -> bs ++ [refDiv]
+ Just ils -> bs ++
+ [Header 1 ("bibliography", ["unnumbered"], []) ils,
+ refDiv]
+ where
+ refDiv = Div ("refs", refclasses, refkvs) refs
+ addUnNumbered cs = "unnumbered" : [c | c <- cs, c /= "unnumbered"]
+ go :: Block -> State Bool Block
+ go (Div ("refs",cs,kvs) xs) = do
+ put True
+ -- refHeader isn't used if you have an explicit references div
+ let cs' = ordNub $ cs ++ refclasses
+ return $ Div ("refs",cs',kvs) (xs ++ refs)
+ go x = return x
+
+refTitle :: Meta -> Maybe [Inline]
+refTitle meta =
+ case lookupMeta "reference-section-title" meta of
+ Just (MetaString s) -> Just [Str s]
+ Just (MetaInlines ils) -> Just ils
+ Just (MetaBlocks [Plain ils]) -> Just ils
+ Just (MetaBlocks [Para ils]) -> Just ils
+ _ -> Nothing
+
+isRefRemove :: Meta -> Bool
+isRefRemove meta =
+ maybe False truish $ lookupMeta "suppress-bibliography" meta
+
+legacyDateRanges :: Reference Inlines -> Reference Inlines
+legacyDateRanges ref =
+ ref{ referenceVariables = M.map go $ referenceVariables ref }
+ where
+ go (DateVal d)
+ | null (dateParts d)
+ , Just lit <- dateLiteral d
+ = case T.splitOn "_" lit of
+ [x,y] -> case Citeproc.rawDateEDTF (x <> "/" <> y) of
+ Just d' -> DateVal d'
+ Nothing -> DateVal d
+ _ -> DateVal d
+ go x = x
+
+linkifyVariables :: Reference Inlines -> Reference Inlines
+linkifyVariables ref =
+ ref{ referenceVariables = M.mapWithKey go $ referenceVariables ref }
+ where
+ go "URL" x = tolink "https://" x
+ go "DOI" x = tolink "https://doi.org/" x
+ go "ISBN" x = tolink "https://worldcat.org/isbn/" x
+ go "PMID" x = tolink "https://www.ncbi.nlm.nih.gov/pubmed/" x
+ go "PMCID" x = tolink "https://www.ncbi.nlm.nih.gov/pmc/articles/" x
+ go _ x = x
+ tolink pref x = let x' = extractText x
+ x'' = if "://" `T.isInfixOf` x'
+ then x'
+ else pref <> x'
+ in FancyVal (B.link x'' "" (B.str x'))
+
+extractText :: Val Inlines -> Text
+extractText (TextVal x) = x
+extractText (FancyVal x) = toText x
+extractText (NumVal n) = T.pack (show n)
+extractText _ = mempty
+
+deNote :: Inline -> Inline
+deNote (Note bs) = Note $ walk go bs
+ where
+ go (Note bs')
+ = Span ("",[],[]) (Space : Str "(" :
+ (removeFinalPeriod
+ (blocksToInlines bs')) ++ [Str ")"])
+ go x = x
+deNote x = x
+
+-- Note: we can't use dropTextWhileEnd because this would
+-- remove the final period on abbreviations like Ibid.
+-- But removing a final Str "." is safe.
+removeFinalPeriod :: [Inline] -> [Inline]
+removeFinalPeriod ils =
+ case lastMay ils of
+ Just (Str ".") -> initSafe ils
+ _ -> ils
+
+
+
diff --git a/src/Text/Pandoc/Citeproc/BibTeX.hs b/src/Text/Pandoc/Citeproc/BibTeX.hs
new file mode 100644
index 000000000..5919fee77
--- /dev/null
+++ b/src/Text/Pandoc/Citeproc/BibTeX.hs
@@ -0,0 +1,1237 @@
+{-# LANGUAGE ViewPatterns #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
+-----------------------------------------------------------------------------
+-- |
+-- Module : Text.CSL.Input.Bibtex
+-- Copyright : (c) John MacFarlane
+-- License : BSD-style (see LICENSE)
+--
+-- Maintainer : John MacFarlane <fiddlosopher@gmail.com>
+-- Stability : unstable-- Portability : unportable
+--
+-----------------------------------------------------------------------------
+
+module Text.Pandoc.Citeproc.BibTeX
+ ( Variant(..)
+ , readBibtexString
+ )
+ where
+
+import Text.Pandoc.Definition
+import Text.Pandoc.Builder as B
+import Text.Pandoc.Readers.LaTeX (readLaTeX)
+import Text.Pandoc.Extensions (Extension(..), extensionsFromList)
+import Text.Pandoc.Options (ReaderOptions(..))
+import Text.Pandoc.Class (runPure)
+import Text.Pandoc.Error (PandocError)
+import Text.Pandoc.Shared (stringify)
+import qualified Text.Pandoc.Walk as Walk
+import Citeproc.Types
+import Citeproc.CaseTransform (withSentenceCase)
+import Citeproc.Pandoc (caseTransform)
+import Text.Pandoc.Citeproc.Util (toIETF)
+import Text.Pandoc.Citeproc.Data (biblatexStringMap)
+import Data.Default
+import Data.Text (Text)
+import qualified Data.Text as T
+import qualified Data.Map as Map
+import Data.Maybe
+import Text.Parsec hiding (State, many, (<|>))
+import Control.Applicative
+import Data.List.Split (splitOn, splitWhen, wordsBy)
+import Control.Monad.RWS hiding ((<>))
+import qualified Data.Sequence as Seq
+import Data.Char (isAlphaNum, isDigit, isLetter,
+ isUpper, toLower, toUpper,
+ isLower, isPunctuation)
+import Data.List (foldl', intercalate)
+import Safe (readMay)
+
+data Variant = Bibtex | Biblatex
+ deriving (Show, Eq, Ord)
+
+-- | Parse BibTeX or BibLaTeX into a list of 'Reference's.
+readBibtexString :: Variant -- ^ bibtex or biblatex
+ -> Locale -- ^ Locale
+ -> (Text -> Bool) -- ^ Filter on citation ids
+ -> Text -- ^ bibtex/biblatex text
+ -> Either ParseError [Reference Inlines]
+readBibtexString variant locale idpred contents = do
+ case runParser (((resolveCrossRefs variant <$> bibEntries) <* eof) >>=
+ mapM (itemToReference locale variant) .
+ filter (idpred . identifier))
+ (fromMaybe defaultLang $ localeLanguage locale, Map.empty)
+ "" contents of
+ Left err -> Left err
+ Right xs -> return xs
+
+defaultLang :: Lang
+defaultLang = Lang "en" (Just "US")
+
+-- a map of bibtex "string" macros
+type StringMap = Map.Map Text Text
+
+type BibParser = Parsec Text (Lang, StringMap)
+
+data Item = Item{ identifier :: Text
+ , sourcePos :: SourcePos
+ , entryType :: Text
+ , fields :: Map.Map Text Text
+ }
+ deriving (Show, Ord, Eq)
+
+itemToReference :: Locale -> Variant -> Item -> BibParser (Reference Inlines)
+itemToReference locale variant item = do
+ setPosition (sourcePos item)
+ bib item $ do
+ let lang = fromMaybe defaultLang $ localeLanguage locale
+ modify $ \st -> st{ localeLang = lang,
+ untitlecase = case lang of
+ (Lang "en" _) -> True
+ _ -> False }
+
+ id' <- asks identifier
+ otherIds <- (Just <$> getRawField "ids")
+ <|> return Nothing
+ (reftype, genre) <- getTypeAndGenre
+ -- hyphenation:
+ let getLangId = do
+ langid <- T.strip . T.toLower <$> getRawField "langid"
+ idopts <- T.strip . T.toLower . stringify <$>
+ getField "langidopts" <|> return ""
+ case (langid, idopts) of
+ ("english","variant=british") -> return "british"
+ ("english","variant=american") -> return "american"
+ ("english","variant=us") -> return "american"
+ ("english","variant=usmax") -> return "american"
+ ("english","variant=uk") -> return "british"
+ ("english","variant=australian") -> return "australian"
+ ("english","variant=newzealand") -> return "newzealand"
+ (x,_) -> return x
+ hyphenation <- (Just . toIETF . T.toLower <$>
+ (getLangId <|> getRawField "hyphenation"))
+ <|> return Nothing
+ modify $ \s -> s{ untitlecase = untitlecase s &&
+ case hyphenation of
+ Just x -> "en-" `T.isPrefixOf` x
+ _ -> True }
+
+
+ opts <- (parseOptions <$> getRawField "options") <|> return []
+
+ et <- asks entryType
+
+ -- titles
+ let isArticle = et `elem`
+ ["article", "periodical", "suppperiodical", "review"]
+ let isPeriodical = et == "periodical"
+ let isChapterlike = et `elem`
+ ["inbook","incollection","inproceedings","inreference","bookinbook"]
+
+ let getFieldMaybe f = (Just <$> getField f) <|> return Nothing
+
+ -- names
+ let getNameList' f = Just <$>
+ getNameList (("bibtex", case variant of
+ Bibtex -> "true"
+ Biblatex -> "false") : opts) f
+
+ author' <- getNameList' "author" <|> return Nothing
+ containerAuthor' <- getNameList' "bookauthor" <|> return Nothing
+ translator' <- getNameList' "translator" <|> return Nothing
+ editortype <- getRawField "editortype" <|> return mempty
+ editor'' <- getNameList' "editor" <|> return Nothing
+ director'' <- getNameList' "director" <|> return Nothing
+ let (editor', director') = case editortype of
+ "director" -> (Nothing, editor'')
+ _ -> (editor'', director'')
+ -- FIXME: add same for editora, editorb, editorc
+
+ -- dates
+ issued' <- (Just <$> (getDate "date" <|> getOldDate mempty)) <|>
+ return Nothing
+ eventDate' <- (Just <$> (getDate "eventdate" <|> getOldDate "event")) <|>
+ return Nothing
+ origDate' <- (Just <$> (getDate "origdate" <|> getOldDate "orig")) <|>
+ return Nothing
+ accessed' <- (Just <$> (getDate "urldate" <|> getOldDate "url")) <|>
+ return Nothing
+
+ -- locators
+ pages' <- getFieldMaybe "pages"
+ volume' <- getFieldMaybe "volume"
+ part' <- getFieldMaybe "part"
+ volumes' <- getFieldMaybe "volumes"
+ pagetotal' <- getFieldMaybe "pagetotal"
+ chapter' <- getFieldMaybe "chapter"
+ edition' <- getFieldMaybe "edition"
+ version' <- getFieldMaybe "version"
+ (number', collectionNumber', issue') <-
+ (getField "number" >>= \x ->
+ if et `elem` ["book","collection","proceedings","reference",
+ "mvbook","mvcollection","mvproceedings", "mvreference",
+ "bookinbook","inbook", "incollection","inproceedings",
+ "inreference", "suppbook","suppcollection"]
+ then return (Nothing, Just x, Nothing)
+ else if isArticle
+ then (getField "issue" >>= \y ->
+ return (Nothing, Nothing, Just $ concatWith ',' [x,y]))
+ <|> return (Nothing, Nothing, Just x)
+ else return (Just x, Nothing, Nothing))
+ <|> return (Nothing, Nothing, Nothing)
+
+ -- titles
+ hasMaintitle <- (True <$ getRawField "maintitle") <|> return False
+
+ title' <- Just <$>
+ ((guard isPeriodical >> getTitle "issuetitle")
+ <|> (guard hasMaintitle >>
+ guard (not isChapterlike) >>
+ getTitle "maintitle")
+ <|> getTitle "title")
+ <|> return Nothing
+
+ subtitle' <- (guard isPeriodical >> getTitle "issuesubtitle")
+ <|> (guard hasMaintitle >>
+ guard (not isChapterlike) >>
+ getTitle "mainsubtitle")
+ <|> getTitle "subtitle"
+ <|> return mempty
+ titleaddon' <- (guard hasMaintitle >>
+ guard (not isChapterlike) >>
+ getTitle "maintitleaddon")
+ <|> getTitle "titleaddon"
+ <|> return mempty
+
+ volumeTitle' <- Just <$>
+ ((guard hasMaintitle >>
+ guard (not isChapterlike) >>
+ getTitle "title")
+ <|> (guard hasMaintitle >>
+ guard isChapterlike >>
+ getTitle "booktitle"))
+ <|> return Nothing
+ volumeSubtitle' <- (guard hasMaintitle >>
+ guard (not isChapterlike) >>
+ getTitle "subtitle")
+ <|> (guard hasMaintitle >>
+ guard isChapterlike >>
+ getTitle "booksubtitle")
+ <|> return mempty
+ volumeTitleAddon' <- (guard hasMaintitle >>
+ guard (not isChapterlike) >>
+ getTitle "titleaddon")
+ <|> (guard hasMaintitle >>
+ guard isChapterlike >>
+ getTitle "booktitleaddon")
+ <|> return mempty
+
+ containerTitle' <- Just <$>
+ ((guard isPeriodical >> getPeriodicalTitle "title")
+ <|> (guard isChapterlike >> getTitle "maintitle")
+ <|> (guard isChapterlike >> getTitle "booktitle")
+ <|> getPeriodicalTitle "journaltitle"
+ <|> getPeriodicalTitle "journal")
+ <|> return Nothing
+ containerSubtitle' <- (guard isPeriodical >> getPeriodicalTitle "subtitle")
+ <|> (guard isChapterlike >> getTitle "mainsubtitle")
+ <|> (guard isChapterlike >> getTitle "booksubtitle")
+ <|> getPeriodicalTitle "journalsubtitle"
+ <|> return mempty
+ containerTitleAddon' <- (guard isPeriodical >>
+ getPeriodicalTitle "titleaddon")
+ <|> (guard isChapterlike >>
+ getTitle "maintitleaddon")
+ <|> (guard isChapterlike >>
+ getTitle "booktitleaddon")
+ <|> return mempty
+ containerTitleShort' <- Just <$>
+ ((guard isPeriodical >>
+ guard (not hasMaintitle) >>
+ getField "shorttitle")
+ <|> getPeriodicalTitle "shortjournal")
+ <|> return Nothing
+
+ -- change numerical series title to e.g. 'series 3'
+ let fixSeriesTitle [Str xs] | isNumber xs =
+ [Str (ordinalize locale xs), Space, Str (resolveKey' lang "jourser")]
+ fixSeriesTitle xs = xs
+ seriesTitle' <- (Just . B.fromList . fixSeriesTitle .
+ B.toList . resolveKey lang <$>
+ getTitle "series") <|>
+ return Nothing
+ shortTitle' <- Just <$>
+ ((guard (not hasMaintitle || isChapterlike) >>
+ getTitle "shorttitle")
+ <|> if (subtitle' /= mempty || titleaddon' /= mempty) &&
+ not hasMaintitle
+ then getShortTitle False "title"
+ else getShortTitle True "title")
+ <|> return Nothing
+
+ eventTitle' <- Just <$> getTitle "eventtitle" <|> return Nothing
+ origTitle' <- Just <$> getTitle "origtitle" <|> return Nothing
+
+ -- publisher
+ pubfields <- mapM (\f -> Just `fmap`
+ (if variant == Bibtex || f == "howpublished"
+ then getField f
+ else getLiteralList' f)
+ <|> return Nothing)
+ ["school","institution","organization", "howpublished","publisher"]
+ let publisher' = case catMaybes pubfields of
+ [] -> Nothing
+ xs -> Just $ concatWith ';' xs
+ origpublisher' <- (Just <$> getField "origpublisher") <|> return Nothing
+
+ -- places
+ venue' <- (Just <$> getField "venue") <|> return Nothing
+ address' <- Just <$>
+ (if variant == Bibtex
+ then getField "address"
+ else getLiteralList' "address"
+ <|> (guard (et /= "patent") >>
+ getLiteralList' "location"))
+ <|> return Nothing
+ origLocation' <- Just <$>
+ (if variant == Bibtex
+ then getField "origlocation"
+ else getLiteralList' "origlocation")
+ <|> return Nothing
+ jurisdiction' <- if reftype == "patent"
+ then Just <$>
+ (concatWith ';' . map (resolveKey lang) <$>
+ getLiteralList "location") <|> return Nothing
+ else return Nothing
+
+ -- url, doi, isbn, etc.:
+ -- note that with eprinttype = arxiv, we take eprint to be a partial url
+ -- archivePrefix is an alias for eprinttype
+ url' <- (guard (et == "online" || lookup "url" opts /= Just "false")
+ >> Just <$> getRawField "url")
+ <|> (do etype <- getRawField "eprinttype"
+ eprint <- getRawField "eprint"
+ let baseUrl =
+ case T.toLower etype of
+ "arxiv" -> "http://arxiv.org/abs/"
+ "jstor" -> "http://www.jstor.org/stable/"
+ "pubmed" -> "http://www.ncbi.nlm.nih.gov/pubmed/"
+ "googlebooks" -> "http://books.google.com?id="
+ _ -> ""
+ if T.null baseUrl
+ then mzero
+ else return $ Just $ baseUrl <> eprint)
+ <|> return Nothing
+ doi' <- (guard (lookup "doi" opts /= Just "false") >>
+ Just <$> getRawField "doi")
+ <|> return Nothing
+ isbn' <- Just <$> getRawField "isbn" <|> return Nothing
+ issn' <- Just <$> getRawField "issn" <|> return Nothing
+ pmid' <- Just <$> getRawField "pmid" <|> return Nothing
+ pmcid' <- Just <$> getRawField "pmcid" <|> return Nothing
+ callNumber' <- Just <$> getRawField "library" <|> return Nothing
+
+ -- notes
+ annotation' <- Just <$>
+ (getField "annotation" <|> getField "annote")
+ <|> return Nothing
+ abstract' <- Just <$> getField "abstract" <|> return Nothing
+ keywords' <- Just <$> getField "keywords" <|> return Nothing
+ note' <- if et == "periodical"
+ then return Nothing
+ else Just <$> getField "note" <|> return Nothing
+ addendum' <- if variant == Bibtex
+ then return Nothing
+ else Just <$> getField "addendum"
+ <|> return Nothing
+ pubstate' <- ( (Just . resolveKey lang <$> getField "pubstate")
+ <|> case dateLiteral <$> issued' of
+ Just (Just "forthcoming") ->
+ return $ Just $ B.str "forthcoming"
+ _ -> return Nothing
+ )
+
+
+
+
+ let addField (_, Nothing) = id
+ addField (f, Just x) = Map.insert f x
+ let vars = foldr addField mempty
+ [ ("other-ids", TextVal <$> otherIds)
+ , ("genre", TextVal <$> genre)
+ , ("language", TextVal <$> hyphenation)
+ -- dates
+ , ("accessed", DateVal <$> accessed')
+ , ("event-date", DateVal <$> eventDate')
+ , ("issued", DateVal <$> issued')
+ , ("original-date", DateVal <$> origDate')
+ -- names
+ , ("author", NamesVal <$> author')
+ , ("editor", NamesVal <$> editor')
+ , ("translator", NamesVal <$> translator')
+ , ("director", NamesVal <$> director')
+ , ("container-author", NamesVal <$> containerAuthor')
+ -- locators
+ , ("page", FancyVal . Walk.walk convertEnDash <$> pages')
+ , ("number-of-pages", FancyVal <$> pagetotal')
+ , ("volume", case (volume', part') of
+ (Nothing, Nothing) -> Nothing
+ (Just v, Nothing) -> Just $ FancyVal v
+ (Nothing, Just p) -> Just $ FancyVal p
+ (Just v, Just p) ->
+ Just $ FancyVal $ v <> B.str "." <> p)
+ , ("number-of-volumes", FancyVal <$> volumes')
+ , ("chapter-number", FancyVal <$> chapter')
+ , ("edition", FancyVal <$> edition')
+ , ("version", FancyVal <$> version')
+ , ("number", FancyVal <$> number')
+ , ("collection-number", FancyVal <$> collectionNumber')
+ , ("issue", FancyVal <$> issue')
+ -- title
+ , ("original-title", FancyVal <$> origTitle')
+ , ("event", FancyVal <$> eventTitle')
+ , ("title", case title' of
+ Just t -> Just $ FancyVal $
+ concatWith '.' [
+ concatWith ':' [t, subtitle']
+ , titleaddon' ]
+ Nothing -> Nothing)
+ , ("volume-title",
+ case volumeTitle' of
+ Just t -> Just $ FancyVal $
+ concatWith '.' [
+ concatWith ':' [t, volumeSubtitle']
+ , volumeTitleAddon' ]
+ Nothing -> Nothing)
+ , ("container-title",
+ case containerTitle' of
+ Just t -> Just $ FancyVal $
+ concatWith '.' [
+ concatWith ':' [t,
+ containerSubtitle']
+ , containerTitleAddon' ]
+ Nothing -> Nothing)
+ , ("container-title-short", FancyVal <$> containerTitleShort')
+ , ("collection-title", FancyVal <$> seriesTitle')
+ , ("title-short", FancyVal <$> shortTitle')
+ -- publisher
+ , ("publisher", FancyVal <$> publisher')
+ , ("original-publisher", FancyVal <$> origpublisher')
+ -- places
+ , ("jurisdiction", FancyVal <$> jurisdiction')
+ , ("event-place", FancyVal <$> venue')
+ , ("publisher-place", FancyVal <$> address')
+ , ("original-publisher-place", FancyVal <$> origLocation')
+ -- urls
+ , ("url", TextVal <$> url')
+ , ("doi", TextVal <$> doi')
+ , ("isbn", TextVal <$> isbn')
+ , ("issn", TextVal <$> issn')
+ , ("pmcid", TextVal <$> pmcid')
+ , ("pmid", TextVal <$> pmid')
+ , ("call-number", TextVal <$> callNumber')
+ -- notes
+ , ("note", case catMaybes [note', addendum'] of
+ [] -> Nothing
+ xs -> return $ FancyVal $ concatWith '.' xs)
+ , ("annote", FancyVal <$> annotation')
+ , ("abstract", FancyVal <$> abstract')
+ , ("keyword", FancyVal <$> keywords')
+ , ("status", FancyVal <$> pubstate')
+ ]
+ return $ Reference
+ { referenceId = ItemId id'
+ , referenceType = reftype
+ , referenceDisambiguation = Nothing
+ , referenceVariables = vars }
+
+
+bib :: Item -> Bib a -> BibParser a
+bib entry m = fst <$> evalRWST m entry (BibState True (Lang "en" (Just "US")))
+
+resolveCrossRefs :: Variant -> [Item] -> [Item]
+resolveCrossRefs variant entries =
+ map (resolveCrossRef variant entries) entries
+
+resolveCrossRef :: Variant -> [Item] -> Item -> Item
+resolveCrossRef variant entries entry =
+ Map.foldrWithKey go entry (fields entry)
+ where go key val entry' =
+ if key == "crossref" || key == "xdata"
+ then entry'{ fields = fields entry' <>
+ Map.fromList (getXrefFields variant
+ entry entries val) }
+ else entry'
+
+getXrefFields :: Variant -> Item -> [Item] -> Text -> [(Text, Text)]
+getXrefFields variant baseEntry entries keys = do
+ let keys' = splitKeys keys
+ xrefEntry <- [e | e <- entries, identifier e `elem` keys']
+ (k, v) <- Map.toList $ fields xrefEntry
+ if k == "crossref" || k == "xdata"
+ then do
+ xs <- mapM (getXrefFields variant baseEntry entries)
+ (splitKeys v)
+ (x, y) <- xs
+ guard $ isNothing $ Map.lookup x $ fields xrefEntry
+ return (x, y)
+ else do
+ k' <- case variant of
+ Bibtex -> return k
+ Biblatex -> transformKey
+ (entryType xrefEntry) (entryType baseEntry) k
+ guard $ isNothing $ Map.lookup k' $ fields baseEntry
+ return (k',v)
+
+
+
+data BibState = BibState{
+ untitlecase :: Bool
+ , localeLang :: Lang
+ }
+
+type Bib = RWST Item () BibState BibParser
+
+blocksToInlines :: [Block] -> Inlines
+blocksToInlines bs =
+ case bs of
+ [Plain xs] -> B.fromList xs
+ [Para xs] -> B.fromList xs
+ _ -> B.fromList $ Walk.query (:[]) bs
+
+adjustSpans :: Lang -> Inline -> Inline
+adjustSpans lang (RawInline (Format "latex") s)
+ | s == "\\hyphen" || s == "\\hyphen " = Str "-"
+ | otherwise = parseRawLaTeX lang s
+adjustSpans _ SoftBreak = Space
+adjustSpans _ x = x
+
+parseRawLaTeX :: Lang -> Text -> Inline
+parseRawLaTeX lang t@(T.stripPrefix "\\" -> Just xs) =
+ case parseLaTeX lang contents of
+ Right [Para ys] -> f command ys
+ Right [Plain ys] -> f command ys
+ Right [] -> f command []
+ _ -> RawInline (Format "latex") t
+ where (command', contents') = T.break (\c -> c =='{' || c =='\\') xs
+ command = T.strip command'
+ contents = T.drop 1 $ T.dropEnd 1 contents'
+ f "mkbibquote" ils = Span nullAttr [Quoted DoubleQuote ils]
+ f "mkbibemph" ils = Span nullAttr [Emph ils]
+ f "mkbibitalic" ils = Span nullAttr [Emph ils]
+ f "mkbibbold" ils = Span nullAttr [Strong ils]
+ f "mkbibparens" ils = Span nullAttr $
+ [Str "("] ++ ils ++ [Str ")"]
+ f "mkbibbrackets" ils = Span nullAttr $
+ [Str "["] ++ ils ++ [Str "]"]
+ -- ... both should be nestable & should work in year fields
+ f "autocap" ils = Span nullAttr ils
+ -- TODO: should work in year fields
+ f "textnormal" ils = Span ("",["nodecor"],[]) ils
+ f "bibstring" [Str s] = Str $ resolveKey' lang s
+ f "adddot" [] = Str "."
+ f "adddotspace" [] = Span nullAttr [Str ".", Space]
+ f "addabbrvspace" [] = Space
+ f _ ils = Span nullAttr ils
+parseRawLaTeX _ t = RawInline (Format "latex") t
+
+latex' :: Text -> Bib [Block]
+latex' t = do
+ lang <- gets localeLang
+ case parseLaTeX lang t of
+ Left _ -> mzero
+ Right bs -> return bs
+
+parseLaTeX :: Lang -> Text -> Either PandocError [Block]
+parseLaTeX lang t =
+ case runPure (readLaTeX
+ def{ readerExtensions =
+ extensionsFromList [Ext_raw_tex, Ext_smart] } t) of
+ Left e -> Left e
+ Right (Pandoc _ bs) -> Right $ Walk.walk (adjustSpans lang) bs
+
+latex :: Text -> Bib Inlines
+latex = fmap blocksToInlines . latex' . T.strip
+
+type Options = [(Text, Text)]
+
+parseOptions :: Text -> Options
+parseOptions = map breakOpt . T.splitOn ","
+ where breakOpt x = case T.break (=='=') x of
+ (w,v) -> (T.toLower $ T.strip w,
+ T.toLower $ T.strip $ T.drop 1 v)
+
+bibEntries :: BibParser [Item]
+bibEntries = do
+ skipMany nonEntry
+ many (bibItem <* skipMany nonEntry)
+ where nonEntry = bibSkip <|>
+ try (char '@' >>
+ (bibComment <|> bibPreamble <|> bibString))
+
+bibSkip :: BibParser ()
+bibSkip = skipMany1 (satisfy (/='@'))
+
+bibComment :: BibParser ()
+bibComment = do
+ cistring "comment"
+ spaces
+ void inBraces <|> bibSkip <|> return ()
+
+bibPreamble :: BibParser ()
+bibPreamble = do
+ cistring "preamble"
+ spaces
+ void inBraces
+
+bibString :: BibParser ()
+bibString = do
+ cistring "string"
+ spaces
+ char '{'
+ spaces
+ (k,v) <- entField
+ char '}'
+ updateState (\(l,m) -> (l, Map.insert k v m))
+ return ()
+
+inBraces :: BibParser Text
+inBraces = try $ do
+ char '{'
+ res <- manyTill
+ ( (T.pack <$> many1 (noneOf "{}\\"))
+ <|> (char '\\' >> ( (char '{' >> return "\\{")
+ <|> (char '}' >> return "\\}")
+ <|> return "\\"))
+ <|> (braced <$> inBraces)
+ ) (char '}')
+ return $ T.concat res
+
+braced :: Text -> Text
+braced = T.cons '{' . flip T.snoc '}'
+
+inQuotes :: BibParser Text
+inQuotes = do
+ char '"'
+ T.concat <$> manyTill
+ ( (T.pack <$> many1 (noneOf "\"\\{"))
+ <|> (char '\\' >> T.cons '\\' . T.singleton <$> anyChar)
+ <|> braced <$> inBraces
+ ) (char '"')
+
+fieldName :: BibParser Text
+fieldName = resolveAlias . T.toLower . T.pack
+ <$> many1 (letter <|> digit <|> oneOf "-_:+")
+
+isBibtexKeyChar :: Char -> Bool
+isBibtexKeyChar c =
+ isAlphaNum c || c `elem` (".:;?!`'()/*@_+=-[]*&" :: [Char])
+
+bibItem :: BibParser Item
+bibItem = do
+ char '@'
+ pos <- getPosition
+ enttype <- map toLower <$> many1 letter
+ spaces
+ char '{'
+ spaces
+ entid <- many1 (satisfy isBibtexKeyChar)
+ spaces
+ char ','
+ spaces
+ entfields <- entField `sepEndBy` (char ',' >> spaces)
+ spaces
+ char '}'
+ return $ Item (T.pack entid) pos (T.pack enttype) (Map.fromList entfields)
+
+entField :: BibParser (Text, Text)
+entField = do
+ k <- fieldName
+ spaces
+ char '='
+ spaces
+ vs <- (expandString <|> inQuotes <|> inBraces <|> rawWord) `sepBy`
+ try (spaces >> char '#' >> spaces)
+ spaces
+ return (k, T.concat vs)
+
+resolveAlias :: Text -> Text
+resolveAlias "archiveprefix" = "eprinttype"
+resolveAlias "primaryclass" = "eprintclass"
+resolveAlias s = s
+
+rawWord :: BibParser Text
+rawWord = T.pack <$> many1 alphaNum
+
+expandString :: BibParser Text
+expandString = do
+ k <- fieldName
+ (lang, strs) <- getState
+ case Map.lookup k strs of
+ Just v -> return v
+ Nothing -> return $ resolveKey' lang k
+
+cistring :: Text -> BibParser Text
+cistring s = try (go s)
+ where go t = case T.uncons t of
+ Nothing -> return ""
+ Just (c,cs) -> do
+ x <- char (toLower c) <|> char (toUpper c)
+ xs <- go cs
+ return (T.cons x xs)
+
+splitKeys :: Text -> [Text]
+splitKeys = filter (not . T.null) . T.split (\c -> c == ' ' || c == ',')
+
+-- Biblatex Localization Keys (see Biblatex manual)
+-- Currently we only map a subset likely to be used in Biblatex *databases*
+-- (in fields such as `type`, and via `\bibstring{}` commands).
+
+parseMonth :: Text -> Maybe Int
+parseMonth s =
+ case T.toLower s of
+ "jan" -> Just 1
+ "feb" -> Just 2
+ "mar" -> Just 3
+ "apr" -> Just 4
+ "may" -> Just 5
+ "jun" -> Just 6
+ "jul" -> Just 7
+ "aug" -> Just 8
+ "sep" -> Just 9
+ "oct" -> Just 10
+ "nov" -> Just 11
+ "dec" -> Just 12
+ _ -> readMay (T.unpack s)
+
+notFound :: Text -> Bib a
+notFound f = Prelude.fail $ T.unpack f ++ " not found"
+
+getField :: Text -> Bib Inlines
+getField f = do
+ fs <- asks fields
+ case Map.lookup f fs of
+ Just x -> latex x
+ Nothing -> notFound f
+
+
+getPeriodicalTitle :: Text -> Bib Inlines
+getPeriodicalTitle f = do
+ ils <- getField f
+ return ils
+
+protectCase :: (Inlines -> Inlines) -> (Inlines -> Inlines)
+protectCase f = Walk.walk unprotect . f . Walk.walk protect
+ where
+ protect (Span ("",[],[]) xs) = Span ("",["nocase"],[]) xs
+ protect x = x
+ unprotect (Span ("",["nocase"],[]) xs)
+ | hasLowercaseWord xs = Span ("",["nocase"],[]) xs
+ | otherwise = Span ("",[],[]) xs
+ unprotect x = x
+ hasLowercaseWord = any startsWithLowercase . splitStrWhen isPunctuation
+ startsWithLowercase (Str (T.uncons -> Just (x,_))) = isLower x
+ startsWithLowercase _ = False
+
+unTitlecase :: Maybe Lang -> Inlines -> Inlines
+unTitlecase mblang = protectCase (caseTransform (withSentenceCase mblang))
+
+getTitle :: Text -> Bib Inlines
+getTitle f = do
+ ils <- getField f
+ utc <- gets untitlecase
+ lang <- gets localeLang
+ let processTitle = if utc then unTitlecase (Just lang) else id
+ return $ processTitle ils
+
+getShortTitle :: Bool -> Text -> Bib Inlines
+getShortTitle requireColon f = do
+ ils <- splitStrWhen (==':') . B.toList <$> getTitle f
+ if not requireColon || containsColon ils
+ then return $ B.fromList $ upToColon ils
+ else return mempty
+
+containsColon :: [Inline] -> Bool
+containsColon xs = Str ":" `elem` xs
+
+upToColon :: [Inline] -> [Inline]
+upToColon xs = takeWhile (/= Str ":") xs
+
+isNumber :: Text -> Bool
+isNumber t = case T.uncons t of
+ Just ('-', ds) -> T.all isDigit ds
+ Just _ -> T.all isDigit t
+ Nothing -> False
+
+getDate :: Text -> Bib Date
+getDate f = do
+ -- the ~ can used for approx dates, but the latex reader
+ -- parses this as a nonbreaking space, so we need to convert it back!
+ let nbspToTilde '\160' = '~'
+ nbspToTilde c = c
+ mbd <- rawDateEDTF . T.map nbspToTilde <$> getRawField f
+ case mbd of
+ Nothing -> Prelude.fail "expected date"
+ Just d -> return d
+
+-- A negative (BC) year might be written with -- or --- in bibtex:
+fixLeadingDash :: Text -> Text
+fixLeadingDash t = case T.uncons t of
+ Just (c, ds) | (c == '–' || c == '—') && firstIsDigit ds -> T.cons '–' ds
+ _ -> t
+ where firstIsDigit = maybe False (isDigit . fst) . T.uncons
+
+getOldDate :: Text -> Bib Date
+getOldDate prefix = do
+ year' <- (readMay . T.unpack . fixLeadingDash . stringify
+ <$> getField (prefix <> "year")) <|> return Nothing
+ month' <- (parseMonth <$> getRawField (prefix <> "month"))
+ <|> return Nothing
+ day' <- (readMay . T.unpack <$> getRawField (prefix <> "day"))
+ <|> return Nothing
+ endyear' <- (readMay . T.unpack . fixLeadingDash . stringify
+ <$> getField (prefix <> "endyear")) <|> return Nothing
+ endmonth' <- (parseMonth . stringify
+ <$> getField (prefix <> "endmonth")) <|> return Nothing
+ endday' <- (readMay . T.unpack . stringify <$>
+ getField (prefix <> "endday")) <|> return Nothing
+ let toDateParts (y', m', d') =
+ DateParts $
+ case y' of
+ Nothing -> []
+ Just y ->
+ case m' of
+ Nothing -> [y]
+ Just m ->
+ case d' of
+ Nothing -> [y,m]
+ Just d -> [y,m,d]
+ let dateparts = filter (\x -> x /= DateParts [])
+ $ map toDateParts [(year',month',day'),
+ (endyear',endmonth',endday')]
+ literal <- if null dateparts
+ then Just <$> getRawField (prefix <> "year")
+ else return Nothing
+ return $
+ Date { dateParts = dateparts
+ , dateCirca = False
+ , dateSeason = Nothing
+ , dateLiteral = literal }
+
+getRawField :: Text -> Bib Text
+getRawField f =
+ (stringify <$> getField f)
+ <|> do fs <- asks fields
+ case Map.lookup f fs of
+ Just x -> return x
+ Nothing -> notFound f
+
+getLiteralList :: Text -> Bib [Inlines]
+getLiteralList f = do
+ fs <- asks fields
+ case Map.lookup f fs of
+ Just x -> latex' x >>= toLiteralList
+ Nothing -> notFound f
+
+-- separates items with semicolons
+getLiteralList' :: Text -> Bib Inlines
+getLiteralList' f = do
+ fs <- asks fields
+ case Map.lookup f fs of
+ Just x -> do
+ x' <- latex' x
+ case x' of
+ [Para xs] ->
+ return $ B.fromList
+ $ intercalate [Str ";", Space]
+ $ splitByAnd xs
+ [Plain xs] ->
+ return $ B.fromList
+ $ intercalate [Str ";", Space]
+ $ splitByAnd xs
+ _ -> mzero
+ Nothing -> notFound f
+
+splitByAnd :: [Inline] -> [[Inline]]
+splitByAnd = splitOn [Space, Str "and", Space]
+
+toLiteralList :: [Block] -> Bib [Inlines]
+toLiteralList [Para xs] =
+ return $ map B.fromList $ splitByAnd xs
+toLiteralList [Plain xs] = toLiteralList [Para xs]
+toLiteralList _ = mzero
+
+concatWith :: Char -> [Inlines] -> Inlines
+concatWith sep = foldl' go mempty
+ where go :: Inlines -> Inlines -> Inlines
+ go accum s
+ | s == mempty = accum
+ | otherwise =
+ case Seq.viewr (B.unMany accum) of
+ Seq.EmptyR -> s
+ _ Seq.:> Str x
+ | not (T.null x) &&
+ T.last x `elem` ("!?.,:;" :: String)
+ -> accum <> B.space <> s
+ _ -> accum <> B.str (T.singleton sep) <>
+ B.space <> s
+
+
+getNameList :: Options -> Text -> Bib [Name]
+getNameList opts f = do
+ fs <- asks fields
+ case Map.lookup f fs of
+ Just x -> latexNames opts x
+ Nothing -> notFound f
+
+toNameList :: Options -> [Block] -> Bib [Name]
+toNameList opts [Para xs] =
+ filter (/= emptyName) <$> mapM (toName opts . addSpaceAfterPeriod)
+ (splitByAnd xs)
+toNameList opts [Plain xs] = toNameList opts [Para xs]
+toNameList _ _ = mzero
+
+latexNames :: Options -> Text -> Bib [Name]
+latexNames opts t = latex' (T.strip t) >>= toNameList opts
+
+-- see issue 392 for motivation. We want to treat
+-- "J.G. Smith" and "J. G. Smith" the same.
+addSpaceAfterPeriod :: [Inline] -> [Inline]
+addSpaceAfterPeriod = go . splitStrWhen (=='.')
+ where
+ go [] = []
+ go (Str (T.unpack -> [c]):Str ".":Str (T.unpack -> [d]):xs)
+ | isLetter d
+ , isLetter c
+ , isUpper c
+ , isUpper d
+ = Str (T.singleton c):Str ".":Space:go (Str (T.singleton d):xs)
+ go (x:xs) = x:go xs
+
+emptyName :: Name
+emptyName =
+ Name { nameFamily = Nothing
+ , nameGiven = Nothing
+ , nameDroppingParticle = Nothing
+ , nameNonDroppingParticle = Nothing
+ , nameSuffix = Nothing
+ , nameLiteral = Nothing
+ , nameCommaSuffix = False
+ , nameStaticOrdering = False
+ }
+
+toName :: Options -> [Inline] -> Bib Name
+toName _ [Str "others"] =
+ return emptyName{ nameLiteral = Just "others" }
+toName _ [Span ("",[],[]) ils] = -- corporate author
+ return emptyName{ nameLiteral = Just $ stringify ils }
+ -- extended BibLaTeX name format - see #266
+toName _ ils@(Str ys:_) | T.any (== '=') ys = do
+ let commaParts = splitWhen (== Str ",")
+ . splitStrWhen (\c -> c == ',' || c == '=' || c == '\160')
+ $ ils
+ let addPart ag (Str "given" : Str "=" : xs) =
+ ag{ nameGiven = case nameGiven ag of
+ Nothing -> Just $ stringify xs
+ Just t -> Just $ t <> " " <> stringify xs }
+ addPart ag (Str "family" : Str "=" : xs) =
+ ag{ nameFamily = Just $ stringify xs }
+ addPart ag (Str "prefix" : Str "=" : xs) =
+ ag{ nameDroppingParticle = Just $ stringify xs }
+ addPart ag (Str "useprefix" : Str "=" : Str "true" : _) =
+ ag{ nameNonDroppingParticle = nameDroppingParticle ag
+ , nameDroppingParticle = Nothing }
+ addPart ag (Str "suffix" : Str "=" : xs) =
+ ag{ nameSuffix = Just $ stringify xs }
+ addPart ag (Space : xs) = addPart ag xs
+ addPart ag _ = ag
+ return $ foldl' addPart emptyName commaParts
+-- First von Last
+-- von Last, First
+-- von Last, Jr ,First
+-- NOTE: biblatex and bibtex differ on:
+-- Drummond de Andrade, Carlos
+-- bibtex takes "Drummond de" as the von;
+-- biblatex takes the whole as a last name.
+-- See https://github.com/plk/biblatex/issues/236
+-- Here we implement the more sensible biblatex behavior.
+toName opts ils = do
+ let useprefix = optionSet "useprefix" opts
+ let usecomma = optionSet "juniorcomma" opts
+ let bibtex = optionSet "bibtex" opts
+ let words' = wordsBy (\x -> x == Space || x == Str "\160")
+ let commaParts = map words' $ splitWhen (== Str ",")
+ $ splitStrWhen
+ (\c -> c == ',' || c == '\160') ils
+ let (first, vonlast, jr) =
+ case commaParts of
+ --- First is the longest sequence of white-space separated
+ -- words starting with an uppercase and that is not the
+ -- whole string. von is the longest sequence of whitespace
+ -- separated words whose last word starts with lower case
+ -- and that is not the whole string.
+ [fvl] -> let (caps', rest') = span isCapitalized fvl
+ in if null rest' && not (null caps')
+ then (init caps', [last caps'], [])
+ else (caps', rest', [])
+ [vl,f] -> (f, vl, [])
+ (vl:j:f:_) -> (f, vl, j )
+ [] -> ([], [], [])
+
+ let (von, lastname) =
+ if bibtex
+ then case span isCapitalized $ reverse vonlast of
+ ([],w:ws) -> (reverse ws, [w])
+ (vs, ws) -> (reverse ws, reverse vs)
+ else case break isCapitalized vonlast of
+ (vs@(_:_), []) -> (init vs, [last vs])
+ (vs, ws) -> (vs, ws)
+ let prefix = T.unwords $ map stringify von
+ let family = T.unwords $ map stringify lastname
+ let suffix = T.unwords $ map stringify jr
+ let given = T.unwords $ map stringify first
+ return
+ Name { nameFamily = if T.null family
+ then Nothing
+ else Just family
+ , nameGiven = if T.null given
+ then Nothing
+ else Just given
+ , nameDroppingParticle = if useprefix || T.null prefix
+ then Nothing
+ else Just prefix
+ , nameNonDroppingParticle = if useprefix && not (T.null prefix)
+ then Just prefix
+ else Nothing
+ , nameSuffix = if T.null suffix
+ then Nothing
+ else Just suffix
+ , nameLiteral = Nothing
+ , nameCommaSuffix = usecomma
+ , nameStaticOrdering = False
+ }
+
+splitStrWhen :: (Char -> Bool) -> [Inline] -> [Inline]
+splitStrWhen _ [] = []
+splitStrWhen p (Str xs : ys) = map Str (go xs) ++ splitStrWhen p ys
+ where go s =
+ let (w,z) = T.break p s
+ in if T.null z
+ then if T.null w
+ then []
+ else [w]
+ else if T.null w
+ then (T.take 1 z : go (T.drop 1 z))
+ else (w : T.take 1 z : go (T.drop 1 z))
+splitStrWhen p (x : ys) = x : splitStrWhen p ys
+
+ordinalize :: Locale -> Text -> Text
+ordinalize locale n =
+ let terms = localeTerms locale
+ pad0 t = case T.length t of
+ 0 -> "00"
+ 1 -> "0" <> t
+ _ -> t
+ in case Map.lookup ("ordinal-" <> pad0 n) terms <|>
+ Map.lookup "ordinal" terms of
+ Nothing -> n
+ Just [] -> n
+ Just (t:_) -> n <> snd t
+
+isCapitalized :: [Inline] -> Bool
+isCapitalized (Str (T.uncons -> Just (c,cs)) : rest)
+ | isUpper c = True
+ | isDigit c = isCapitalized (Str cs : rest)
+ | otherwise = False
+isCapitalized (_:rest) = isCapitalized rest
+isCapitalized [] = True
+
+optionSet :: Text -> Options -> Bool
+optionSet key opts = case lookup key opts of
+ Just "true" -> True
+ Just s -> s == mempty
+ _ -> False
+
+getTypeAndGenre :: Bib (Text, Maybe Text)
+getTypeAndGenre = do
+ lang <- gets localeLang
+ et <- asks entryType
+ guard $ et /= "xdata"
+ reftype' <- resolveKey' lang <$> getRawField "type"
+ <|> return mempty
+ st <- getRawField "entrysubtype" <|> return mempty
+ isEvent <- (True <$ (getRawField "eventdate"
+ <|> getRawField "eventtitle"
+ <|> getRawField "venue")) <|> return False
+ let reftype =
+ case et of
+ "article"
+ | st == "magazine" -> "article-magazine"
+ | st == "newspaper" -> "article-newspaper"
+ | otherwise -> "article-journal"
+ "book" -> "book"
+ "booklet" -> "pamphlet"
+ "bookinbook" -> "chapter"
+ "collection" -> "book"
+ "dataset" -> "dataset"
+ "electronic" -> "webpage"
+ "inbook" -> "chapter"
+ "incollection" -> "chapter"
+ "inreference" -> "entry-encyclopedia"
+ "inproceedings" -> "paper-conference"
+ "manual" -> "book"
+ "mastersthesis" -> "thesis"
+ "misc" -> ""
+ "mvbook" -> "book"
+ "mvcollection" -> "book"
+ "mvproceedings" -> "book"
+ "mvreference" -> "book"
+ "online" -> "webpage"
+ "patent" -> "patent"
+ "periodical"
+ | st == "magazine" -> "article-magazine"
+ | st == "newspaper" -> "article-newspaper"
+ | otherwise -> "article-journal"
+ "phdthesis" -> "thesis"
+ "proceedings" -> "book"
+ "reference" -> "book"
+ "report" -> "report"
+ "software" -> "book" -- no "software" type in CSL
+ "suppbook" -> "chapter"
+ "suppcollection" -> "chapter"
+ "suppperiodical"
+ | st == "magazine" -> "article-magazine"
+ | st == "newspaper" -> "article-newspaper"
+ | otherwise -> "article-journal"
+ "techreport" -> "report"
+ "thesis" -> "thesis"
+ "unpublished" -> if isEvent then "speech" else "manuscript"
+ "www" -> "webpage"
+ -- biblatex, "unsupported"
+ "artwork" -> "graphic"
+ "audio" -> "song" -- for audio *recordings*
+ "commentary" -> "book"
+ "image" -> "graphic" -- or "figure" ?
+ "jurisdiction" -> "legal_case"
+ "legislation" -> "legislation" -- or "bill" ?
+ "legal" -> "treaty"
+ "letter" -> "personal_communication"
+ "movie" -> "motion_picture"
+ "music" -> "song" -- for musical *recordings*
+ "performance" -> "speech"
+ "review" -> "review" -- or "review-book" ?
+ "standard" -> "legislation"
+ "video" -> "motion_picture"
+ -- biblatex-apa:
+ "data" -> "dataset"
+ "letters" -> "personal_communication"
+ "newsarticle" -> "article-newspaper"
+ _ -> ""
+
+ let refgenre =
+ case et of
+ "mastersthesis" -> if T.null reftype'
+ then Just $ resolveKey' lang "mathesis"
+ else Just reftype'
+ "phdthesis" -> if T.null reftype'
+ then Just $ resolveKey' lang "phdthesis"
+ else Just reftype'
+ _ -> if T.null reftype'
+ then Nothing
+ else Just reftype'
+ return (reftype, refgenre)
+
+
+-- transformKey source target key
+-- derived from Appendix C of bibtex manual
+transformKey :: Text -> Text -> Text -> [Text]
+transformKey _ _ "ids" = []
+transformKey _ _ "crossref" = []
+transformKey _ _ "xref" = []
+transformKey _ _ "entryset" = []
+transformKey _ _ "entrysubtype" = []
+transformKey _ _ "execute" = []
+transformKey _ _ "label" = []
+transformKey _ _ "options" = []
+transformKey _ _ "presort" = []
+transformKey _ _ "related" = []
+transformKey _ _ "relatedoptions" = []
+transformKey _ _ "relatedstring" = []
+transformKey _ _ "relatedtype" = []
+transformKey _ _ "shorthand" = []
+transformKey _ _ "shorthandintro" = []
+transformKey _ _ "sortkey" = []
+transformKey x y "author"
+ | x `elem` ["mvbook", "book"] &&
+ y `elem` ["inbook", "bookinbook", "suppbook"] = ["bookauthor", "author"]
+-- note: this next clause is not in the biblatex manual, but it makes
+-- sense in the context of CSL conversion:
+transformKey x y "author"
+ | x == "mvbook" && y == "book" = ["bookauthor", "author"]
+transformKey "mvbook" y z
+ | y `elem` ["book", "inbook", "bookinbook", "suppbook"] = standardTrans z
+transformKey x y z
+ | x `elem` ["mvcollection", "mvreference"] &&
+ y `elem` ["collection", "reference", "incollection", "inreference",
+ "suppcollection"] = standardTrans z
+transformKey "mvproceedings" y z
+ | y `elem` ["proceedings", "inproceedings"] = standardTrans z
+transformKey "book" y z
+ | y `elem` ["inbook", "bookinbook", "suppbook"] = bookTrans z
+transformKey x y z
+ | x `elem` ["collection", "reference"] &&
+ y `elem` ["incollection", "inreference", "suppcollection"] = bookTrans z
+transformKey "proceedings" "inproceedings" z = bookTrans z
+transformKey "periodical" y z
+ | y `elem` ["article", "suppperiodical"] =
+ case z of
+ "title" -> ["journaltitle"]
+ "subtitle" -> ["journalsubtitle"]
+ "shorttitle" -> []
+ "sorttitle" -> []
+ "indextitle" -> []
+ "indexsorttitle" -> []
+ _ -> [z]
+transformKey _ _ x = [x]
+
+standardTrans :: Text -> [Text]
+standardTrans z =
+ case z of
+ "title" -> ["maintitle"]
+ "subtitle" -> ["mainsubtitle"]
+ "titleaddon" -> ["maintitleaddon"]
+ "shorttitle" -> []
+ "sorttitle" -> []
+ "indextitle" -> []
+ "indexsorttitle" -> []
+ _ -> [z]
+
+bookTrans :: Text -> [Text]
+bookTrans z =
+ case z of
+ "title" -> ["booktitle"]
+ "subtitle" -> ["booksubtitle"]
+ "titleaddon" -> ["booktitleaddon"]
+ "shorttitle" -> []
+ "sorttitle" -> []
+ "indextitle" -> []
+ "indexsorttitle" -> []
+ _ -> [z]
+
+resolveKey :: Lang -> Inlines -> Inlines
+resolveKey lang ils = Walk.walk go ils
+ where go (Str s) = Str $ resolveKey' lang s
+ go x = x
+
+resolveKey' :: Lang -> Text -> Text
+resolveKey' lang@(Lang l _) k =
+ case Map.lookup l biblatexStringMap >>= Map.lookup (T.toLower k) of
+ Nothing -> k
+ Just (x, _) -> either (const k) stringify $ parseLaTeX lang x
+
+convertEnDash :: Inline -> Inline
+convertEnDash (Str s) = Str (T.map (\c -> if c == '–' then '-' else c) s)
+convertEnDash x = x
diff --git a/src/Text/Pandoc/Citeproc/CslJson.hs b/src/Text/Pandoc/Citeproc/CslJson.hs
new file mode 100644
index 000000000..862af5188
--- /dev/null
+++ b/src/Text/Pandoc/Citeproc/CslJson.hs
@@ -0,0 +1,37 @@
+{-# LANGUAGE OverloadedStrings #-}
+module Text.Pandoc.Citeproc.CslJson
+ ( cslJsonToReferences )
+where
+
+import Citeproc.CslJson
+import Citeproc.Types
+import Control.Monad.Identity (runIdentity)
+import Data.Aeson (eitherDecodeStrict')
+import Data.ByteString (ByteString)
+import Text.Pandoc.Builder as B
+import Data.Text (Text)
+
+fromCslJson :: CslJson Text -> Inlines
+fromCslJson (CslText t) = B.text t
+fromCslJson CslEmpty = mempty
+fromCslJson (CslConcat x y) = fromCslJson x <> fromCslJson y
+fromCslJson (CslQuoted x) = B.doubleQuoted (fromCslJson x)
+fromCslJson (CslItalic x) = B.emph (fromCslJson x)
+fromCslJson (CslNormal x) = fromCslJson x -- TODO?
+fromCslJson (CslBold x) = B.strong (fromCslJson x)
+fromCslJson (CslUnderline x) = B.underline (fromCslJson x)
+fromCslJson (CslNoDecoration x) =
+ B.spanWith ("",["nodecoration"],[]) (fromCslJson x)
+fromCslJson (CslSmallCaps x) = B.smallcaps (fromCslJson x)
+fromCslJson (CslBaseline x) = fromCslJson x
+fromCslJson (CslSub x) = B.subscript (fromCslJson x)
+fromCslJson (CslSup x) = B.superscript (fromCslJson x)
+fromCslJson (CslNoCase x) = B.spanWith ("",["nocase"],[]) (fromCslJson x)
+fromCslJson (CslDiv t x) = B.spanWith ("",["csl-" <> t],[]) (fromCslJson x)
+
+cslJsonToReferences :: ByteString -> Either String [Reference Inlines]
+cslJsonToReferences raw =
+ case eitherDecodeStrict' raw of
+ Left e -> Left e
+ Right cslrefs -> Right $
+ map (runIdentity . traverse (return . fromCslJson)) cslrefs
diff --git a/src/Text/Pandoc/Citeproc/Data.hs b/src/Text/Pandoc/Citeproc/Data.hs
new file mode 100644
index 000000000..dfdaf2598
--- /dev/null
+++ b/src/Text/Pandoc/Citeproc/Data.hs
@@ -0,0 +1,31 @@
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE TemplateHaskell #-}
+module Text.Pandoc.Citeproc.Data
+ (biblatexStringMap)
+where
+import Data.FileEmbed
+import Data.ByteString (ByteString)
+import qualified Data.Map as M
+import qualified Data.Text.Encoding as TE
+import qualified Data.Text as T
+import Data.Text (Text)
+import Text.Pandoc.Citeproc.Util (toIETF)
+import Citeproc (Lang(..), parseLang)
+
+biblatexLocalizations :: [(FilePath, ByteString)]
+biblatexLocalizations = $(embedDir "citeproc/biblatex-localization")
+
+-- biblatex localization keys, from files at
+-- http://github.com/plk/biblatex/tree/master/tex/latex/biblatex/lbx
+biblatexStringMap :: M.Map Text (M.Map Text (Text, Text))
+biblatexStringMap = foldr go mempty biblatexLocalizations
+ where
+ go (fp, bs) =
+ let Lang lang _ = parseLang (toIETF $ T.takeWhile (/= '.') $ T.pack fp)
+ ls = T.lines $ TE.decodeUtf8 bs
+ in if length ls > 4
+ then M.insert lang (toStringMap $ map (T.splitOn "|") ls)
+ else id
+ toStringMap = foldr go' mempty
+ go' [term, x, y] = M.insert term (x, y)
+ go' _ = id
diff --git a/src/Text/Pandoc/Citeproc/Locator.hs b/src/Text/Pandoc/Citeproc/Locator.hs
new file mode 100644
index 000000000..dba762c02
--- /dev/null
+++ b/src/Text/Pandoc/Citeproc/Locator.hs
@@ -0,0 +1,279 @@
+{-# LANGUAGE TupleSections #-}
+{-# LANGUAGE ViewPatterns #-}
+{-# LANGUAGE OverloadedStrings #-}
+module Text.Pandoc.Citeproc.Locator
+ ( parseLocator )
+where
+import Citeproc.Types
+import Data.Text (Text)
+import qualified Data.Text as T
+import Text.Parsec
+import Text.Pandoc.Definition
+import Text.Pandoc.Parsing (romanNumeral)
+import Text.Pandoc.Shared (stringify)
+import Control.Monad (mzero)
+import qualified Data.Map as M
+import Data.Char (isSpace, isPunctuation, isDigit)
+
+parseLocator :: Locale -> [Inline] -> (Maybe (Text, Text), [Inline])
+parseLocator locale inp =
+ case parse (pLocatorWords (toLocatorMap locale)) "suffix" $ splitInp inp of
+ Right r -> r
+ Left _ -> (Nothing, inp)
+
+splitInp :: [Inline] -> [Inline]
+splitInp = splitStrWhen (\c -> isSpace c || (isPunctuation c && c /= ':'))
+
+--
+-- Locator parsing
+--
+
+type LocatorParser = Parsec [Inline] ()
+
+pLocatorWords :: LocatorMap
+ -> LocatorParser (Maybe (Text, Text), [Inline])
+pLocatorWords locMap = do
+ optional $ pMatchChar "," (== ',')
+ optional pSpace
+ (la, lo) <- pLocatorDelimited locMap <|> pLocatorIntegrated locMap
+ s <- getInput -- rest is suffix
+ -- need to trim, otherwise "p. 9" and "9" will have 'different' locators later on
+ -- i.e. the first one will be " 9"
+ return $
+ if T.null la && T.null lo
+ then (Nothing, s)
+ else (Just (la, T.strip lo), s)
+
+pLocatorDelimited :: LocatorMap -> LocatorParser (Text, Text)
+pLocatorDelimited locMap = try $ do
+ _ <- pMatchChar "{" (== '{')
+ skipMany pSpace -- gobble pre-spaces so label doesn't try to include them
+ (la, _) <- pLocatorLabelDelimited locMap
+ -- we only care about balancing {} and [] (because of the outer [] scope);
+ -- the rest can be anything
+ let inner = do { t <- anyToken; return (True, stringify t) }
+ gs <- many (pBalancedBraces [('{','}'), ('[',']')] inner)
+ _ <- pMatchChar "}" (== '}')
+ let lo = T.concat $ map snd gs
+ return (la, lo)
+
+pLocatorLabelDelimited :: LocatorMap -> LocatorParser (Text, Bool)
+pLocatorLabelDelimited locMap
+ = pLocatorLabel' locMap lim <|> return ("page", True)
+ where
+ lim = stringify <$> anyToken
+
+pLocatorIntegrated :: LocatorMap -> LocatorParser (Text, Text)
+pLocatorIntegrated locMap = try $ do
+ (la, wasImplicit) <- pLocatorLabelIntegrated locMap
+ -- if we got the label implicitly, we have presupposed the first one is
+ -- going to have a digit, so guarantee that. You _can_ have p. (a)
+ -- because you specified it.
+ let modifier = if wasImplicit
+ then requireDigits
+ else requireRomansOrDigits
+ g <- try $ pLocatorWordIntegrated (not wasImplicit) >>= modifier
+ gs <- many (try $ pLocatorWordIntegrated False >>= modifier)
+ let lo = T.concat (g:gs)
+ return (la, lo)
+
+pLocatorLabelIntegrated :: LocatorMap -> LocatorParser (Text, Bool)
+pLocatorLabelIntegrated locMap
+ = pLocatorLabel' locMap lim <|> (lookAhead digital >> return ("page", True))
+ where
+ lim = try $ pLocatorWordIntegrated True >>= requireRomansOrDigits
+ digital = try $ pLocatorWordIntegrated True >>= requireDigits
+
+pLocatorLabel' :: LocatorMap -> LocatorParser Text
+ -> LocatorParser (Text, Bool)
+pLocatorLabel' locMap lim = go ""
+ where
+ -- grow the match string until we hit the end
+ -- trying to find the largest match for a label
+ go acc = try $ do
+ -- advance at least one token each time
+ -- the pathological case is "p.3"
+ t <- anyToken
+ ts <- manyTill anyToken (try $ lookAhead lim)
+ let s = acc <> stringify (t:ts)
+ case M.lookup (T.strip s) locMap of
+ -- try to find a longer one, or return this one
+ Just l -> go s <|> return (l, False)
+ Nothing -> go s
+
+-- hard requirement for a locator to have some real digits in it
+requireDigits :: (Bool, Text) -> LocatorParser Text
+requireDigits (_, s) = if not (T.any isDigit s)
+ then Prelude.fail "requireDigits"
+ else return s
+
+-- soft requirement for a sequence with some roman or arabic parts
+-- (a)(iv) -- because iv is roman
+-- 1(a) -- because 1 is an actual digit
+-- NOT: a, (a)-(b), hello, (some text in brackets)
+requireRomansOrDigits :: (Bool, Text) -> LocatorParser Text
+requireRomansOrDigits (d, s) = if not d
+ then Prelude.fail "requireRomansOrDigits"
+ else return s
+
+pLocatorWordIntegrated :: Bool -> LocatorParser (Bool, Text)
+pLocatorWordIntegrated isFirst = try $ do
+ punct <- if isFirst
+ then return ""
+ else (stringify <$> pLocatorSep) <|> return ""
+ sp <- option "" (pSpace >> return " ")
+ (dig, s) <- pBalancedBraces [('(',')'), ('[',']'), ('{','}')] pPageSeq
+ return (dig, punct <> sp <> s)
+
+-- we want to capture: 123, 123A, C22, XVII, 33-44, 22-33; 22-11
+-- 34(1), 34A(A), 34(1)(i)(i), (1)(a)
+-- [17], [17]-[18], '591 [84]'
+-- (because CSL cannot pull out individual pages/sections
+-- to wrap in braces on a per-style basis)
+pBalancedBraces :: [(Char, Char)]
+ -> LocatorParser (Bool, Text)
+ -> LocatorParser (Bool, Text)
+pBalancedBraces braces p = try $ do
+ ss <- many1 surround
+ return $ anyWereDigitLike ss
+ where
+ except = notFollowedBy pBraces >> p
+ -- outer and inner
+ surround = foldl (\a (open, close) -> sur open close except <|> a)
+ except
+ braces
+
+ isc c = stringify <$> pMatchChar [c] (== c)
+
+ sur c c' m = try $ do
+ (d, mid) <- between (isc c) (isc c') (option (False, "") m)
+ return (d, T.cons c . flip T.snoc c' $ mid)
+
+ flattened = concatMap (\(o, c) -> [o, c]) braces
+ pBraces = pMatchChar "braces" (`elem` flattened)
+
+
+-- YES 1, 1.2, 1.2.3
+-- NO 1., 1.2. a.6
+-- can't use sepBy because we want to leave trailing .s
+pPageSeq :: LocatorParser (Bool, Text)
+pPageSeq = oneDotTwo <|> withPeriod
+ where
+ oneDotTwo = do
+ u <- pPageUnit
+ us <- many withPeriod
+ return $ anyWereDigitLike (u:us)
+ withPeriod = try $ do
+ -- .2
+ p <- pMatchChar "." (== '.')
+ u <- try pPageUnit
+ return (fst u, stringify p <> snd u)
+
+anyWereDigitLike :: [(Bool, Text)] -> (Bool, Text)
+anyWereDigitLike as = (any fst as, T.concat $ map snd as)
+
+pPageUnit :: LocatorParser (Bool, Text)
+pPageUnit = roman <|> plainUnit
+ where
+ -- roman is a 'digit'
+ roman = (True,) <$> pRoman
+ plainUnit = do
+ ts <- many1 (notFollowedBy pSpace >>
+ notFollowedBy pLocatorPunct >>
+ anyToken)
+ let s = stringify ts
+ -- otherwise look for actual digits or -s
+ return (T.any isDigit s, s)
+
+pRoman :: LocatorParser Text
+pRoman = try $ do
+ tok <- anyToken
+ case tok of
+ Str t -> case parse (romanNumeral True *> eof)
+ "roman numeral" (T.toUpper t) of
+ Left _ -> mzero
+ Right () -> return t
+ _ -> mzero
+
+pLocatorPunct :: LocatorParser Inline
+pLocatorPunct = pMatchChar "punctuation" isLocatorPunct
+
+pLocatorSep :: LocatorParser Inline
+pLocatorSep = pMatchChar "locator separator" isLocatorSep
+
+pMatchChar :: String -> (Char -> Bool) -> LocatorParser Inline
+pMatchChar msg f = satisfyTok f' <?> msg
+ where
+ f' (Str (T.unpack -> [c])) = f c
+ f' _ = False
+
+pSpace :: LocatorParser Inline
+pSpace = satisfyTok (\t -> isSpacey t || t == Str "\160") <?> "space"
+
+satisfyTok :: (Inline -> Bool) -> LocatorParser Inline
+satisfyTok f = tokenPrim show (\sp _ _ -> sp) (\tok -> if f tok
+ then Just tok
+ else Nothing)
+
+isSpacey :: Inline -> Bool
+isSpacey Space = True
+isSpacey SoftBreak = True
+isSpacey _ = False
+
+isLocatorPunct :: Char -> Bool
+isLocatorPunct '-' = False -- page range
+isLocatorPunct '–' = False -- page range, en dash
+isLocatorPunct ':' = False -- vol:page-range hack
+isLocatorPunct c = isPunctuation c -- includes [{()}]
+
+isLocatorSep :: Char -> Bool
+isLocatorSep ',' = True
+isLocatorSep ';' = True
+isLocatorSep _ = False
+
+splitStrWhen :: (Char -> Bool) -> [Inline] -> [Inline]
+splitStrWhen _ [] = []
+splitStrWhen p (Str xs : ys) = go (T.unpack xs) ++ splitStrWhen p ys
+ where
+ go [] = []
+ go s = case break p s of
+ ([],[]) -> []
+ (zs,[]) -> [Str $ T.pack zs]
+ ([],w:ws) -> Str (T.singleton w) : go ws
+ (zs,w:ws) -> Str (T.pack zs) : Str (T.singleton w) : go ws
+splitStrWhen p (x : ys) = x : splitStrWhen p ys
+
+--
+-- Locator Map
+--
+
+type LocatorMap = M.Map Text Text
+
+toLocatorMap :: Locale -> LocatorMap
+toLocatorMap locale =
+ foldr go mempty locatorTerms
+ where
+ go tname locmap =
+ case M.lookup tname (localeTerms locale) of
+ Nothing -> locmap
+ Just ts -> foldr (\x -> M.insert (snd x) tname) locmap ts
+
+locatorTerms :: [Text]
+locatorTerms =
+ [ "book"
+ , "chapter"
+ , "column"
+ , "figure"
+ , "folio"
+ , "issue"
+ , "line"
+ , "note"
+ , "opus"
+ , "page"
+ , "number-of-pages"
+ , "paragraph"
+ , "part"
+ , "section"
+ , "sub verbo"
+ , "verse"
+ , "volume" ]
diff --git a/src/Text/Pandoc/Citeproc/MetaValue.hs b/src/Text/Pandoc/Citeproc/MetaValue.hs
new file mode 100644
index 000000000..53b14f904
--- /dev/null
+++ b/src/Text/Pandoc/Citeproc/MetaValue.hs
@@ -0,0 +1,252 @@
+{-# LANGUAGE OverloadedStrings #-}
+module Text.Pandoc.Citeproc.MetaValue
+ ( referenceToMetaValue
+ , metaValueToReference
+ , metaValueToText
+ , metaValueToPath
+ )
+where
+
+import Citeproc.Types
+import Text.Pandoc.Definition
+import Text.Pandoc.Builder as B
+import Text.Pandoc.Walk (query)
+import Text.Pandoc.Shared (stringify)
+import Data.Maybe
+import Safe
+import qualified Data.Set as Set
+import qualified Data.Map as M
+import qualified Data.Text as T
+import Data.Text (Text)
+import Text.Printf (printf)
+import Control.Applicative ((<|>))
+
+metaValueToText :: MetaValue -> Maybe Text
+metaValueToText (MetaString t) = Just t
+metaValueToText (MetaInlines ils) = Just $ stringify ils
+metaValueToText (MetaBlocks bls) = Just $ stringify bls
+metaValueToText (MetaList xs) = T.unwords <$> mapM metaValueToText xs
+metaValueToText _ = Nothing
+
+metaValueToPath :: MetaValue -> Maybe FilePath
+metaValueToPath = fmap T.unpack . metaValueToText
+
+metaValueToBool :: MetaValue -> Maybe Bool
+metaValueToBool (MetaBool b) = Just b
+metaValueToBool (MetaString "true") = Just True
+metaValueToBool (MetaString "false") = Just False
+metaValueToBool (MetaInlines ils) =
+ metaValueToBool (MetaString (stringify ils))
+metaValueToBool _ = Nothing
+
+referenceToMetaValue :: Reference Inlines -> MetaValue
+referenceToMetaValue ref =
+ let ItemId id' = referenceId ref
+ type' = referenceType ref
+ in MetaMap $ M.insert "id" (MetaString id')
+ $ M.insert "type" (MetaString type')
+ $ M.map valToMetaValue
+ $ M.mapKeys fromVariable
+ $ referenceVariables ref
+
+
+valToMetaValue :: Val Inlines -> MetaValue
+valToMetaValue (TextVal t) = MetaString t
+valToMetaValue (FancyVal ils) = MetaInlines (B.toList ils)
+valToMetaValue (NumVal n) = MetaString (T.pack $ show n)
+valToMetaValue (NamesVal ns) = MetaList $ map nameToMetaValue ns
+valToMetaValue (DateVal d) = dateToMetaValue d
+
+nameToMetaValue :: Name -> MetaValue
+nameToMetaValue name =
+ MetaMap $
+ (maybe id (M.insert "family" . MetaString) (nameFamily name)) .
+ (maybe id (M.insert "given" . MetaString) (nameGiven name)) .
+ (maybe id (M.insert "dropping-particle" . MetaString)
+ (nameDroppingParticle name)) .
+ (maybe id (M.insert "non-dropping-particle" . MetaString)
+ (nameNonDroppingParticle name)) .
+ (maybe id (M.insert "suffix" . MetaString) (nameSuffix name)) .
+ (maybe id (M.insert "literal" . MetaString) (nameLiteral name)) .
+ (if nameCommaSuffix name
+ then M.insert "comma-suffix" (MetaBool True)
+ else id) .
+ (if nameStaticOrdering name
+ then M.insert "static-ordering" (MetaBool True)
+ else id)
+ $ mempty
+
+dateToMetaValue :: Date -> MetaValue
+dateToMetaValue date =
+ MetaString $
+ (case dateLiteral date of
+ Just l -> l
+ Nothing -> T.intercalate "/" $ map datePartsToEDTF $ dateParts date)
+ <> (if dateCirca date then "~" else "")
+ where
+ datePartsToEDTF (DateParts dps) =
+ T.pack $
+ (case dps of
+ (y:_) | y > 9999 || y < -10000 -> ('y':)
+ _ -> id) $
+ case dps of
+ (y:m:d:_)
+ | y < -1 -> printf "%05d-%02d-%02d" (y+1) m d
+ | otherwise -> printf "%04d-%02d-%02d" y m d
+ (y:m:[])
+ | y < -1 -> printf "%05d-%02d" (y+1) m
+ | otherwise -> printf "%04d-%02d" y m
+ (y:[])
+ | y < -1 -> printf "%05d" (y+1)
+ | otherwise -> printf "%04d" y
+ _ -> mempty
+
+metaValueToReference :: MetaValue -> Maybe (Reference Inlines)
+metaValueToReference (MetaMap m) = do
+ let m' = M.mapKeys normalizeKey m
+ id' <- M.lookup "id" m' >>= metaValueToText
+ type' <- (M.lookup "type" m' >>= metaValueToText) <|> pure ""
+ let m'' = M.delete "id" $ M.delete "type" m'
+ let vars = M.mapKeys toVariable $ M.mapWithKey metaValueToVal m''
+ return $ Reference { referenceId = ItemId id'
+ , referenceType = type'
+ , referenceDisambiguation = Nothing
+ , referenceVariables = vars }
+metaValueToReference _ = Nothing
+
+metaValueToVal :: Text -> MetaValue -> Val Inlines
+metaValueToVal k v
+ | k `Set.member` dateVariables
+ = DateVal $ metaValueToDate v
+ | k `Set.member` nameVariables
+ = NamesVal $ metaValueToNames v
+ | k == "other-ids"
+ = TextVal $ fromMaybe mempty $ metaValueToText v
+ -- will create space-separated list
+ | otherwise =
+ case v of
+ MetaString t -> TextVal t
+ MetaInlines ils -> FancyVal (B.fromList ils)
+ MetaBlocks bs -> FancyVal (B.fromList $ query id bs)
+ MetaBool b -> TextVal (if b then "true" else "false")
+ MetaList _ -> TextVal mempty
+ MetaMap _ -> TextVal mempty
+
+metaValueToDate :: MetaValue -> Date
+metaValueToDate (MetaMap m) =
+ Date
+ { dateParts = dateparts
+ , dateCirca = circa
+ , dateSeason = season
+ , dateLiteral = literal }
+ where
+ dateparts = case M.lookup "date-parts" m of
+ Just (MetaList xs) ->
+ mapMaybe metaValueToDateParts xs
+ Just _ -> []
+ Nothing ->
+ maybe [] (:[]) $ metaValueToDateParts (MetaMap m)
+ circa = fromMaybe False $
+ M.lookup "circa" m >>= metaValueToBool
+ season = M.lookup "season" m >>= metaValueToInt
+ literal = M.lookup "literal" m >>= metaValueToText
+metaValueToDate (MetaList xs) =
+ Date{ dateParts = mapMaybe metaValueToDateParts xs
+ , dateCirca = False
+ , dateSeason = Nothing
+ , dateLiteral = Nothing }
+metaValueToDate x =
+ fromMaybe emptyDate $ metaValueToText x >>= rawDateEDTF
+
+
+metaValueToInt :: MetaValue -> Maybe Int
+metaValueToInt x = metaValueToText x >>= readMay . T.unpack
+
+metaValueToDateParts :: MetaValue -> Maybe DateParts
+metaValueToDateParts (MetaList xs) =
+ Just $ DateParts $ map (fromMaybe 0 . metaValueToInt) xs
+metaValueToDateParts (MetaMap m) =
+ case (M.lookup "year" m >>= metaValueToInt,
+ ((M.lookup "month" m >>= metaValueToInt)
+ <|>
+ ((+ 20) <$> (M.lookup "season" m >>= metaValueToInt))),
+ M.lookup "day" m >>= metaValueToInt) of
+ (Just y, Just mo, Just d) -> Just $ DateParts [y, mo, d]
+ (Just y, Just mo, Nothing) -> Just $ DateParts [y, mo]
+ (Just y, Nothing, _) -> Just $ DateParts [y]
+ _ -> Nothing
+metaValueToDateParts _ = Nothing
+
+emptyDate :: Date
+emptyDate = Date { dateParts = []
+ , dateCirca = False
+ , dateSeason = Nothing
+ , dateLiteral = Nothing }
+
+metaValueToNames :: MetaValue -> [Name]
+metaValueToNames (MetaList xs) = mapMaybe metaValueToName xs
+metaValueToNames x = maybeToList $ metaValueToName x
+
+metaValueToName :: MetaValue -> Maybe Name
+metaValueToName (MetaMap m) = extractParticles <$>
+ Just Name
+ { nameFamily = family
+ , nameGiven = given
+ , nameDroppingParticle = dropping
+ , nameNonDroppingParticle = nondropping
+ , nameSuffix = suffix
+ , nameCommaSuffix = commasuffix
+ , nameStaticOrdering = staticordering
+ , nameLiteral = literal
+ }
+ where
+ family = M.lookup "family" m >>= metaValueToText
+ given = M.lookup "given" m >>= metaValueToText
+ dropping = M.lookup "dropping-particle" m
+ >>= metaValueToText
+ nondropping = M.lookup "non-dropping-particle" m
+ >>= metaValueToText
+ suffix = M.lookup "suffix" m >>= metaValueToText
+ commasuffix = fromMaybe False $
+ M.lookup "comma-suffix" m >>= metaValueToBool
+ staticordering = fromMaybe False $
+ M.lookup "static-ordering" m >>= metaValueToBool
+ literal = M.lookup "literal" m >>= metaValueToText
+metaValueToName x = extractParticles <$>
+ case metaValueToText x of
+ Nothing -> Nothing
+ Just lit -> Just Name
+ { nameFamily = Nothing
+ , nameGiven = Nothing
+ , nameDroppingParticle = Nothing
+ , nameNonDroppingParticle = Nothing
+ , nameSuffix = Nothing
+ , nameCommaSuffix = False
+ , nameStaticOrdering = False
+ , nameLiteral = Just lit }
+
+dateVariables :: Set.Set Text
+dateVariables = Set.fromList
+ [ "accessed", "container", "event-date", "issued",
+ "original-date", "submitted" ]
+
+nameVariables :: Set.Set Text
+nameVariables = Set.fromList
+ [ "author", "collection-editor", "composer",
+ "container-author", "director", "editor",
+ "editorial-director", "illustrator",
+ "interviewer", "original-author",
+ "recipient", "reviewed-author",
+ "translator" ]
+
+normalizeKey :: Text -> Text
+normalizeKey k =
+ case T.toLower k of
+ "doi" -> "DOI"
+ "isbn" -> "ISBN"
+ "issn" -> "ISSN"
+ "pmcid" -> "PMCID"
+ "pmid" -> "PMID"
+ "url" -> "URL"
+ x -> x
+
diff --git a/src/Text/Pandoc/Citeproc/Util.hs b/src/Text/Pandoc/Citeproc/Util.hs
new file mode 100644
index 000000000..6d8e01bc9
--- /dev/null
+++ b/src/Text/Pandoc/Citeproc/Util.hs
@@ -0,0 +1,70 @@
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE OverloadedStrings #-}
+module Text.Pandoc.Citeproc.Util
+ ( toIETF )
+where
+import Data.Text (Text)
+
+toIETF :: Text -> Text
+toIETF "english" = "en-US" -- "en-EN" unavailable in CSL
+toIETF "usenglish" = "en-US"
+toIETF "american" = "en-US"
+toIETF "british" = "en-GB"
+toIETF "ukenglish" = "en-GB"
+toIETF "canadian" = "en-US" -- "en-CA" unavailable in CSL
+toIETF "australian" = "en-GB" -- "en-AU" unavailable in CSL
+toIETF "newzealand" = "en-GB" -- "en-NZ" unavailable in CSL
+toIETF "afrikaans" = "af-ZA"
+toIETF "arabic" = "ar"
+toIETF "basque" = "eu"
+toIETF "bulgarian" = "bg-BG"
+toIETF "catalan" = "ca-AD"
+toIETF "croatian" = "hr-HR"
+toIETF "czech" = "cs-CZ"
+toIETF "danish" = "da-DK"
+toIETF "dutch" = "nl-NL"
+toIETF "estonian" = "et-EE"
+toIETF "finnish" = "fi-FI"
+toIETF "canadien" = "fr-CA"
+toIETF "acadian" = "fr-CA"
+toIETF "french" = "fr-FR"
+toIETF "francais" = "fr-FR"
+toIETF "austrian" = "de-AT"
+toIETF "naustrian" = "de-AT"
+toIETF "german" = "de-DE"
+toIETF "germanb" = "de-DE"
+toIETF "ngerman" = "de-DE"
+toIETF "greek" = "el-GR"
+toIETF "polutonikogreek" = "el-GR"
+toIETF "hebrew" = "he-IL"
+toIETF "hungarian" = "hu-HU"
+toIETF "icelandic" = "is-IS"
+toIETF "italian" = "it-IT"
+toIETF "japanese" = "ja-JP"
+toIETF "latvian" = "lv-LV"
+toIETF "lithuanian" = "lt-LT"
+toIETF "magyar" = "hu-HU"
+toIETF "mongolian" = "mn-MN"
+toIETF "norsk" = "nb-NO"
+toIETF "nynorsk" = "nn-NO"
+toIETF "farsi" = "fa-IR"
+toIETF "polish" = "pl-PL"
+toIETF "brazil" = "pt-BR"
+toIETF "brazilian" = "pt-BR"
+toIETF "portugues" = "pt-PT"
+toIETF "portuguese" = "pt-PT"
+toIETF "romanian" = "ro-RO"
+toIETF "russian" = "ru-RU"
+toIETF "serbian" = "sr-RS"
+toIETF "serbianc" = "sr-RS"
+toIETF "slovak" = "sk-SK"
+toIETF "slovene" = "sl-SL"
+toIETF "spanish" = "es-ES"
+toIETF "swedish" = "sv-SE"
+toIETF "thai" = "th-TH"
+toIETF "turkish" = "tr-TR"
+toIETF "ukrainian" = "uk-UA"
+toIETF "vietnamese" = "vi-VN"
+toIETF "latin" = "la"
+toIETF x = x
+
diff --git a/src/Text/Pandoc/Class/PandocMonad.hs b/src/Text/Pandoc/Class/PandocMonad.hs
index a454de1d0..6042973ab 100644
--- a/src/Text/Pandoc/Class/PandocMonad.hs
+++ b/src/Text/Pandoc/Class/PandocMonad.hs
@@ -553,7 +553,7 @@ getDefaultReferencePptx = do
mapM pathToEntry paths
-- | Read file from user data directory or,
--- if not found there, from Cabal data directory.
+-- if not found there, from the default data files.
readDataFile :: PandocMonad m => FilePath -> m B.ByteString
readDataFile fname = do
datadir <- getUserDataDir
@@ -565,7 +565,7 @@ readDataFile fname = do
then readFileStrict (userDir </> fname)
else readDefaultDataFile fname
--- | Read file from from Cabal data directory.
+-- | Read file from from the default data files.
readDefaultDataFile :: PandocMonad m => FilePath -> m B.ByteString
readDefaultDataFile "reference.docx" =
B.concat . BL.toChunks . fromArchive <$> getDefaultReferenceDocx
diff --git a/src/Text/Pandoc/Error.hs b/src/Text/Pandoc/Error.hs
index 2e67e5bc1..63973bd05 100644
--- a/src/Text/Pandoc/Error.hs
+++ b/src/Text/Pandoc/Error.hs
@@ -32,6 +32,7 @@ import Text.Printf (printf)
import Text.Parsec.Error
import Text.Parsec.Pos hiding (Line)
import Text.Pandoc.Shared (tshow)
+import Citeproc (CiteprocError, prettyCiteprocError)
type Input = Text
@@ -60,6 +61,7 @@ data PandocError = PandocIOError Text IOError
| PandocUnknownReaderError Text
| PandocUnknownWriterError Text
| PandocUnsupportedExtensionError Text Text
+ | PandocCiteprocError CiteprocError
deriving (Show, Typeable, Generic)
instance Exception PandocError
@@ -139,6 +141,8 @@ handleError (Left e) =
PandocUnsupportedExtensionError ext f -> err 23 $
"The extension " <> ext <> " is not supported " <>
"for " <> f
+ PandocCiteprocError e' -> err 24 $
+ prettyCiteprocError e'
err :: Int -> Text -> IO a
err exitCode msg = do
diff --git a/src/Text/Pandoc/Filter.hs b/src/Text/Pandoc/Filter.hs
index 502aaefae..f5c1a4f76 100644
--- a/src/Text/Pandoc/Filter.hs
+++ b/src/Text/Pandoc/Filter.hs
@@ -26,6 +26,7 @@ import Text.Pandoc.Class.PandocMonad (report, getVerbosity)
import Text.Pandoc.Definition (Pandoc)
import Text.Pandoc.Options (ReaderOptions)
import Text.Pandoc.Logging
+import Text.Pandoc.Citeproc (processCitations)
import qualified Text.Pandoc.Filter.JSON as JSONFilter
import qualified Text.Pandoc.Filter.Lua as LuaFilter
import qualified Text.Pandoc.Filter.Path as Path
@@ -39,6 +40,7 @@ import Control.Monad (foldM, when)
-- | Type of filter and path to filter file.
data Filter = LuaFilter FilePath
| JSONFilter FilePath
+ | CiteprocFilter -- built-in citeproc
deriving (Show, Generic)
instance FromYAML Filter where
@@ -47,15 +49,19 @@ instance FromYAML Filter where
ty <- m .: "type"
fp <- m .: "path"
case ty of
+ "citeproc" -> return CiteprocFilter
"lua" -> return $ LuaFilter $ T.unpack fp
"json" -> return $ JSONFilter $ T.unpack fp
_ -> fail $ "Unknown filter type " ++ show (ty :: T.Text)) node
<|>
(withStr "Filter" $ \t -> do
let fp = T.unpack t
- case takeExtension fp of
- ".lua" -> return $ LuaFilter fp
- _ -> return $ JSONFilter fp) node
+ if fp == "citeproc"
+ then return CiteprocFilter
+ else return $
+ case takeExtension fp of
+ ".lua" -> LuaFilter fp
+ _ -> JSONFilter fp) node
-- | Modify the given document using a filter.
applyFilters :: ReaderOptions
@@ -71,6 +77,8 @@ applyFilters ropts filters args d = do
withMessages f $ JSONFilter.apply ropts args f doc
applyFilter doc (LuaFilter f) =
withMessages f $ LuaFilter.apply ropts args f doc
+ applyFilter doc CiteprocFilter =
+ processCitations doc
withMessages f action = do
verbosity <- getVerbosity
when (verbosity == INFO) $ report $ RunningFilter f
@@ -85,5 +93,6 @@ applyFilters ropts filters args d = do
expandFilterPath :: Filter -> PandocIO Filter
expandFilterPath (LuaFilter fp) = LuaFilter <$> Path.expandFilterPath fp
expandFilterPath (JSONFilter fp) = JSONFilter <$> Path.expandFilterPath fp
+expandFilterPath CiteprocFilter = return CiteprocFilter
$(deriveJSON defaultOptions ''Filter)
diff --git a/src/Text/Pandoc/Logging.hs b/src/Text/Pandoc/Logging.hs
index af59316b5..f6a2a6e1a 100644
--- a/src/Text/Pandoc/Logging.hs
+++ b/src/Text/Pandoc/Logging.hs
@@ -98,6 +98,7 @@ data LogMessage =
| CouldNotDeduceFormat [Text.Text] Text.Text
| RunningFilter FilePath
| FilterCompleted FilePath Integer
+ | CiteprocWarning Text.Text
deriving (Show, Eq, Data, Ord, Typeable, Generic)
instance ToJSON LogMessage where
@@ -227,6 +228,8 @@ instance ToJSON LogMessage where
FilterCompleted fp ms ->
["path" .= Text.pack fp
,"milliseconds" .= Text.pack (show ms) ]
+ CiteprocWarning msg ->
+ ["message" .= msg]
showPos :: SourcePos -> Text.Text
showPos pos = Text.pack $ sn ++ "line " ++
@@ -338,6 +341,7 @@ showLogMessage msg =
RunningFilter fp -> "Running filter " <> Text.pack fp
FilterCompleted fp ms -> "Completed filter " <> Text.pack fp <>
" in " <> Text.pack (show ms) <> " ms"
+ CiteprocWarning ms -> "Citeproc: " <> ms
messageVerbosity :: LogMessage -> Verbosity
messageVerbosity msg =
@@ -383,3 +387,4 @@ messageVerbosity msg =
CouldNotDeduceFormat{} -> WARNING
RunningFilter{} -> INFO
FilterCompleted{} -> INFO
+ CiteprocWarning{} -> WARNING
diff --git a/src/Text/Pandoc/Readers.hs b/src/Text/Pandoc/Readers.hs
index 1337c742c..9a069f7d0 100644
--- a/src/Text/Pandoc/Readers.hs
+++ b/src/Text/Pandoc/Readers.hs
@@ -51,6 +51,9 @@ module Text.Pandoc.Readers
, readFB2
, readIpynb
, readCSV
+ , readCslJson
+ , readBibTeX
+ , readBibLaTeX
-- * Miscellaneous
, getReader
, getDefaultExtensions
@@ -95,6 +98,8 @@ import Text.Pandoc.Readers.Txt2Tags
import Text.Pandoc.Readers.Vimwiki
import Text.Pandoc.Readers.Man
import Text.Pandoc.Readers.CSV
+import Text.Pandoc.Readers.CslJson
+import Text.Pandoc.Readers.BibTeX
import qualified Text.Pandoc.UTF8 as UTF8
import Text.Parsec.Error
@@ -138,6 +143,9 @@ readers = [ ("native" , TextReader readNative)
,("fb2" , TextReader readFB2)
,("ipynb" , TextReader readIpynb)
,("csv" , TextReader readCSV)
+ ,("csljson" , TextReader readCslJson)
+ ,("bibtex" , TextReader readBibTeX)
+ ,("biblatex" , TextReader readBibLaTeX)
]
-- | Retrieve reader, extensions based on formatSpec (format+extensions).
diff --git a/src/Text/Pandoc/Readers/BibTeX.hs b/src/Text/Pandoc/Readers/BibTeX.hs
new file mode 100644
index 000000000..c367e75a1
--- /dev/null
+++ b/src/Text/Pandoc/Readers/BibTeX.hs
@@ -0,0 +1,70 @@
+{-# LANGUAGE OverloadedStrings #-}
+{- |
+ Module : Text.Pandoc.Readers.BibTeX
+ Copyright : Copyright (C) 2020 John MacFarlane
+ License : GNU GPL, version 2 or above
+
+ Maintainer : John MacFarlane <jgm@berkeley.edu>
+ Stability : alpha
+ Portability : portable
+
+Parses BibTeX or BibLaTeX bibliographies into a Pandoc document
+with empty body and `references` and `nocite` fields
+in the metadata. A wildcard `nocite` is used so that
+if the document is rendered in another format, the
+entire bibliography will be printed.
+-}
+module Text.Pandoc.Readers.BibTeX
+ ( readBibTeX
+ , readBibLaTeX
+ )
+where
+
+import Text.Pandoc.Options
+import Text.Pandoc.Definition
+import Text.Pandoc.Builder (setMeta, cite, str)
+import Data.Text (Text)
+import Citeproc (Lang(..), parseLang)
+import Citeproc.Locale (getLocale)
+import Data.Maybe (fromMaybe)
+import Text.Pandoc.Error (PandocError(..))
+import Text.Pandoc.Class (PandocMonad, lookupEnv)
+import Text.Pandoc.Citeproc.BibTeX as BibTeX
+import Text.Pandoc.Citeproc.MetaValue (referenceToMetaValue)
+import Control.Monad.Except (throwError)
+
+-- | Read BibTeX from an input string and return a Pandoc document.
+-- The document will have only metadata, with an empty body.
+-- The metadata will contain a `references` field with the
+-- bibliography entries, and a `nocite` field with the wildcard `[@*]`.
+readBibTeX :: PandocMonad m => ReaderOptions -> Text -> m Pandoc
+readBibTeX = readBibTeX' BibTeX.Bibtex
+
+-- | Read BibLaTeX from an input string and return a Pandoc document.
+-- The document will have only metadata, with an empty body.
+-- The metadata will contain a `references` field with the
+-- bibliography entries, and a `nocite` field with the wildcard `[@*]`.
+readBibLaTeX :: PandocMonad m => ReaderOptions -> Text -> m Pandoc
+readBibLaTeX = readBibTeX' BibTeX.Biblatex
+
+readBibTeX' :: PandocMonad m => Variant -> ReaderOptions -> Text -> m Pandoc
+readBibTeX' variant _opts t = do
+ lang <- fromMaybe (Lang "en" (Just "US")) . fmap parseLang
+ <$> lookupEnv "LANG"
+ locale <- case getLocale lang of
+ Left e -> throwError $ PandocCiteprocError e
+ Right l -> return l
+ case BibTeX.readBibtexString variant locale (const True) t of
+ Left e -> throwError $ PandocParsecError t e
+ Right refs -> return $ setMeta "references"
+ (map referenceToMetaValue refs)
+ . setMeta "nocite"
+ (cite [Citation {citationId = "*"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0}]
+ (str "[@*]"))
+ $ Pandoc nullMeta []
+
diff --git a/src/Text/Pandoc/Readers/CslJson.hs b/src/Text/Pandoc/Readers/CslJson.hs
new file mode 100644
index 000000000..377186b1e
--- /dev/null
+++ b/src/Text/Pandoc/Readers/CslJson.hs
@@ -0,0 +1,53 @@
+{-# LANGUAGE OverloadedStrings #-}
+{- |
+ Module : Text.Pandoc.Readers.CslJson
+ Copyright : Copyright (C) 2020 John MacFarlane
+ License : GNU GPL, version 2 or above
+
+ Maintainer : John MacFarlane <jgm@berkeley.edu>
+ Stability : alpha
+ Portability : portable
+
+Parses CSL JSON bibliographies into a Pandoc document
+with empty body and `references` and `nocite` fields
+in the metadata. A wildcard `nocite` is used so that
+if the document is rendered in another format, the
+entire bibliography will be printed.
+
+<https://citeproc-js.readthedocs.io/en/latest/csl-json/markup.html>.
+-}
+module Text.Pandoc.Readers.CslJson
+ ( readCslJson )
+where
+
+import Text.Pandoc.Options
+import Text.Pandoc.Definition
+import Text.Pandoc.Builder (setMeta, cite, str)
+import qualified Text.Pandoc.UTF8 as UTF8
+import Data.Text (Text)
+import qualified Data.Text as T
+import Text.Pandoc.Error (PandocError(..))
+import Text.Pandoc.Class (PandocMonad)
+import Text.Pandoc.Citeproc.CslJson (cslJsonToReferences)
+import Text.Pandoc.Citeproc.MetaValue (referenceToMetaValue)
+import Control.Monad.Except (throwError)
+
+-- | Read CSL JSON from an input string and return a Pandoc document.
+-- The document will have only metadata, with an empty body.
+-- The metadata will contain a `references` field with the
+-- bibliography entries, and a `nocite` field with the wildcard `[@*]`.
+readCslJson :: PandocMonad m => ReaderOptions -> Text -> m Pandoc
+readCslJson _opts t =
+ case cslJsonToReferences (UTF8.fromText t) of
+ Left e -> throwError $ PandocParseError $ T.pack e
+ Right refs -> return $ setMeta "references"
+ (map referenceToMetaValue refs)
+ . setMeta "nocite"
+ (cite [Citation {citationId = "*"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0}]
+ (str "[@*]"))
+ $ Pandoc nullMeta []
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 77f28b21b..257788081 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -1665,6 +1665,7 @@ str = do
abbrevs <- getOption readerAbbreviations
if not (T.null result) && T.last result == '.' && result `Set.member` abbrevs
then try (do ils <- whitespace
+ notFollowedBy (() <$ cite <|> () <$ note)
-- ?? lookAhead alphaNum
-- replace space after with nonbreaking space
-- if softbreak, move before abbrev if possible (#4635)
diff --git a/src/Text/Pandoc/Templates.hs b/src/Text/Pandoc/Templates.hs
index 1f253b465..0c10b258d 100644
--- a/src/Text/Pandoc/Templates.hs
+++ b/src/Text/Pandoc/Templates.hs
@@ -80,6 +80,7 @@ getDefaultTemplate writer = do
let format = T.takeWhile (`notElem` ("+-" :: String)) writer -- strip off extensions
case format of
"native" -> return ""
+ "csljson" -> return ""
"json" -> return ""
"docx" -> return ""
"fb2" -> return ""
diff --git a/src/Text/Pandoc/Writers.hs b/src/Text/Pandoc/Writers.hs
index df8355c32..0654c2d85 100644
--- a/src/Text/Pandoc/Writers.hs
+++ b/src/Text/Pandoc/Writers.hs
@@ -24,6 +24,7 @@ module Text.Pandoc.Writers
, writeCommonMark
, writeConTeXt
, writeCustom
+ , writeCslJson
, writeDZSlides
, writeDocbook4
, writeDocbook5
@@ -86,6 +87,7 @@ import Text.Pandoc.Error
import Text.Pandoc.Writers.AsciiDoc
import Text.Pandoc.Writers.CommonMark
import Text.Pandoc.Writers.ConTeXt
+import Text.Pandoc.Writers.CslJson
import Text.Pandoc.Writers.Custom
import Text.Pandoc.Writers.Docbook
import Text.Pandoc.Writers.Docx
@@ -182,6 +184,7 @@ writers = [
,("gfm" , TextWriter writeCommonMark)
,("tei" , TextWriter writeTEI)
,("muse" , TextWriter writeMuse)
+ ,("csljson" , TextWriter writeCslJson)
]
-- | Retrieve writer, extensions based on formatSpec (format+extensions).
diff --git a/src/Text/Pandoc/Writers/CslJson.hs b/src/Text/Pandoc/Writers/CslJson.hs
new file mode 100644
index 000000000..9f6f2f8ea
--- /dev/null
+++ b/src/Text/Pandoc/Writers/CslJson.hs
@@ -0,0 +1,87 @@
+{-# LANGUAGE OverloadedStrings #-}
+{- |
+ Module : Text.Pandoc.Writers.CslJson
+ Copyright : Copyright (C) 2020 John MacFarlane
+ License : GNU GPL, version 2 or above
+
+ Maintainer : John MacFarlane <jgm@berkeley.edu>
+ Stability : alpha
+ Portability : portable
+
+Conversion of references from 'Pandoc' metadata to CSL JSON:
+<https://citeproc-js.readthedocs.io/en/latest/csl-json/markup.html>.
+
+Note that this writer ignores everything in the body of the
+document and everything in the metadata except `references`.
+It assumes that the `references` field is a list with the structure
+of a CSL JSON bibliography.
+-}
+module Text.Pandoc.Writers.CslJson ( writeCslJson )
+where
+import Data.Text (Text)
+import qualified Data.Text as T
+import qualified Text.Pandoc.UTF8 as UTF8
+import Text.Pandoc.Error
+import Text.Pandoc.Class
+import Control.Monad.Except (throwError)
+import Data.ByteString.Lazy (toStrict)
+import Data.ByteString (ByteString)
+import Text.Pandoc.Definition
+import Text.Pandoc.Builder as B
+import Text.Pandoc.Citeproc.MetaValue (metaValueToReference, metaValueToText)
+import Citeproc (parseLang, Locale, Reference(..), Lang(..))
+import Control.Monad.Identity
+import Citeproc.Locale (getLocale)
+import Citeproc.CslJson
+import Text.Pandoc.Options (WriterOptions)
+import Data.Maybe (fromMaybe, mapMaybe)
+import Data.Aeson.Encode.Pretty (Config (..), Indent (Spaces),
+ NumberFormat (Generic),
+ defConfig, encodePretty')
+
+writeCslJson :: PandocMonad m => WriterOptions -> Pandoc -> m Text
+writeCslJson _opts (Pandoc meta _) = do
+ let lang = fromMaybe (Lang "en" (Just "US")) $
+ parseLang <$> (lookupMeta "lang" meta >>= metaValueToText)
+ locale <- case getLocale lang of
+ Left e -> throwError $ PandocCiteprocError e
+ Right l -> return l
+ case lookupMeta "references" meta of
+ Just (MetaList rs) -> return $ (UTF8.toText $
+ toCslJson locale (mapMaybe metaValueToReference rs)) <> "\n"
+ _ -> throwError $ PandocAppError "No references field"
+
+fromInlines :: [Inline] -> CslJson Text
+fromInlines = foldMap fromInline . B.fromList
+
+fromInline :: Inline -> CslJson Text
+fromInline (Str t) = CslText t
+fromInline (Emph ils) = CslItalic (fromInlines ils)
+fromInline (Strong ils) = CslBold (fromInlines ils)
+fromInline (Underline ils) = CslUnderline (fromInlines ils)
+fromInline (Strikeout ils) = fromInlines ils
+fromInline (Superscript ils) = CslSup (fromInlines ils)
+fromInline (Subscript ils) = CslSub (fromInlines ils)
+fromInline (SmallCaps ils) = CslSmallCaps (fromInlines ils)
+fromInline (Quoted _ ils) = CslQuoted (fromInlines ils)
+fromInline (Cite _ ils) = fromInlines ils
+fromInline (Code _ t) = CslText t
+fromInline Space = CslText " "
+fromInline SoftBreak = CslText " "
+fromInline LineBreak = CslText "\n"
+fromInline (Math _ t) = CslText t
+fromInline (RawInline _ _) = CslEmpty
+fromInline (Link _ ils _) = fromInlines ils
+fromInline (Image _ ils _) = fromInlines ils
+fromInline (Note _) = CslEmpty
+fromInline (Span (_,[cl],_) ils)
+ | "csl-" `T.isPrefixOf` cl = CslDiv cl (fromInlines ils)
+fromInline (Span _ ils) = fromInlines ils
+
+toCslJson :: Locale -> [Reference Inlines] -> ByteString
+toCslJson locale = toStrict .
+ encodePretty' defConfig{ confIndent = Spaces 2
+ , confCompare = compare
+ , confNumFormat = Generic }
+ . map (runIdentity . traverse (return . renderCslJson locale . foldMap fromInline))
+
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs
index fa7e2ceea..89a50125b 100644
--- a/src/Text/Pandoc/Writers/Docx.hs
+++ b/src/Text/Pandoc/Writers/Docx.hs
@@ -1184,6 +1184,18 @@ inlineToOpenXML' _ (Str str) =
formattedString str
inlineToOpenXML' opts Space = inlineToOpenXML opts (Str " ")
inlineToOpenXML' opts SoftBreak = inlineToOpenXML opts (Str " ")
+inlineToOpenXML' opts (Span ("",["csl-block"],[]) ils) =
+ inlinesToOpenXML opts ils
+inlineToOpenXML' opts (Span ("",["csl-left-margin"],[]) ils) =
+ inlinesToOpenXML opts ils
+inlineToOpenXML' opts (Span ("",["csl-right-inline"],[]) ils) =
+ ([mknode "w:r" []
+ (mknode "w:t"
+ [("xml:space","preserve")]
+ ("\t" :: String))] ++)
+ <$> inlinesToOpenXML opts ils
+inlineToOpenXML' opts (Span ("",["csl-indent"],[]) ils) =
+ inlinesToOpenXML opts ils
inlineToOpenXML' _ (Span (ident,["comment-start"],kvs) ils) = do
-- prefer the "id" in kvs, since that is the one produced by the docx
-- reader.
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index b40765145..b6bde7f8f 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -86,6 +86,8 @@ data WriterState = WriterState
, stSlideLevel :: Int -- ^ Slide level
, stInSection :: Bool -- ^ Content is in a section (revealjs)
, stCodeBlockNum :: Int -- ^ Number of code block
+ , stCsl :: Bool -- ^ Has CSL references
+ , stCslEntrySpacing :: Maybe Int -- ^ CSL entry spacing
}
defaultWriterState :: WriterState
@@ -96,7 +98,9 @@ defaultWriterState = WriterState {stNotes= [], stMath = False, stQuotes = False,
stSlideVariant = NoSlides,
stSlideLevel = 1,
stInSection = False,
- stCodeBlockNum = 0}
+ stCodeBlockNum = 0,
+ stCsl = False,
+ stCslEntrySpacing = Nothing}
-- Helpers to render HTML with the appropriate function.
@@ -316,39 +320,48 @@ pandocToHtml opts (Pandoc meta blocks) = do
Just sty -> defField "highlighting-css"
(T.pack $ styleToCss sty)
Nothing -> id
- else id) $
+ else id) .
+ (if stCsl st
+ then defField "csl-css" True .
+ (case stCslEntrySpacing st of
+ Nothing -> id
+ Just 0 -> id
+ Just n ->
+ defField "csl-entry-spacing"
+ (tshow n <> "em"))
+ else id) .
(if stMath st
then defField "math" (renderHtml' math)
- else id) $
+ else id) .
(case writerHTMLMathMethod opts of
MathJax u -> defField "mathjax" True .
defField "mathjaxurl"
(T.takeWhile (/='?') u)
- _ -> defField "mathjax" False) $
+ _ -> defField "mathjax" False) .
(case writerHTMLMathMethod opts of
PlainMath -> defField "displaymath-css" True
WebTeX _ -> defField "displaymath-css" True
- _ -> id) $
- defField "document-css" (isNothing mCss && slideVariant == NoSlides) $
- defField "quotes" (stQuotes st) $
+ _ -> id) .
+ defField "document-css" (isNothing mCss && slideVariant == NoSlides) .
+ defField "quotes" (stQuotes st) .
-- for backwards compatibility we populate toc
-- with the contents of the toc, rather than a
-- boolean:
- maybe id (defField "toc") toc $
- maybe id (defField "table-of-contents") toc $
- defField "author-meta" authsMeta $
+ maybe id (defField "toc") toc .
+ maybe id (defField "table-of-contents") toc .
+ defField "author-meta" authsMeta .
maybe id (defField "date-meta")
- (normalizeDate dateMeta) $
+ (normalizeDate dateMeta) .
defField "pagetitle"
- (stringifyHTML . docTitle $ meta) $
- defField "idprefix" (writerIdentifierPrefix opts) $
+ (stringifyHTML . docTitle $ meta) .
+ defField "idprefix" (writerIdentifierPrefix opts) .
-- these should maybe be set in pandoc.hs
defField "slidy-url"
- ("https://www.w3.org/Talks/Tools/Slidy2" :: Text) $
- defField "slideous-url" ("slideous" :: Text) $
+ ("https://www.w3.org/Talks/Tools/Slidy2" :: Text) .
+ defField "slideous-url" ("slideous" :: Text) .
defField "revealjs-url" ("https://unpkg.com/reveal.js@^4/" :: Text) $
- defField "s5-url" ("s5/default" :: Text) $
- defField "html5" (stHtml5 st)
+ defField "s5-url" ("s5/default" :: Text) .
+ defField "html5" (stHtml5 st) $
metadata
return (thebody, context)
@@ -743,12 +756,17 @@ blockToHtml opts (Div (ident, "section":dclasses, dkvs)
blockToHtml opts (Div attr@(ident, classes, kvs') bs) = do
html5 <- gets stHtml5
slideVariant <- gets stSlideVariant
+ let isCslBibBody = ident == "refs" || "csl-bib-body" `elem` classes
+ when isCslBibBody $ modify $ \st -> st{ stCsl = True
+ , stCslEntrySpacing =
+ lookup "entry-spacing" kvs' >>=
+ safeRead }
+ let isCslBibEntry = "csl-entry" `elem` classes
let kvs = [(k,v) | (k,v) <- kvs', k /= "width"] ++
[("style", "width:" <> w <> ";") | "column" `elem` classes,
("width", w) <- kvs'] ++
- [("role", "doc-bibliography") | ident == "refs" && html5] ++
- [("role", "doc-biblioentry")
- | "ref-" `T.isPrefixOf` ident && html5]
+ [("role", "doc-bibliography") | isCslBibBody && html5] ++
+ [("role", "doc-biblioentry") | isCslBibEntry && html5]
let speakerNotes = "notes" `elem` classes
-- we don't want incremental output inside speaker notes, see #1394
let opts' = if | speakerNotes -> opts{ writerIncremental = False }
@@ -765,7 +783,9 @@ blockToHtml opts (Div attr@(ident, classes, kvs') bs) = do
-- a newline between the column divs, which throws
-- off widths! see #4028
mconcat <$> mapM (blockToHtml opts) bs
- else blockListToHtml opts' bs
+ else if isCslBibEntry
+ then mconcat <$> mapM (cslEntryToHtml opts') bs
+ else blockListToHtml opts' bs
let contents' = nl opts >> contents >> nl opts
let (divtag, classes'') = if html5 && "section" `elem` classes'
then (H5.section, filter (/= "section") classes')
@@ -1439,6 +1459,23 @@ blockListToNote opts ref blocks = do
_ -> noteItem
return $ nl opts >> noteItem'
+cslEntryToHtml :: PandocMonad m
+ => WriterOptions
+ -> Block
+ -> StateT WriterState m Html
+cslEntryToHtml opts (Para xs) = do
+ html5 <- gets stHtml5
+ let inDiv :: Text -> Html -> Html
+ inDiv cls x = ((if html5 then H5.div else H.div)
+ x ! A.class_ (toValue cls))
+ let go (Span ("",[cls],[]) ils)
+ | cls == "csl-block" || cls == "csl-left-margin" ||
+ cls == "csl-right-inline" || cls == "csl-indent"
+ = inDiv cls <$> inlineListToHtml opts ils
+ go il = inlineToHtml opts il
+ mconcat <$> mapM go xs
+cslEntryToHtml opts x = blockToHtml opts x
+
isMathEnvironment :: Text -> Bool
isMathEnvironment s = "\\begin{" `T.isPrefixOf` s &&
envName `elem` mathmlenvs
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 228b34d09..a4003b672 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -71,7 +71,6 @@ data WriterState =
, stBeamer :: Bool -- produce beamer
, stEmptyLine :: Bool -- true if no content on line
, stHasCslRefs :: Bool -- has a Div with class refs
- , stCslHangingIndent :: Bool -- use hanging indent for bib
, stIsFirstInDefinition :: Bool -- first block in a defn list
}
@@ -103,7 +102,6 @@ startingState options = WriterState {
, stBeamer = False
, stEmptyLine = True
, stHasCslRefs = False
- , stCslHangingIndent = False
, stIsFirstInDefinition = False }
-- | Convert Pandoc to LaTeX.
@@ -243,7 +241,6 @@ pandocToLaTeX options (Pandoc meta blocks) = do
else defField "dir" ("ltr" :: Text)) $
defField "section-titles" True $
defField "csl-refs" (stHasCslRefs st) $
- defField "csl-hanging-indent" (stCslHangingIndent st) $
defField "geometry" geometryFromMargins $
(case T.uncons . render Nothing <$>
getField "papersize" metadata of
@@ -541,16 +538,23 @@ blockToLaTeX (Div (identifier,classes,kvs) bs) = do
then modify $ \st -> st{ stIncremental = True }
else when (beamer && "nonincremental" `elem` classes) $
modify $ \st -> st { stIncremental = False }
- result <- if identifier == "refs"
+ result <- if identifier == "refs" || -- <- for backwards compatibility
+ "csl-bib-body" `elem` classes
then do
+ modify $ \st -> st{ stHasCslRefs = True }
inner <- blockListToLaTeX bs
- modify $ \st -> st{ stHasCslRefs = True
- , stCslHangingIndent =
- "hanging-indent" `elem` classes }
- return $ "\\begin{cslreferences}" $$
- inner $$
- "\\end{cslreferences}"
- else blockListToLaTeX bs
+ return $ "\\begin{CSLReferences}" <>
+ (if "hanging-indent" `elem` classes
+ then braces "1"
+ else braces "0") <>
+ (case lookup "entry-spacing" kvs of
+ Nothing -> braces "0"
+ Just s -> braces (literal s))
+ $$ inner
+ $+$ "\\end{CSLReferences}"
+ else if "csl-entry" `elem` classes
+ then vcat <$> mapM cslEntryToLaTeX bs
+ else blockListToLaTeX bs
modify $ \st -> st{ stIncremental = oldIncremental }
linkAnchor' <- hypertarget True identifier empty
-- see #2704 for the motivation for adding \leavevmode:
@@ -1151,6 +1155,23 @@ isQuoted :: Inline -> Bool
isQuoted (Quoted _ _) = True
isQuoted _ = False
+cslEntryToLaTeX :: PandocMonad m
+ => Block
+ -> LW m (Doc Text)
+cslEntryToLaTeX (Para xs) =
+ mconcat <$> mapM go xs
+ where
+ go (Span ("",["csl-block"],[]) ils) =
+ (cr <>) . inCmd "CSLBlock" <$> inlineListToLaTeX ils
+ go (Span ("",["csl-left-margin"],[]) ils) =
+ inCmd "CSLLeftMargin" <$> inlineListToLaTeX ils
+ go (Span ("",["csl-right-inline"],[]) ils) =
+ (cr <>) . inCmd "CSLRightInline" <$> inlineListToLaTeX ils
+ go (Span ("",["csl-indent"],[]) ils) =
+ (cr <>) . inCmd "CSLIndent" <$> inlineListToLaTeX ils
+ go il = inlineToLaTeX il
+cslEntryToLaTeX x = blockToLaTeX x
+
-- | Convert inline element to LaTeX
inlineToLaTeX :: PandocMonad m
=> Inline -- ^ Inline to convert
diff --git a/src/Text/Pandoc/Writers/Ms.hs b/src/Text/Pandoc/Writers/Ms.hs
index f3aadde59..dbf7a3d79 100644
--- a/src/Text/Pandoc/Writers/Ms.hs
+++ b/src/Text/Pandoc/Writers/Ms.hs
@@ -110,16 +110,37 @@ blockToMs :: PandocMonad m
-> Block -- ^ Block element
-> MS m (Doc Text)
blockToMs _ Null = return empty
-blockToMs opts (Div (ident,_,_) bs) = do
+blockToMs opts (Div (ident,cls,kvs) bs) = do
let anchor = if T.null ident
then empty
else nowrap $
literal ".pdfhref M "
<> doubleQuotes (literal (toAscii ident))
- setFirstPara
- res <- blockListToMs opts bs
- setFirstPara
- return $ anchor $$ res
+ case cls of
+ _ | "csl-entry" `elem` cls ->
+ (".CSLENTRY" $$) . vcat <$> mapM (cslEntryToMs True opts) bs
+ | "csl-bib-body" `elem` cls -> do
+ res <- blockListToMs opts bs
+ return $ anchor $$
+ -- so that XP paragraphs are indented:
+ ".nr PI 3n" $$
+ -- space between entries
+ ".de CSLENTRY" $$
+ (case lookup "entry-spacing" kvs >>= safeRead of
+ Just n | n > (0 :: Int) -> ".sp"
+ _ -> mempty) $$
+ ".." $$
+ ".de CSLP" $$
+ (if "hanging-indent" `elem` cls
+ then ".XP"
+ else ".LP") $$
+ ".." $$
+ res
+ _ -> do
+ setFirstPara
+ res <- blockListToMs opts bs
+ setFirstPara
+ return $ anchor $$ res
blockToMs opts (Plain inlines) =
liftM vcat $ mapM (inlineListToMs' opts) $ splitSentences inlines
blockToMs opts (Para [Image attr alt (src,_tit)])
@@ -440,6 +461,39 @@ inlineToMs _ (Note contents) = do
modify $ \st -> st{ stNotes = contents : stNotes st }
return $ literal "\\**"
+cslEntryToMs :: PandocMonad m
+ => Bool
+ -> WriterOptions
+ -> Block
+ -> MS m (Doc Text)
+cslEntryToMs atStart opts (Para xs) =
+ case xs of
+ (Span ("",["csl-left-margin"],[]) lils :
+ rest@(Span ("",["csl-right-inline"],[]) _ : _))
+ -> do lils' <- inlineListToMs' opts lils
+ ((cr <> literal ".IP " <>
+ doubleQuotes (nowrap lils') <>
+ literal " 5") $$)
+ <$> cslEntryToMs False opts (Para rest)
+ (Span ("",["csl-block"],[]) ils : rest)
+ -> ((cr <> literal ".LP") $$)
+ <$> cslEntryToMs False opts (Para (ils ++ rest))
+ (Span ("",["csl-left-margin"],[]) ils : rest)
+ -> ((cr <> literal ".LP") $$)
+ <$> cslEntryToMs False opts (Para (ils ++ rest))
+ (Span ("",["csl-indented"],[]) ils : rest)
+ -> ((cr <> literal ".LP") $$)
+ <$> cslEntryToMs False opts (Para (ils ++ rest))
+ _ | atStart
+ -> (".CSLP" $$) <$> cslEntryToMs False opts (Para xs)
+ | otherwise
+ -> case xs of
+ [] -> return mempty
+ (x:rest) -> (<>) <$> (inlineToMs opts x)
+ <*> (cslEntryToMs False opts (Para rest))
+cslEntryToMs _ opts x = blockToMs opts x
+
+
handleNotes :: PandocMonad m => WriterOptions -> Doc Text -> MS m (Doc Text)
handleNotes opts fallback = do
notes <- gets stNotes
diff --git a/stack.yaml b/stack.yaml
index 203e0a612..df8d77584 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -3,15 +3,11 @@ flags:
trypandoc: false
embed_data_files: true
static: false
- pandoc-citeproc:
- bibutils: true
- embed_data_files: true
- unicode_collation: false
- test_citeproc: false
- debug: false
packages:
- '.'
extra-deps:
+- git: https://github.com/jgm/citeproc
+ commit: e3695de4f34f33e32c6d3c33e8cdcf3fa96f6a5b
- pandoc-types-1.22
- texmath-0.12.0.3
- rfc5051-0.2
@@ -28,8 +24,6 @@ extra-deps:
- commonmark-0.1.0.2
- commonmark-extensions-0.2.0.1
- commonmark-pandoc-0.2.0.1
-- git: https://github.com/jgm/pandoc-citeproc
- commit: 159bbb566858c0bc522e6404eb989671cd7236fd
ghc-options:
"$locals": -fhide-source-paths -Wno-missing-home-modules
diff --git a/test/command/5541-localLink.md b/test/command/5541-localLink.md
index 16430be34..077005160 100644
--- a/test/command/5541-localLink.md
+++ b/test/command/5541-localLink.md
@@ -146,4 +146,4 @@ if you can read this text, [and it's linked]{#spanner} - all good!
</Properties>
</Hyperlink>
</Document>
-``` \ No newline at end of file
+```
diff --git a/test/command/5541-nesting.md b/test/command/5541-nesting.md
index 616184f5c..194b79164 100644
--- a/test/command/5541-nesting.md
+++ b/test/command/5541-nesting.md
@@ -94,4 +94,4 @@
</Story>
</Document>
-``` \ No newline at end of file
+```
diff --git a/test/command/5541-urlLink.md b/test/command/5541-urlLink.md
index 2ba81ce29..453653ffc 100644
--- a/test/command/5541-urlLink.md
+++ b/test/command/5541-urlLink.md
@@ -109,4 +109,4 @@ some more text that [links to](https://www.pandoc.org) Pandoc.
</Properties>
</Hyperlink>
</Document>
-``` \ No newline at end of file
+```
diff --git a/test/command/5849-prefix.md b/test/command/5849-prefix.md
index 61af8f03a..f3217a187 100644
--- a/test/command/5849-prefix.md
+++ b/test/command/5849-prefix.md
@@ -2,31 +2,30 @@
% pandoc -t latex --biblatex
[e.g. @a1;@a2;@a3; but also @b1;@b2;@b3]
^D
-\autocites[e.g.~][]{a1,a2,a3}[but also][]{b1,b2,b3}
+\autocites[e.g.][]{a1,a2,a3}[but also][]{b1,b2,b3}
```
```
% pandoc -t latex --biblatex
[e.g. @a1; e.g. @a2;@a3; but also @b1;@b2;but also @b3]
^D
-\autocites[e.g.~][]{a1}[e.g.~][]{a2,a3}[but also][]{b1,b2}[but
-also][]{b3}
+\autocites[e.g.][]{a1}[e.g.][]{a2,a3}[but also][]{b1,b2}[but also][]{b3}
```
```
% pandoc -t latex --biblatex
[e.g. @a1, ch.3 and elsewhere;@a2;@a3; but also @a4;@a5]
^D
-\autocites[e.g.~][ch.3 and elsewhere]{a1}{a2,a3}[but also][]{a4,a5}
+\autocites[e.g.][ch.3 and elsewhere]{a1}{a2,a3}[but also][]{a4,a5}
```
```
% pandoc -t latex --biblatex
[e.g. @a1;@a2, ch.3 and elsewhere;@a3; but also @a4;@a5]
^D
-\autocites[e.g.~][ch.3 and elsewhere]{a1,a2}{a3}[but also][]{a4,a5}
+\autocites[e.g.][ch.3 and elsewhere]{a1,a2}{a3}[but also][]{a4,a5}
```
```
% pandoc -t latex --biblatex
[e.g. @a1, blah;@a2, ch.3 and elsewhere;@a3; but also @b4;@b5]
^D
-\autocites[e.g.~][blah]{a1}[ch.3 and elsewhere]{a2}{a3}[but
+\autocites[e.g.][blah]{a1}[ch.3 and elsewhere]{a2}{a3}[but
also][]{b4,b5}
```
diff --git a/test/command/6675.md b/test/command/6675.md
index eac4214d7..d2984571f 100644
--- a/test/command/6675.md
+++ b/test/command/6675.md
@@ -131,4 +131,4 @@ and some text that [links to](#header-1) the first header
</Properties>
</Hyperlink>
</Document>
-``` \ No newline at end of file
+```
diff --git a/test/command/advanced-optical-materials.csl b/test/command/advanced-optical-materials.csl
new file mode 100644
index 000000000..23e80cf1a
--- /dev/null
+++ b/test/command/advanced-optical-materials.csl
@@ -0,0 +1,155 @@
+<?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-US">
+ <info>
+ <title>Advanced Optical Materials</title>
+ <id>http://www.zotero.org/styles/advanced-optical-materials</id>
+ <link href="http://www.zotero.org/styles/advanced-optical-materials" rel="self"/>
+ <link href="http://www.zotero.org/styles/small" rel="template"/>
+ <link href="http://onlinelibrary.wiley.com/journal/10.1002/(ISSN)2195-1071/homepage/2298_forauthors.html" rel="documentation"/>
+ <author>
+ <name>Martin F. Schumann</name>
+ <email>mfs@mfs.name</email>
+ </author>
+ <category citation-format="numeric"/>
+ <category field="engineering"/>
+ <eissn>2195-1071</eissn>
+ <summary>A style for Wiley's Advanced Optical Materials</summary>
+ <updated>2017-02-16T15:37:41+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>
+ <macro name="author">
+ <names variable="author">
+ <name initialize-with=". " delimiter=", " delimiter-precedes-last="always"/>
+ <label form="short" prefix=", " text-case="capitalize-first" suffix=" "/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="editor">
+ <names variable="editor">
+ <label form="short" text-case="capitalize-first" suffix=".: " strip-periods="true"/>
+ <name initialize-with="." delimiter=", " delimiter-precedes-last="always"/>
+ </names>
+ </macro>
+ <macro name="year-date">
+ <group font-weight="bold">
+ <choose>
+ <if variable="issued">
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </if>
+ <else>
+ <text term="no date" form="short"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <macro name="access-date">
+ <group delimiter=", ">
+ <date variable="accessed">
+ <date-part name="month" prefix="accessed: " suffix=", " form="short"/>
+ <date-part name="year"/>
+ </date>
+ </group>
+ </macro>
+ <macro name="access">
+ <choose>
+ <if variable="page" match="none">
+ <choose>
+ <if variable="DOI">
+ <text variable="DOI" prefix="DOI: "/>
+ </if>
+ </choose>
+ <choose>
+ <if type="webpage">
+ <text variable="URL"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="publisher">
+ <group delimiter=", ">
+ <text variable="publisher" text-case="capitalize-all"/>
+ <text variable="publisher-place" text-case="title"/>
+ </group>
+ </macro>
+ <macro name="pages">
+ <label variable="page" form="short" suffix=" "/>
+ <text variable="page"/>
+ </macro>
+ <citation collapse="citation-number">
+ <sort>
+ <key variable="citation-number"/>
+ </sort>
+ <layout prefix="[" suffix="]" delimiter="," vertical-align="sup">
+ <text variable="citation-number"/>
+ </layout>
+ </citation>
+ <bibliography entry-spacing="0" second-field-align="flush" line-spacing="2">
+ <layout suffix=".">
+ <text variable="citation-number" prefix="[" suffix="]"/>
+ <text macro="author" suffix=", "/>
+ <choose>
+ <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <group delimiter=", ">
+ <text variable="title" text-case="title" font-style="italic"/>
+ <text macro="publisher"/>
+ <text macro="year-date"/>
+ </group>
+ </if>
+ <else-if type="chapter paper-conference" match="any">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <text term="in"/>
+ <text variable="container-title" form="short" text-case="title" font-style="italic"/>
+ <text macro="editor" prefix="(" suffix=")"/>
+ </group>
+ <text macro="publisher"/>
+ <text macro="year-date"/>
+ <group delimiter=" ">
+ <text macro="pages"/>
+ </group>
+ </group>
+ </else-if>
+ <else-if type="patent">
+ <group delimiter=", ">
+ <text variable="number" font-style="italic"/>
+ <text macro="year-date"/>
+ </group>
+ </else-if>
+ <else-if type="thesis">
+ <group delimiter=", ">
+ <text variable="title" text-case="title"/>
+ <text variable="genre"/>
+ <text variable="publisher"/>
+ <text macro="year-date"/>
+ </group>
+ </else-if>
+ <else-if type="webpage">
+ <group delimiter=", ">
+ <text variable="title"/>
+ <text macro="access"/>
+ <text macro="access-date"/>
+ </group>
+ </else-if>
+ <else>
+ <group delimiter=" ">
+ <text variable="container-title" form="short" font-style="italic"/>
+ <group delimiter=", ">
+ <text macro="year-date"/>
+ <group>
+ <text variable="volume" font-style="italic"/>
+ </group>
+ <text variable="page-first"/>
+ </group>
+ </group>
+ <text macro="access" prefix=", "/>
+ </else>
+ </choose>
+ </layout>
+ </bibliography>
+</style>
diff --git a/test/command/annales.csl b/test/command/annales.csl
new file mode 100644
index 000000000..ee370da05
--- /dev/null
+++ b/test/command/annales.csl
@@ -0,0 +1,334 @@
+<?xml version="1.0" encoding="utf-8"?>
+<style xmlns="http://purl.org/net/xbiblio/csl" class="note" default-locale="fr-FR" version="1.0" page-range-format="expanded" demote-non-dropping-particle="sort-only">
+ <info>
+ <title>Annales. Histoire, Sciences sociales (French)</title>
+ <id>http://www.zotero.org/styles/annales</id>
+ <link href="http://www.zotero.org/styles/annales" rel="self"/>
+ <link href="http://annales.ehess.fr/?lang=en/" rel="documentation"/>
+ <author>
+ <name>Franziska Heimburger</name>
+ <email>zotero@franziska.fr</email>
+ </author>
+ <category citation-format="note"/>
+ <category field="social_science"/>
+ <issn>0395-2649</issn>
+ <updated>2013-08-29T04:18:55+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="ordinal-01">ère</term>
+ <term name="ordinal-02">e</term>
+ <term name="ordinal-03">e</term>
+ <term name="ordinal-04">e</term>
+ <term name="cited">op.&#160;cit.</term>
+ <term name="page" form="short">
+ <single>p.</single>
+ <multiple>p.</multiple>
+ </term>
+ <term name="editor" form="short">
+ <single>dir.</single>
+ <multiple>dir.</multiple>
+ </term>
+ </terms>
+ </locale>
+ <macro name="author">
+ <names variable="author">
+ <name form="long" and="text" delimiter-precedes-last="never">
+ <name-part name="family" font-variant="small-caps"/>
+ </name>
+ <label form="short" prefix="&#160;(" suffix=")"/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <text macro="title"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="author-short">
+ <names variable="author">
+ <name form="long" and="text" initialize-with=". " delimiter-precedes-last="never">
+ <name-part name="family" font-variant="small-caps"/>
+ </name>
+ <label form="short" prefix="&#160;(" suffix=")"/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <text macro="title"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="editor">
+ <names variable="editor">
+ <name form="long" and="text" delimiter-precedes-last="never" sort-separator=" " font-style="normal">
+ </name>
+ <label form="short" prefix="&#160;(" suffix=".)"/>
+ </names>
+ </macro>
+ <macro name="translator">
+ <names variable="translator">
+ <name form="long" and="text" delimiter-precedes-last="never" sort-separator=" " font-style="normal" prefix=" trad. fr. ">
+ <name-part name="family" font-variant="small-caps"/>
+ </name>
+ </names>
+ </macro>
+ <macro name="title">
+ <choose>
+ <if type="bill book graphic legal_case motion_picture report song" match="any">
+ <text variable="title" text-case="capitalize-first" font-style="italic"/>
+ </if>
+ <else-if type="article-journal article-newspaper article-magazine" match="any">
+ <group delimiter=", ">
+ <text variable="title" text-case="capitalize-first" quotes="true" font-style="normal"/>
+ <text variable="container-title" font-style="italic"/>
+ </group>
+ </else-if>
+ <else-if type="thesis" match="any">
+ <group>
+ <text variable="title" text-case="capitalize-first" quotes="true" font-style="normal"/>
+ <text variable="genre" suffix=", " prefix=" "/>
+ <text variable="publisher"/>
+ </group>
+ </else-if>
+ <else-if type="manuscript" match="any">
+ <group delimiter=",">
+ <text variable="title" text-case="capitalize-first" quotes="true" font-style="normal"/>
+ <text variable="genre" prefix=" "/>
+ </group>
+ </else-if>
+ <else-if type="chapter entry-dictionary entry-encyclopedia" match="any">
+ <group>
+ <text variable="title" text-case="capitalize-first" quotes="true" suffix=","/>
+ <text value="in" font-style="italic" suffix=" " prefix=" "/>
+ <text macro="editor" suffix=", "/>
+ <text variable="container-title" text-case="capitalize-first" font-style="italic"/>
+ </group>
+ </else-if>
+ <else-if type="webpage" match="any">
+ <group>
+ <text variable="title" text-case="capitalize-first" font-style="italic" suffix=", "/>
+ <text variable="URL" text-decoration="underline"/>
+ </group>
+ </else-if>
+ <else>
+ <text variable="title" quotes="true"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="pub-place">
+ <choose>
+ <if type="bill book chapter entry-dictionary entry-encyclopedia thesis graphic legal_case manuscript motion_picture paper-conference report song" match="any">
+ <text variable="publisher-place"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="publisher">
+ <choose>
+ <if type="bill book chapter entry-dictionary entry-encyclopedia graphic legal_case motion_picture paper-conference report song" match="any">
+ <text variable="publisher"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="yearpage">
+ <choose>
+ <if type="bill book graphic legal_case motion_picture paper-conference manuscript report song thesis" match="any">
+ <group delimiter=", " font-style="normal">
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ <group delimiter=" ">
+ <text term="volume" form="short"/>
+ <text variable="volume"/>
+ </group>
+ <group delimiter="&#8239;">
+ <label variable="locator" form="short"/>
+ <text variable="locator"/>
+ </group>
+ </group>
+ </if>
+ <else-if type="chapter entry-dictionary entry-encyclopedia" match="any">
+ <group delimiter=" " font-style="normal">
+ <date variable="issued">
+ <date-part name="year" suffix=", "/>
+ </date>
+ <group>
+ <text term="volume" form="short" suffix="."/>
+ <text variable="number-of-volumes" prefix=". " suffix="/"/>
+ <text variable="volume" suffix=","/>
+ </group>
+ <label variable="page" form="short"/>
+ <group delimiter=", ">
+ <text variable="page"/>
+ <group delimiter="&#8239;">
+ <label variable="locator" form="short"/>
+ <text variable="locator"/>
+ </group>
+ </group>
+ </group>
+ </else-if>
+ <else-if type="article-journal" match="any">
+ <group delimiter=" " font-style="normal">
+ <label variable="page" form="short"/>
+ <group delimiter=", ">
+ <text variable="page"/>
+ <group delimiter="&#8239;">
+ <label variable="locator" form="short"/>
+ <text variable="locator"/>
+ </group>
+ </group>
+ </group>
+ </else-if>
+ <else-if type="article-newspaper article-magazine" match="any">
+ <group delimiter=" " font-style="normal">
+ <date variable="issued" form="numeric">
+ <date-part name="day"/>
+ <date-part name="month"/>
+ <date-part name="year"/>
+ </date>
+ <group delimiter=" " font-style="normal">
+ <choose>
+ <if variable="locator" match="any">
+ <group delimiter="&#8239;">
+ <label variable="locator" form="short"/>
+ <text variable="locator"/>
+ </group>
+ </if>
+ <else-if variable="locator" match="none">
+ <label variable="page" form="short"/>
+ </else-if>
+ </choose>
+ </group>
+ </group>
+ </else-if>
+ <else-if type="webpage" match="any">
+ <group delimiter=" " font-style="normal">
+ <text value="consulté le" suffix=" " prefix=" "/>
+ <date variable="accessed" form="text">
+ <date-part name="day"/>
+ <date-part name="month"/>
+ <date-part name="year"/>
+ </date>
+ </group>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="edition">
+ <choose>
+ <if type="bill book graphic legal_case motion_picture report song chapter paper-conference" match="any">
+ <choose>
+ <if is-numeric="edition">
+ <group delimiter=" ">
+ <number variable="edition" form="ordinal"/>
+ <text term="edition" form="short"/>
+ </group>
+ </if>
+ <else>
+ <text variable="edition" text-case="capitalize-first" suffix="."/>
+ </else>
+ </choose>
+ </if>
+ <else-if type="article-journal article-magazine" match="any">
+ <group font-style="normal">
+ <choose>
+ <if variable="issued">
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ <text macro="volume" prefix=", "/>
+ </if>
+ <else>
+ <text macro="volume" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ </group>
+ </else-if>
+ </choose>
+ <text macro="issue" prefix=", "/>
+ </macro>
+ <macro name="volume">
+ <choose>
+ <if is-numeric="volume">
+ <text term="volume" form="short" suffix=".&#160;"/>
+ <text variable="volume"/>
+ </if>
+ <else>
+ <text variable="volume"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="issue">
+ <choose>
+ <if is-numeric="issue">
+ <text term="issue" form="short" suffix="&#160;"/>
+ <text variable="issue"/>
+ </if>
+ <else>
+ <text variable="issue"/>
+ </else>
+ </choose>
+ </macro>
+ <citation>
+ <layout suffix="." delimiter="&#160;; ">
+ <choose>
+ <if position="ibid-with-locator">
+ <group delimiter=", ">
+ <text term="ibid" text-case="capitalize-first" font-style="italic" suffix="."/>
+ <group delimiter="&#8239;">
+ <label variable="locator" form="short"/>
+ <text variable="locator"/>
+ </group>
+ </group>
+ </if>
+ <else-if position="ibid">
+ <text term="ibid" text-case="capitalize-first" font-style="italic"/>
+ </else-if>
+ <else-if position="subsequent">
+ <group delimiter=", ">
+ <text macro="author-short"/>
+ <choose>
+ <if type="bill book graphic legal_case motion_picture report song thesis" match="any">
+ <text variable="title" form="short" font-style="italic"/>
+ </if>
+ <else>
+ <text variable="title" text-case="capitalize-first" form="short" quotes="true" font-style="normal"/>
+ </else>
+ </choose>
+ <text term="cited" font-style="italic" suffix="."/>
+ <group delimiter="&#8239;">
+ <label variable="locator" form="short"/>
+ <text variable="locator"/>
+ </group>
+ </group>
+ </else-if>
+ <else>
+ <group delimiter=", ">
+ <text macro="author"/>
+ <text macro="title"/>
+ <text macro="translator"/>
+ <text macro="edition"/>
+ <text macro="pub-place"/>
+ <text macro="publisher"/>
+ <text macro="yearpage"/>
+ </group>
+ </else>
+ </choose>
+ </layout>
+ </citation>
+ <bibliography>
+ <sort>
+ <key macro="author" names-min="3" names-use-first="3"/>
+ <key variable="issued" sort="descending"/>
+ </sort>
+ <layout suffix=".">
+ <group delimiter=", ">
+ <text macro="author"/>
+ <text macro="title"/>
+ <text macro="translator"/>
+ <text macro="edition"/>
+ <text macro="pub-place"/>
+ <text macro="publisher"/>
+ <text macro="yearpage"/>
+ </group>
+ </layout>
+ </bibliography>
+</style>
diff --git a/test/command/apa.csl b/test/command/apa.csl
new file mode 100644
index 000000000..999f8bf7f
--- /dev/null
+++ b/test/command/apa.csl
@@ -0,0 +1,474 @@
+<?xml version="1.0" encoding="utf-8"?>
+<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never">
+ <!-- This style was edited with the Visual CSL Editor (http://steveridout.com/csl/visualEditor/) -->
+ <info>
+ <title>American Psychological Association 6th edition</title>
+ <title-short>APA</title-short>
+ <id>http://www.zotero.org/styles/apa</id>
+ <link href="http://www.zotero.org/styles/apa" rel="self"/>
+ <link href="http://owl.english.purdue.edu/owl/resource/560/01/" rel="documentation"/>
+ <author>
+ <name>Simon Kornblith</name>
+ <email>simon@simonster.com</email>
+ </author>
+ <contributor>
+ <name>Bruce D'Arcus</name>
+ </contributor>
+ <contributor>
+ <name>Curtis M. Humphrey</name>
+ </contributor>
+ <contributor>
+ <name>Richard Karnesky</name>
+ <email>karnesky+zotero@gmail.com</email>
+ <uri>http://arc.nucapt.northwestern.edu/Richard_Karnesky</uri>
+ </contributor>
+ <contributor>
+ <name>Sebastian Karcher</name>
+ </contributor>
+ <category citation-format="author-date"/>
+ <category field="psychology"/>
+ <category field="generic-base"/>
+ <updated>2014-04-12T01:20:52+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="editortranslator" form="short">
+ <single>ed. &amp; trans.</single>
+ <multiple>eds. &amp; trans.</multiple>
+ </term>
+ <term name="translator" form="short">
+ <single>trans.</single>
+ <multiple>trans.</multiple>
+ </term>
+ </terms>
+ </locale>
+ <macro name="container-contributors">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <names variable="editor translator container-author" delimiter=", " suffix=", ">
+ <name and="symbol" initialize-with=". " delimiter=", "/>
+ <label form="short" prefix=" (" text-case="title" suffix=")"/>
+ </names>
+ </if>
+ </choose>
+ </macro>
+ <macro name="secondary-contributors">
+ <choose>
+ <if type="article-journal chapter paper-conference" match="none">
+ <names variable="translator editor container-author" delimiter=", " prefix=" (" suffix=")">
+ <name and="symbol" initialize-with=". " delimiter=", "/>
+ <label form="short" prefix=", " text-case="title"/>
+ </names>
+ </if>
+ </choose>
+ </macro>
+ <macro name="author">
+ <names variable="author">
+ <name name-as-sort-order="all" and="symbol" sort-separator=", " initialize-with=". " delimiter=", " delimiter-precedes-last="always"/>
+ <label form="short" prefix=" (" suffix=")" text-case="capitalize-first"/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <choose>
+ <if type="report">
+ <text variable="publisher"/>
+ <text macro="title"/>
+ </if>
+ <else>
+ <text macro="title"/>
+ </else>
+ </choose>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="author-short">
+ <names variable="author">
+ <name form="short" and="symbol" delimiter=", " initialize-with=". "/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <choose>
+ <if type="report">
+ <text variable="publisher"/>
+ <text variable="title" form="short" font-style="italic"/>
+ </if>
+ <else-if type="legal_case">
+ <text variable="title" font-style="italic"/>
+ </else-if>
+ <else-if type="bill book graphic legislation motion_picture song" match="any">
+ <text variable="title" form="short" font-style="italic"/>
+ </else-if>
+ <else>
+ <text variable="title" form="short" quotes="true"/>
+ </else>
+ </choose>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="access">
+ <choose>
+ <if type="thesis">
+ <choose>
+ <if variable="archive" match="any">
+ <group>
+ <text term="retrieved" text-case="capitalize-first" suffix=" "/>
+ <text term="from" suffix=" "/>
+ <text variable="archive" suffix="."/>
+ <text variable="archive_location" prefix=" (" suffix=")"/>
+ </group>
+ </if>
+ <else>
+ <group>
+ <text term="retrieved" text-case="capitalize-first" suffix=" "/>
+ <text term="from" suffix=" "/>
+ <text variable="URL"/>
+ </group>
+ </else>
+ </choose>
+ </if>
+ <else>
+ <choose>
+ <if variable="DOI">
+ <text variable="DOI" prefix="doi:"/>
+ </if>
+ <else>
+ <choose>
+ <if type="webpage">
+ <group delimiter=" ">
+ <text term="retrieved" text-case="capitalize-first" suffix=" "/>
+ <group>
+ <date variable="accessed" form="text" suffix=", "/>
+ </group>
+ <text term="from"/>
+ <text variable="URL"/>
+ </group>
+ </if>
+ <else>
+ <group>
+ <text term="retrieved" text-case="capitalize-first" suffix=" "/>
+ <text term="from" suffix=" "/>
+ <text variable="URL"/>
+ </group>
+ </else>
+ </choose>
+ </else>
+ </choose>
+ </else>
+ </choose>
+ </macro>
+ <macro name="title">
+ <choose>
+ <if type="report thesis" match="any">
+ <text variable="title" font-style="italic"/>
+ <group prefix=" (" suffix=")" delimiter=" ">
+ <text variable="genre"/>
+ <text variable="number" prefix="No. "/>
+ </group>
+ </if>
+ <else-if type="book graphic motion_picture report song manuscript speech" match="any">
+ <!---This is a hack until we have a computer program type -->
+ <choose>
+ <if variable="version">
+ <group delimiter=" ">
+ <text variable="title"/>
+ <group delimiter=" " prefix="(" suffix=")">
+ <text term="version" text-case="capitalize-first"/>
+ <text variable="version"/>
+ </group>
+ </group>
+ </if>
+ <else>
+ <text variable="title" font-style="italic"/>
+ </else>
+ </choose>
+ </else-if>
+ <else>
+ <text variable="title"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="publisher">
+ <choose>
+ <if type="report" match="any">
+ <group delimiter=": ">
+ <text variable="publisher-place"/>
+ <text variable="publisher"/>
+ </group>
+ </if>
+ <else-if type="thesis" match="any">
+ <group delimiter=", ">
+ <text variable="publisher"/>
+ <text variable="publisher-place"/>
+ </group>
+ </else-if>
+ <else>
+ <group delimiter=", ">
+ <choose>
+ <if variable="event" match="none">
+ <text variable="genre"/>
+ </if>
+ </choose>
+ <choose>
+ <if type="article-journal article-magazine" match="none">
+ <group delimiter=": ">
+ <text variable="publisher-place"/>
+ <text variable="publisher"/>
+ </group>
+ </if>
+ </choose>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="event">
+ <choose>
+ <if variable="container-title" match="none">
+ <choose>
+ <if variable="event">
+ <choose>
+ <if variable="genre" match="none">
+ <text term="presented at" text-case="capitalize-first" suffix=" "/>
+ <text variable="event"/>
+ </if>
+ <else>
+ <group delimiter=" ">
+ <text variable="genre" text-case="capitalize-first"/>
+ <text term="presented at"/>
+ <text variable="event"/>
+ </group>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="issued">
+ <choose>
+ <if type="bill legal_case legislation" match="none">
+ <choose>
+ <if variable="issued">
+ <group prefix=" (" suffix=")">
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ <text variable="year-suffix"/>
+ <choose>
+ <if type="article-journal bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="none">
+ <date variable="issued">
+ <date-part prefix=", " name="month"/>
+ <date-part prefix=" " name="day"/>
+ </date>
+ </if>
+ </choose>
+ </group>
+ </if>
+ <else>
+ <group prefix=" (" suffix=")">
+ <text term="no date" form="short"/>
+ <text variable="year-suffix" prefix="-"/>
+ </group>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="issued-sort">
+ <choose>
+ <if type="article-journal bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="none">
+ <date variable="issued">
+ <date-part name="year"/>
+ <date-part name="month"/>
+ <date-part name="day"/>
+ </date>
+ </if>
+ <else>
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </else>
+ </choose>
+ </macro>
+ <macro name="issued-year">
+ <choose>
+ <if variable="issued">
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ <text variable="year-suffix"/>
+ </if>
+ <else>
+ <text term="no date" form="short"/>
+ <text variable="year-suffix" prefix="-"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="edition">
+ <choose>
+ <if is-numeric="edition">
+ <group delimiter=" ">
+ <number variable="edition" form="ordinal"/>
+ <text term="edition" form="short"/>
+ </group>
+ </if>
+ <else>
+ <text variable="edition" suffix="."/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="locators">
+ <choose>
+ <if type="article-journal article-magazine" match="any">
+ <group prefix=", " delimiter=", ">
+ <group>
+ <text variable="volume" font-style="italic"/>
+ <text variable="issue" prefix="(" suffix=")"/>
+ </group>
+ <text variable="page"/>
+ </group>
+ </if>
+ <else-if type="article-newspaper">
+ <group delimiter=" " prefix=", ">
+ <label variable="page" form="short"/>
+ <text variable="page"/>
+ </group>
+ </else-if>
+ <else-if type="book graphic motion_picture report song chapter paper-conference" match="any">
+ <group prefix=" (" suffix=")" delimiter=", ">
+ <text macro="edition"/>
+ <group>
+ <text term="volume" form="short" plural="true" text-case="capitalize-first" suffix=" "/>
+ <number variable="number-of-volumes" form="numeric" prefix="1-"/>
+ </group>
+ <group>
+ <text term="volume" form="short" text-case="capitalize-first" suffix=" "/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ <group>
+ <label variable="page" form="short" suffix=" "/>
+ <text variable="page"/>
+ </group>
+ </group>
+ </else-if>
+ <else-if type="legal_case">
+ <group prefix=" (" suffix=")" delimiter=" ">
+ <text variable="authority"/>
+ <date variable="issued" form="text"/>
+ </group>
+ </else-if>
+ <else-if type="bill legislation" match="any">
+ <date variable="issued" prefix=" (" suffix=")">
+ <date-part name="year"/>
+ </date>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="citation-locator">
+ <group>
+ <choose>
+ <if locator="chapter">
+ <label variable="locator" form="long" text-case="capitalize-first"/>
+ </if>
+ <else>
+ <label variable="locator" form="short"/>
+ </else>
+ </choose>
+ <text variable="locator" prefix=" "/>
+ </group>
+ </macro>
+ <macro name="container">
+ <group>
+ <choose>
+ <if type="chapter paper-conference entry-encyclopedia" match="any">
+ <text term="in" text-case="capitalize-first" suffix=" "/>
+ </if>
+ </choose>
+ <text macro="container-contributors"/>
+ <text macro="secondary-contributors"/>
+ <text macro="container-title"/>
+ </group>
+ </macro>
+ <macro name="container-title">
+ <choose>
+ <if type="article article-journal article-magazine article-newspaper" match="any">
+ <text variable="container-title" font-style="italic" text-case="title"/>
+ </if>
+ <else-if type="bill legal_case legislation" match="none">
+ <text variable="container-title" font-style="italic"/>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="legal-cites">
+ <choose>
+ <if type="bill legal_case legislation" match="any">
+ <group delimiter=" " prefix=", ">
+ <choose>
+ <if variable="container-title">
+ <text variable="volume"/>
+ <text variable="container-title"/>
+ <group delimiter=" ">
+ <!--change to label variable="section" as that becomes available -->
+ <text term="section" form="symbol"/>
+ <text variable="section"/>
+ </group>
+ <text variable="page"/>
+ </if>
+ <else>
+ <choose>
+ <if type="legal_case">
+ <text variable="number" prefix="No. "/>
+ </if>
+ <else>
+ <text variable="number" prefix="Pub. L. No. "/>
+ <group delimiter=" ">
+ <!--change to label variable="section" as that becomes available -->
+ <text term="section" form="symbol"/>
+ <text variable="section"/>
+ </group>
+ </else>
+ </choose>
+ </else>
+ </choose>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <citation et-al-min="6" et-al-use-first="1" et-al-subsequent-min="3" et-al-subsequent-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true" collapse="year" givenname-disambiguation-rule="primary-name">
+ <sort>
+ <key macro="author"/>
+ <key macro="issued-sort"/>
+ </sort>
+ <layout prefix="(" suffix=")" delimiter="; ">
+ <group delimiter=", ">
+ <text macro="author-short"/>
+ <text macro="issued-year"/>
+ <text macro="citation-locator"/>
+ </group>
+ </layout>
+ </citation>
+ <bibliography hanging-indent="true" et-al-min="8" et-al-use-first="6" et-al-use-last="true" entry-spacing="0" line-spacing="2">
+ <sort>
+ <key macro="author"/>
+ <key macro="issued-sort" sort="ascending"/>
+ <key macro="title"/>
+ </sort>
+ <layout>
+ <group suffix=".">
+ <group delimiter=". ">
+ <text macro="author"/>
+ <text macro="issued"/>
+ <text macro="title" prefix=" "/>
+ <text macro="container"/>
+ </group>
+ <text macro="legal-cites"/>
+ <text macro="locators"/>
+ <group delimiter=", " prefix=". ">
+ <text macro="event"/>
+ <text macro="publisher"/>
+ </group>
+ </group>
+ <text macro="access" prefix=" "/>
+ </layout>
+ </bibliography>
+</style>
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>
diff --git a/test/command/biblatex-266.md b/test/command/biblatex-266.md
new file mode 100644
index 000000000..24de45d95
--- /dev/null
+++ b/test/command/biblatex-266.md
@@ -0,0 +1,34 @@
+```
+% pandoc -f biblatex -t markdown -s
+@book{goethe2005,
+ langid = {german},
+ location = {{Frankfurt am Main}},
+ title = {Not A Real Book},
+ date = {2005},
+ author = {family=Goethe, given=Johann Wolfgang, prefix=von, useprefix=false and given=Antonie, prefix=van, family=Leeuwenhoek, useprefix=true}, editor = {Schöne, Albrecht}
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - dropping-particle: von
+ family: Goethe
+ given: Johann Wolfgang
+ - family: Leeuwenhoek
+ given: Antonie
+ non-dropping-particle: van
+ editor:
+ - family: Schöne
+ given: Albrecht
+ id: goethe2005
+ issued: 2005
+ language: 'de-DE'
+ publisher-place: Frankfurt am Main
+ title: Not A Real Book
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-aksin.md b/test/command/biblatex-aksin.md
new file mode 100644
index 000000000..48b757025
--- /dev/null
+++ b/test/command/biblatex-aksin.md
@@ -0,0 +1,78 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Aksin et al. 2006)
+
+Aksin, Özge, Hayati Türkmen, Levent Artok, Bekir Çetinkaya, Chaoying Ni,
+Orhan Büyükgüngör, and Erhan Özkal. 2006. “Effect of Immobilization on
+Catalytic Characteristics of Saturated Pd-N-heterocyclic Carbenes in
+Mizoroki-Heck Reactions.” *J. Organomet. Chem.* 691 (13): 3027–3036.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Aksin et al., 2006)
+
+Aksin, Ö., Türkmen, H., Artok, L., Çetinkaya, B., Ni, C., Büyükgüngör,
+O., & Özkal, E. (2006). Effect of immobilization on catalytic
+characteristics of saturated Pd-N-heterocyclic carbenes in Mizoroki-Heck
+reactions. *J. Organomet. Chem.*, *691*(13), 3027–3036.
+
+
+}
+
+@string{ jomch = {J.~Organomet. Chem.} }
+
+@Article{aksin,
+ author = {Aks{\i}n, {\"O}zge and T{\"u}rkmen, Hayati and Artok, Levent
+ and {\c{C}}etinkaya, Bekir and Ni, Chaoying and
+ B{\"u}y{\"u}kg{\"u}ng{\"o}r, Orhan and {\"O}zkal, Erhan},
+ title = {Effect of immobilization on catalytic characteristics of
+ saturated {Pd-N}-heterocyclic carbenes in {Mizoroki-Heck}
+ reactions},
+ journaltitle = jomch,
+ date = 2006,
+ volume = 691,
+ number = 13,
+ pages = {3027-3036},
+ indextitle = {Effect of immobilization on catalytic characteristics},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Aksın
+ given: Özge
+ - family: Türkmen
+ given: Hayati
+ - family: Artok
+ given: Levent
+ - family: Çetinkaya
+ given: Bekir
+ - family: Ni
+ given: Chaoying
+ - family: Büyükgüngör
+ given: Orhan
+ - family: Özkal
+ given: Erhan
+ container-title: J. Organomet. Chem.
+ id: aksin
+ issue: 13
+ issued: 2006
+ page: '3027-3036'
+ title: 'Effect of immobilization on catalytic characteristics of
+ saturated Pd-N-heterocyclic carbenes in Mizoroki-Heck reactions'
+ type: 'article-journal'
+ volume: 691
+---
+
+
+```
diff --git a/test/command/biblatex-almendro.md b/test/command/biblatex-almendro.md
new file mode 100644
index 000000000..9706a1baf
--- /dev/null
+++ b/test/command/biblatex-almendro.md
@@ -0,0 +1,71 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Almendro et al. 1998)
+
+Almendro, José L., Jacinto Martín, Alberto Sánchez, and Fernando Nozal.
+1998. “Elektromagnetisches Signalhorn.”
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Almendro, Martín, Sánchez, & Nozal, 1998)
+
+Almendro, J. L., Martín, J., Sánchez, A., & Nozal, F. (1998).
+Elektromagnetisches Signalhorn.
+
+
+NOTES:
+
+- CSL styles’ handling of patent items needs to be improved
+
+}
+
+@Patent{almendro,
+ author = {Almendro, Jos{\'e} L. and Mart{\'i}n, Jacinto and S{\'a}nchez,
+ Alberto and Nozal, Fernando},
+ title = {Elektromagnetisches Signalhorn},
+ number = {EU-29702195U},
+ date = 1998,
+ location = {countryfr and countryuk and countryde},
+ hyphenation = {german},
+ annotation = {This is a patent entry with a location
+ field. The number is given in the number field. Note
+ the format of the location field in the database
+ file. Compare laufenberg, sorace, and
+ kowalik},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'This is a patent entry with a location field. The number is
+ given in the number field. Note the format of the location field in
+ the database file. Compare laufenberg, sorace, and kowalik'
+ author:
+ - family: Almendro
+ given: José L.
+ - family: Martín
+ given: Jacinto
+ - family: Sánchez
+ given: Alberto
+ - family: Nozal
+ given: Fernando
+ id: almendro
+ issued: 1998
+ jurisdiction: France; United Kingdom; Germany
+ language: 'de-DE'
+ number: 'EU-29702195U'
+ title: Elektromagnetisches Signalhorn
+ type: patent
+---
+
+
+```
diff --git a/test/command/biblatex-angenendt.md b/test/command/biblatex-angenendt.md
new file mode 100644
index 000000000..c800ff3e6
--- /dev/null
+++ b/test/command/biblatex-angenendt.md
@@ -0,0 +1,66 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Angenendt 2002)
+
+Angenendt, Arnold. 2002. “In Honore Salvatoris – Vom Sinn und Unsinn der
+Patrozinienkunde.” *Revue d’Histoire Ecclésiastique* 97: 431–456,
+791–823.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Angenendt, 2002)
+
+Angenendt, A. (2002). In Honore Salvatoris – Vom Sinn und Unsinn der
+Patrozinienkunde. *Revue d’Histoire Ecclésiastique*, *97*, 431–456,
+791–823.
+
+
+}
+
+@Article{angenendt,
+ author = {Angenendt, Arnold},
+ title = {In Honore Salvatoris~-- Vom Sinn und Unsinn der
+ Patrozinienkunde},
+ journaltitle = {Revue d'Histoire Eccl{\'e}siastique},
+ date = 2002,
+ volume = 97,
+ pages = {431--456, 791--823},
+ hyphenation = {german},
+ indextitle = {In Honore Salvatoris},
+ shorttitle = {In Honore Salvatoris},
+ annotation = {A German article in a French journal. Apart from that, a
+ typical article entry. Note the indextitle
+ field},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'A German article in a French journal. Apart from that, a
+ typical article entry. Note the indextitle field'
+ author:
+ - family: Angenendt
+ given: Arnold
+ container-title: 'Revue d''Histoire Ecclésiastique'
+ id: angenendt
+ issued: 2002
+ language: 'de-DE'
+ page: '431-456, 791-823'
+ title: 'In Honore Salvatoris -- Vom Sinn und Unsinn der
+ Patrozinienkunde'
+ title-short: In Honore Salvatoris
+ type: 'article-journal'
+ volume: 97
+---
+
+
+```
diff --git a/test/command/biblatex-aristotle-anima.md b/test/command/biblatex-aristotle-anima.md
new file mode 100644
index 000000000..88b888149
--- /dev/null
+++ b/test/command/biblatex-aristotle-anima.md
@@ -0,0 +1,62 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Aristotle 1907)
+
+Aristotle. 1907. *De Anima*. Edited by Robert Drew Hicks. Cambridge:
+Cambridge University Press.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Aristotle, 1907)
+
+Aristotle. (1907). *De anima*. (R. D. Hicks, Ed.). Cambridge: Cambridge
+University Press.
+
+
+}
+
+@string{ cup = {Cambridge University Press} }
+
+@Book{aristotle:anima,
+ author = {Aristotle},
+ title = {De Anima},
+ date = 1907,
+ editor = {Hicks, Robert Drew},
+ publisher = cup,
+ location = {Cambridge},
+ keywords = {primary},
+ hyphenation = {british},
+ annotation = {A book entry with an author and an
+ editor},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A book entry with an author and an editor
+ author:
+ - family: Aristotle
+ editor:
+ - family: Hicks
+ given: Robert Drew
+ id: 'aristotle:anima'
+ issued: 1907
+ keyword: primary
+ language: 'en-GB'
+ publisher: Cambridge University Press
+ publisher-place: Cambridge
+ title: De anima
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-aristotle-physics.md b/test/command/biblatex-aristotle-physics.md
new file mode 100644
index 000000000..5d0009b17
--- /dev/null
+++ b/test/command/biblatex-aristotle-physics.md
@@ -0,0 +1,63 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Aristotle 1929)
+
+Aristotle. 1929. *Physics*. Translated by P. H. Wicksteed and F. M.
+Cornford. New York: G. P. Putnam.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Aristotle, 1929)
+
+Aristotle. (1929). *Physics*. (P. H. Wicksteed & F. M. Cornford,
+Trans.). New York: G. P. Putnam.
+
+
+}
+
+@Book{aristotle:physics,
+ author = {Aristotle},
+ title = {Physics},
+ date = 1929,
+ translator = {Wicksteed, P. H. and Cornford, F. M.},
+ publisher = {G. P. Putnam},
+ location = {New York},
+ keywords = {primary},
+ hyphenation = {american},
+ shorttitle = {Physics},
+ annotation = {A book entry with a translator field},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A book entry with a translator field
+ author:
+ - family: Aristotle
+ id: 'aristotle:physics'
+ issued: 1929
+ keyword: primary
+ language: 'en-US'
+ publisher: G. P. Putnam
+ publisher-place: New York
+ title: Physics
+ title-short: Physics
+ translator:
+ - family: Wicksteed
+ given: P. H.
+ - family: Cornford
+ given: F. M.
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-aristotle-poetics.md b/test/command/biblatex-aristotle-poetics.md
new file mode 100644
index 000000000..ed8884a2b
--- /dev/null
+++ b/test/command/biblatex-aristotle-poetics.md
@@ -0,0 +1,65 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Aristotle 1968)
+
+Aristotle. 1968. *Poetics*. Edited by D. W. Lucas. Clarendon Aristotle.
+Oxford: Clarendon Press.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Aristotle, 1968)
+
+Aristotle. (1968). *Poetics*. (D. W. Lucas, Ed.). Oxford: Clarendon
+Press.
+
+
+}
+
+@Book{aristotle:poetics,
+ author = {Aristotle},
+ title = {Poetics},
+ date = 1968,
+ editor = {Lucas, D. W.},
+ series = {Clarendon {Aristotle}},
+ publisher = {Clarendon Press},
+ location = {Oxford},
+ keywords = {primary},
+ hyphenation = {british},
+ shorttitle = {Poetics},
+ annotation = {A book entry with an author and an
+ editor as well as a series field},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A book entry with an author and an editor as well as a series
+ field
+ author:
+ - family: Aristotle
+ collection-title: Clarendon Aristotle
+ editor:
+ - family: Lucas
+ given: D. W.
+ id: 'aristotle:poetics'
+ issued: 1968
+ keyword: primary
+ language: 'en-GB'
+ publisher: Clarendon Press
+ publisher-place: Oxford
+ title: Poetics
+ title-short: Poetics
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-aristotle-rhetoric.md b/test/command/biblatex-aristotle-rhetoric.md
new file mode 100644
index 000000000..34fe2c6a8
--- /dev/null
+++ b/test/command/biblatex-aristotle-rhetoric.md
@@ -0,0 +1,80 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Aristotle 1877)
+
+Aristotle. 1877. *The Rhetoric of Aristotle with a Commentary by the
+Late Edward Meredith Cope*. Edited by Edward Meredith Cope. 3. Cambridge
+University Press.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Aristotle, 1877)
+
+Aristotle. (1877). *The rhetoric of Aristotle with a commentary by the
+late Edward Meredith Cope*. (E. M. Cope, Ed.) (1-3). Cambridge
+University Press.
+
+
+NOTES:
+
+- biblio2yaml
+ - commentator has no counterpart in CSL
+
+}
+
+@string{ cup = {Cambridge University Press} }
+
+@Book{aristotle:rhetoric,
+ author = {Aristotle},
+ title = {The Rhetoric of {Aristotle} with a commentary by the late {Edward
+ Meredith Cope}},
+ date = 1877,
+ editor = {Cope, Edward Meredith},
+ commentator = {Cope, Edward Meredith},
+ volumes = 3,
+ publisher = cup,
+ keywords = {primary},
+ hyphenation = {british},
+ sorttitle = {Rhetoric of Aristotle},
+ indextitle = {Rhetoric of {Aristotle}, The},
+ shorttitle = {Rhetoric},
+ annotation = {A commented edition. Note the concatenation of the
+ editor and commentator fields as well as the
+ volumes, sorttitle, and indextitle
+ fields},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'A commented edition. Note the concatenation of the editor and
+ commentator fields as well as the volumes, sorttitle, and indextitle
+ fields'
+ author:
+ - family: Aristotle
+ editor:
+ - family: Cope
+ given: Edward Meredith
+ id: 'aristotle:rhetoric'
+ issued: 1877
+ keyword: primary
+ language: 'en-GB'
+ number-of-volumes: 3
+ publisher: Cambridge University Press
+ title: The rhetoric of Aristotle with a commentary by the late Edward
+ Meredith Cope
+ title-short: Rhetoric
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-article.md b/test/command/biblatex-article.md
new file mode 100644
index 000000000..b54c45f5e
--- /dev/null
+++ b/test/command/biblatex-article.md
@@ -0,0 +1,128 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+ - contains:
+ - an article entry with just the required fields
+ - an article entry with required and all optional fields
+ - notes:
+ - year, month to be ignored if date is present
+ - journal to be ignored if journaltitle is present
+ - editortype, editoratype, editorbtype, editorctype, pubstate,
+series contain keys which, unless corresponding CSL terms exist, require
+locale-specific expansion
+ - limitations:
+ - annotator, commentator, eid, eprint, eprintclass, eprinttype,
+issuetitle, issuesubtitle, language, origlanguage have no matching
+counterparts in CSL
+ - for editor, editora, editorb, editorc (plus editortype,
+editoratype, editorbtype, editorctype) only a subset, editor and director,
+has matching counterparts in CSL
+ - kludges:
+ - note + addendum -> CSL note
+ - number + issue -> CSL issue
+ - handling of titleaddon
+ - handling of (journal) series
+ - done properly, this should be mapped to some CSL variable
+(version? edition? collection-number?), CSL styles would have to be adapted
+ - slightly better kludge would map integer to ordinal + "ser."
+("3" -> "3rd ser."); localization keys "newseries" -> "new ser.",
+"oldseries" -> "old ser."; and print all other values as is -- but still
+wouldn't fit all styles or locales.
+ }
+
+@article{article-req,
+ Author = {Author, Ann},
+ Date = {2013-07-29},
+ Hyphenation = {english},
+ Journaltitle = {The Journaltitle},
+ Title = {An Article Entry with Just the Required Fields}}
+
+@article{article-opt,
+ Addendum = {The Addendum},
+ Annotator = {Annotator, A.},
+ Author = {Author, Jr., Ann A.},
+ Commentator = {Commentator, C.},
+ Date = {2008-12-31},
+ Doi = {10.1086/520976},
+ Editor = {Editor, Edward},
+ Editora = {Editor, A.},
+ Editorb = {Editor, B.},
+ Editorc = {Editor, C.},
+ Eid = {eid},
+ Eprint = {eprint},
+ Eprintclass = {eprintclass},
+ Eprinttype = {eprinttype},
+ Hyphenation = {english},
+ Issn = {issn},
+ Issue = {issue},
+ Issuesubtitle = {The Issuesubtitle},
+ Issuetitle = {The Issuetitle},
+ Journalsubtitle = {The Journalsubtitle},
+ Journaltitle = {The Journaltitle},
+ Journal = {The Journal},
+ Language = {language},
+ Month = {08},
+ Year = {2007},
+ Note = {The Note},
+ Number = {number},
+ Origlanguage = {origlanguage},
+ Pages = {pages},
+ Pubstate = {inpress},
+ Series = {newseries},
+ Subtitle = {The Subtitle},
+ Title = {An Article Entry with the Required and All Optional Fields},
+ Titleaddon = {The Titleaddon},
+ Translator = {Translator, Ted},
+ Url = {http://foo.bar.baz/},
+ Urldate = {2013-07-29},
+ Version = {version},
+ Volume = {volume},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Author
+ given: Ann
+ container-title: The Journaltitle
+ id: 'article-req'
+ issued: '2013-07-29'
+ language: 'en-US'
+ title: An article entry with just the required fields
+ type: 'article-journal'
+- accessed: '2013-07-29'
+ author:
+ - family: Author
+ given: Ann A.
+ suffix: Jr.
+ collection-title: new series
+ container-title: 'The Journaltitle: The Journalsubtitle'
+ doi: 10.1086/520976
+ editor:
+ - family: Editor
+ given: Edward
+ id: 'article-opt'
+ issn: issn
+ issue: 'number, issue'
+ issued: '2008-12-31'
+ language: 'en-US'
+ note: The Note. The Addendum
+ page: pages
+ status: in press
+ title: 'An article entry with the required and all optional fields:
+ The subtitle. The titleaddon'
+ title-short: An article entry with the required and all optional
+ fields
+ translator:
+ - family: Translator
+ given: Ted
+ type: 'article-journal'
+ url: 'http://foo.bar.baz/'
+ version: version
+ volume: volume
+---
+
+
+```
diff --git a/test/command/biblatex-augustine.md b/test/command/biblatex-augustine.md
new file mode 100644
index 000000000..9bb48dd4b
--- /dev/null
+++ b/test/command/biblatex-augustine.md
@@ -0,0 +1,56 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Augustine 1995)
+
+Augustine, Robert L. 1995. *Heterogeneous Catalysis for the Synthetic
+Chemist*. New York: Marcel Dekker.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Augustine, 1995)
+
+Augustine, R. L. (1995). *Heterogeneous catalysis for the synthetic
+chemist*. New York: Marcel Dekker.
+
+
+}
+
+@Book{augustine,
+ author = {Augustine, Robert L.},
+ title = {Heterogeneous catalysis for the synthetic chemist},
+ date = 1995,
+ publisher = {Marcel Dekker},
+ location = {New York},
+ hyphenation = {american},
+ shorttitle = {Heterogeneous catalysis},
+ annotation = {A plain book entry},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A plain book entry
+ author:
+ - family: Augustine
+ given: Robert L.
+ id: augustine
+ issued: 1995
+ language: 'en-US'
+ publisher: Marcel Dekker
+ publisher-place: New York
+ title: Heterogeneous catalysis for the synthetic chemist
+ title-short: Heterogeneous catalysis
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-averroes-bland.md b/test/command/biblatex-averroes-bland.md
new file mode 100644
index 000000000..6c630a93f
--- /dev/null
+++ b/test/command/biblatex-averroes-bland.md
@@ -0,0 +1,85 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Averroes 1982)
+
+Averroes. 1982. *The Epistle on the Possibility of Conjunction with the
+Active Intellect by Ibn Rushd with the Commentary of Moses Narboni*.
+Kalman P. Bland. Moreshet: Studies in Jewish History, Literature and
+Thought 7. New York: Jewish Theological Seminary of America.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Averroes, 1982)
+
+Averroes. (1982). *The epistle on the possibility of conjunction with
+the active intellect by Ibn Rushd with the commentary of Moses Narboni*.
+(K. P. Bland). New York: Jewish Theological Seminary of America.
+
+
+NOTES:
+
+- citeproc
+ - term "edited and translated by" missing
+
+}
+
+@Book{averroes-bland,
+ author = {Averroes},
+ title = {The Epistle on the Possibility of Conjunction with the Active
+ Intellect by {Ibn Rushd} with the Commentary of {Moses Narboni}},
+ date = 1982,
+ editor = {Bland, Kalman P.},
+ translator = {Bland, Kalman P.},
+ series = {Moreshet: {Studies} in {Jewish} History, Literature and Thought},
+ number = 7,
+ publisher = {Jewish Theological Seminary of America},
+ location = {New York},
+ keywords = {primary},
+ hyphenation = {american},
+ indextitle = {Epistle on the Possibility of Conjunction, The},
+ shorttitle = {Possibility of Conjunction},
+ annotation = {A book entry with a series and a
+ number. Note the concatenation of the editor
+ and translator fields as well as the
+ indextitle field},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A book entry with a series and a number. Note the
+ concatenation of the editor and translator fields as well as the
+ indextitle field
+ author:
+ - family: Averroes
+ collection-number: 7
+ collection-title: 'Moreshet: Studies in Jewish history, literature and
+ thought'
+ editor:
+ - family: Bland
+ given: Kalman P.
+ id: 'averroes-bland'
+ issued: 1982
+ keyword: primary
+ language: 'en-US'
+ publisher: Jewish Theological Seminary of America
+ publisher-place: New York
+ title: The epistle on the possibility of conjunction with the active
+ intellect by Ibn Rushd with the commentary of Moses Narboni
+ title-short: Possibility of conjunction
+ translator:
+ - family: Bland
+ given: Kalman P.
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-averroes-hannes.md b/test/command/biblatex-averroes-hannes.md
new file mode 100644
index 000000000..d144dcc91
--- /dev/null
+++ b/test/command/biblatex-averroes-hannes.md
@@ -0,0 +1,84 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Averroes 1892)
+
+Averroes. 1892. *Des Averroës Abhandlung: “Über die Möglichkeit der
+Conjunktion” oder “Über den materiellen Intellekt”*. Ludwig Hannes.
+Halle an der Saale: C. A. Kaemmerer.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Averroes, 1892)
+
+Averroes. (1892). *Des Averroës Abhandlung: “Über die Möglichkeit der
+Conjunktion” oder “Über den materiellen Intellekt”*. (L. Hannes). Halle
+an der Saale: C. A. Kaemmerer.
+
+
+NOTES:
+
+- citeproc
+ - term "edited and translated by" missing
+
+}
+
+@Book{averroes-hannes,
+ author = {Averroes},
+ title = {Des Averro{\"e}s Abhandlung: \mkbibquote{{\"U}ber die
+ M{\"o}glichkeit der Conjunktion} oder \mkbibquote{{\"U}ber den
+ materiellen Intellekt}},
+ date = 1892,
+ editor = {Hannes, Ludwig},
+ translator = {Hannes, Ludwig},
+ annotator = {Hannes, Ludwig},
+ publisher = {C.~A. Kaemmerer},
+ location = {Halle an der Saale},
+ keywords = {primary},
+ hyphenation = {german},
+ sorttitle = {Uber die Moglichkeit der Conjunktion},
+ indexsorttitle= {Uber die Moglichkeit der Conjunktion},
+ indextitle = {{\"U}ber die M{\"o}glichkeit der Conjunktion},
+ shorttitle = {{\"U}ber die M{\"o}glichkeit der Conjunktion},
+ annotation = {An annotated edition. Note the concatenation of the
+ editor, translator, and annotator
+ fields. Also note the shorttitle,
+ indextitle, sorttitle, and
+ indexsorttitle fields},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'An annotated edition. Note the concatenation of the editor,
+ translator, and annotator fields. Also note the shorttitle,
+ indextitle, sorttitle, and indexsorttitle fields'
+ author:
+ - family: Averroes
+ editor:
+ - family: Hannes
+ given: Ludwig
+ id: 'averroes-hannes'
+ issued: 1892
+ keyword: primary
+ language: 'de-DE'
+ publisher: C. A. Kaemmerer
+ publisher-place: Halle an der Saale
+ title: 'Des Averroës Abhandlung: "Über die Möglichkeit der
+ Conjunktion" oder "Über den materiellen Intellekt"'
+ title-short: Über die Möglichkeit der Conjunktion
+ translator:
+ - family: Hannes
+ given: Ludwig
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-averroes-hercz.md b/test/command/biblatex-averroes-hercz.md
new file mode 100644
index 000000000..bf9dbf3a4
--- /dev/null
+++ b/test/command/biblatex-averroes-hercz.md
@@ -0,0 +1,85 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Averroes 1869)
+
+Averroes. 1869. *Drei Abhandlungen über die Conjunction des separaten
+Intellects mit dem Menschen: Von Averroes (Vater und Sohn), aus dem
+Arabischen übersetzt von Samuel Ibn Tibbon*. J. Hercz. Berlin:
+S. Hermann.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Averroes, 1869)
+
+Averroes. (1869). *Drei Abhandlungen über die Conjunction des separaten
+Intellects mit dem Menschen: Von Averroes (Vater und Sohn), aus dem
+Arabischen übersetzt von Samuel Ibn Tibbon*. (J. Hercz). Berlin:
+S. Hermann.
+
+
+NOTES:
+
+- citeproc
+ - term "edited and translated by" missing
+
+}
+
+@Book{averroes-hercz,
+ author = {Averroes},
+ title = {Drei Abhandlungen {\"u}ber die Conjunction des separaten
+ Intellects mit dem Menschen},
+ date = 1869,
+ editor = {Hercz, J.},
+ translator = {Hercz, J.},
+ publisher = {S.~Hermann},
+ location = {Berlin},
+ keywords = {primary},
+ hyphenation = {german},
+ indexsorttitle= {Drei Abhandlungen uber die Conjunction},
+ indextitle = {Drei Abhandlungen {\"u}ber die Conjunction},
+ subtitle = {Von Averroes (Vater und Sohn), aus dem Arabischen
+ {\"u}bersetzt von Samuel Ibn Tibbon},
+ shorttitle = {Drei Abhandlungen},
+ annotation = {A book entry. Note the concatenation of the
+ editor and translator fields as well as the
+ indextitle and indexsorttitle fields},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A book entry. Note the concatenation of the editor and
+ translator fields as well as the indextitle and indexsorttitle
+ fields
+ author:
+ - family: Averroes
+ editor:
+ - family: Hercz
+ given: J.
+ id: 'averroes-hercz'
+ issued: 1869
+ keyword: primary
+ language: 'de-DE'
+ publisher: S. Hermann
+ publisher-place: Berlin
+ title: 'Drei Abhandlungen über die Conjunction des separaten
+ Intellects mit dem Menschen: Von Averroes (Vater und Sohn), aus dem
+ Arabischen übersetzt von Samuel Ibn Tibbon'
+ title-short: Drei Abhandlungen
+ translator:
+ - family: Hercz
+ given: J.
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-baez-article.md b/test/command/biblatex-baez-article.md
new file mode 100644
index 000000000..bd7561dba
--- /dev/null
+++ b/test/command/biblatex-baez-article.md
@@ -0,0 +1,76 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Baez and Lauda 2004)
+
+Baez, John C., and Aaron D. Lauda. 2004. “Higher-dimensional Algebra V:
+2-groups” (version 3). *Theory and Applications of Categories* 12:
+423–491.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Baez & Lauda, 2004)
+
+Baez, J. C., & Lauda, A. D. (2004). Higher-dimensional algebra V:
+2-groups. *Theory and Applications of Categories*, *12*, 423–491.
+
+
+NOTES:
+
+- biblio2yaml
+ - eprint: see baez-online
+
+}
+
+@Article{baez-article,
+ author = {Baez, John C. and Lauda, Aaron D.},
+ title = {Higher-Dimensional Algebra {V}: 2-Groups},
+ journaltitle = {Theory and Applications of Categories},
+ date = 2004,
+ volume = 12,
+ pages = {423-491},
+ version = 3,
+ eprint = {math/0307200v3},
+ eprinttype = {arxiv},
+ hyphenation = {american},
+ annotation = {An article with eprint and
+ eprinttype fields. Note that the arXiv reference is
+ transformed into a clickable link if hyperref support
+ has been enabled. Compare baez\slash online, which
+ is the same item given as an online entry},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'An article with eprint and eprinttype fields. Note that the
+ arXiv reference is transformed into a clickable link if hyperref
+ support has been enabled. Compare baez/online, which is the same
+ item given as an online entry'
+ author:
+ - family: Baez
+ given: John C.
+ - family: Lauda
+ given: Aaron D.
+ container-title: Theory and Applications of Categories
+ id: 'baez-article'
+ issued: 2004
+ language: 'en-US'
+ page: '423-491'
+ title: 'Higher-dimensional algebra V: 2-groups'
+ title-short: 'Higher-dimensional algebra V'
+ type: 'article-journal'
+ url: 'http://arxiv.org/abs/math/0307200v3'
+ version: 3
+ volume: 12
+---
+
+
+```
diff --git a/test/command/biblatex-baez-online.md b/test/command/biblatex-baez-online.md
new file mode 100644
index 000000000..b1cbf3e06
--- /dev/null
+++ b/test/command/biblatex-baez-online.md
@@ -0,0 +1,69 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Baez and Lauda 2004)
+
+Baez, John C., and Aaron D. Lauda. 2004. “Higher-dimensional Algebra V:
+2-groups” (version 3). October 27.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Baez & Lauda, 2004)
+
+Baez, J. C., & Lauda, A. D. (2004, October 27). Higher-dimensional
+algebra V: 2-groups.
+
+
+NOTES:
+
+- biblio2yaml:
+ - eprinttype = {arxiv}, eprint = {math/0307200v3},
+ should be converted to a url: http://arxiv.org/abs/math/0307200v3
+ (prefix http://arxiv.org/abs/ seems to work for all arxiv material)
+
+}
+
+@Online{baez-online,
+ author = {Baez, John C. and Lauda, Aaron D.},
+ title = {Higher-Dimensional Algebra {V}: 2-Groups},
+ date = {2004-10-27},
+ version = 3,
+ hyphenation = {american},
+ eprinttype = {arxiv},
+ eprint = {math/0307200v3},
+ annotation = {An online reference from arXiv. Note the
+ eprint and eprinttype fields. Compare
+ baez\slash article which is the same item given as an
+ article entry with eprint information},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: An online reference from arXiv. Note the eprint and eprinttype
+ fields. Compare baez/article which is the same item given as an
+ article entry with eprint information
+ author:
+ - family: Baez
+ given: John C.
+ - family: Lauda
+ given: Aaron D.
+ id: 'baez-online'
+ issued: '2004-10-27'
+ language: 'en-US'
+ title: 'Higher-dimensional algebra V: 2-groups'
+ title-short: 'Higher-dimensional algebra V'
+ type: webpage
+ url: 'http://arxiv.org/abs/math/0307200v3'
+ version: 3
+---
+
+
+```
diff --git a/test/command/biblatex-basic.md b/test/command/biblatex-basic.md
new file mode 100644
index 000000000..1110b0fb4
--- /dev/null
+++ b/test/command/biblatex-basic.md
@@ -0,0 +1,69 @@
+@Book{item1,
+author="John Doe",
+title="First Book",
+year="2005",
+address="Cambridge",
+publisher="Cambridge University Press"
+}
+
+@Article{item2,
+author="John Doe",
+title="Article",
+year="2006",
+journal="Journal of Generic Studies",
+volume="6",
+pages="33-34"
+}
+
+@InCollection{пункт3,
+author="John Doe and Jenny Roe",
+title="Why Water Is Wet",
+booktitle="Third Book",
+editor="Sam Smith",
+publisher="Oxford University Press",
+address="Oxford",
+year="2007"
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Doe
+ given: John
+ id: item1
+ issued: 2005
+ publisher: Cambridge University Press
+ publisher-place: Cambridge
+ title: First book
+ type: book
+- author:
+ - family: Doe
+ given: John
+ container-title: Journal of Generic Studies
+ id: item2
+ issued: 2006
+ page: '33-34'
+ title: Article
+ type: 'article-journal'
+ volume: 6
+- author:
+ - family: Doe
+ given: John
+ - family: Roe
+ given: Jenny
+ container-title: Third book
+ editor:
+ - family: Smith
+ given: Sam
+ id: пункт3
+ issued: 2007
+ publisher: Oxford University Press
+ publisher-place: Oxford
+ title: Why water is wet
+ type: chapter
+---
+
+
+```
diff --git a/test/command/biblatex-bertram.md b/test/command/biblatex-bertram.md
new file mode 100644
index 000000000..d29a3232d
--- /dev/null
+++ b/test/command/biblatex-bertram.md
@@ -0,0 +1,66 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Bertram and Wentworth 1996)
+
+Bertram, Aaron, and Richard Wentworth. 1996. “Gromov Invariants for
+Holomorphic Maps on Riemann Surfaces.” *J. Amer. Math. Soc.* 9 (2):
+529–571.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Bertram & Wentworth, 1996)
+
+Bertram, A., & Wentworth, R. (1996). Gromov invariants for holomorphic
+maps on Riemann surfaces. *J. Amer. Math. Soc.*, *9*(2), 529–571.
+
+
+}
+
+@string{ jams = {J.~Amer. Math. Soc.} }
+
+@Article{bertram,
+ author = {Bertram, Aaron and Wentworth, Richard},
+ title = {Gromov invariants for holomorphic maps on {Riemann} surfaces},
+ journaltitle = jams,
+ date = 1996,
+ volume = 9,
+ number = 2,
+ pages = {529-571},
+ hyphenation = {american},
+ shorttitle = {Gromov invariants},
+ annotation = {An article entry with a volume and a
+ number field},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: An article entry with a volume and a number field
+ author:
+ - family: Bertram
+ given: Aaron
+ - family: Wentworth
+ given: Richard
+ container-title: J. Amer. Math. Soc.
+ id: bertram
+ issue: 2
+ issued: 1996
+ language: 'en-US'
+ page: '529-571'
+ title: Gromov invariants for holomorphic maps on Riemann surfaces
+ title-short: Gromov invariants
+ type: 'article-journal'
+ volume: 9
+---
+
+
+```
diff --git a/test/command/biblatex-bibstring-resolution.md b/test/command/biblatex-bibstring-resolution.md
new file mode 100644
index 000000000..f1dc6f4de
--- /dev/null
+++ b/test/command/biblatex-bibstring-resolution.md
@@ -0,0 +1,20 @@
+```
+% pandoc -f biblatex -t markdown -s
+@book{item1,
+ Title = {The Title: \bibstring{newseries}},
+ Hyphenation = {english}
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- id: item1
+ language: 'en-US'
+ title: 'The title: New series'
+ title-short: The title
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-book-averroes.md b/test/command/biblatex-book-averroes.md
new file mode 100644
index 000000000..600516816
--- /dev/null
+++ b/test/command/biblatex-book-averroes.md
@@ -0,0 +1,128 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+adapted from http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/examples/biblatex-examples.bib
+
+@book{averroes/bland,
+ Annotation = {A book entry with a series and a number. Note the concatenation of the editor and translator fields as well as the indextitle field},
+ Author = {Averroes},
+ Date = 1982,
+ Editor = {Bland, Kalman P.},
+ Hyphenation = {american},
+ Indextitle = {Epistle on the Possibility of Conjunction, The},
+ Keywords = {primary},
+ Location = {New York},
+ Number = 7,
+ Publisher = {Jewish Theological Seminary of America},
+ Series = {{Moreshet: Studies in Jewish History, Literature and Thought}},
+ Shorttitle = {Possibility of Conjunction},
+ Title = {The Epistle on the Possibility of Conjunction with the Active Intellect by {Ibn Rushd} with the Commentary of {Moses Narboni}},
+ Translator = {Bland, Kalman P.}}
+
+@book{averroes/hannes,
+ Annotation = {An annotated edition. Note the concatenation of the editor, translator, and annotator fields. Also note the shorttitle, indextitle, sorttitle, and indexsorttitle fields},
+ Annotator = {Hannes, Ludwig},
+ Author = {Averroes},
+ Date = 1892,
+ Editor = {Hannes, Ludwig},
+ Hyphenation = {german},
+ Indexsorttitle = {Uber die Moglichkeit der Conjunktion},
+ Indextitle = {Über die Möglichkeit der Conjunktion},
+ Keywords = {primary},
+ Location = {Halle an der Saale},
+ Publisher = {C.~A. Kaemmerer},
+ Shorttitle = {Über die Möglichkeit der Conjunktion},
+ Sorttitle = {Uber die Moglichkeit der Conjunktion},
+ Title = {Des Averroës Abhandlung: \mkbibquote{Über die Möglichkeit der Conjunktion} oder \mkbibquote{Über den materiellen Intellekt}},
+ Translator = {Hannes, Ludwig}}
+
+@book{averroes/hercz,
+ Annotation = {A book entry. Note the concatenation of the editor and translator fields as well as the indextitle and indexsorttitle fields},
+ Author = {Averroes},
+ Date = 1869,
+ Editor = {Hercz, J.},
+ Hyphenation = {german},
+ Indexsorttitle = {Drei Abhandlungen uber die Conjunction},
+ Indextitle = {Drei Abhandlungen über die Conjunction},
+ Keywords = {primary},
+ Location = {Berlin},
+ Publisher = {S.~Hermann},
+ Shorttitle = {Drei Abhandlungen},
+ Subtitle = {Von Averroes (Vater und Sohn), aus dem Arabischen übersetzt von Samuel Ibn Tibbon},
+ Title = {Drei Abhandlungen über die Conjunction des separaten Intellects mit dem Menschen},
+ Translator = {Hercz, J.}}
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A book entry with a series and a number. Note the
+ concatenation of the editor and translator fields as well as the
+ indextitle field
+ author:
+ - family: Averroes
+ collection-number: 7
+ collection-title: '[Moreshet: Studies in Jewish History, Literature
+ and Thought]{.nocase}'
+ editor:
+ - family: Bland
+ given: Kalman P.
+ id: averroes/bland
+ issued: 1982
+ keyword: primary
+ language: 'en-US'
+ publisher: Jewish Theological Seminary of America
+ publisher-place: New York
+ title: The epistle on the possibility of conjunction with the active
+ intellect by Ibn Rushd with the commentary of Moses Narboni
+ title-short: Possibility of conjunction
+ translator:
+ - family: Bland
+ given: Kalman P.
+ type: book
+- annote: 'An annotated edition. Note the concatenation of the editor,
+ translator, and annotator fields. Also note the shorttitle,
+ indextitle, sorttitle, and indexsorttitle fields'
+ author:
+ - family: Averroes
+ editor:
+ - family: Hannes
+ given: Ludwig
+ id: averroes/hannes
+ issued: 1892
+ keyword: primary
+ language: 'de-DE'
+ publisher: C. A. Kaemmerer
+ publisher-place: Halle an der Saale
+ title: 'Des Averroës Abhandlung: "Über die Möglichkeit der
+ Conjunktion" oder "Über den materiellen Intellekt"'
+ title-short: Über die Möglichkeit der Conjunktion
+ translator:
+ - family: Hannes
+ given: Ludwig
+ type: book
+- annote: A book entry. Note the concatenation of the editor and
+ translator fields as well as the indextitle and indexsorttitle
+ fields
+ author:
+ - family: Averroes
+ editor:
+ - family: Hercz
+ given: J.
+ id: averroes/hercz
+ issued: 1869
+ keyword: primary
+ language: 'de-DE'
+ publisher: S. Hermann
+ publisher-place: Berlin
+ title: 'Drei Abhandlungen über die Conjunction des separaten
+ Intellects mit dem Menschen: Von Averroes (Vater und Sohn), aus dem
+ Arabischen übersetzt von Samuel Ibn Tibbon'
+ title-short: Drei Abhandlungen
+ translator:
+ - family: Hercz
+ given: J.
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-book-coleridge.md b/test/command/biblatex-book-coleridge.md
new file mode 100644
index 000000000..f2e05feaa
--- /dev/null
+++ b/test/command/biblatex-book-coleridge.md
@@ -0,0 +1,59 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{adapted from http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/examples/biblatex-examples.bib
+
+TODO (as a stopgap):
+Combine biblatex “volume = 7” and “part = 2” to CSL “volume: 7.2”
+
+}
+
+@book{coleridge,
+ Annotation = {One (partial) volume of a multivolume book. This is a book entry with a volume and a part field which explicitly refers to the second (physical) part of the seventh (logical) volume. Also note the series and number fields},
+ Author = {Coleridge, Samuel Taylor},
+ Date = 1983,
+ Editor = {Coburn, Kathleen and Engell, James and Bate, W. Jackson},
+ Hyphenation = {british},
+ Indextitle = {Biographia literaria},
+ Location = {London},
+ Maintitle = {The collected works of {Samuel Taylor Coleridge}},
+ Number = 75,
+ Part = 2,
+ Publisher = {Routledge {and} Kegan Paul},
+ Series = {Bollingen Series},
+ Shorttitle = {Biographia literaria},
+ Title = {Biographia literaria, or {Biographical} sketches of my literary life and opinions},
+ Volume = 7}
+^D
+---
+nocite: '[@*]'
+references:
+- annote: One (partial) volume of a multivolume book. This is a book
+ entry with a volume and a part field which explicitly refers to the
+ second (physical) part of the seventh (logical) volume. Also note
+ the series and number fields
+ author:
+ - family: Coleridge
+ given: Samuel Taylor
+ collection-number: 75
+ collection-title: Bollingen series
+ editor:
+ - family: Coburn
+ given: Kathleen
+ - family: Engell
+ given: James
+ - family: Bate
+ given: W. Jackson
+ id: coleridge
+ issued: 1983
+ language: 'en-GB'
+ publisher: Routledge and Kegan Paul
+ publisher-place: London
+ title: The collected works of Samuel Taylor Coleridge
+ type: book
+ volume: 7.2
+ volume-title: 'Biographia literaria, or Biographical sketches of my
+ literary life and opinions'
+---
+
+
+```
diff --git a/test/command/biblatex-book-title-maintitle-series.md b/test/command/biblatex-book-title-maintitle-series.md
new file mode 100644
index 000000000..c58932aa8
--- /dev/null
+++ b/test/command/biblatex-book-title-maintitle-series.md
@@ -0,0 +1,39 @@
+```
+% pandoc -f biblatex -t markdown -s
+@book{item1,
+ Author = {Author, Al},
+ Date = {2013},
+ Hyphenation = {french},
+ Location = {Location},
+ Mainsubtitle = {Mainsubtitle},
+ Maintitle = {Maintitle},
+ Maintitleaddon = {Maintitleaddon},
+ Number = {3},
+ Publisher = {Publisher},
+ Series = {Series},
+ Subtitle = {Subtitle},
+ Title = {Title of the Book},
+ Titleaddon = {Titleaddon},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Author
+ given: Al
+ collection-number: 3
+ collection-title: Series
+ id: item1
+ issued: 2013
+ language: 'fr-FR'
+ publisher: Publisher
+ publisher-place: Location
+ title: 'Maintitle: Mainsubtitle. Maintitleaddon'
+ type: book
+ volume-title: 'Title of the Book: Subtitle. Titleaddon'
+---
+
+
+```
diff --git a/test/command/biblatex-book-vazques-de-parga.md b/test/command/biblatex-book-vazques-de-parga.md
new file mode 100644
index 000000000..12e0a83f9
--- /dev/null
+++ b/test/command/biblatex-book-vazques-de-parga.md
@@ -0,0 +1,48 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{excerpted from http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/examples/biblatex-examples.bib
+
+Note handling of Author = {Vázques{ de }Parga, Luis}
+
+}
+
+@book{vazques-de-parga,
+ Annotation = {A multivolume book cited as a whole. This is a book entry with volumes, note, sorttitle, and indextitle fields},
+ Author = {Vázques{ de }Parga, Luis and Lacarra, José María and Uría Ríu, Juan},
+ Date = 1993,
+ Hyphenation = {spanish},
+ Indextitle = {Peregrinaciones a Santiago de Compostela, Las},
+ Location = {Pamplona},
+ Note = {Ed. facs. de la realizada en 1948--49},
+ Publisher = {Iberdrola},
+ Shorttitle = {Peregrinaciones},
+ Sorttitle = {Peregrinaciones a Santiago de Compostela},
+ Title = {Las Peregrinaciones a Santiago de Compostela},
+ Volumes = 3}
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'A multivolume book cited as a whole. This is a book entry
+ with volumes, note, sorttitle, and indextitle fields'
+ author:
+ - family: Vázques de Parga
+ given: Luis
+ - family: Lacarra
+ given: José María
+ - family: Uría Ríu
+ given: Juan
+ id: 'vazques-de-parga'
+ issued: 1993
+ language: 'es-ES'
+ note: 'Ed. facs. de la realizada en 1948--49'
+ number-of-volumes: 3
+ publisher: Iberdrola
+ publisher-place: Pamplona
+ title: Las Peregrinaciones a Santiago de Compostela
+ title-short: Peregrinaciones
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-brandt.md b/test/command/biblatex-brandt.md
new file mode 100644
index 000000000..66a1f2ac3
--- /dev/null
+++ b/test/command/biblatex-brandt.md
@@ -0,0 +1,88 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Brandt and Hoffmann 1987)
+
+Brandt, Ahasver von, and Erich Hoffmann. 1987. “Die nordischen Länder
+von der Mitte des 11. Jahrhunderts bis 1448.” In *Europa im Hoch- und
+Spätmittelalter*, edited by Ferdinand Seibt, 884–917. Handbuch der
+europäischen Geschichte 2. Stuttgart: Klett-Cotta.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Brandt & Hoffmann, 1987)
+
+Brandt, A. von, & Hoffmann, E. (1987). Die nordischen Länder von der
+Mitte des 11. Jahrhunderts bis 1448. In F. Seibt (ed.), *Europa im Hoch-
+und Spätmittelalter* (pp. 884–917). Stuttgart: Klett-Cotta.
+
+
+}
+
+@InCollection{brandt,
+ author = {von Brandt, Ahasver and Erich Hoffmann},
+ editor = {Ferdinand Seibt},
+ title = {Die nordischen L{\"a}nder von der Mitte des 11.~Jahrhunderts
+ bis 1448},
+ date = 1987,
+ booktitle = {Europa im Hoch- und Sp{\"a}tmittelalter},
+ series = {Handbuch der europ{\"a}ischen Geschichte},
+ number = 2,
+ publisher = {Klett-Cotta},
+ location = {Stuttgart},
+ pages = {884-917},
+ options = {useprefix=false},
+ hyphenation = {german},
+ indexsorttitle= {Nordischen Lander von der Mitte des 11. Jahrhunderts bis
+ 1448},
+ indextitle = {Nordischen L{\"a}nder von der Mitte des 11.~Jahrhunderts bis
+ 1448, Die},
+ shorttitle = {Die nordischen L{\"a}nder},
+ annotation = {An incollection entry with a series and a
+ number. Note the format of the printed name and
+ compare the useprefix option in the options
+ field as well as vangennep. Also note the
+ indextitle, and indexsorttitle fields},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'An incollection entry with a series and a number. Note the
+ format of the printed name and compare the useprefix option in the
+ options field as well as vangennep. Also note the indextitle, and
+ indexsorttitle fields'
+ author:
+ - dropping-particle: von
+ family: Brandt
+ given: Ahasver
+ - family: Hoffmann
+ given: Erich
+ collection-number: 2
+ collection-title: Handbuch der europäischen Geschichte
+ container-title: 'Europa im Hoch- und Spätmittelalter'
+ editor:
+ - family: Seibt
+ given: Ferdinand
+ id: brandt
+ issued: 1987
+ language: 'de-DE'
+ page: '884-917'
+ publisher: 'Klett-Cotta'
+ publisher-place: Stuttgart
+ title: Die nordischen Länder von der Mitte des 11. Jahrhunderts bis
+ 1448
+ title-short: Die nordischen Länder
+ type: chapter
+---
+
+
+```
diff --git a/test/command/biblatex-britannica.md b/test/command/biblatex-britannica.md
new file mode 100644
index 000000000..95e09d00f
--- /dev/null
+++ b/test/command/biblatex-britannica.md
@@ -0,0 +1,85 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Preece 2003)
+
+Preece, Warren E., ed. 2003. *The New EncyclopæDia Britannica*. 15th ed.
+32. Chicago, Ill.: Encyclopædia Britannica.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Preece, 2003)
+
+Preece, W. E. (Ed.). (2003). *The new encyclopædia Britannica* (15th
+ed., 1-32). Chicago, Ill.: Encyclopædia Britannica.
+
+
+NOTES:
+
+- biblio2yaml
+ - spurious <span> in Encyclopædia
+ - options = {useeditor=false} has no equivalent in CSL, so citing and alphabetizing by title even though there is an editor does not seem to be possible
+
+- citeproc
+ - incorrect camel case: "EncyclopæDia"
+ - term "vols." missing
+
+}
+
+@Collection{britannica,
+ editor = {Preece, Warren E.},
+ title = {The New Encyclop{\ae}dia {Britannica}},
+ date = 2003,
+ edition = 15,
+ volumes = 32,
+ publisher = {Encyclop{\ae}dia Britannica},
+ location = {Chicago, Ill.},
+ options = {useeditor=false},
+ label = {EB},
+ hyphenation = {british},
+ sorttitle = {Encyclop{\ae}dia Britannica},
+ indextitle = {Encyclop{\ae}dia Britannica, The New},
+ shorttitle = {Encyclop{\ae}dia {Britannica}},
+ annotation = {This is a collection entry for an encyclopedia. Note
+ the useeditor option in the options field as
+ well as the sorttitle field. We want this entry to be
+ cited and alphabetized by title even though there is an
+ editor. In addition to that, we want the title to be
+ alphabetized under \enquote*{E} rather than \enquote*{T}. Also
+ note the label field which is provided for
+ author-year citation styles},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'This is a collection entry for an encyclopedia. Note the
+ useeditor option in the options field as well as the sorttitle
+ field. We want this entry to be cited and alphabetized by title even
+ though there is an editor. In addition to that, we want the title to
+ be alphabetized under ''E'' rather than ''T''. Also note the label field
+ which is provided for author-year citation styles'
+ edition: 15
+ editor:
+ - family: Preece
+ given: Warren E.
+ id: britannica
+ issued: 2003
+ language: 'en-GB'
+ number-of-volumes: 32
+ publisher: Encyclopædia Britannica
+ publisher-place: 'Chicago, Ill.'
+ title: The new encyclopædia Britannica
+ title-short: Encyclopædia Britannica
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-chiu.md b/test/command/biblatex-chiu.md
new file mode 100644
index 000000000..73dcc29bf
--- /dev/null
+++ b/test/command/biblatex-chiu.md
@@ -0,0 +1,77 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Chiu and Chow 1978)
+
+Chiu, Willy W., and We Min Chow. 1978. “A Hybrid Hierarchical Model of a
+Multiple Virtual Storage (MVS) Operating System.” Research report
+RC-6947. IBM.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Chiu & Chow, 1978)
+
+Chiu, W. W., & Chow, W. M. (1978). *A hybrid hierarchical model of a
+multiple virtual storage (MVS) operating system* (research report No.
+RC-6947). IBM.
+
+
+NOTES:
+
+- biblio2yaml
+ - "MVS", when not wrapped in {}, gives "mVS", which is probably never intended, or useful (latex converts the whole word to lowercase if unprotected ("MVS" -> "mvs"))
+
+}
+
+@Report{chiu,
+ author = {Chiu, Willy W. and Chow, We Min},
+ title = {A Hybrid Hierarchical Model of a Multiple Virtual Storage
+ ({MVS}) Operating System},
+ type = {resreport},
+ institution = {IBM},
+ date = 1978,
+ number = {RC-6947},
+ hyphenation = {american},
+ sorttitle = {Hybrid Hierarchical Model of a Multiple Virtual Storage (MVS)
+ Operating System},
+ indextitle = {Hybrid Hierarchical Model, A},
+ annotation = {This is a report entry for a research report. Note
+ the format of the type field in the database file
+ which uses a localization key. The number of the report is
+ given in the number field. Also note the
+ sorttitle and indextitle fields},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: This is a report entry for a research report. Note the format
+ of the type field in the database file which uses a localization
+ key. The number of the report is given in the number field. Also
+ note the sorttitle and indextitle fields
+ author:
+ - family: Chiu
+ given: Willy W.
+ - family: Chow
+ given: We Min
+ genre: research report
+ id: chiu
+ issued: 1978
+ language: 'en-US'
+ number: 'RC-6947'
+ publisher: IBM
+ title: A hybrid hierarchical model of a multiple virtual storage (MVS)
+ operating system
+ type: report
+---
+
+
+```
diff --git a/test/command/biblatex-cicero.md b/test/command/biblatex-cicero.md
new file mode 100644
index 000000000..05b21755e
--- /dev/null
+++ b/test/command/biblatex-cicero.md
@@ -0,0 +1,82 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Cicero 1995)
+
+Cicero, Marcus Tullius. 1995. *De natura deorum. Über das Wesen der
+Götter*. Ursula Blank-Sangmeister. Stuttgart: Reclam.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Cicero, 1995)
+
+Cicero, M. T. (1995). *De natura deorum. Über das Wesen der Götter*. (U.
+Blank-Sangmeister). Stuttgart: Reclam.
+
+
+NOTES:
+
+- biblio2yaml
+ - afterword, language: no CSL variables available
+
+- citeproc:
+ - term such as "edited and translated by" should appear
+
+}
+
+@Book{cicero,
+ author = {Cicero, Marcus Tullius},
+ title = {De natura deorum. {\"U}ber das Wesen der G{\"o}tter},
+ date = 1995,
+ editor = {Blank-Sangmeister, Ursula},
+ translator = {Blank-Sangmeister, Ursula},
+ afterword = {Thraede, Klaus},
+ language = {langlatin and langgerman},
+ publisher = {Reclam},
+ location = {Stuttgart},
+ hyphenation = {german},
+ indextitle = {De natura deorum},
+ shorttitle = {De natura deorum},
+ annotation = {A bilingual edition of Cicero's \emph{De natura deorum}, with
+ a German translation. Note the format of the language
+ field in the database file, the concatenation of the
+ editor and translator fields, and the
+ afterword field},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'A bilingual edition of Cicero''s *De natura deorum*, with a
+ German translation. Note the format of the language field in the
+ database file, the concatenation of the editor and translator
+ fields, and the afterword field'
+ author:
+ - family: Cicero
+ given: Marcus Tullius
+ editor:
+ - family: 'Blank-Sangmeister'
+ given: Ursula
+ id: cicero
+ issued: 1995
+ language: 'de-DE'
+ publisher: Reclam
+ publisher-place: Stuttgart
+ title: De natura deorum. Über das Wesen der Götter
+ title-short: De natura deorum
+ translator:
+ - family: 'Blank-Sangmeister'
+ given: Ursula
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-cms.md b/test/command/biblatex-cms.md
new file mode 100644
index 000000000..3d6534073
--- /dev/null
+++ b/test/command/biblatex-cms.md
@@ -0,0 +1,81 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(*The Chicago Manual of Style: The Essential Guide for Writers, Editors,
+and Publishers* 2003)
+
+*The Chicago Manual of Style: The Essential Guide for Writers, Editors,
+and Publishers*. 2003. 15th ed. Chicago, Ill.: University of Chicago
+Press.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(*Chicago manual of style*, 2003)
+
+*The Chicago manual of style: The essential guide for writers, editors,
+and publishers*. (2003) (15th ed.). Chicago, Ill.: University of Chicago
+Press.
+
+
+NOTES:
+
+- chicago-author-date.csl should have as in-text citation:
+ (*Chicago Manual of Style* 2003)
+ Same behaviour in Zotero; most probably a style file issue.
+
+}
+
+@Manual{cms,
+ title = {The {Chicago} Manual of Style},
+ date = 2003,
+ subtitle = {The Essential Guide for Writers, Editors, and Publishers},
+ edition = 15,
+ publisher = {University of Chicago Press},
+ location = {Chicago, Ill.},
+ isbn = {0-226-10403-6},
+ label = {CMS},
+ hyphenation = {american},
+ sorttitle = {Chicago Manual of Style},
+ indextitle = {Chicago Manual of Style, The},
+ shorttitle = {Chicago Manual of Style},
+ annotation = {This is a manual entry without an author or
+ editor. Note the label field in the database
+ file which is provided for author-year citation styles. Also
+ note the sorttitle and indextitle fields. By
+ default, all entries without an author or
+ editor are alphabetized by title but we want
+ this entry to be alphabetized under \enquote*{C} rather than
+ \enquote*{T}. There's also an isbn field},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'This is a manual entry without an author or editor. Note the
+ label field in the database file which is provided for author-year
+ citation styles. Also note the sorttitle and indextitle fields. By
+ default, all entries without an author or editor are alphabetized by
+ title but we want this entry to be alphabetized under ''C'' rather
+ than ''T''. There''s also an isbn field'
+ edition: 15
+ id: cms
+ isbn: '0-226-10403-6'
+ issued: 2003
+ language: 'en-US'
+ publisher: University of Chicago Press
+ publisher-place: 'Chicago, Ill.'
+ title: 'The Chicago manual of style: The essential guide for writers,
+ editors, and publishers'
+ title-short: Chicago manual of style
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-coleridge.md b/test/command/biblatex-coleridge.md
new file mode 100644
index 000000000..e2a9f7bfd
--- /dev/null
+++ b/test/command/biblatex-coleridge.md
@@ -0,0 +1,86 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2015-03-08:
+
+(Coleridge 1983)
+
+Coleridge, Samuel Taylor. 1983. *The Collected Works of Samuel Taylor
+Coleridge*. Edited by Kathleen Coburn, James Engell, and W. Jackson
+Bate. Vol. 7.2. Bollingen Series 75. London: Routledge and Kegan Paul.
+
+Formatted with pandoc and apa.csl, 2015-03-08:
+
+(Coleridge, 1983)
+
+Coleridge, S. T. (1983). *The collected works of Samuel Taylor
+Coleridge*. (K. Coburn, J. Engell, & W. J. Bate, Eds.) (Vol. 7.2).
+London: Routledge and Kegan Paul.
+
+NOTES:
+
+- volume-title currently not implemented by chicago-author-date.csl and apa.csl.
+
+}
+
+@Book{coleridge,
+ author = {Coleridge, Samuel Taylor},
+ title = {Biographia literaria, or {Biographical} sketches of my literary
+ life and opinions},
+ date = 1983,
+ editor = {Coburn, Kathleen and Engell, James and Bate, W. Jackson},
+ maintitle = {The collected works of {Samuel Taylor Coleridge}},
+ volume = 7,
+ part = 2,
+ series = {Bollingen Series},
+ number = 75,
+ publisher = {Routledge {and} Kegan Paul},
+ location = {London},
+ hyphenation = {british},
+ indextitle = {Biographia literaria},
+ shorttitle = {Biographia literaria},
+ annotation = {One (partial) volume of a multivolume book. This is a
+ book entry with a volume and a part
+ field which explicitly refers to the second (physical) part of
+ the seventh (logical) volume. Also note the series
+ and number fields},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: One (partial) volume of a multivolume book. This is a book
+ entry with a volume and a part field which explicitly refers to the
+ second (physical) part of the seventh (logical) volume. Also note
+ the series and number fields
+ author:
+ - family: Coleridge
+ given: Samuel Taylor
+ collection-number: 75
+ collection-title: Bollingen series
+ editor:
+ - family: Coburn
+ given: Kathleen
+ - family: Engell
+ given: James
+ - family: Bate
+ given: W. Jackson
+ id: coleridge
+ issued: 1983
+ language: 'en-GB'
+ publisher: Routledge and Kegan Paul
+ publisher-place: London
+ title: The collected works of Samuel Taylor Coleridge
+ type: book
+ volume: 7.2
+ volume-title: 'Biographia literaria, or Biographical sketches of my
+ literary life and opinions'
+---
+
+
+```
diff --git a/test/command/biblatex-companion.md b/test/command/biblatex-companion.md
new file mode 100644
index 000000000..08249e2c0
--- /dev/null
+++ b/test/command/biblatex-companion.md
@@ -0,0 +1,70 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Goossens, Mittelbach, and Samarin 1994)
+
+Goossens, Michel, Frank Mittelbach, and Alexander Samarin. 1994. *The
+LaTeX Companion*. 1st ed. Reading, Mass.: Addison-Wesley.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Goossens, Mittelbach, & Samarin, 1994)
+
+Goossens, M., Mittelbach, F., & Samarin, A. (1994). *The LaTeX
+companion* (1st ed.). Reading, Mass.: Addison-Wesley.
+
+
+}
+
+@Book{companion,
+ author = {Goossens, Michel and Mittelbach, Frank and Samarin, Alexander},
+ title = {The {LaTeX} Companion},
+ date = 1994,
+ edition = 1,
+ publisher = {Addison-Wesley},
+ location = {Reading, Mass.},
+ pagetotal = 528,
+ hyphenation = {american},
+ sorttitle = {LaTeX Companion},
+ indextitle = {LaTeX Companion, The},
+ shorttitle = {LaTeX Companion},
+ annotation = {A book with three authors. Note the formatting of the author
+ list. By default, only the first name is reversed in the
+ bibliography},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'A book with three authors. Note the formatting of the author
+ list. By default, only the first name is reversed in the
+ bibliography'
+ author:
+ - family: Goossens
+ given: Michel
+ - family: Mittelbach
+ given: Frank
+ - family: Samarin
+ given: Alexander
+ edition: 1
+ id: companion
+ issued: 1994
+ language: 'en-US'
+ number-of-pages: 528
+ publisher: 'Addison-Wesley'
+ publisher-place: 'Reading, Mass.'
+ title: The LaTeX companion
+ title-short: LaTeX companion
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-cotton.md b/test/command/biblatex-cotton.md
new file mode 100644
index 000000000..cca41be7e
--- /dev/null
+++ b/test/command/biblatex-cotton.md
@@ -0,0 +1,69 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Cotton et al. 1999)
+
+Cotton, Frank Albert, Geoffrey Wilkinson, Carlos A. Murillio, and
+Manfred Bochmann. 1999. *Advanced Inorganic Chemistry*. 6th ed.
+Chichester: Wiley.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Cotton, Wilkinson, Murillio, & Bochmann, 1999)
+
+Cotton, F. A., Wilkinson, G., Murillio, C. A., & Bochmann, M. (1999).
+*Advanced inorganic chemistry* (6th ed.). Chichester: Wiley.
+
+
+}
+
+@Book{cotton,
+ author = {Cotton, Frank Albert and Wilkinson, Geoffrey and Murillio,
+ Carlos A. and Bochmann, Manfred},
+ title = {Advanced inorganic chemistry},
+ date = 1999,
+ edition = 6,
+ publisher = {Wiley},
+ location = {Chichester},
+ hyphenation = {british},
+ annotation = {A book entry with \arabic{author} authors and an
+ edition field. By default, long author and
+ editor lists are automatically truncated. This is
+ configurable},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'A book entry with author authors and an edition field. By
+ default, long author and editor lists are automatically truncated.
+ This is configurable'
+ author:
+ - family: Cotton
+ given: Frank Albert
+ - family: Wilkinson
+ given: Geoffrey
+ - family: Murillio
+ given: Carlos A.
+ - family: Bochmann
+ given: Manfred
+ edition: 6
+ id: cotton
+ issued: 1999
+ language: 'en-GB'
+ publisher: Wiley
+ publisher-place: Chichester
+ title: Advanced inorganic chemistry
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-crossref-inbook-mvbook.md b/test/command/biblatex-crossref-inbook-mvbook.md
new file mode 100644
index 000000000..834752609
--- /dev/null
+++ b/test/command/biblatex-crossref-inbook-mvbook.md
@@ -0,0 +1,58 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+crossref, directly from inbook to mvbook
+
+}
+
+@inbook{inbook-1,
+ Crossref = {mvbook-1},
+ Title = {Macbeth [title field of inbook-1]},
+ Date = {1975},
+ Volume = {3},
+ Chapter = {7},
+ Pages = {100-200},
+}
+
+@mvbook{mvbook-1,
+ Author = {Shakespeare},
+ Date = {1970/1980},
+ Title = {Collected Works [title field of mvbook-1]},
+ Location = {Location},
+ Publisher = {Publisher},
+ Volumes = {4},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Shakespeare
+ chapter-number: 7
+ container-author:
+ - family: Shakespeare
+ container-title: 'Collected works \[title field of mvbook-1\]'
+ id: 'inbook-1'
+ issued: 1975
+ number-of-volumes: 4
+ page: '100-200'
+ publisher: Publisher
+ publisher-place: Location
+ title: 'Macbeth \[title field of inbook-1\]'
+ type: chapter
+ volume: 3
+- author:
+ - family: Shakespeare
+ id: 'mvbook-1'
+ issued: 1970/1980
+ number-of-volumes: 4
+ publisher: Publisher
+ publisher-place: Location
+ title: 'Collected works \[title field of mvbook-1\]'
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-crossref-nested.md b/test/command/biblatex-crossref-nested.md
new file mode 100644
index 000000000..520e464e9
--- /dev/null
+++ b/test/command/biblatex-crossref-nested.md
@@ -0,0 +1,100 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Nested crossreferences (see biber manual v 1.7)
+
+}
+
+@bookinbook{bookinbook-1,
+ Crossref = {book-1},
+ Title = {Macbeth [title field of bookinbook-1]},
+ Chapter = {7},
+ Pages = {100-200},
+}
+
+@inbook{inbook-1,
+ Crossref = {book-1},
+ Title = {Macbeth [title field of inbook-1]},
+ Chapter = {7},
+ Pages = {100-200},
+}
+
+@book{book-1,
+ Crossref = {mvbook-1},
+ Date = {1975},
+ Title = {Tragedies [title field of book-1]},
+ Volume = {3}
+}
+
+@mvbook{mvbook-1,
+ Author = {Shakespeare},
+ Date = {1970/1980},
+ Title = {Collected Works [title field of mvbook-1]},
+ Location = {Location},
+ Publisher = {Publisher},
+ Volumes = {4}
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Shakespeare
+ chapter-number: 7
+ container-author:
+ - family: Shakespeare
+ container-title: 'Collected works \[title field of mvbook-1\]'
+ id: 'bookinbook-1'
+ issued: 1975
+ number-of-volumes: 4
+ page: '100-200'
+ publisher: Publisher
+ publisher-place: Location
+ title: 'Macbeth \[title field of bookinbook-1\]'
+ type: chapter
+ volume: 3
+ volume-title: 'Tragedies \[title field of book-1\]'
+- author:
+ - family: Shakespeare
+ chapter-number: 7
+ container-author:
+ - family: Shakespeare
+ container-title: 'Collected works \[title field of mvbook-1\]'
+ id: 'inbook-1'
+ issued: 1975
+ number-of-volumes: 4
+ page: '100-200'
+ publisher: Publisher
+ publisher-place: Location
+ title: 'Macbeth \[title field of inbook-1\]'
+ type: chapter
+ volume: 3
+ volume-title: 'Tragedies \[title field of book-1\]'
+- author:
+ - family: Shakespeare
+ container-author:
+ - family: Shakespeare
+ id: 'book-1'
+ issued: 1975
+ number-of-volumes: 4
+ publisher: Publisher
+ publisher-place: Location
+ title: 'Collected works \[title field of mvbook-1\]'
+ type: book
+ volume: 3
+ volume-title: 'Tragedies \[title field of book-1\]'
+- author:
+ - family: Shakespeare
+ id: 'mvbook-1'
+ issued: 1970/1980
+ number-of-volumes: 4
+ publisher: Publisher
+ publisher-place: Location
+ title: 'Collected works \[title field of mvbook-1\]'
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-ctan.md b/test/command/biblatex-ctan.md
new file mode 100644
index 000000000..d15b47b55
--- /dev/null
+++ b/test/command/biblatex-ctan.md
@@ -0,0 +1,73 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(“CTAN: The Comprehensive TeX Archive Network” 2006)
+
+“CTAN: The Comprehensive TeX Archive Network.” 2006.
+<http://www.ctan.org>.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(“CTAN: The Comprehensive TeX Archive Network,” 2006)
+
+CTAN: The Comprehensive TeX Archive Network. (2006). Retrieved October
+01, 2006, from <http://www.ctan.org>
+
+
+NOTES:
+
+- biblio2yaml
+ - if there is no shorttitle, but title and subtitle, the title alone should also be mapped to title-short
+
+- citeproc
+ - citeproc should use title-short (if available) instead of title for in-text citations when there is no author
+
+}
+
+@Online{ctan,
+ title = {{CTAN}},
+ date = 2006,
+ url = {http://www.ctan.org},
+ subtitle = {{The Comprehensive TeX Archive Network}},
+ urldate = {2006-10-01},
+ label = {CTAN},
+ hyphenation = {american},
+ annotation = {This is an online entry. The \textsc{url}, which is
+ given in the url field, is transformed into a
+ clickable link if hyperref support has been
+ enabled. Note the format of the urldate field
+ (yyyy-mm-dd) in the database file. Also note the
+ label field which may be used as a fallback by
+ citation styles which need an author and\slash or a
+ year},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- accessed: '2006-10-01'
+ annote: 'This is an online entry. The [url]{.smallcaps}, which is
+ given in the url field, is transformed into a clickable link if
+ hyperref support has been enabled. Note the format of the urldate
+ field (yyyy-mm-dd) in the database file. Also note the label field
+ which may be used as a fallback by citation styles which need an
+ author and/or a year'
+ id: ctan
+ issued: 2006
+ language: 'en-US'
+ title: 'CTAN: The Comprehensive TeX Archive Network'
+ title-short: CTAN
+ type: webpage
+ url: 'http://www.ctan.org'
+---
+
+
+```
diff --git a/test/command/biblatex-dates.md b/test/command/biblatex-dates.md
new file mode 100644
index 000000000..cb3c5585a
--- /dev/null
+++ b/test/command/biblatex-dates.md
@@ -0,0 +1,162 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+ - Dates
+ - Not included in tests:
+ - malformed dates and date ranges
+ - literal dates ("13th century"; not supported by biblatex)
+ - seasons (would have to come from parsing the issue field)
+ - uncertain dates (use "doubtfuldate" from biblatex-apa?)
+ - dates with single-digit day or month (not supported by biblatex)
+ - negative dates (not supported by biblatex)
+ - Note: biblatex supports years < 1000 but only if padded with leading zeros
+ - TODO:
+ - either biblio2yaml or, probably better, citeproc should strip leading zeros
+ from days and months (CSL can add leading zeros to its output, but not remove
+ them when they are in its input data)
+}
+
+@article{year-month-old,
+ Author = {Author, Al},
+ Journal = {Journal},
+ Month = aug,
+ Title = {Year and Month, bibtex style, supported by biblatex for backwards compatibility},
+ Year = {1999}}
+
+@article{year-month-new,
+ Author = {Author, Al},
+ Journal = {Journal},
+ Month = {08},
+ Title = {Year and Month, biblatex style; note that biblatex does not have a ``day'' field},
+ Year = {1999}}
+
+@article{dates,
+ Author = {Author, Al},
+ Date = {2012-12-13},
+ Eventdate = {2011-10-03},
+ Journal = {Journal},
+ Month = may,
+ Origdate = {1888-10-01},
+ Title = {Dates, default biblatex style; year, month to be ignored if date exists},
+ Urldate = {1999-05-23},
+ Year = {9999}}
+
+@article{date-ranges-different-years,
+ Author = {Author, Al},
+ Date = {1999-10-14/2010-01-23},
+ Eventdate = {1999-12/2000-01},
+ Journal = {Journal},
+ Origdate = {1888-01-02/1913-12-13},
+ Title = {Date ranges; different years},
+ Urldate = {2012-10-12/2013-01-31}}
+
+@article{date-ranges-same-year,
+ Author = {Author, Al},
+ Date = {1999-10-14/1999-10-15},
+ Eventdate = {1999-10/1999-11},
+ Journal = {Journal},
+ Origdate = {1888-01-02/1888-12-13},
+ Title = {Date ranges; same year},
+ Urldate = {2012-10-31/2012-11-01}}
+
+@article{date-ranges-open,
+ Author = {Author, Al},
+ Date = {1999-10-14/},
+ Eventdate = {1999-10/},
+ Journal = {Journal},
+ Origdate = {1888-01-02/},
+ Title = {Date ranges, open-ended},
+ Urldate = {2012-10-31/}}
+
+@article{dates-very-old,
+ Author = {Author, Al},
+ Date = {0712-12-13},
+ Eventdate = {0311-10-03},
+ Journal = {Journal},
+ Month = may,
+ Origdate = {0088-10-01},
+ Title = {Dates, year less than 1000},
+ Urldate = {0999-12-14}}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Author
+ given: Al
+ container-title: Journal
+ id: 'year-month-old'
+ issued: '1999-08'
+ title: 'Year and month, bibtex style, supported by biblatex for
+ backwards compatibility'
+ type: 'article-journal'
+- author:
+ - family: Author
+ given: Al
+ container-title: Journal
+ id: 'year-month-new'
+ issued: '1999-08'
+ title: 'Year and month, biblatex style; note that biblatex does not
+ have a "day" field'
+ type: 'article-journal'
+- accessed: '1999-05-23'
+ author:
+ - family: Author
+ given: Al
+ container-title: Journal
+ event-date: '2011-10-03'
+ id: dates
+ issued: '2012-12-13'
+ original-date: '1888-10-01'
+ title: 'Dates, default biblatex style; year, month to be ignored if
+ date exists'
+ type: 'article-journal'
+- accessed: '2012-10-12/2013-01-31'
+ author:
+ - family: Author
+ given: Al
+ container-title: Journal
+ event-date: '1999-12/2000-01'
+ id: 'date-ranges-different-years'
+ issued: '1999-10-14/2010-01-23'
+ original-date: '1888-01-02/1913-12-13'
+ title: Date ranges; different years
+ type: 'article-journal'
+- accessed: '2012-10-31/2012-11-01'
+ author:
+ - family: Author
+ given: Al
+ container-title: Journal
+ event-date: '1999-10/1999-11'
+ id: 'date-ranges-same-year'
+ issued: '1999-10-14/1999-10-15'
+ original-date: '1888-01-02/1888-12-13'
+ title: Date ranges; same year
+ type: 'article-journal'
+- accessed: '2012-10-31/'
+ author:
+ - family: Author
+ given: Al
+ container-title: Journal
+ event-date: '1999-10/'
+ id: 'date-ranges-open'
+ issued: '1999-10-14/'
+ original-date: '1888-01-02/'
+ title: 'Date ranges, open-ended'
+ type: 'article-journal'
+- accessed: '0999-12-14'
+ author:
+ - family: Author
+ given: Al
+ container-title: Journal
+ event-date: '0311-10-03'
+ id: 'dates-very-old'
+ issued: '0712-12-13'
+ original-date: '0088-10-01'
+ title: 'Dates, year less than 1000'
+ type: 'article-journal'
+---
+
+
+```
diff --git a/test/command/biblatex-doody.md b/test/command/biblatex-doody.md
new file mode 100644
index 000000000..26e2ac830
--- /dev/null
+++ b/test/command/biblatex-doody.md
@@ -0,0 +1,101 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Doody 1974) (Matuz 1990)
+
+Doody, Terrence. 1974. “Hemingway’s Style and Jake’s Narration.” *The
+Journal of Narrative Technique* 4 (3): 212–225.
+
+Matuz, Roger, ed. 1990. *Contemporary Literary Criticism*. Vol. 61.
+Detroit: Gale.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Doody, 1974) (Matuz, 1990)
+
+Doody, T. (1974). Hemingway’s style and Jake’s narration. *The Journal
+of Narrative Technique*, *4*(3), 212–225.
+
+Matuz, R. (Ed.). (1990). *Contemporary literary criticism* (Vol. 61, pp.
+204–208). Detroit: Gale.
+
+
+NOTES
+
+- biblio2yaml
+ - contains fields “related” and “relatedstring”. In principle, these could be appended to CSL "note", if citeproc can handle citations in the bibliography ...
+
+}
+
+@Article{doody,
+ author = {Doody, Terrence},
+ title = {Hemingway's Style and {Jake}'s Narration},
+ year = 1974,
+ volume = 4,
+ number = 3,
+ pages = {212-225},
+ hyphenation = {american},
+ related = {matuz:doody},
+ relatedstring= {\autocap{e}xcerpt in},
+ journal = {The Journal of Narrative Technique},
+ annotation = {An article entry cited as an excerpt from a
+ collection entry. Note the format of the
+ related and relatedstring fields},
+}
+
+@Collection{matuz:doody,
+ editor = {Matuz, Roger},
+ title = {Contemporary Literary Criticism},
+ year = 1990,
+ volume = 61,
+ publisher = {Gale},
+ location = {Detroit},
+ pages = {204-208},
+ hyphenation = {american},
+ annotation = {A collection entry providing the excerpt information
+ for the doody entry. Note the format of the
+ pages field},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: An article entry cited as an excerpt from a collection entry.
+ Note the format of the related and relatedstring fields
+ author:
+ - family: Doody
+ given: Terrence
+ container-title: The Journal of Narrative Technique
+ id: doody
+ issue: 3
+ issued: 1974
+ language: 'en-US'
+ page: '212-225'
+ title: 'Hemingway''s style and Jake''s narration'
+ type: 'article-journal'
+ volume: 4
+- annote: A collection entry providing the excerpt information for the
+ doody entry. Note the format of the pages field
+ editor:
+ - family: Matuz
+ given: Roger
+ id: 'matuz:doody'
+ issued: 1990
+ language: 'en-US'
+ page: '204-208'
+ publisher: Gale
+ publisher-place: Detroit
+ title: Contemporary literary criticism
+ type: book
+ volume: 61
+---
+
+
+```
diff --git a/test/command/biblatex-edtf-date.md b/test/command/biblatex-edtf-date.md
new file mode 100644
index 000000000..e14a76cb6
--- /dev/null
+++ b/test/command/biblatex-edtf-date.md
@@ -0,0 +1,73 @@
+```
+% pandoc -f biblatex -t markdown -s
+Note that current CSL doesn't give us a way
+to distinguish between /open and /unknown,
+so item3-3 and item3-4 get parsed similarly.
+That should change in CSL 1.1, and then this
+test should be revised.
+
+@article{item3-3, date={1998/unknown}}
+@article{item3-4, date={1999/open}}
+@article{item3-10, date={2004-04-05T14:34:00}}
+@article{item5-1, date={0000}}
+@article{item5-2, date={-0876}}
+@article{item5-3, date={-0877/-0866}}
+@article{item5-5, date={-0343-02}}
+@article{item5-8, date={1723~}}
+@article{item5-9, date={1723?}}
+@article{item5-10, date={1723?~}}
+@article{item5-11, date={2004-22}}
+@article{item5-12, date={2004-24}}
+@article{item5-13, date={20uu}}
+@article{item5-14, date={y-123456789}}
+
+^D
+---
+nocite: '[@*]'
+references:
+- id: 'item3-3'
+ issued: 1998/
+ type: 'article-journal'
+- id: 'item3-4'
+ issued: 1999/
+ type: 'article-journal'
+- id: 'item3-10'
+ issued: '2004-04-05'
+ type: 'article-journal'
+- id: 'item5-1'
+ issued: 0000
+ type: 'article-journal'
+- id: 'item5-2'
+ issued: '-0876'
+ type: 'article-journal'
+- id: 'item5-3'
+ issued: '-0877/-0866'
+ type: 'article-journal'
+- id: 'item5-5'
+ issued: '-0343-02'
+ type: 'article-journal'
+- id: 'item5-8'
+ issued: 1723\~
+ type: 'article-journal'
+- id: 'item5-9'
+ issued: 1723
+ type: 'article-journal'
+- id: 'item5-10'
+ issued: 1723\~
+ type: 'article-journal'
+- id: 'item5-11'
+ issued: '2004-22'
+ type: 'article-journal'
+- id: 'item5-12'
+ issued: '2004-24'
+ type: 'article-journal'
+- id: 'item5-13'
+ issued: 2000/2099
+ type: 'article-journal'
+- id: 'item5-14'
+ issued: 'y-123456789'
+ type: 'article-journal'
+---
+
+
+```
diff --git a/test/command/biblatex-escapedquotes.md b/test/command/biblatex-escapedquotes.md
new file mode 100644
index 000000000..132684adb
--- /dev/null
+++ b/test/command/biblatex-escapedquotes.md
@@ -0,0 +1,51 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{From jgm/pandoc#1568. Double quotes escaped using {"}.}
+
+@ARTICLE{Koff2009-gn,
+ title = "Pan-Canadian evaluation of irreversible compression ratios
+ ({"}lossy{"} compression) for development of national
+ guidelines",
+ author = "Koff, David and Bak, Peter and Brownrigg, Paul and
+ Hosseinzadeh, Danoush and Khademi, April and Kiss, Alex and
+ Lepanto, Luigi and Michalak, Tracy and Shulman, Harry and
+ Volkening, Andrew",
+ affiliation = "Sunnybrook Health Sciences Centre, 2075 Bayview Ave., Toronto,
+ ON, M4N 3M5, Canada. dkoffmcmaster.ca",
+ journal = "Journal of digital imaging",
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Koff
+ given: David
+ - family: Bak
+ given: Peter
+ - family: Brownrigg
+ given: Paul
+ - family: Hosseinzadeh
+ given: Danoush
+ - family: Khademi
+ given: April
+ - family: Kiss
+ given: Alex
+ - family: Lepanto
+ given: Luigi
+ - family: Michalak
+ given: Tracy
+ - family: Shulman
+ given: Harry
+ - family: Volkening
+ given: Andrew
+ container-title: Journal of digital imaging
+ id: 'Koff2009-gn'
+ title: 'Pan-canadian evaluation of irreversible compression ratios
+ (\"lossy\" compression) for development of national guidelines'
+ type: 'article-journal'
+---
+
+
+```
diff --git a/test/command/biblatex-examples.bib b/test/command/biblatex-examples.bib
new file mode 100644
index 000000000..36ac849dd
--- /dev/null
+++ b/test/command/biblatex-examples.bib
@@ -0,0 +1,1674 @@
+@string{anch-ie = {Angew.~Chem. Int.~Ed.}}
+@string{cup = {Cambridge University Press}}
+@string{dtv = {Deutscher Taschenbuch-Verlag}}
+@string{hup = {Harvard University Press}}
+@string{jams = {J.~Amer. Math. Soc.}}
+@string{jchph = {J.~Chem. Phys.}}
+@string{jomch = {J.~Organomet. Chem.}}
+@string{pup = {Princeton University Press}}
+
+@incollection{westfahl:space,
+ author = {Westfahl, Gary},
+ title = {The True Frontier},
+ subtitle = {Confronting and Avoiding the Realities of Space in {American}
+ Science Fiction Films},
+ pages = {55-65},
+ crossref = {westfahl:frontier},
+ langid = {english},
+ langidopts = {variant=american},
+ indextitle = {True Frontier, The},
+ annotation = {A cross-referenced article from a \texttt{collection}. This is
+ an \texttt{incollection} entry with a \texttt{crossref}
+ field. Note the \texttt{subtitle} and \texttt{indextitle}
+ fields},
+}
+
+@set{set,
+ entryset = {herrmann,aksin,yoon},
+ annotation = {A \texttt{set} with three members. The \texttt{crossref} field
+ in the \texttt{@set} entry and the \texttt{entryset} field in
+ each set member entry is needed only when using BibTeX as the
+ backend},
+}
+
+@set{stdmodel,
+ entryset = {glashow,weinberg,salam},
+ annotation = {A \texttt{set} with three members discussing the standard
+ model of particle physics. The \texttt{crossref} field
+ in the \texttt{@set} entry and the \texttt{entryset} field in
+ each set member entry is needed only when using BibTeX as the
+ backend},
+}
+
+@article{aksin,
+ author = {Aks{\i}n, {\"O}zge and T{\"u}rkmen, Hayati and Artok, Levent
+ and {\c{C}}etinkaya, Bekir and Ni, Chaoying and
+ B{\"u}y{\"u}kg{\"u}ng{\"o}r, Orhan and {\"O}zkal, Erhan},
+ title = {Effect of immobilization on catalytic characteristics of
+ saturated {Pd-N}-heterocyclic carbenes in {Mizoroki-Heck}
+ reactions},
+ journaltitle = jomch,
+ date = 2006,
+ volume = 691,
+ number = 13,
+ pages = {3027-3036},
+ indextitle = {Effect of immobilization on catalytic characteristics},
+}
+
+@article{angenendt,
+ author = {Angenendt, Arnold},
+ title = {In Honore Salvatoris~-- Vom Sinn und Unsinn der
+ Patrozinienkunde},
+ journaltitle = {Revue d'Histoire Eccl{\'e}siastique},
+ date = 2002,
+ volume = 97,
+ pages = {431--456, 791--823},
+ langid = {german},
+ indextitle = {In Honore Salvatoris},
+ shorttitle = {In Honore Salvatoris},
+ annotation = {A German article in a French journal. Apart from that, a
+ typical \texttt{article} entry. Note the \texttt{indextitle}
+ field},
+}
+
+@article{baez/article,
+ author = {Baez, John C. and Lauda, Aaron D.},
+ title = {Higher-Dimensional Algebra {V}: 2-Groups},
+ journaltitle = {Theory and Applications of Categories},
+ date = 2004,
+ volume = 12,
+ pages = {423-491},
+ version = 3,
+ eprint = {math/0307200v3},
+ eprinttype = {arxiv},
+ langid = {english},
+ langidopts = {variant=american},
+ annotation = {An \texttt{article} with \texttt{eprint} and
+ \texttt{eprinttype} fields. Note that the arXiv reference is
+ transformed into a clickable link if \texttt{hyperref} support
+ has been enabled. Compare \texttt{baez\slash online}, which
+ is the same item given as an \texttt{online} entry},
+}
+
+@article{bertram,
+ author = {Bertram, Aaron and Wentworth, Richard},
+ title = {Gromov invariants for holomorphic maps on {Riemann} surfaces},
+ journaltitle = jams,
+ date = 1996,
+ volume = 9,
+ number = 2,
+ pages = {529-571},
+ langid = {english},
+ langidopts = {variant=american},
+ shorttitle = {Gromov invariants},
+ annotation = {An \texttt{article} entry with a \texttt{volume} and a
+ \texttt{number} field},
+}
+
+@article{doody,
+ author = {Doody, Terrence},
+ title = {Hemingway's Style and {Jake's} Narration},
+ year = 1974,
+ volume = 4,
+ number = 3,
+ pages = {212-225},
+ langid = {english},
+ langidopts = {variant=american},
+ related = {matuz:doody},
+ relatedstring= {\autocap{e}xcerpt in},
+ journal = {The Journal of Narrative Technique},
+ annotation = {An \texttt{article} entry cited as an excerpt from a
+ \texttt{collection} entry. Note the format of the
+ \texttt{related} and \texttt{relatedstring} fields},
+}
+
+@collection{matuz:doody,
+ editor = {Matuz, Roger},
+ title = {Contemporary Literary Criticism},
+ year = 1990,
+ volume = 61,
+ publisher = {Gale},
+ location = {Detroit},
+ pages = {204-208},
+ langid = {english},
+ langidopts = {variant=american},
+ annotation = {A \texttt{collection} entry providing the excerpt information
+ for the \texttt{doody} entry. Note the format of the
+ \texttt{pages} field},
+}
+
+@article{gillies,
+ author = {Gillies, Alexander},
+ title = {Herder and the Preparation of {Goethe's} Idea of World
+ Literature},
+ journaltitle = {Publications of the English Goethe Society},
+ date = 1933,
+ series = {newseries},
+ volume = 9,
+ pages = {46-67},
+ langid = {english},
+ langidopts = {variant=british},
+ annotation = {An \texttt{article} entry with a \texttt{series} and a
+ \texttt{volume} field. Note that format of the \texttt{series}
+ field in the database file},
+}
+
+@article{glashow,
+ author = {Glashow, Sheldon},
+ title = {Partial Symmetries of Weak Interactions},
+ journaltitle = {Nucl.~Phys.},
+ date = 1961,
+ volume = 22,
+ pages = {579-588},
+}
+
+@article{herrmann,
+ author = {Herrmann, Wolfgang A. and {\"O}fele, Karl and Schneider,
+ Sabine K. and Herdtweck, Eberhardt and Hoffmann, Stephan D.},
+ title = {A carbocyclic carbene as an efficient catalyst ligand for {C--C}
+ coupling reactions},
+ journaltitle = anch-ie,
+ date = 2006,
+ volume = 45,
+ number = 23,
+ pages = {3859-3862},
+ indextitle = {Carbocyclic carbene as an efficient catalyst, A},
+}
+
+@article{kastenholz,
+ author = {Kastenholz, M. A. and H{\"u}nenberger, Philippe H.},
+ title = {Computation of methodology\hyphen independent ionic solvation
+ free energies from molecular simulations},
+ journaltitle = jchph,
+ date = 2006,
+ subtitle = {{I}. {The} electrostatic potential in molecular liquids},
+ volume = 124,
+ eid = 124106,
+ doi = {10.1063/1.2172593},
+ langid = {english},
+ langidopts = {variant=american},
+ indextitle = {Computation of ionic solvation free energies},
+ annotation = {An \texttt{article} entry with an \texttt{eid} and a
+ \texttt{doi} field. Note that the \textsc{doi} is transformed
+ into a clickable link if \texttt{hyperref} support has been
+ enabled},
+ abstract = {The computation of ionic solvation free energies from
+ atomistic simulations is a surprisingly difficult problem that
+ has found no satisfactory solution for more than 15 years. The
+ reason is that the charging free energies evaluated from such
+ simulations are affected by very large errors. One of these is
+ related to the choice of a specific convention for summing up
+ the contributions of solvent charges to the electrostatic
+ potential in the ionic cavity, namely, on the basis of point
+ charges within entire solvent molecules (M scheme) or on the
+ basis of individual point charges (P scheme). The use of an
+ inappropriate convention may lead to a charge-independent
+ offset in the calculated potential, which depends on the
+ details of the summation scheme, on the quadrupole-moment
+ trace of the solvent molecule, and on the approximate form
+ used to represent electrostatic interactions in the
+ system. However, whether the M or P scheme (if any) represents
+ the appropriate convention is still a matter of on-going
+ debate. The goal of the present article is to settle this
+ long-standing controversy by carefully analyzing (both
+ analytically and numerically) the properties of the
+ electrostatic potential in molecular liquids (and inside
+ cavities within them).},
+}
+
+@article{murray,
+ author = {Hostetler, Michael J. and Wingate, Julia E. and Zhong,
+ Chuan-Jian and Harris, Jay E. and Vachet, Richard W. and
+ Clark, Michael R. and Londono, J. David and Green, Stephen
+ J. and Stokes, Jennifer J. and Wignall, George D. and Glish,
+ Gary L. and Porter, Marc D. and Evans, Neal D. and Murray,
+ Royce W.},
+ title = {Alkanethiolate gold cluster molecules with core diameters from
+ 1.5 to 5.2~{nm}},
+ journaltitle = {Langmuir},
+ date = 1998,
+ subtitle = {Core and monolayer properties as a function of core size},
+ volume = 14,
+ number = 1,
+ pages = {17-30},
+ langid = {english},
+ langidopts = {variant=american},
+ indextitle = {Alkanethiolate gold cluster molecules},
+ shorttitle = {Alkanethiolate gold cluster molecules},
+ annotation = {An \texttt{article} entry with \arabic{author} authors. By
+ default, long author and editor lists are automatically
+ truncated. This is configurable},
+}
+
+@article{reese,
+ author = {Reese, Trevor R.},
+ title = {Georgia in {Anglo-Spanish} Diplomacy, 1736--1739},
+ journaltitle = {William and Mary Quarterly},
+ date = 1958,
+ series = 3,
+ volume = 15,
+ pages = {168-190},
+ langid = {english},
+ langidopts = {variant=american},
+ annotation = {An \texttt{article} entry with a \texttt{series} and a
+ \texttt{volume} field. Note the format of the series. If the
+ value of the \texttt{series} field is an integer, this number
+ is printed as an ordinal and the string \enquote*{series} is
+ appended automatically},
+}
+
+@article{sarfraz,
+ author = {M. Sarfraz and M. F. A. Razzak},
+ title = {Technical section: {An} algorithm for automatic capturing of
+ the font outlines},
+ year = 2002,
+ volume = 26,
+ number = 5,
+ pages = {795-804},
+ issn = {0097-8493},
+ journal = {Computers and Graphics},
+ annotation = {An \texttt{article} entry with an \texttt{issn} field},
+}
+
+@article{shore,
+ author = {Shore, Bradd},
+ title = {Twice-Born, Once Conceived},
+ journaltitle = {American Anthropologist},
+ date = {1991-03},
+ subtitle = {Meaning Construction and Cultural Cognition},
+ series = {newseries},
+ volume = 93,
+ number = 1,
+ pages = {9-27},
+ annotation = {An \texttt{article} entry with \texttt{series},
+ \texttt{volume}, and \texttt{number} fields. Note the format
+ of the \texttt{series} which is a localization key},
+}
+
+@article{sigfridsson,
+ author = {Sigfridsson, Emma and Ryde, Ulf},
+ title = {Comparison of methods for deriving atomic charges from the
+ electrostatic potential and moments},
+ journaltitle = {Journal of Computational Chemistry},
+ date = 1998,
+ volume = 19,
+ number = 4,
+ pages = {377-395},
+ doi = {10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P},
+ langid = {english},
+ langidopts = {variant=american},
+ indextitle = {Methods for deriving atomic charges},
+ annotation = {An \texttt{article} entry with \texttt{volume},
+ \texttt{number}, and \texttt{doi} fields. Note that the
+ \textsc{doi} is transformed into a clickable link if
+ \texttt{hyperref} support has been enabled},
+ abstract = {Four methods for deriving partial atomic charges from the
+ quantum chemical electrostatic potential (CHELP, CHELPG,
+ Merz-Kollman, and RESP) have been compared and critically
+ evaluated. It is shown that charges strongly depend on how and
+ where the potential points are selected. Two alternative
+ methods are suggested to avoid the arbitrariness in the
+ point-selection schemes and van der Waals exclusion radii:
+ CHELP-BOW, which also estimates the charges from the
+ electrostatic potential, but with potential points that are
+ Boltzmann-weighted after their occurrence in actual
+ simulations using the energy function of the program in which
+ the charges will be used, and CHELMO, which estimates the
+ charges directly from the electrostatic multipole
+ moments. Different criteria for the quality of the charges are
+ discussed.},
+}
+
+@article{spiegelberg,
+ author = {Spiegelberg, Herbert},
+ title = {\mkbibquote{Intention} und \mkbibquote{Intentionalit{\"a}t} in
+ der Scholastik, bei Brentano und Husserl},
+ journaltitle = {Studia Philosophica},
+ date = 1969,
+ volume = 29,
+ pages = {189-216},
+ langid = {german},
+ sorttitle = {Intention und Intentionalitat in der Scholastik, bei Brentano
+ und Husserl},
+ indexsorttitle= {Intention und Intentionalitat in der Scholastik, bei Brentano
+ und Husserl},
+ shorttitle = {Intention und Intentionalit{\"a}t},
+ annotation = {An \texttt{article} entry. Note the \texttt{sorttitle} and
+ \texttt{indexsorttitle} fields and the markup of the quotes in
+ the database file},
+}
+
+@article{springer,
+ author = {Springer, Otto},
+ title = {Mediaeval Pilgrim Routes from {Scandinavia} to {Rome}},
+ journaltitle = {Mediaeval Studies},
+ date = 1950,
+ volume = 12,
+ pages = {92-122},
+ langid = {english},
+ langidopts = {variant=british},
+ shorttitle = {Mediaeval Pilgrim Routes},
+ annotation = {A plain \texttt{article} entry},
+}
+
+@article{weinberg,
+ author = {Weinberg, Steven},
+ title = {A Model of Leptons},
+ journaltitle = {Phys.~Rev.~Lett.},
+ date = 1967,
+ volume = 19,
+ pages = {1264-1266},
+}
+
+@article{yoon,
+ author = {Yoon, Myeong S. and Ryu, Dowook and Kim, Jeongryul and Ahn,
+ Kyo Han},
+ title = {Palladium pincer complexes with reduced bond angle strain:
+ efficient catalysts for the {Heck} reaction},
+ journaltitle = {Organometallics},
+ date = 2006,
+ volume = 25,
+ number = 10,
+ pages = {2409-2411},
+ indextitle = {Palladium pincer complexes},
+}
+
+@book{aristotle:anima,
+ author = {Aristotle},
+ title = {De Anima},
+ date = 1907,
+ editor = {Hicks, Robert Drew},
+ publisher = cup,
+ location = {Cambridge},
+ keywords = {primary},
+ langid = {english},
+ langidopts = {variant=british},
+ annotation = {A \texttt{book} entry with an \texttt{author} and an
+ \texttt{editor}},
+}
+
+@book{aristotle:physics,
+ author = {Aristotle},
+ title = {Physics},
+ date = 1929,
+ translator = {Wicksteed, P. H. and Cornford, F. M.},
+ publisher = {G. P. Putnam},
+ location = {New York},
+ keywords = {primary},
+ langid = {english},
+ langidopts = {variant=american},
+ shorttitle = {Physics},
+ annotation = {A \texttt{book} entry with a \texttt{translator} field},
+}
+
+@book{aristotle:poetics,
+ author = {Aristotle},
+ title = {Poetics},
+ date = 1968,
+ editor = {Lucas, D. W.},
+ series = {Clarendon {Aristotle}},
+ publisher = {Clarendon Press},
+ location = {Oxford},
+ keywords = {primary},
+ langid = {english},
+ langidopts = {variant=british},
+ shorttitle = {Poetics},
+ annotation = {A \texttt{book} entry with an \texttt{author} and an
+ \texttt{editor} as well as a \texttt{series} field},
+}
+
+@book{aristotle:rhetoric,
+ author = {Aristotle},
+ title = {The Rhetoric of {Aristotle} with a commentary by the late {Edward
+ Meredith Cope}},
+ date = 1877,
+ editor = {Cope, Edward Meredith},
+ commentator = {Cope, Edward Meredith},
+ volumes = 3,
+ publisher = cup,
+ keywords = {primary},
+ langid = {english},
+ langidopts = {variant=british},
+ sorttitle = {Rhetoric of Aristotle},
+ indextitle = {Rhetoric of {Aristotle}, The},
+ shorttitle = {Rhetoric},
+ annotation = {A commented edition. Note the concatenation of the
+ \texttt{editor} and \texttt{commentator} fields as well as the
+ \texttt{volumes}, \texttt{sorttitle}, and \texttt{indextitle}
+ fields},
+}
+
+@book{augustine,
+ author = {Augustine, Robert L.},
+ title = {Heterogeneous catalysis for the synthetic chemist},
+ date = 1995,
+ publisher = {Marcel Dekker},
+ location = {New York},
+ langid = {english},
+ langidopts = {variant=american},
+ shorttitle = {Heterogeneous catalysis},
+ annotation = {A plain \texttt{book} entry},
+}
+
+@book{averroes/bland,
+ author = {Averroes},
+ title = {The Epistle on the Possibility of Conjunction with the Active
+ Intellect by {Ibn Rushd} with the Commentary of {Moses Narboni}},
+ date = 1982,
+ editor = {Bland, Kalman P.},
+ translator = {Bland, Kalman P.},
+ series = {Moreshet: Studies in {Jewish} History, Literature and Thought},
+ number = 7,
+ publisher = {Jewish Theological Seminary of America},
+ location = {New York},
+ keywords = {primary},
+ langid = {english},
+ langidopts = {variant=american},
+ indextitle = {Epistle on the Possibility of Conjunction, The},
+ shorttitle = {Possibility of Conjunction},
+ annotation = {A \texttt{book} entry with a \texttt{series} and a
+ \texttt{number}. Note the concatenation of the \texttt{editor}
+ and \texttt{translator} fields as well as the
+ \texttt{indextitle} field},
+}
+
+@book{averroes/hannes,
+ author = {Averroes},
+ title = {Des Averro{\"e}s Abhandlung: \mkbibquote{{\"U}ber die
+ M{\"o}glichkeit der Conjunktion} oder \mkbibquote{{\"U}ber den
+ materiellen Intellekt}},
+ date = 1892,
+ editor = {Hannes, Ludwig},
+ translator = {Hannes, Ludwig},
+ annotator = {Hannes, Ludwig},
+ publisher = {C.~A. Kaemmerer},
+ location = {Halle an der Saale},
+ keywords = {primary},
+ langid = {german},
+ sorttitle = {Uber die Moglichkeit der Conjunktion},
+ indexsorttitle= {Uber die Moglichkeit der Conjunktion},
+ indextitle = {{\"U}ber die M{\"o}glichkeit der Conjunktion},
+ shorttitle = {{\"U}ber die M{\"o}glichkeit der Conjunktion},
+ annotation = {An annotated edition. Note the concatenation of the
+ \texttt{editor}, \texttt{translator}, and \texttt{annotator}
+ fields. Also note the \texttt{shorttitle},
+ \texttt{indextitle}, \texttt{sorttitle}, and
+ \texttt{indexsorttitle} fields},
+}
+
+@book{averroes/hercz,
+ author = {Averroes},
+ title = {Drei Abhandlungen {\"u}ber die Conjunction des separaten
+ Intellects mit dem Menschen},
+ date = 1869,
+ editor = {Hercz, J.},
+ translator = {Hercz, J.},
+ publisher = {S.~Hermann},
+ location = {Berlin},
+ keywords = {primary},
+ langid = {german},
+ indexsorttitle= {Drei Abhandlungen uber die Conjunction},
+ indextitle = {Drei Abhandlungen {\"u}ber die Conjunction},
+ subtitle = {Von Averroes (Vater und Sohn), aus dem Arabischen
+ {\"u}bersetzt von Samuel Ibn Tibbon},
+ shorttitle = {Drei Abhandlungen},
+ annotation = {A \texttt{book} entry. Note the concatenation of the
+ \texttt{editor} and \texttt{translator} fields as well as the
+ \texttt{indextitle} and \texttt{indexsorttitle} fields},
+}
+
+@book{cicero,
+ author = {Cicero, Marcus Tullius},
+ title = {De natura deorum. {\"U}ber das Wesen der G{\"o}tter},
+ date = 1995,
+ editor = {Blank-Sangmeister, Ursula},
+ translator = {Blank-Sangmeister, Ursula},
+ afterword = {Thraede, Klaus},
+ language = {langlatin and langgerman},
+ publisher = {Reclam},
+ location = {Stuttgart},
+ langid = {german},
+ indextitle = {De natura deorum},
+ shorttitle = {De natura deorum},
+ annotation = {A bilingual edition of Cicero's \emph{De natura deorum}, with
+ a German translation. Note the format of the \texttt{language}
+ field in the database file, the concatenation of the
+ \texttt{editor} and \texttt{translator} fields, and the
+ \texttt{afterword} field},
+}
+
+@book{coleridge,
+ author = {Coleridge, Samuel Taylor},
+ title = {Biographia literaria, or {Biographical} sketches of my literary
+ life and opinions},
+ date = 1983,
+ editor = {Coburn, Kathleen and Engell, James and Bate, W. Jackson},
+ maintitle = {The collected works of {Samuel Taylor Coleridge}},
+ volume = 7,
+ part = 2,
+ series = {Bollingen Series},
+ number = 75,
+ publisher = {Routledge {and} Kegan Paul},
+ location = {London},
+ langid = {english},
+ langidopts = {variant=british},
+ indextitle = {Biographia literaria},
+ shorttitle = {Biographia literaria},
+ annotation = {One (partial) volume of a multivolume book. This is a
+ \texttt{book} entry with a \texttt{volume} and a \texttt{part}
+ field which explicitly refers to the second (physical) part of
+ the seventh (logical) volume. Also note the \texttt{series}
+ and \texttt{number} fields},
+}
+
+@book{companion,
+ author = {Goossens, Michel and Mittelbach, Frank and Samarin, Alexander},
+ title = {The {LaTeX} Companion},
+ date = 1994,
+ edition = 1,
+ publisher = {Addison-Wesley},
+ location = {Reading, Mass.},
+ pagetotal = 528,
+ langid = {english},
+ langidopts = {variant=american},
+ sorttitle = {LaTeX Companion},
+ indextitle = {LaTeX Companion, The},
+ shorttitle = {LaTeX Companion},
+ annotation = {A book with three authors. Note the formatting of the author
+ list. By default, only the first name is reversed in the
+ bibliography},
+}
+
+@book{cotton,
+ author = {Cotton, Frank Albert and Wilkinson, Geoffrey and Murillio,
+ Carlos A. and Bochmann, Manfred},
+ title = {Advanced inorganic chemistry},
+ date = 1999,
+ edition = 6,
+ publisher = {Wiley},
+ location = {Chichester},
+ langid = {english},
+ langidopts = {variant=british},
+ annotation = {A \texttt{book} entry with \arabic{author} authors and an
+ \texttt{edition} field. By default, long \texttt{author} and
+ \texttt{editor} lists are automatically truncated. This is
+ configurable},
+}
+
+@book{gerhardt,
+ author = {Gerhardt, Michael J.},
+ title = {The Federal Appointments Process},
+ date = 2000,
+ publisher = {Duke University Press},
+ location = {Durham and London},
+ langid = {english},
+ langidopts = {variant=american},
+ sorttitle = {Federal Appointments Process},
+ indextitle = {Federal Appointments Process, The},
+ subtitle = {A Constitutional and Historical Analysis},
+ shorttitle = {Federal Appointments Process},
+ annotation = {This is a \texttt{book} entry. Note the format of the
+ \texttt{location} field as well as the \texttt{sorttitle} and
+ \texttt{indextitle} fields},
+}
+
+@book{gonzalez,
+ author = {Gonzalez, Ray},
+ title = {The Ghost of {John Wayne} and Other Stories},
+ date = 2001,
+ publisher = {The University of Arizona Press},
+ location = {Tucson},
+ isbn = {0-816-52066-6},
+ langid = {english},
+ langidopts = {variant=american},
+ sorttitle = {Ghost of John Wayne and Other Stories},
+ indextitle = {Ghost of {John Wayne} and Other Stories, The},
+ shorttitle = {Ghost of {John Wayne}},
+ annotation = {A collection of short stories. This is a \texttt{book} entry.
+ Note the \texttt{sorttitle} and \texttt{indextitle} fields in
+ the database file. There's also an \texttt{isbn} field},
+}
+
+@book{hammond,
+ author = {Hammond, Christopher},
+ title = {The basics of crystallography and diffraction},
+ date = 1997,
+ publisher = {International Union of Crystallography and Oxford University
+ Press},
+ location = {Oxford},
+ langid = {english},
+ langidopts = {variant=british},
+ sorttitle = {Basics of crystallography and diffraction},
+ indextitle = {Basics of crystallography and diffraction, The},
+ shorttitle = {Crystallography and diffraction},
+ annotation = {A \texttt{book} entry. Note the \texttt{sorttitle} and
+ \texttt{indextitle} fields as well as the format of the
+ \texttt{publisher} field},
+}
+
+@book{iliad,
+ author = {Homer},
+ title = {Die Ilias},
+ date = 2004,
+ translator = {Schadewaldt, Wolfgang},
+ introduction = {Latacz, Joachim},
+ edition = 3,
+ publisher = {Artemis \& Winkler},
+ location = {D{\"u}sseldorf and Z{\"u}rich},
+ langid = {german},
+ sorttitle = {Ilias},
+ indextitle = {Ilias, Die},
+ shorttitle = {Ilias},
+ annotation = {A German translation of the \emph{Iliad}. Note the
+ \texttt{translator} and \texttt{introduction} fields and the
+ format of the \texttt{location} field in the database
+ file. Also note the \texttt{sorttitle} and \texttt{indextitle}
+ fields},
+}
+
+@book{knuth:ct,
+ author = {Knuth, Donald E.},
+ title = {Computers \& Typesetting},
+ date = {1984/1986},
+ volumes = 5,
+ publisher = {Addison-Wesley},
+ location = {Reading, Mass.},
+ langid = {english},
+ langidopts = {variant=american},
+ sortyear = {1984-0},
+ sorttitle = {Computers & Typesetting},
+ indexsorttitle= {Computers & Typesetting},
+ annotation = {A five-volume book cited as a whole. This is a \texttt{book}
+ entry, note the \texttt{volumes} field},
+}
+
+@book{knuth:ct:a,
+ author = {Knuth, Donald E.},
+ title = {The {\TeX} book},
+ date = 1984,
+ maintitle = {Computers \& Typesetting},
+ volume = {A},
+ publisher = {Addison-Wesley},
+ location = {Reading, Mass.},
+ langid = {english},
+ langidopts = {variant=american},
+ sortyear = {1984-1},
+ sorttitle = {Computers & Typesetting A},
+ indexsorttitle= {The TeXbook},
+ indextitle = {\protect\TeX book, The},
+ shorttitle = {\TeX book},
+ annotation = {The first volume of a five-volume book. Note the
+ \texttt{sorttitle} and \texttt{sortyear} fields. We want this
+ volume to be listed after the entry referring to the entire
+ five-volume set. Also note the \texttt{indextitle} and
+ \texttt{indexsorttitle} fields. Indexing packages that don't
+ generate robust index entries require some control sequences
+ to be protected from expansion},
+}
+
+@book{knuth:ct:b,
+ author = {Knuth, Donald E.},
+ title = {\TeX: The Program},
+ date = 1986,
+ maintitle = {Computers \& Typesetting},
+ volume = {B},
+ publisher = {Addison-Wesley},
+ location = {Reading, Mass.},
+ langid = {english},
+ langidopts = {variant=american},
+ sortyear = {1986-1},
+ sorttitle = {Computers & Typesetting B},
+ indexsorttitle= {TeX: The Program},
+ shorttitle = {\TeX},
+ annotation = {The second volume of a five-volume book. Note the
+ \texttt{sorttitle} and \texttt{sortyear} fields. Also note the
+ \texttt{indexsorttitle} field},
+}
+
+@book{knuth:ct:c,
+ author = {Knuth, Donald E.},
+ title = {The {METAFONTbook}},
+ date = 1986,
+ maintitle = {Computers \& Typesetting},
+ volume = {C},
+ publisher = {Addison-Wesley},
+ location = {Reading, Mass.},
+ langid = {english},
+ langidopts = {variant=american},
+ sortyear = {1986-2},
+ sorttitle = {Computers & Typesetting C},
+ indextitle = {METAFONTbook, The},
+ shorttitle = {METAFONTbook},
+ annotation = {The third volume of a five-volume book. Note the
+ \texttt{sorttitle} and \texttt{sortyear} fields as well as the
+ \texttt{indextitle} field},
+}
+
+@book{knuth:ct:d,
+ author = {Knuth, Donald E.},
+ title = {METAFONT: The Program},
+ date = 1986,
+ maintitle = {Computers \& Typesetting},
+ volume = {D},
+ publisher = {Addison-Wesley},
+ location = {Reading, Mass.},
+ langid = {english},
+ langidopts = {variant=american},
+ sortyear = {1986-3},
+ sorttitle = {Computers & Typesetting D},
+ shorttitle = {METAFONT},
+ annotation = {The fourth volume of a five-volume book. Note the
+ \texttt{sorttitle} and \texttt{sortyear} fields},
+}
+
+@book{knuth:ct:e,
+ author = {Knuth, Donald E.},
+ title = {{Computer Modern} Typefaces},
+ date = 1986,
+ maintitle = {Computers \& Typesetting},
+ volume = {E},
+ publisher = {Addison-Wesley},
+ location = {Reading, Mass.},
+ langid = {english},
+ langidopts = {variant=american},
+ sortyear = {1986-4},
+ sorttitle = {Computers & Typesetting E},
+ annotation = {The fifth volume of a five-volume book. Note the
+ \texttt{sorttitle} and \texttt{sortyear} fields},
+}
+
+@book{knuth:ct:related,
+ author = {Knuth, Donald E.},
+ title = {Computers \& Typesetting},
+ date = {1984/1986},
+ volumes = 5,
+ publisher = {Addison-Wesley},
+ location = {Reading, Mass.},
+ langid = {english},
+ langidopts = {variant=american},
+ sortyear = {1984-0},
+ sorttitle = {Computers & Typesetting},
+ indexsorttitle= {Computers & Typesetting},
+ related = {knuth:ct:a,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e},
+ relatedtype = {multivolume},
+ annotation = {A five-volume book cited as a whole and related to its
+ individual volumes. Note the \texttt{related} and
+ \texttt{relatedtype} fields},
+}
+
+@book{kullback,
+ author = {Kullback, Solomon},
+ title = {Information Theory and Statistics},
+ year = 1959,
+ publisher = {John Wiley \& Sons},
+ location = {New York},
+ langid = {english},
+ langidopts = {variant=american},
+}
+
+@book{kullback:reprint,
+ author = {Kullback, Solomon},
+ title = {Information Theory and Statistics},
+ year = 1997,
+ publisher = {Dover Publications},
+ location = {New York},
+ origyear = 1959,
+ origpublisher= {John Wiley \& Sons},
+ langid = {english},
+ langidopts = {variant=american},
+ annotation = {A reprint of the \texttt{kullback} entry. Note the format of
+ \texttt{origyear} and \texttt{origpublisher}. These fields are
+ not used by the standard bibliography styles},
+}
+
+@book{kullback:related,
+ author = {Kullback, Solomon},
+ title = {Information Theory and Statistics},
+ year = 1997,
+ publisher = {Dover Publications},
+ location = {New York},
+ langid = {english},
+ langidopts = {variant=american},
+ related = {kullback},
+ relatedtype = {origpubin},
+ annotation = {A reprint of the \texttt{kullback} entry. Note the format of
+ the \texttt{related} and \texttt{relatedtype} fields},
+}
+
+@book{malinowski,
+ author = {Malinowski, Bronis{\l}aw},
+ title = {Argonauts of the {Western Pacific}},
+ date = 1972,
+ edition = 8,
+ publisher = {Routledge {and} Kegan Paul},
+ location = {London},
+ langid = {english},
+ langidopts = {variant=british},
+ subtitle = {An account of native enterprise and adventure in the
+ Archipelagoes of {Melanesian New Guinea}},
+ shorttitle = {Argonauts},
+ annotation = {This is a \texttt{book} entry. Note the format of the
+ \texttt{publisher} and \texttt{edition} fields as well as the
+ \texttt{subtitle} field},
+}
+
+@book{maron,
+ author = {Maron, Monika},
+ title = {Animal Triste},
+ date = 2000,
+ translator = {Brigitte Goldstein},
+ origlanguage = {german},
+ publisher = {University of Nebraska Press},
+ location = {Lincoln},
+ langid = {english},
+ langidopts = {variant=american},
+ shorttitle = {Animal Triste},
+ annotation = {An English translation of a German novel with a French title.
+ In other words: a \texttt{book} entry with a
+ \texttt{translator} field. Note the \texttt{origlanguage}
+ field which is concatenated with the \texttt{translator}},
+}
+
+@book{massa,
+ author = {Werner Massa},
+ title = {Crystal structure determination},
+ date = 2004,
+ edition = 2,
+ publisher = {Spinger},
+ location = {Berlin},
+ langid = {english},
+ langidopts = {variant=british},
+ annotation = {A \texttt{book} entry with an \texttt{edition} field},
+}
+
+@article{moore,
+ author = {Moore, Gordon E.},
+ title = {Cramming more components onto integrated circuits},
+ journaltitle = {Electronics},
+ year = 1965,
+ volume = 38,
+ number = 8,
+ pages = {114-117},
+ langid = {english},
+ langidopts = {variant=american},
+}
+
+@article{moore:related,
+ author = {Moore, Gordon E.},
+ title = {Cramming more components onto integrated circuits},
+ journaltitle = {Proceedings of the {IEEE}},
+ year = 1998,
+ volume = 86,
+ number = 1,
+ pages = {82-85},
+ langid = {english},
+ langidopts = {variant=american},
+ related = {moore},
+ relatedtype = {reprintfrom},
+ annotation = {A reprint of Moore's law. Note the \texttt{related} and
+ \texttt{relatedtype} fields},
+}
+
+@book{nietzsche:ksa,
+ author = {Nietzsche, Friedrich},
+ title = {S{\"a}mtliche Werke},
+ date = 1988,
+ editor = {Colli, Giorgio and Montinari, Mazzino},
+ edition = 2,
+ volumes = 15,
+ publisher = dtv # { and Walter de Gruyter},
+ location = {M{\"u}nchen and Berlin and New York},
+ langid = {german},
+ sortyear = {1988-0},
+ sorttitle = {Werke-00-000},
+ indexsorttitle= {Samtliche Werke},
+ subtitle = {Kritische Studienausgabe},
+ annotation = {The critical edition of Nietzsche's works. This is a
+ \texttt{book} entry referring to a 15-volume work as a
+ whole. Note the \texttt{volumes} field and the format of the
+ \texttt{publisher} and \texttt{location} fields in the
+ database file. Also note the \texttt{sorttitle} and
+ \texttt{sortyear} fields which are used to fine-tune the
+ sorting order of the bibliography. We want this item listed
+ first in the bibliography},
+}
+
+@book{nietzsche:ksa1,
+ author = {Nietzsche, Friedrich},
+ title = {Die Geburt der Trag{\"o}die. Unzeitgem{\"a}{\ss}e
+ Betrachtungen I--IV. Nachgelassene Schriften 1870--1973},
+ date = 1988,
+ editor = {Colli, Giorgio and Montinari, Mazzino},
+ maintitle = {S{\"a}mtliche Werke},
+ mainsubtitle = {Kritische Studienausgabe},
+ volume = 1,
+ edition = 2,
+ publisher = dtv # { and Walter de Gruyter},
+ location = {M{\"u}nchen and Berlin and New York},
+ langid = {german},
+ sortyear = {1988-1},
+ sorttitle = {Werke-01-000},
+ indexsorttitle= {Samtliche Werke I},
+ bookauthor = {Nietzsche, Friedrich},
+ indextitle = {S{\"a}mtliche Werke I},
+ shorttitle = {S{\"a}mtliche Werke I},
+ annotation = {A single volume from the critical edition of Nietzsche's
+ works. This \texttt{book} entry explicitly refers to the first
+ volume only. Note the \texttt{title} and \texttt{maintitle}
+ fields. Also note the \texttt{sorttitle} and \texttt{sortyear}
+ fields. We want this entry to be listed after the entry
+ referring to the entire edition},
+}
+
+@book{nussbaum,
+ author = {Nussbaum, Martha},
+ title = {Aristotle's \mkbibquote{De Motu Animalium}},
+ date = 1978,
+ publisher = pup,
+ location = {Princeton},
+ keywords = {secondary},
+ langid = {english},
+ langidopts = {variant=american},
+ sorttitle = {Aristotle's De Motu Animalium},
+ indexsorttitle= {Aristotle's De Motu Animalium},
+ annotation = {A \texttt{book} entry. Note the \texttt{sorttitle} and
+ \texttt{indexsorttitle} fields and the markup of the quotes in
+ the database file},
+}
+
+@book{piccato,
+ author = {Piccato, Pablo},
+ title = {City of Suspects},
+ date = 2001,
+ publisher = {Duke University Press},
+ location = {Durham and London},
+ langid = {english},
+ langidopts = {variant=american},
+ subtitle = {Crime in {Mexico City}, 1900--1931},
+ shorttitle = {City of Suspects},
+ annotation = {This is a \texttt{book} entry. Note the format of the
+ \texttt{location} field in the database file},
+}
+
+@book{vangennep,
+ author = {van Gennep, Arnold},
+ title = {Les rites de passage},
+ date = 1909,
+ publisher = {Nourry},
+ location = {Paris},
+ options = {useprefix},
+ langid = {french},
+ sorttitle = {Rites de passage},
+ indextitle = {Rites de passage, Les},
+ shorttitle = {Rites de passage},
+ annotation = {A \texttt{book} entry. Note the format of the printed name and
+ compare the \texttt{useprefix} option in the \texttt{options}
+ field as well as \texttt{brandt} and \texttt{geer}},
+}
+
+@book{vangennep:trans,
+ author = {van Gennep, Arnold},
+ title = {The Rites of Passage},
+ year = 1960,
+ translator = {Vizedom, Monika B. and Caffee, Gabrielle L.},
+ language = {english},
+ origlanguage = {french},
+ publisher = {University of Chicago Press},
+ options = {useprefix},
+ indextitle = {Rites of Passage, The},
+ sorttitle = {Rites of Passage},
+ shorttitle = {Rites of Passage},
+ langid = {english},
+ langidopts = {variant=american},
+ annotation = {A translation of the \texttt{vangennep} entry. Note the
+ \texttt{translator} and \texttt{origlanguage} fields. Compare
+ with the \texttt{vangennep:related} entry.},
+}
+
+@book{vangennep:related,
+ author = {van Gennep, Arnold},
+ title = {Les rites de passage},
+ date = 1909,
+ publisher = {Nourry},
+ location = {Paris},
+ options = {useprefix},
+ langid = {french},
+ related = {vizedom:related},
+ relatedtype = {bytranslator},
+ sorttitle = {Rites de passage},
+ indextitle = {Rites de passage, Les},
+ shorttitle = {Rites de passage},
+ annotation = {A variant of the \texttt{vangennep} entry related to its
+ translation. Note the format of the \texttt{related} and
+ \texttt{relatedtype} fields},
+}
+
+@book{vizedom:related,
+ title = {The Rites of Passage},
+ year = 1960,
+ translator = {Vizedom, Monika B. and Caffee, Gabrielle L.},
+ language = {english},
+ publisher = {University of Chicago Press},
+ langid = {english},
+ langidopts = {variant=american},
+ options = {usetranslator},
+ related = {vangennep},
+ relatedtype = {translationof},
+ indextitle = {Rites of Passage, The},
+ sorttitle = {Rites of Passage},
+ shorttitle = {Rites of Passage},
+ annotation = {A translated work from \texttt{vangennep}. Note the format of
+ the \texttt{related} and \texttt{relatedtype} fields},
+}
+
+@book{vazques-de-parga,
+ author = {V{\'a}zques{ de }Parga, Luis and Lacarra, Jos{\'e} Mar{\'i}a
+ and Ur{\'i}a R{\'i}u, Juan},
+ title = {Las Peregrinaciones a Santiago de Compostela},
+ date = 1993,
+ volumes = 3,
+ note = {Ed. facs. de la realizada en 1948--49},
+ publisher = {Iberdrola},
+ location = {Pamplona},
+ langid = {spanish},
+ sorttitle = {Peregrinaciones a Santiago de Compostela},
+ indextitle = {Peregrinaciones a Santiago de Compostela, Las},
+ shorttitle = {Peregrinaciones},
+ annotation = {A multivolume book cited as a whole. This is a \texttt{book}
+ entry with \texttt{volumes}, \texttt{note},
+ \texttt{sorttitle}, and \texttt{indextitle} fields},
+}
+
+@book{wilde,
+ author = {Wilde, Oscar},
+ title = {The Importance of Being Earnest: A Trivial Comedy for Serious
+ People},
+ year = 1899,
+ series = {English and {American} drama of the Nineteenth Century},
+ publisher = {Leonard Smithers {and} Company},
+ eprint = {4HIWAAAAYAAJ},
+ eprinttype = {googlebooks},
+ annotation = {A \texttt{book} with \texttt{eprint} and \texttt{eprinttype}
+ fields.},
+}
+
+@book{worman,
+ author = {Worman, Nancy},
+ title = {The Cast of Character},
+ date = 2002,
+ publisher = {University of Texas Press},
+ location = {Austin},
+ langid = {english},
+ langidopts = {variant=american},
+ sorttitle = {Cast of Character},
+ indextitle = {Cast of Character, The},
+ subtitle = {Style in {Greek} Literature},
+ shorttitle = {Cast of Character},
+ annotation = {A \texttt{book} entry. Note the \texttt{sorttitle} and
+ \texttt{indextitle} fields},
+}
+
+@collection{britannica,
+ editor = {Preece, Warren E.},
+ title = {The {New Encyclop{\ae}dia Britannica}},
+ date = 2003,
+ edition = 15,
+ volumes = 32,
+ publisher = {Encyclop{\ae}dia Britannica},
+ location = {Chicago, Ill.},
+ options = {useeditor=false},
+ label = {EB},
+ langid = {english},
+ langidopts = {variant=british},
+ sorttitle = {Encyclop{\ae}dia Britannica},
+ indextitle = {{Encyclop{\ae}dia Britannica}, The {New}},
+ shorttitle = {{Encyclop{\ae}dia Britannica}},
+ annotation = {This is a \texttt{collection} entry for an encyclopedia. Note
+ the \texttt{useeditor} option in the \texttt{options} field as
+ well as the \texttt{sorttitle} field. We want this entry to be
+ cited and alphabetized by title even though there is an
+ editor. In addition to that, we want the title to be
+ alphabetized under \enquote*{E} rather than \enquote*{T}. Also
+ note the \texttt{label} field which is provided for
+ author-year citation styles},
+}
+
+@collection{gaonkar,
+ editor = {Gaonkar, Dilip Parameshwar},
+ title = {Alternative Modernities},
+ date = 2001,
+ publisher = {Duke University Press},
+ location = {Durham and London},
+ isbn = {0-822-32714-7},
+ langid = {english},
+ langidopts = {variant=american},
+ annotation = {This is a \texttt{collection} entry. Note the format of the
+ \texttt{location} field in the database file as well as the
+ \texttt{isbn} field},
+}
+
+@InCollection{gaonkar:in,
+ author = {Gaonkar, Dilip Parameshwar},
+ editor = {Gaonkar, Dilip Parameshwar},
+ title = {On Alternative Modernities},
+ date = 2001,
+ booktitle = {Alternative Modernities},
+ publisher = {Duke University Press},
+ location = {Durham and London},
+ isbn = {0-822-32714-7},
+ pages = {1-23},
+}
+
+@collection{jaffe,
+ editor = {Jaff{\'e}, Philipp},
+ title = {Regesta Pontificum Romanorum ab condita ecclesia ad annum post
+ Christum natum \textsc{mcxcviii}},
+ date = {1885/1888},
+ editora = {Loewenfeld, Samuel and Kaltenbrunner, Ferdinand and Ewald,
+ Paul},
+ edition = 2,
+ volumes = 2,
+ location = {Leipzig},
+ langid = {latin},
+ editoratype = {redactor},
+ indextitle = {Regesta Pontificum Romanorum},
+ shorttitle = {Regesta Pontificum Romanorum},
+ annotation = {A \texttt{collection} entry with \texttt{edition} and
+ \texttt{volumes} fields. Note the \texttt{editora} and
+ \texttt{editoratype} fields},
+}
+
+@collection{westfahl:frontier,
+ editor = {Westfahl, Gary},
+ title = {Space and Beyond},
+ date = 2000,
+ subtitle = {The Frontier Theme in Science Fiction},
+ publisher = {Greenwood},
+ location = {Westport, Conn. and London},
+ langid = {english},
+ langidopts = {variant=american},
+ booktitle = {Space and Beyond},
+ booksubtitle = {The Frontier Theme in Science Fiction},
+ annotation = {This is a \texttt{collection} entry. Note the format of the
+ \texttt{location} field as well as the \texttt{subtitle} and
+ \texttt{booksubtitle} fields},
+}
+
+@inbook{kant:kpv,
+ title = {Kritik der praktischen Vernunft},
+ date = 1968,
+ author = {Kant, Immanuel},
+ booktitle = {Kritik der praktischen Vernunft. Kritik der Urtheilskraft},
+ bookauthor = {Kant, Immanuel},
+ maintitle = {Kants Werke. Akademie Textausgabe},
+ volume = 5,
+ publisher = {Walter de Gruyter},
+ location = {Berlin},
+ pages = {1-163},
+ shorthand = {KpV},
+ langid = {german},
+ shorttitle = {Kritik der praktischen Vernunft},
+ annotation = {An edition of Kant's \emph{Collected Works}, volume five. This
+ is an \texttt{inbook} entry which explicitly refers to the
+ \emph{Critique of Practical Reason} only, not to the entire
+ fifth volume. Note the \texttt{author} and \texttt{bookauthor}
+ fields in the database file. By default, the
+ \texttt{bookauthor} is omitted if the values of the
+ \texttt{author} and \texttt{bookauthor} fields are identical},
+}
+
+@inbook{kant:ku,
+ title = {Kritik der Urtheilskraft},
+ date = 1968,
+ author = {Kant, Immanuel},
+ booktitle = {Kritik der praktischen Vernunft. Kritik der Urtheilskraft},
+ bookauthor = {Kant, Immanuel},
+ maintitle = {Kants Werke. Akademie Textausgabe},
+ volume = 5,
+ publisher = {Walter de Gruyter},
+ location = {Berlin},
+ pages = {165-485},
+ shorthand = {KU},
+ langid = {german},
+ annotation = {An edition of Kant's \emph{Collected Works}, volume five. This
+ is an \texttt{inbook} entry which explicitly refers to the
+ \emph{Critique of Judgment} only, not to the entire fifth
+ volume},
+}
+
+@inbook{nietzsche:historie,
+ title = {Unzeitgem{\"a}sse Betrachtungen. Zweites St{\"u}ck},
+ date = 1988,
+ author = {Nietzsche, Friedrich},
+ booktitle = {Die Geburt der Trag{\"o}die. Unzeitgem{\"a}{\ss}e
+ Betrachtungen I--IV. Nachgelassene Schriften 1870--1973},
+ bookauthor = {Nietzsche, Friedrich},
+ editor = {Colli, Giorgio and Montinari, Mazzino},
+ subtitle = {Vom Nutzen und Nachtheil der Historie f{\"u}r das Leben},
+ maintitle = {S{\"a}mtliche Werke},
+ mainsubtitle = {Kritische Studienausgabe},
+ volume = 1,
+ publisher = dtv # { and Walter de Gruyter},
+ location = {M{\"u}nchen and Berlin and New York},
+ pages = {243-334},
+ langid = {german},
+ sortyear = {1988-2},
+ sorttitle = {Werke-01-243},
+ indexsorttitle= {Vom Nutzen und Nachtheil der Historie fur das Leben},
+ indextitle = {Vom Nutzen und Nachtheil der Historie f{\"u}r das Leben},
+ shorttitle = {Vom Nutzen und Nachtheil der Historie},
+ annotation = {A single essay from the critical edition of Nietzsche's works.
+ This \texttt{inbook} entry explicitly refers to an essay found
+ in the first volume. Note the \texttt{title},
+ \texttt{booktitle}, and \texttt{maintitle} fields. Also note
+ the \texttt{sorttitle} and \texttt{sortyear} fields. We want
+ this entry to be listed after the entry referring to the
+ entire first volume},
+}
+
+@incollection{brandt,
+ author = {von Brandt, Ahasver and Erich Hoffmann},
+ editor = {Ferdinand Seibt},
+ title = {Die nordischen L{\"a}nder von der Mitte des 11.~Jahrhunderts
+ bis 1448},
+ date = 1987,
+ booktitle = {Europa im Hoch- und Sp{\"a}tmittelalter},
+ series = {Handbuch der europ{\"a}ischen Geschichte},
+ number = 2,
+ publisher = {Klett-Cotta},
+ location = {Stuttgart},
+ pages = {884-917},
+ options = {useprefix=false},
+ langid = {german},
+ indexsorttitle= {Nordischen Lander von der Mitte des 11. Jahrhunderts bis
+ 1448},
+ indextitle = {Nordischen L{\"a}nder von der Mitte des 11.~Jahrhunderts bis
+ 1448, Die},
+ shorttitle = {Die nordischen L{\"a}nder},
+ annotation = {An \texttt{incollection} entry with a \texttt{series} and a
+ \texttt{number}. Note the format of the printed name and
+ compare the \texttt{useprefix} option in the \texttt{options}
+ field as well as \texttt{vangennep}. Also note the
+ \texttt{indextitle, and \texttt{indexsorttitle} fields}},
+}
+
+@incollection{hyman,
+ author = {Arthur Hyman},
+ editor = {O'Meara, Dominic J.},
+ title = {Aristotle's Theory of the Intellect and its Interpretation by
+ {Averroes}},
+ date = 1981,
+ booktitle = {Studies in {Aristotle}},
+ series = {Studies in Philosophy and the History of Philosophy},
+ number = 9,
+ publisher = {The Catholic University of America Press},
+ location = {Washington, D.C.},
+ pages = {161-191},
+ keywords = {secondary},
+ langid = {english},
+ langidopts = {variant=american},
+ indextitle = {Aristotle's Theory of the Intellect},
+ shorttitle = {Aristotle's Theory of the Intellect},
+ annotation = {An \texttt{incollection} entry with a \texttt{series} and
+ \texttt{number} field},
+}
+
+@incollection{pines,
+ author = {Pines, Shlomo},
+ editor = {Twersky, Isadore},
+ title = {The Limitations of Human Knowledge According to {Al-Farabi}, {ibn
+ Bajja}, and {Maimonides}},
+ date = 1979,
+ booktitle = {Studies in Medieval {Jewish} History and Literature},
+ publisher = hup,
+ location = {Cambridge, Mass.},
+ pages = {82-109},
+ keywords = {secondary},
+ langid = {english},
+ langidopts = {variant=american},
+ indextitle = {Limitations of Human Knowledge According to {Al-Farabi}, {ibn
+ Bajja}, and {Maimonides}, The},
+ shorttitle = {Limitations of Human Knowledge},
+ annotation = {A typical \texttt{incollection} entry. Note the
+ \texttt{indextitle} field},
+}
+
+@inproceedings{moraux,
+ author = {Moraux, Paul},
+ editor = {Lloyd, G. E. R. and Owen, G. E. L.},
+ title = {Le \emph{De Anima} dans la tradition gr{\`e}cque},
+ date = 1979,
+ booktitle = {Aristotle on Mind and the Senses},
+ subtitle = {Quelques aspects de l'interpretation du trait{\'e}, de
+ Theophraste {\`a} Themistius},
+ booktitleaddon= {Proceedings of the Seventh Symposium Aristotelicum},
+ eventdate = 1975,
+ publisher = cup,
+ location = {Cambridge},
+ pages = {281-324},
+ keywords = {secondary},
+ langid = {french},
+ indexsorttitle= {De Anima dans la tradition grecque},
+ indextitle = {\emph{De Anima} dans la tradition gr{\`e}cque, Le},
+ shorttitle = {\emph{De Anima} dans la tradition gr{\`e}cque},
+ annotation = {This is a typical \texttt{inproceedings} entry. Note the
+ \texttt{booksubtitle}, \texttt{shorttitle},
+ \texttt{indextitle}, and \texttt{indexsorttitle} fields. Also
+ note the \texttt{eventdate} field.},
+}
+
+@inproceedings{salam,
+ author = {Salam, Abdus},
+ editor = {Svartholm, Nils},
+ title = {Weak and Electromagnetic Interactions},
+ date = 1968,
+ booktitle = {Elementary particle theory},
+ booksubtitle = {Relativistic groups and analyticity},
+ booktitleaddon= {Proceedings of the {Eighth Nobel Symposium}},
+ eventdate = {1968-05-19/1968-05-25},
+ venue = {Aspen{\"a}sgarden, Lerum},
+ publisher = {Almquist \& Wiksell},
+ location = {Stockholm},
+ pages = {367-377},
+}
+
+@manual{cms,
+ title = {The {Chicago} Manual of Style},
+ date = 2003,
+ subtitle = {The Essential Guide for Writers, Editors, and Publishers},
+ edition = 15,
+ publisher = {University of Chicago Press},
+ location = {Chicago, Ill.},
+ isbn = {0-226-10403-6},
+ label = {CMS},
+ langid = {english},
+ langidopts = {variant=american},
+ sorttitle = {Chicago Manual of Style},
+ indextitle = {Chicago Manual of Style, The},
+ shorttitle = {Chicago Manual of Style},
+ annotation = {This is a \texttt{manual} entry without an \texttt{author} or
+ \texttt{editor}. Note the \texttt{label} field in the database
+ file which is provided for author-year citation styles. Also
+ note the \texttt{sorttitle} and \texttt{indextitle} fields. By
+ default, all entries without an \texttt{author} or
+ \texttt{editor} are alphabetized by \texttt{title} but we want
+ this entry to be alphabetized under \enquote*{C} rather than
+ \enquote*{T}. There's also an \texttt{isbn} field},
+}
+
+@online{baez/online,
+ author = {Baez, John C. and Lauda, Aaron D.},
+ title = {Higher-Dimensional Algebra {V}: 2-Groups},
+ date = {2004-10-27},
+ version = 3,
+ langid = {english},
+ langidopts = {variant=american},
+ eprinttype = {arxiv},
+ eprint = {math/0307200v3},
+ annotation = {An \texttt{online} reference from arXiv. Note the
+ \texttt{eprint} and \texttt{eprinttype} fields. Compare
+ \texttt{baez\slash article} which is the same item given as an
+ \texttt{article} entry with eprint information},
+}
+
+@online{ctan,
+ title = {CTAN},
+ date = 2006,
+ url = {http://www.ctan.org},
+ subtitle = {The {Comprehensive TeX Archive Network}},
+ urldate = {2006-10-01},
+ label = {CTAN},
+ langid = {english},
+ langidopts = {variant=american},
+ annotation = {This is an \texttt{online} entry. The \textsc{url}, which is
+ given in the \texttt{url} field, is transformed into a
+ clickable link if \texttt{hyperref} support has been
+ enabled. Note the format of the \texttt{urldate} field
+ (\texttt{yyyy-mm-dd}) in the database file. Also note the
+ \texttt{label} field which may be used as a fallback by
+ citation styles which need an \texttt{author} and\slash or a
+ \texttt{year}},
+}
+
+@online{itzhaki,
+ author = {Itzhaki, Nissan},
+ title = {Some remarks on {'t Hooft's} {S}-matrix for black holes},
+ date = {1996-03-11},
+ version = 1,
+ langid = {english},
+ langidopts = {variant=american},
+ eprinttype = {arxiv},
+ eprint = {hep-th/9603067},
+ annotation = {An \texttt{online} reference from arXiv. Note the
+ \texttt{eprint} and \texttt{eprinttype} fields. Also note that
+ the arXiv reference is transformed into a clickable link if
+ \texttt{hyperref} support has been enabled},
+ abstract = {We discuss the limitations of 't Hooft's proposal for the
+ black hole S-matrix. We find that the validity of the S-matrix
+ implies violation of the semi-classical approximation at
+ scales large compared to the Planck scale. We also show that
+ the effect of the centrifugal barrier on the S-matrix is
+ crucial even for large transverse distances.},
+}
+
+@online{markey,
+ author = {Markey, Nicolas},
+ title = {Tame the {BeaST}},
+ date = {2005-10-16},
+ url = {http://mirror.ctan.org/info/bibtex/tamethebeast/ttb_en.pdf},
+ subtitle = {The {B} to {X} of {BibTeX}},
+ version = {1.3},
+ urldate = {2006-10-01},
+ langid = {english},
+ langidopts = {variant=american},
+ sorttitle = {Tame the Beast},
+ annotation = {An \texttt{online} entry for a tutorial. Note the format of
+ the \texttt{date} field (\texttt{yyyy-mm-dd}) in the database
+ file.},
+}
+
+@online{wassenberg,
+ author = {Wassenberg, Jan and Sanders, Peter},
+ title = {Faster Radix Sort via Virtual Memory and Write-Combining},
+ date = {2010-08-17},
+ version = 1,
+ langid = {english},
+ langidopts = {variant=american},
+ eprinttype = {arxiv},
+ eprintclass = {cs.DS},
+ eprint = {1008.2849v1},
+ annotation = {A recent \texttt{online} reference from arXiv using the new
+ (April 2007 onward) identifier format. Note the
+ \texttt{eprint}, \texttt{eprinttype}, and \texttt{eprintclass}
+ fields. Also note that the arXiv reference is transformed into
+ a clickable link if \texttt{hyperref} support has been
+ enabled},
+ abstract = {Sorting algorithms are the deciding factor for the performance
+ of common operations such as removal of duplicates or database
+ sort-merge joins. This work focuses on 32-bit integer keys,
+ optionally paired with a 32-bit value. We present a fast radix
+ sorting algorithm that builds upon a microarchitecture-aware
+ variant of counting sort},
+}
+
+@patent{almendro,
+ author = {Almendro, Jos{\'e} L. and Mart{\'i}n, Jacinto and S{\'a}nchez,
+ Alberto and Nozal, Fernando},
+ title = {Elektromagnetisches Signalhorn},
+ number = {EU-29702195U},
+ date = 1998,
+ location = {countryfr and countryuk and countryde},
+ langid = {german},
+ annotation = {This is a \texttt{patent} entry with a \texttt{location}
+ field. The number is given in the \texttt{number} field. Note
+ the format of the \texttt{location} field in the database
+ file. Compare \texttt{laufenberg}, \texttt{sorace}, and
+ \texttt{kowalik}},
+}
+
+@patent{kowalik,
+ author = {Kowalik, F. and Isard, M.},
+ title = {Estimateur d'un d{\'e}faut de fonctionnement d'un modulateur
+ en quadrature et {\'e}tage de modulation l'utilisant},
+ number = 9500261,
+ date = {1995-01-11},
+ type = {patreqfr},
+ langid = {french},
+ indextitle = {Estimateur d'un d{\'e}faut de fonctionnement},
+ annotation = {This is a \texttt{patent} entry for a French patent request
+ with a full date. The number is given in the \texttt{number}
+ field. Note the format of the \texttt{type} and \texttt{date}
+ fields in the database file. Compare \texttt{almendro},
+ \texttt{laufenberg}, and \texttt{sorace}},
+}
+
+@patent{laufenberg,
+ author = {Laufenberg, Xaver and Eynius, Dominique and Suelzle, Helmut
+ and Usbeck, Stephan and Spaeth, Matthias and Neuser-Hoffmann,
+ Miriam and Myrzik, Christian and Schmid, Manfred and Nietfeld,
+ Franz and Thiel, Alexander and Braun, Harald and Ebner,
+ Norbert},
+ title = {Elektrische Einrichtung und Betriebsverfahren},
+ number = 1700367,
+ date = {2006-09-13},
+ holder = {{Robert Bosch GmbH} and {Daimler Chrysler AG} and {Bayerische
+ Motoren Werke AG}},
+ type = {patenteu},
+ langid = {german},
+ annotation = {This is a \texttt{patent} entry with a \texttt{holder} field.
+ Note the format of the \texttt{type} and \texttt{location}
+ fields in the database file. Compare \texttt{almendro},
+ \texttt{sorace}, and \texttt{kowalik}},
+ abstract = {The invention relates to an electric device comprising a
+ generator, in particular for use in the vehicle electric
+ system of a motor vehicle and a controller for controlling the
+ generator voltage. The device is equipped with a control zone,
+ in which the voltage is controlled and zones, in which the
+ torque is controlled. The invention also relates to methods
+ for operating a device of this type.},
+ file = {http://v3.espacenet.com/textdoc?IDX=EP1700367},
+}
+
+@patent{sorace,
+ author = {Sorace, Ronald E. and Reinhardt, Victor S. and Vaughn, Steven
+ A.},
+ title = {High-Speed Digital-to-{RF} Converter},
+ number = 5668842,
+ date = {1997-09-16},
+ holder = {{Hughes Aircraft Company}},
+ type = {patentus},
+ langid = {english},
+ langidopts = {variant=american},
+ annotation = {This is a \texttt{patent} entry with a \texttt{holder} field.
+ Note the format of the \texttt{type} and \texttt{date} fields
+ in the database file. Compare \texttt{almendro},
+ \texttt{laufenberg}, and \texttt{kowalik}},
+}
+
+@periodical{jcg,
+ title = {Computers and Graphics},
+ year = 2011,
+ issuetitle = {Semantic {3D} Media and Content},
+ volume = 35,
+ number = 4,
+ issn = {0097-8493},
+ annotation = {This is a \texttt{periodical} entry with an \texttt{issn}
+ field.},
+}
+
+@report{chiu,
+ author = {Chiu, Willy W. and Chow, We Min},
+ title = {A Hybrid Hierarchical Model of a {Multiple Virtual Storage}
+ ({MVS}) Operating System},
+ type = {resreport},
+ institution = {IBM},
+ date = 1978,
+ number = {RC-6947},
+ langid = {english},
+ langidopts = {variant=american},
+ sorttitle = {Hybrid Hierarchical Model of a Multiple Virtual Storage (MVS)
+ Operating System},
+ indextitle = {Hybrid Hierarchical Model, A},
+ annotation = {This is a \texttt{report} entry for a research report. Note
+ the format of the \texttt{type} field in the database file
+ which uses a localization key. The number of the report is
+ given in the \texttt{number} field. Also note the
+ \texttt{sorttitle} and \texttt{indextitle} fields},
+}
+
+@report{padhye,
+ author = {Padhye, Jitendra and Firoiu, Victor and Towsley, Don},
+ title = {A Stochastic Model of {TCP Reno} Congestion Avoidance and
+ Control},
+ type = {techreport},
+ institution = {University of Massachusetts},
+ date = 1999,
+ number = {99-02},
+ location = {Amherst, Mass.},
+ langid = {english},
+ langidopts = {variant=american},
+ sorttitle = {A Stochastic Model of TCP Reno Congestion Avoidance and
+ Control},
+ indextitle = {Stochastic Model of {TCP Reno} Congestion Avoidance and Control,
+ A},
+ annotation = {This is a \texttt{report} entry for a technical report. Note
+ the format of the \texttt{type} field in the database file
+ which uses a localization key. The number of the report is
+ given in the \texttt{number} field. Also note the
+ \texttt{sorttitle} and \texttt{indextitle} fields},
+ abstract = {The steady state performance of a bulk transfer TCP flow
+ (i.e. a flow with a large amount of data to send, such as FTP
+ transfers) may be characterized by three quantities. The first
+ is the send rate, which is the amount of data sent by the
+ sender in unit time. The second is the throughput, which is
+ the amount of data received by the receiver in unit time. Note
+ that the throughput will always be less than or equal to the
+ send rate due to losses. Finally, the number of non-duplicate
+ packets received by the receiver in unit time gives us the
+ goodput of the connection. The goodput is always less than or
+ equal to the throughput, since the receiver may receive two
+ copies of the same packet due to retransmissions by the
+ sender. In a previous paper, we presented a simple model for
+ predicting the steady state send rate of a bulk transfer TCP
+ flow as a function of loss rate and round trip time. In this
+ paper, we extend that work in two ways. First, we analyze the
+ performance of bulk transfer TCP flows using more precise,
+ stochastic analysis. Second, we build upon the previous
+ analysis to provide both an approximate formula as well as a
+ more accurate stochastic model for the steady state throughput
+ of a bulk transfer TCP flow.},
+ file = {ftp://gaia.cs.umass.edu/pub/Padhey99-markov.ps},
+}
+
+@thesis{geer,
+ author = {de Geer, Ingrid},
+ title = {Earl, Saint, Bishop, Skald~-- and Music},
+ type = {phdthesis},
+ institution = {Uppsala Universitet},
+ date = 1985,
+ subtitle = {The {Orkney Earldom} of the Twelfth Century. {A} Musicological
+ Study},
+ location = {Uppsala},
+ options = {useprefix=false},
+ langid = {english},
+ langidopts = {variant=british},
+ annotation = {This is a typical \texttt{thesis} entry for a PhD thesis. Note
+ the \texttt{type} field in the database file which uses a
+ localization key. Also note the format of the printed name and
+ compare the \texttt{useprefix} option in the \texttt{options}
+ field as well as \texttt{vangennep}},
+}
+
+@thesis{loh,
+ author = {Loh, Nin C.},
+ title = {High-Resolution Micromachined Interferometric Accelerometer},
+ type = {mathesis},
+ institution = {Massachusetts Institute of Technology},
+ date = 1992,
+ location = {Cambridge, Mass.},
+ langid = {english},
+ langidopts = {variant=american},
+ annotation = {This is a typical \texttt{thesis} entry for an MA thesis. Note
+ the \texttt{type} field in the database file which uses a
+ localization key},
+}
diff --git a/test/command/biblatex-formatting.md b/test/command/biblatex-formatting.md
new file mode 100644
index 000000000..1fbd5a6a1
--- /dev/null
+++ b/test/command/biblatex-formatting.md
@@ -0,0 +1,23 @@
+```
+% pandoc -f biblatex -t markdown -s
+@article{item1,
+ Title = {The Title:
+ \textit{italics},
+ \textbf{bold},
+ \textsubscript{subscript},
+ \textsuperscript{superscript},
+ \textsc{small-caps}}
+}
+^D
+---
+nocite: '[@*]'
+references:
+- id: item1
+ title: 'The title: *Italics*, **bold**, ~subscript~, ^superscript^,
+ [small-caps]{.smallcaps}'
+ title-short: The title
+ type: 'article-journal'
+---
+
+
+```
diff --git a/test/command/biblatex-gaonkar-in.md b/test/command/biblatex-gaonkar-in.md
new file mode 100644
index 000000000..5073fc884
--- /dev/null
+++ b/test/command/biblatex-gaonkar-in.md
@@ -0,0 +1,62 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Gaonkar 2001)
+
+Gaonkar, Dilip Parameshwar. 2001. “On Alternative Modernities.” In
+*Alternative Modernities*, edited by Dilip Parameshwar Gaonkar, 1–23.
+Durham; London: Duke University Press.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Gaonkar, 2001)
+
+Gaonkar, D. P. (2001). On alternative modernities. In D. P. Gaonkar
+(Ed.), *Alternative modernities* (pp. 1–23). Durham; London: Duke
+University Press.
+
+
+}
+
+@InCollection{gaonkar:in,
+ author = {Gaonkar, Dilip Parameshwar},
+ editor = {Gaonkar, Dilip Parameshwar},
+ title = {On Alternative Modernities},
+ date = 2001,
+ booktitle = {Alternative Modernities},
+ publisher = {Duke University Press},
+ location = {Durham and London},
+ isbn = {0-822-32714-7},
+ pages = {1-23},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Gaonkar
+ given: Dilip Parameshwar
+ container-title: Alternative modernities
+ editor:
+ - family: Gaonkar
+ given: Dilip Parameshwar
+ id: 'gaonkar:in'
+ isbn: '0-822-32714-7'
+ issued: 2001
+ page: '1-23'
+ publisher: Duke University Press
+ publisher-place: Durham; London
+ title: On alternative modernities
+ type: chapter
+---
+
+
+```
diff --git a/test/command/biblatex-gaonkar.md b/test/command/biblatex-gaonkar.md
new file mode 100644
index 000000000..102c52ebb
--- /dev/null
+++ b/test/command/biblatex-gaonkar.md
@@ -0,0 +1,59 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Gaonkar 2001)
+
+Gaonkar, Dilip Parameshwar, ed. 2001. *Alternative Modernities*. Durham;
+London: Duke University Press.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Gaonkar, 2001)
+
+Gaonkar, D. P. (Ed.). (2001). *Alternative modernities*. Durham; London:
+Duke University Press.
+
+
+}
+
+@Collection{gaonkar,
+ editor = {Gaonkar, Dilip Parameshwar},
+ title = {Alternative Modernities},
+ date = 2001,
+ publisher = {Duke University Press},
+ location = {Durham and London},
+ isbn = {0-822-32714-7},
+ hyphenation = {american},
+ annotation = {This is a collection entry. Note the format of the
+ location field in the database file as well as the
+ isbn field},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: This is a collection entry. Note the format of the location
+ field in the database file as well as the isbn field
+ editor:
+ - family: Gaonkar
+ given: Dilip Parameshwar
+ id: gaonkar
+ isbn: '0-822-32714-7'
+ issued: 2001
+ language: 'en-US'
+ publisher: Duke University Press
+ publisher-place: Durham; London
+ title: Alternative modernities
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-geer.md b/test/command/biblatex-geer.md
new file mode 100644
index 000000000..c3acec4fa
--- /dev/null
+++ b/test/command/biblatex-geer.md
@@ -0,0 +1,70 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Geer 1985)
+
+Geer, Ingrid de. 1985. “Earl, Saint, Bishop, Skald – and Music: The
+Orkney Earldom of the Twelfth Century. A Musicological Study.” PhD
+thesis, Uppsala: Uppsala Universitet.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Geer, 1985)
+
+Geer, I. de. (1985). *Earl, saint, bishop, skald – and music: The Orkney
+earldom of the twelfth century. A musicological study* (PhD thesis).
+Uppsala Universitet, Uppsala.
+
+
+}
+
+@Thesis{geer,
+ author = {de Geer, Ingrid},
+ title = {Earl, Saint, Bishop, Skald~-- and Music},
+ type = {phdthesis},
+ institution = {Uppsala Universitet},
+ date = 1985,
+ subtitle = {The {Orkney} Earldom of the Twelfth Century. {A} Musicological
+ Study},
+ location = {Uppsala},
+ options = {useprefix=false},
+ hyphenation = {british},
+ annotation = {This is a typical thesis entry for a PhD thesis. Note
+ the type field in the database file which uses a
+ localization key. Also note the format of the printed name and
+ compare the useprefix option in the options
+ field as well as vangennep},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: This is a typical thesis entry for a PhD thesis. Note the type
+ field in the database file which uses a localization key. Also note
+ the format of the printed name and compare the useprefix option in
+ the options field as well as vangennep
+ author:
+ - dropping-particle: de
+ family: Geer
+ given: Ingrid
+ genre: PhD thesis
+ id: geer
+ issued: 1985
+ language: 'en-GB'
+ publisher: Uppsala Universitet
+ publisher-place: Uppsala
+ title: 'Earl, saint, bishop, skald -- and music: The Orkney earldom of
+ the twelfth century. A musicological study'
+ title-short: 'Earl, saint, bishop, skald -- and music'
+ type: thesis
+---
+
+
+```
diff --git a/test/command/biblatex-gerhardt.md b/test/command/biblatex-gerhardt.md
new file mode 100644
index 000000000..c4bc42802
--- /dev/null
+++ b/test/command/biblatex-gerhardt.md
@@ -0,0 +1,64 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Gerhardt 2000)
+
+Gerhardt, Michael J. 2000. *The Federal Appointments Process: A
+Constitutional and Historical Analysis*. Durham; London: Duke University
+Press.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Gerhardt, 2000)
+
+Gerhardt, M. J. (2000). *The federal appointments process: A
+constitutional and historical analysis*. Durham; London: Duke University
+Press.
+
+
+}
+
+@Book{gerhardt,
+ author = {Gerhardt, Michael J.},
+ title = {The Federal Appointments Process},
+ date = 2000,
+ publisher = {Duke University Press},
+ location = {Durham and London},
+ hyphenation = {american},
+ sorttitle = {Federal Appointments Process},
+ indextitle = {Federal Appointments Process, The},
+ subtitle = {A Constitutional and Historical Analysis},
+ shorttitle = {Federal Appointments Process},
+ annotation = {This is a book entry. Note the format of the
+ location field as well as the sorttitle and
+ indextitle fields},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: This is a book entry. Note the format of the location field as
+ well as the sorttitle and indextitle fields
+ author:
+ - family: Gerhardt
+ given: Michael J.
+ id: gerhardt
+ issued: 2000
+ language: 'en-US'
+ publisher: Duke University Press
+ publisher-place: Durham; London
+ title: 'The federal appointments process: A constitutional and
+ historical analysis'
+ title-short: Federal appointments process
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-gillies.md b/test/command/biblatex-gillies.md
new file mode 100644
index 000000000..79d3f5949
--- /dev/null
+++ b/test/command/biblatex-gillies.md
@@ -0,0 +1,70 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Gillies 1933)
+
+Gillies, Alexander. 1933. “Herder and the Preparation of Goethe’s Idea
+of World Literature.” *Publications of the English Goethe Society, New
+Series* 9: 46–67.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Gillies, 1933)
+
+Gillies, A. (1933). Herder and the preparation of Goethe’s idea of world
+literature. *Publications of the English Goethe Society, new series*,
+*9*, 46–67.
+
+
+NOTES:
+
+- biblio2yaml
+ - "new series" is not pretty, but it’s the best we can do at the moment, given the limitations of CSL.
+
+}
+
+@Article{gillies,
+ author = {Gillies, Alexander},
+ title = {Herder and the Preparation of {Goethe}'s Idea of World
+ Literature},
+ journaltitle = {Publications of the English Goethe Society},
+ date = 1933,
+ series = {newseries},
+ volume = 9,
+ pages = {46-67},
+ hyphenation = {british},
+ annotation = {An article entry with a series and a
+ volume field. Note that format of the series
+ field in the database file},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: An article entry with a series and a volume field. Note that
+ format of the series field in the database file
+ author:
+ - family: Gillies
+ given: Alexander
+ collection-title: new series
+ container-title: Publications of the English Goethe Society
+ id: gillies
+ issued: 1933
+ language: 'en-GB'
+ page: '46-67'
+ title: 'Herder and the preparation of Goethe''s idea of world
+ literature'
+ type: 'article-journal'
+ volume: 9
+---
+
+
+```
diff --git a/test/command/biblatex-glashow.md b/test/command/biblatex-glashow.md
new file mode 100644
index 000000000..f8c23415c
--- /dev/null
+++ b/test/command/biblatex-glashow.md
@@ -0,0 +1,51 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Glashow 1961)
+
+Glashow, Sheldon. 1961. “Partial Symmetries of Weak Interactions.”
+*Nucl. Phys.* 22: 579–588.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Glashow, 1961)
+
+Glashow, S. (1961). Partial symmetries of weak interactions.
+*Nucl. Phys.*, *22*, 579–588.
+
+
+}
+
+@Article{glashow,
+ author = {Glashow, Sheldon},
+ title = {Partial Symmetries of Weak Interactions},
+ journaltitle = {Nucl.~Phys.},
+ date = 1961,
+ volume = 22,
+ pages = {579-588},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Glashow
+ given: Sheldon
+ container-title: Nucl. Phys.
+ id: glashow
+ issued: 1961
+ page: '579-588'
+ title: Partial symmetries of weak interactions
+ type: 'article-journal'
+ volume: 22
+---
+
+
+```
diff --git a/test/command/biblatex-gonzalez.md b/test/command/biblatex-gonzalez.md
new file mode 100644
index 000000000..981deba94
--- /dev/null
+++ b/test/command/biblatex-gonzalez.md
@@ -0,0 +1,62 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Gonzalez 2001)
+
+Gonzalez, Ray. 2001. *The Ghost of John Wayne and Other Stories*.
+Tucson: The University of Arizona Press.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Gonzalez, 2001)
+
+Gonzalez, R. (2001). *The ghost of John Wayne and other stories*.
+Tucson: The University of Arizona Press.
+
+}
+
+@Book{gonzalez,
+ author = {Gonzalez, Ray},
+ title = {The Ghost of {John Wayne} and Other Stories},
+ date = 2001,
+ publisher = {The University of Arizona Press},
+ location = {Tucson},
+ isbn = {0-816-52066-6},
+ hyphenation = {american},
+ sorttitle = {Ghost of John Wayne and Other Stories},
+ indextitle = {Ghost of {John Wayne} and Other Stories, The},
+ shorttitle = {Ghost of {John Wayne}},
+ annotation = {A collection of short stories. This is a book entry.
+ Note the sorttitle and indextitle fields in
+ the database file. There's also an isbn field},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'A collection of short stories. This is a book entry. Note the
+ sorttitle and indextitle fields in the database file. There''s also
+ an isbn field'
+ author:
+ - family: Gonzalez
+ given: Ray
+ id: gonzalez
+ isbn: '0-816-52066-6'
+ issued: 2001
+ language: 'en-US'
+ publisher: The University of Arizona Press
+ publisher-place: Tucson
+ title: The ghost of John Wayne and other stories
+ title-short: Ghost of John Wayne
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-hammond.md b/test/command/biblatex-hammond.md
new file mode 100644
index 000000000..77b898730
--- /dev/null
+++ b/test/command/biblatex-hammond.md
@@ -0,0 +1,63 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Hammond 1997)
+
+Hammond, Christopher. 1997. *The Basics of Crystallography and
+Diffraction*. Oxford: International Union of Crystallography; Oxford
+University Press.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Hammond, 1997)
+
+Hammond, C. (1997). *The basics of crystallography and diffraction*.
+Oxford: International Union of Crystallography; Oxford University Press.
+
+
+}
+
+@Book{hammond,
+ author = {Hammond, Christopher},
+ title = {The basics of crystallography and diffraction},
+ date = 1997,
+ publisher = {International Union of Crystallography and Oxford University
+ Press},
+ location = {Oxford},
+ hyphenation = {british},
+ sorttitle = {Basics of crystallography and diffraction},
+ indextitle = {Basics of crystallography and diffraction, The},
+ shorttitle = {Crystallography and diffraction},
+ annotation = {A book entry. Note the sorttitle and
+ indextitle fields as well as the format of the
+ publisher field},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A book entry. Note the sorttitle and indextitle fields as well
+ as the format of the publisher field
+ author:
+ - family: Hammond
+ given: Christopher
+ id: hammond
+ issued: 1997
+ language: 'en-GB'
+ publisher: International Union of Crystallography; Oxford University
+ Press
+ publisher-place: Oxford
+ title: The basics of crystallography and diffraction
+ title-short: Crystallography and diffraction
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-herrmann.md b/test/command/biblatex-herrmann.md
new file mode 100644
index 000000000..6445f270a
--- /dev/null
+++ b/test/command/biblatex-herrmann.md
@@ -0,0 +1,70 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Herrmann et al. 2006)
+
+Herrmann, Wolfgang A., Karl Öfele, Sabine K. Schneider, Eberhardt
+Herdtweck, and Stephan D. Hoffmann. 2006. “A Carbocyclic Carbene as an
+Efficient Catalyst Ligand for C–C Coupling Reactions.” *Angew. Chem.
+Int. Ed.* 45 (23): 3859–3862.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Herrmann, Öfele, Schneider, Herdtweck, & Hoffmann, 2006)
+
+Herrmann, W. A., Öfele, K., Schneider, S. K., Herdtweck, E., & Hoffmann,
+S. D. (2006). A carbocyclic carbene as an efficient catalyst ligand for
+C–C coupling reactions. *Angew. Chem. Int. Ed.*, *45*(23), 3859–3862.
+
+
+}
+
+@string{ anch-ie = {Angew.~Chem. Int.~Ed.} }
+
+@Article{herrmann,
+ author = {Herrmann, Wolfgang A. and {\"O}fele, Karl and Schneider,
+ Sabine K. and Herdtweck, Eberhardt and Hoffmann, Stephan D.},
+ title = {A carbocyclic carbene as an efficient catalyst ligand for {C--C}
+ coupling reactions},
+ journaltitle = anch-ie,
+ date = 2006,
+ volume = 45,
+ number = 23,
+ pages = {3859-3862},
+ indextitle = {Carbocyclic carbene as an efficient catalyst, A},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Herrmann
+ given: Wolfgang A.
+ - family: Öfele
+ given: Karl
+ - family: Schneider
+ given: Sabine K.
+ - family: Herdtweck
+ given: Eberhardt
+ - family: Hoffmann
+ given: Stephan D.
+ container-title: Angew. Chem. Int. Ed.
+ id: herrmann
+ issue: 23
+ issued: 2006
+ page: '3859-3862'
+ title: 'A carbocyclic carbene as an efficient catalyst ligand for C--C
+ coupling reactions'
+ type: 'article-journal'
+ volume: 45
+---
+
+
+```
diff --git a/test/command/biblatex-hyman.md b/test/command/biblatex-hyman.md
new file mode 100644
index 000000000..966dc9133
--- /dev/null
+++ b/test/command/biblatex-hyman.md
@@ -0,0 +1,79 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Hyman 1981)
+
+Hyman, Arthur. 1981. “Aristotle’s Theory of the Intellect and Its
+Interpretation by Averroes.” In *Studies in Aristotle*, edited by
+Dominic J. O’Meara, 161–191. Studies in Philosophy and the History of
+Philosophy 9. Washington, D.C.: The Catholic University of America
+Press.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Hyman, 1981)
+
+Hyman, A. (1981). Aristotle’s theory of the intellect and its
+interpretation by Averroes. In D. J. O’Meara (Ed.), *Studies in
+Aristotle* (pp. 161–191). Washington, D.C.: The Catholic University of
+America Press.
+
+
+}
+
+@InCollection{hyman,
+ author = {Arthur Hyman},
+ editor = {O'Meara, Dominic J.},
+ title = {Aristotle's Theory of the Intellect and its Interpretation by
+ {Averroes}},
+ date = 1981,
+ booktitle = {Studies in {Aristotle}},
+ series = {Studies in Philosophy and the History of Philosophy},
+ number = 9,
+ publisher = {The Catholic University of America Press},
+ location = {Washington, D.C.},
+ pages = {161-191},
+ keywords = {secondary},
+ hyphenation = {american},
+ indextitle = {Aristotle's Theory of the Intellect},
+ shorttitle = {Aristotle's Theory of the Intellect},
+ annotation = {An incollection entry with a series and
+ number field},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: An incollection entry with a series and number field
+ author:
+ - family: Hyman
+ given: Arthur
+ collection-number: 9
+ collection-title: Studies in philosophy and the history of philosophy
+ container-title: Studies in Aristotle
+ editor:
+ - family: 'O''Meara'
+ given: Dominic J.
+ id: hyman
+ issued: 1981
+ keyword: secondary
+ language: 'en-US'
+ page: '161-191'
+ publisher: The Catholic University of America Press
+ publisher-place: 'Washington, D.C.'
+ title: 'Aristotle''s theory of the intellect and its interpretation by
+ Averroes'
+ title-short: 'Aristotle''s theory of the intellect'
+ type: chapter
+---
+
+
+```
diff --git a/test/command/biblatex-iliad.md b/test/command/biblatex-iliad.md
new file mode 100644
index 000000000..4497cf5c3
--- /dev/null
+++ b/test/command/biblatex-iliad.md
@@ -0,0 +1,68 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Homer 2004)
+
+Homer. 2004. *Die Ilias*. Translated by Wolfgang Schadewaldt. 3rd ed.
+Düsseldorf; Zürich: Artemis & Winkler.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Homer, 2004)
+
+Homer. (2004). *Die Ilias*. (W. Schadewaldt, trans.) (3rd ed.).
+Düsseldorf; Zürich: Artemis & Winkler.
+
+}
+
+@Book{iliad,
+ author = {Homer},
+ title = {Die Ilias},
+ date = 2004,
+ translator = {Schadewaldt, Wolfgang},
+ introduction = {Latacz, Joachim},
+ edition = 3,
+ publisher = {Artemis \& Winkler},
+ location = {D{\"u}sseldorf and Z{\"u}rich},
+ hyphenation = {german},
+ sorttitle = {Ilias},
+ indextitle = {Ilias, Die},
+ shorttitle = {Ilias},
+ annotation = {A German translation of the \emph{Iliad}. Note the
+ translator and introduction fields and the
+ format of the location field in the database
+ file. Also note the sorttitle and indextitle
+ fields},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'A German translation of the *Iliad*. Note the translator and
+ introduction fields and the format of the location field in the
+ database file. Also note the sorttitle and indextitle fields'
+ author:
+ - family: Homer
+ edition: 3
+ id: iliad
+ issued: 2004
+ language: 'de-DE'
+ publisher: 'Artemis & Winkler'
+ publisher-place: Düsseldorf; Zürich
+ title: Die Ilias
+ title-short: Ilias
+ translator:
+ - family: Schadewaldt
+ given: Wolfgang
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-inbook-title-booktitle-maintitle-series-2.md b/test/command/biblatex-inbook-title-booktitle-maintitle-series-2.md
new file mode 100644
index 000000000..806cbb238
--- /dev/null
+++ b/test/command/biblatex-inbook-title-booktitle-maintitle-series-2.md
@@ -0,0 +1,48 @@
+```
+% pandoc -f biblatex -t markdown -s
+@inbook{item1,
+ Author = {Author, Al},
+ Bookauthor = {Bookauthor, Bob},
+ Booksubtitle = {Booksubtitle},
+ Booktitle = {Booktitle},
+ Booktitleaddon = {Booktitleaddon},
+ Date = {2011},
+ Hyphenation = {french},
+ Location = {Location},
+ Mainsubtitle = {Mainsubtitle},
+ Maintitle = {Maintitle},
+ Maintitleaddon = {Maintitleaddon},
+ Number = {3},
+ Publisher = {Publisher},
+ Series = {Series},
+ Subtitle = {Subtitle},
+ Title = {Title of the ``inbook'' Entry},
+ Titleaddon = {Titleaddon},
+ Volume = {4}}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Author
+ given: Al
+ collection-number: 3
+ collection-title: Series
+ container-author:
+ - family: Bookauthor
+ given: Bob
+ container-title: 'Maintitle: Mainsubtitle. Maintitleaddon'
+ id: item1
+ issued: 2011
+ language: 'fr-FR'
+ publisher: Publisher
+ publisher-place: Location
+ title: 'Title of the "inbook" Entry: Subtitle. Titleaddon'
+ type: chapter
+ volume: 4
+ volume-title: 'Booktitle: Booksubtitle. Booktitleaddon'
+---
+
+
+```
diff --git a/test/command/biblatex-inbook-title-booktitle-maintitle-series.md b/test/command/biblatex-inbook-title-booktitle-maintitle-series.md
new file mode 100644
index 000000000..bd428f672
--- /dev/null
+++ b/test/command/biblatex-inbook-title-booktitle-maintitle-series.md
@@ -0,0 +1,44 @@
+```
+% pandoc -f biblatex -t markdown -s
+@inbook{item1,
+ Author = {Author, Al},
+ Booksubtitle = {Booksubtitle},
+ Booktitle = {Booktitle},
+ Booktitleaddon = {Booktitleaddon},
+ Date = {2011},
+ Hyphenation = {french},
+ Location = {Location},
+ Mainsubtitle = {Mainsubtitle},
+ Maintitle = {Maintitle},
+ Maintitleaddon = {Maintitleaddon},
+ Number = {3},
+ Publisher = {Publisher},
+ Series = {Series},
+ Subtitle = {Subtitle},
+ Title = {Title of the ``inbook'' Entry},
+ Titleaddon = {Titleaddon},
+ Volume = {4}}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Author
+ given: Al
+ collection-number: 3
+ collection-title: Series
+ container-title: 'Maintitle: Mainsubtitle. Maintitleaddon'
+ id: item1
+ issued: 2011
+ language: 'fr-FR'
+ publisher: Publisher
+ publisher-place: Location
+ title: 'Title of the "inbook" Entry: Subtitle. Titleaddon'
+ type: chapter
+ volume: 4
+ volume-title: 'Booktitle: Booksubtitle. Booktitleaddon'
+---
+
+
+```
diff --git a/test/command/biblatex-inbook.md b/test/command/biblatex-inbook.md
new file mode 100644
index 000000000..7d2ee5b47
--- /dev/null
+++ b/test/command/biblatex-inbook.md
@@ -0,0 +1,147 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+adapted from http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/examples/biblatex-examples.bib
+
+TODO / citeproc: in biblatex "inbook" entries, citeproc should suppress bookauthor = CSL container-author if identical with author. -- See annotation in kant:kpv.
+}
+
+@string{dtv = {Deutscher Taschenbuch-Verlag}}
+
+@inbook{kant:kpv,
+ Annotation = {An edition of Kant's \emph{Collected Works}, volume five. This is an inbook entry which explicitly refers to the \emph{Critique of Practical Reason} only, not to the entire fifth volume. Note the author and bookauthor fields in the database file. By default, the bookauthor is omitted if the values of the author and bookauthor fields are identical},
+ Author = {Kant, Immanuel},
+ Bookauthor = {Kant, Immanuel},
+ Booktitle = {Kritik der praktischen Vernunft. Kritik der Urtheilskraft},
+ Date = 1968,
+ Hyphenation = {german},
+ Location = {Berlin},
+ Maintitle = {Kants Werke. Akademie Textausgabe},
+ Pages = {1-163},
+ Publisher = {Walter de Gruyter},
+ Shorthand = {KpV},
+ Shorttitle = {Kritik der praktischen Vernunft},
+ Title = {Kritik der praktischen Vernunft},
+ Volume = 5}
+
+@inbook{kant:ku,
+ Annotation = {An edition of Kant's \emph{Collected Works}, volume five. This is an inbook entry which explicitly refers to the \emph{Critique of Judgment} only, not to the entire fifth volume},
+ Author = {Kant, Immanuel},
+ Bookauthor = {Kant, Immanuel},
+ Booktitle = {Kritik der praktischen Vernunft. Kritik der Urtheilskraft},
+ Date = 1968,
+ Hyphenation = {german},
+ Location = {Berlin},
+ Maintitle = {Kants Werke. Akademie Textausgabe},
+ Pages = {165-485},
+ Publisher = {Walter de Gruyter},
+ Shorthand = {KU},
+ Title = {Kritik der Urtheilskraft},
+ Volume = 5}
+
+@inbook{nietzsche:historie,
+ Annotation = {A single essay from the critical edition of Nietzsche's works. This inbook entry explicitly refers to an essay found in the first volume. Note the title, booktitle, and maintitle fields. Also note the sorttitle and sortyear fields. We want this entry to be listed after the entry referring to the entire first volume},
+ Author = {Nietzsche, Friedrich},
+ Bookauthor = {Nietzsche, Friedrich},
+ Booktitle = {Die Geburt der Tragödie. Unzeitgemäße Betrachtungen I--IV. Nachgelassene Schriften 1870--1973},
+ Date = 1988,
+ Editor = {Colli, Giorgio and Montinari, Mazzino},
+ Hyphenation = {german},
+ Indexsorttitle = {Vom Nutzen und Nachtheil der Historie fur das Leben},
+ Indextitle = {Vom Nutzen und Nachtheil der Historie für das Leben},
+ Location = {München and Berlin and New York},
+ Mainsubtitle = {Kritische Studienausgabe},
+ Maintitle = {Sämtliche Werke},
+ Pages = {243-334},
+ Publisher = dtv # { and Walter de Gruyter},
+ Shorttitle = {Vom Nutzen und Nachtheil der Historie},
+ Sorttitle = {Werke-01-243},
+ Sortyear = {1988-2},
+ Subtitle = {Vom Nutzen und Nachtheil der Historie für das Leben},
+ Title = {Unzeitgemässe Betrachtungen. Zweites Stück},
+ Volume = 1}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'An edition of Kant''s *Collected Works*, volume five. This is
+ an inbook entry which explicitly refers to the *Critique of
+ Practical Reason* only, not to the entire fifth volume. Note the
+ author and bookauthor fields in the database file. By default, the
+ bookauthor is omitted if the values of the author and bookauthor
+ fields are identical'
+ author:
+ - family: Kant
+ given: Immanuel
+ container-author:
+ - family: Kant
+ given: Immanuel
+ container-title: Kants Werke. Akademie Textausgabe
+ id: 'kant:kpv'
+ issued: 1968
+ language: 'de-DE'
+ page: '1-163'
+ publisher: Walter de Gruyter
+ publisher-place: Berlin
+ title: Kritik der praktischen Vernunft
+ title-short: Kritik der praktischen Vernunft
+ type: chapter
+ volume: 5
+ volume-title: Kritik der praktischen Vernunft. Kritik der
+ Urtheilskraft
+- annote: 'An edition of Kant''s *Collected Works*, volume five. This is
+ an inbook entry which explicitly refers to the *Critique of
+ Judgment* only, not to the entire fifth volume'
+ author:
+ - family: Kant
+ given: Immanuel
+ container-author:
+ - family: Kant
+ given: Immanuel
+ container-title: Kants Werke. Akademie Textausgabe
+ id: 'kant:ku'
+ issued: 1968
+ language: 'de-DE'
+ page: '165-485'
+ publisher: Walter de Gruyter
+ publisher-place: Berlin
+ title: Kritik der Urtheilskraft
+ type: chapter
+ volume: 5
+ volume-title: Kritik der praktischen Vernunft. Kritik der
+ Urtheilskraft
+- annote: 'A single essay from the critical edition of Nietzsche''s
+ works. This inbook entry explicitly refers to an essay found in the
+ first volume. Note the title, booktitle, and maintitle fields. Also
+ note the sorttitle and sortyear fields. We want this entry to be
+ listed after the entry referring to the entire first volume'
+ author:
+ - family: Nietzsche
+ given: Friedrich
+ container-author:
+ - family: Nietzsche
+ given: Friedrich
+ container-title: 'Sämtliche Werke: Kritische Studienausgabe'
+ editor:
+ - family: Colli
+ given: Giorgio
+ - family: Montinari
+ given: Mazzino
+ id: 'nietzsche:historie'
+ issued: 1988
+ language: 'de-DE'
+ page: '243-334'
+ publisher: 'Deutscher Taschenbuch-Verlag; Walter de Gruyter'
+ publisher-place: München; Berlin; New York
+ title: 'Unzeitgemässe Betrachtungen. Zweites Stück: Vom Nutzen und
+ Nachtheil der Historie für das Leben'
+ title-short: Vom Nutzen und Nachtheil der Historie
+ type: chapter
+ volume: 1
+ volume-title: 'Die Geburt der Tragödie. Unzeitgemäße Betrachtungen
+ I--IV. Nachgelassene Schriften 1870--1973'
+---
+
+
+```
diff --git a/test/command/biblatex-incollection-2.md b/test/command/biblatex-incollection-2.md
new file mode 100644
index 000000000..495541035
--- /dev/null
+++ b/test/command/biblatex-incollection-2.md
@@ -0,0 +1,98 @@
+```
+% pandoc -f biblatex -t markdown -s
+
+@comment{adapted from http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/examples/biblatex-examples.bib}
+
+
+@string{hup = {Harvard University Press}}
+
+
+@incollection{westfahl:space,
+ Annotation = {A cross-referenced article from a collection. This is an incollection entry with a crossref field. Note the subtitle and indextitle fields},
+ Author = {Westfahl, Gary},
+ Crossref = {westfahl:frontier},
+ Hyphenation = {american},
+ Indextitle = {True Frontier, The},
+ Pages = {55-65},
+ Subtitle = {Confronting and Avoiding the Realities of Space in {American} Science Fiction Films},
+ Title = {The True Frontier}}
+
+@incollection{gaonkar:in,
+ Author = {Gaonkar, Dilip Parameshwar},
+ Booktitle = {Alternative Modernities},
+ Date = 2001,
+ Editor = {Gaonkar, Dilip Parameshwar},
+ Isbn = {0-822-32714-7},
+ Location = {Durham and London},
+ Pages = {1-23},
+ Publisher = {Duke University Press},
+ Title = {On Alternative Modernities}}
+
+@collection{westfahl:frontier,
+ Annotation = {This is a collection entry. Note the format of the location field as well as the subtitle and booksubtitle fields},
+ Booksubtitle = {The Frontier Theme in Science Fiction},
+ Booktitle = {Space and Beyond},
+ Date = 2000,
+ Editor = {Westfahl, Gary},
+ Hyphenation = {american},
+ Location = {Westport, Conn. and London},
+ Publisher = {Greenwood},
+ Subtitle = {The Frontier Theme in Science Fiction},
+ Title = {Space and Beyond}}
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'A cross-referenced article from a collection. This is an
+ incollection entry with a crossref field. Note the subtitle and
+ indextitle fields'
+ author:
+ - family: Westfahl
+ given: Gary
+ container-title: 'Space and beyond: The frontier theme in science
+ fiction'
+ editor:
+ - family: Westfahl
+ given: Gary
+ id: 'westfahl:space'
+ issued: 2000
+ language: 'en-US'
+ page: '55-65'
+ publisher: Greenwood
+ publisher-place: 'Westport, Conn.; London'
+ title: 'The true frontier: Confronting and avoiding the realities of
+ space in American science fiction films'
+ title-short: The true frontier
+ type: chapter
+- author:
+ - family: Gaonkar
+ given: Dilip Parameshwar
+ container-title: Alternative modernities
+ editor:
+ - family: Gaonkar
+ given: Dilip Parameshwar
+ id: 'gaonkar:in'
+ isbn: '0-822-32714-7'
+ issued: 2001
+ page: '1-23'
+ publisher: Duke University Press
+ publisher-place: Durham; London
+ title: On alternative modernities
+ type: chapter
+- annote: This is a collection entry. Note the format of the location
+ field as well as the subtitle and booksubtitle fields
+ editor:
+ - family: Westfahl
+ given: Gary
+ id: 'westfahl:frontier'
+ issued: 2000
+ language: 'en-US'
+ publisher: Greenwood
+ publisher-place: 'Westport, Conn.; London'
+ title: 'Space and beyond: The frontier theme in science fiction'
+ title-short: Space and beyond
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-incollection.md b/test/command/biblatex-incollection.md
new file mode 100644
index 000000000..128f2d4b4
--- /dev/null
+++ b/test/command/biblatex-incollection.md
@@ -0,0 +1,130 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{adapted from http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/examples/biblatex-examples.bib}
+
+@string{hup = {Harvard University Press}}
+
+@incollection{brandt,
+ Annotation = {An incollection entry with a series and a number. Note the format of the printed name and compare the useprefix option in the options field as well as vangennep. Also note the indextitle, and indexsorttitle fields},
+ Author = {von Brandt, Ahasver and Hoffmann, Erich},
+ Booktitle = {Europa im Hoch- und Spätmittelalter},
+ Date = 1987,
+ Editor = {Seibt, Ferdinand},
+ Hyphenation = {german},
+ Indexsorttitle = {Nordischen Lander von der Mitte des 11. Jahrhunderts bis 1448},
+ Indextitle = {Nordischen Länder von der Mitte des 11.~Jahrhunderts bis 1448, Die},
+ Location = {Stuttgart},
+ Number = 2,
+ Options = {useprefix=false},
+ Pages = {884-917},
+ Publisher = {Klett-Cotta},
+ Series = {Handbuch der europäischen Geschichte},
+ Shorttitle = {Die nordischen Länder},
+ Title = {Die nordischen Länder von der Mitte des 11.~Jahrhunderts bis 1448}}
+
+@incollection{hyman,
+ Annotation = {An incollection entry with a series and number field},
+ Author = {Hyman, Arthur},
+ Booktitle = {Studies in {Aristotle}},
+ Date = 1981,
+ Editor = {O'Meara, Dominic J.},
+ Hyphenation = {american},
+ Indextitle = {Aristotle's Theory of the Intellect},
+ Keywords = {secondary},
+ Location = {Washington, D.C.},
+ Number = 9,
+ Pages = {161-191},
+ Publisher = {The Catholic University of America Press},
+ Series = {Studies in Philosophy and the History of Philosophy},
+ Shorttitle = {Aristotle's Theory of the Intellect},
+ Title = {Aristotle's Theory of the Intellect and its Interpretation by {Averroes}}}
+
+@incollection{pines,
+ Annotation = {A typical incollection entry. Note the indextitle field},
+ Author = {Pines, Shlomo},
+ Booktitle = {Studies in Medieval {Jewish} History and Literature},
+ Date = 1979,
+ Editor = {Twersky, Isadore},
+ Hyphenation = {american},
+ Indextitle = {Limitations of Human Knowledge According to Al-Farabi, ibn Bajja, and Maimonides, The},
+ Keywords = {secondary},
+ Location = {Cambridge, Mass.},
+ Pages = {82-109},
+ Publisher = hup,
+ Shorttitle = {Limitations of Human Knowledge},
+ Title = {The Limitations of Human Knowledge According to {Al-Farabi}, {ibn Bajja}, and {Maimonides}}}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'An incollection entry with a series and a number. Note the
+ format of the printed name and compare the useprefix option in the
+ options field as well as vangennep. Also note the indextitle, and
+ indexsorttitle fields'
+ author:
+ - dropping-particle: von
+ family: Brandt
+ given: Ahasver
+ - family: Hoffmann
+ given: Erich
+ collection-number: 2
+ collection-title: Handbuch der europäischen Geschichte
+ container-title: 'Europa im Hoch- und Spätmittelalter'
+ editor:
+ - family: Seibt
+ given: Ferdinand
+ id: brandt
+ issued: 1987
+ language: 'de-DE'
+ page: '884-917'
+ publisher: 'Klett-Cotta'
+ publisher-place: Stuttgart
+ title: Die nordischen Länder von der Mitte des 11. Jahrhunderts bis
+ 1448
+ title-short: Die nordischen Länder
+ type: chapter
+- annote: An incollection entry with a series and number field
+ author:
+ - family: Hyman
+ given: Arthur
+ collection-number: 9
+ collection-title: Studies in philosophy and the history of philosophy
+ container-title: Studies in Aristotle
+ editor:
+ - family: 'O''Meara'
+ given: Dominic J.
+ id: hyman
+ issued: 1981
+ keyword: secondary
+ language: 'en-US'
+ page: '161-191'
+ publisher: The Catholic University of America Press
+ publisher-place: 'Washington, D.C.'
+ title: 'Aristotle''s theory of the intellect and its interpretation by
+ Averroes'
+ title-short: 'Aristotle''s theory of the intellect'
+ type: chapter
+- annote: A typical incollection entry. Note the indextitle field
+ author:
+ - family: Pines
+ given: Shlomo
+ container-title: Studies in medieval Jewish history and literature
+ editor:
+ - family: Twersky
+ given: Isadore
+ id: pines
+ issued: 1979
+ keyword: secondary
+ language: 'en-US'
+ page: '82-109'
+ publisher: Harvard University Press
+ publisher-place: 'Cambridge, Mass.'
+ title: 'The limitations of human knowledge according to Al-Farabi,
+ [ibn Bajja]{.nocase}, and Maimonides'
+ title-short: Limitations of human knowledge
+ type: chapter
+---
+
+
+```
diff --git a/test/command/biblatex-inproceedings.md b/test/command/biblatex-inproceedings.md
new file mode 100644
index 000000000..2c48ab5bf
--- /dev/null
+++ b/test/command/biblatex-inproceedings.md
@@ -0,0 +1,88 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{adapted from http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/examples/biblatex-examples.bib}
+
+@string{cup = {Cambridge University Press}}
+
+@inproceedings{moraux,
+ Annotation = {This is a typical inproceedings entry. Note the booksubtitle, shorttitle, indextitle, and indexsorttitle fields. Also note the eventdate field.},
+ Author = {Moraux, Paul},
+ Booktitle = {Aristotle on Mind and the Senses},
+ Booktitleaddon = {Proceedings of the Seventh Symposium Aristotelicum},
+ Date = 1979,
+ Editor = {Lloyd, G. E. R. and Owen, G. E. L.},
+ Eventdate = 1975,
+ Hyphenation = {french},
+ Indexsorttitle = {De Anima dans la tradition grecque},
+ Indextitle = {\emph{De Anima} dans la tradition grècque, Le},
+ Keywords = {secondary},
+ Location = {Cambridge},
+ Pages = {281-324},
+ Publisher = cup,
+ Shorttitle = {\emph{De Anima} dans la tradition grècque},
+ Subtitle = {Quelques aspects de l'interpretation du traité, de Theophraste à Themistius},
+ Title = {Le \emph{De Anima} dans la tradition grècque}}
+
+@inproceedings{salam,
+ Author = {Salam, Abdus},
+ Booksubtitle = {Relativistic groups and analyticity},
+ Booktitle = {Elementary particle theory},
+ Booktitleaddon = {Proceedings of the Eighth {Nobel} Symposium},
+ Date = 1968,
+ Editor = {Svartholm, Nils},
+ Eventdate = {1968-05-19/1968-05-25},
+ Location = {Stockholm},
+ Pages = {367-377},
+ Publisher = {Almquist \& Wiksell},
+ Title = {Weak and Electromagnetic Interactions},
+ Venue = {Aspenäsgarden, Lerum}}
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'This is a typical inproceedings entry. Note the booksubtitle,
+ shorttitle, indextitle, and indexsorttitle fields. Also note the
+ eventdate field.'
+ author:
+ - family: Moraux
+ given: Paul
+ container-title: Aristotle on Mind and the Senses. Proceedings of the
+ Seventh Symposium Aristotelicum
+ editor:
+ - family: Lloyd
+ given: G. E. R.
+ - family: Owen
+ given: G. E. L.
+ event-date: 1975
+ id: moraux
+ issued: 1979
+ keyword: secondary
+ language: 'fr-FR'
+ page: '281-324'
+ publisher: Cambridge University Press
+ publisher-place: Cambridge
+ title: 'Le *De Anima* dans la tradition grècque: Quelques aspects de
+ l''interpretation du traité, de Theophraste à Themistius'
+ title-short: '*De Anima* dans la tradition grècque'
+ type: 'paper-conference'
+- author:
+ - family: Salam
+ given: Abdus
+ container-title: 'Elementary particle theory: Relativistic groups and
+ analyticity. Proceedings of the eighth Nobel symposium'
+ editor:
+ - family: Svartholm
+ given: Nils
+ event-date: '1968-05-19/1968-05-25'
+ event-place: 'Aspenäsgarden, Lerum'
+ id: salam
+ issued: 1968
+ page: '367-377'
+ publisher: 'Almquist & Wiksell'
+ publisher-place: Stockholm
+ title: Weak and electromagnetic interactions
+ type: 'paper-conference'
+---
+
+
+```
diff --git a/test/command/biblatex-issue288.md b/test/command/biblatex-issue288.md
new file mode 100644
index 000000000..115b0012a
--- /dev/null
+++ b/test/command/biblatex-issue288.md
@@ -0,0 +1,35 @@
+```
+% pandoc -f biblatex -t markdown -s
+@thesis{Leavitt_2016,
+location = {{Los Angeles, CA}},
+title = {Upvoting the News: {{Breaking}} News Aggregation, Crowd Collaboration,
+and Algorithm-Driven Attention on Reddit.Com},
+timestamp = {2017-04-06T14:13:22Z},
+langid = {english},
+institution = {{University of Southern California}},
+type = {Dissertation},
+author = {Leavitt, Alex},
+date = {2016-08},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Leavitt
+ given: Alex
+ genre: Dissertation
+ id: Leavitt_2016
+ issued: '2016-08'
+ language: 'en-US'
+ publisher: University of Southern California
+ publisher-place: 'Los Angeles, CA'
+ title: 'Upvoting the news: Breaking news aggregation, crowd
+ collaboration, and algorithm-driven attention on reddit.com'
+ title-short: Upvoting the news
+ type: thesis
+---
+
+
+```
diff --git a/test/command/biblatex-itzhaki.md b/test/command/biblatex-itzhaki.md
new file mode 100644
index 000000000..29921404c
--- /dev/null
+++ b/test/command/biblatex-itzhaki.md
@@ -0,0 +1,83 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Itzhaki 1996)
+
+Itzhaki, Nissan. 1996. “Some Remarks on ’t Hooft’s S-matrix for Black
+Holes” (version 1). March 11.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Itzhaki, 1996)
+
+Itzhaki, N. (1996, March 11). Some remarks on ’t Hooft’s S-matrix for
+black holes.
+
+
+NOTES:
+
+- biblio2yaml:
+ - eprinttype = {arxiv}, eprint = {hep-th/9603067},
+ should be converted to a url: http://arxiv.org/abs/hep-th/9603067
+ (prefix http://arxiv.org/abs/ seems to work for all arxiv material)
+
+- citeproc:
+ - obtaining correct case of "'t Hooft's" in title is possible but awkward:
+ '{t Hooft's} works; {'t Hooft}'s or '{t Hooft}'s do not
+
+}
+
+@Online{itzhaki,
+ author = {Itzhaki, Nissan},
+ title = {Some remarks on '{t Hooft's} {S}-matrix for black holes},
+ date = {1996-03-11},
+ version = 1,
+ hyphenation = {american},
+ eprinttype = {arxiv},
+ eprint = {hep-th/9603067},
+ annotation = {An online reference from arXiv. Note the
+ eprint and eprinttype fields. Also note that
+ the arXiv reference is transformed into a clickable link if
+ hyperref support has been enabled},
+ abstract = {We discuss the limitations of 't Hooft's proposal for the
+ black hole S-matrix. We find that the validity of the S-matrix
+ implies violation of the semi-classical approximation at
+ scales large compared to the Planck scale. We also show that
+ the effect of the centrifugal barrier on the S-matrix is
+ crucial even for large transverse distances.},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- abstract: 'We discuss the limitations of ''t Hooft''s proposal for the
+ black hole S-matrix. We find that the validity of the S-matrix
+ implies violation of the semi-classical approximation at scales
+ large compared to the Planck scale. We also show that the effect of
+ the centrifugal barrier on the S-matrix is crucial even for large
+ transverse distances.'
+ annote: An online reference from arXiv. Note the eprint and eprinttype
+ fields. Also note that the arXiv reference is transformed into a
+ clickable link if hyperref support has been enabled
+ author:
+ - family: Itzhaki
+ given: Nissan
+ id: itzhaki
+ issued: '1996-03-11'
+ language: 'en-US'
+ title: 'Some remarks on ''[t Hooft''s]{.nocase} S-matrix for black
+ holes'
+ type: webpage
+ url: 'http://arxiv.org/abs/hep-th/9603067'
+ version: 1
+---
+
+
+```
diff --git a/test/command/biblatex-jaffe.md b/test/command/biblatex-jaffe.md
new file mode 100644
index 000000000..cf9bb09bb
--- /dev/null
+++ b/test/command/biblatex-jaffe.md
@@ -0,0 +1,82 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Jaffé 1885–1888)
+
+Jaffé, Philipp, ed. 1885–1888. *Regesta Pontificum Romanorum ab condita
+ecclesia ad annum post Christum natum \<span
+Style="font-variant:small-caps;"\>mcxcviii\</span\>*. 2nd ed. 2.
+Leipzig.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Jaffé, 1885–1888)
+
+Jaffé, P. (Ed.). (1885–1888). *Regesta Pontificum Romanorum ab condita
+ecclesia ad annum post Christum natum \<span
+style="font-variant:small-caps;"\>mcxcviii\</span\>* (2nd ed., 1-2).
+Leipzig.
+
+
+NOTES:
+
+- biblatex conversion:
+ - hyphenation = {latin}
+- citeproc:
+ - "vols." is missing
+ - works in Zotero
+ - This does not show up in the tests from the citeproc test suite that currently fail.
+ - "\<span ...\> needs to be fixed.
+ - maybe add markdown syntax ^^small caps^^ ?
+ - in pandoc "plain" output, small caps could be converted to uppercase chars: "MCXCVIII" would definitely look better here.
+
+}
+
+@Collection{jaffe,
+ editor = {Jaff{\'e}, Philipp},
+ title = {Regesta Pontificum Romanorum ab condita ecclesia ad annum post
+ Christum natum \textsc{mcxcviii}},
+ date = {1885/1888},
+ editora = {Loewenfeld, Samuel and Kaltenbrunner, Ferdinand and Ewald,
+ Paul},
+ edition = 2,
+ volumes = 2,
+ location = {Leipzig},
+ editoratype = {redactor},
+ indextitle = {Regesta Pontificum Romanorum},
+ shorttitle = {Regesta Pontificum Romanorum},
+ annotation = {A collection entry with edition and
+ volumes fields. Note the editora and
+ editoratype fields},
+ hyphenation = {latin},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A collection entry with edition and volumes fields. Note the
+ editora and editoratype fields
+ edition: 2
+ editor:
+ - family: Jaffé
+ given: Philipp
+ id: jaffe
+ issued: 1885/1888
+ language: la
+ number-of-volumes: 2
+ publisher-place: Leipzig
+ title: 'Regesta Pontificum Romanorum ab condita ecclesia ad annum post
+ Christum natum [mcxcviii]{.smallcaps}'
+ title-short: Regesta Pontificum Romanorum
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-jcg.md b/test/command/biblatex-jcg.md
new file mode 100644
index 000000000..509039f98
--- /dev/null
+++ b/test/command/biblatex-jcg.md
@@ -0,0 +1,54 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(“Semantic 3D Media and Content” 2011)
+
+“Semantic 3D Media and Content.” 2011. *Computers and Graphics* 35 (4).
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(“Semantic 3D media and content,” 2011)
+
+Semantic 3D media and content. (2011). *Computers and Graphics*,
+*35*(4).
+
+
+NOTES:
+ - output looks OK even if indistinguishable from article without page numbers
+
+}
+
+@Periodical{jcg,
+ title = {Computers and Graphics},
+ year = 2011,
+ issuetitle = {Semantic {3D} Media and Content},
+ volume = 35,
+ number = 4,
+ issn = {0097-8493},
+ annotation = {This is a periodical entry with an issn
+ field.},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: This is a periodical entry with an issn field.
+ container-title: Computers and Graphics
+ id: jcg
+ issn: '0097-8493'
+ issue: 4
+ issued: 2011
+ title: Semantic 3D media and content
+ type: 'article-journal'
+ volume: 35
+---
+
+
+```
diff --git a/test/command/biblatex-kant-kpv.md b/test/command/biblatex-kant-kpv.md
new file mode 100644
index 000000000..678d656b2
--- /dev/null
+++ b/test/command/biblatex-kant-kpv.md
@@ -0,0 +1,90 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Kant 1968)
+
+Kant, Immanuel. 1968. “Kritik der praktischen Vernunft.” In *Kants
+Werke. Akademie Textausgabe*, by Immanuel Kant, 5:1–163. Berlin: Walter
+de Gruyter.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Kant, 1968)
+
+Kant, I. (1968). Kritik der praktischen Vernunft. In *Kants Werke.
+Akademie Textausgabe* (Vol. 5, pp. 1–163). Berlin: Walter de Gruyter.
+
+
+NOTES:
+
+- citeproc
+ - support for the not yet official "volume-title" is missing
+
+- csl style file
+ - if author and container-author are identical, container-author should be suppressed (apparently csl style file issue; zotero shows same behaviour)
+
+}
+
+@InBook{kant:kpv,
+ title = {Kritik der praktischen Vernunft},
+ date = 1968,
+ author = {Kant, Immanuel},
+ booktitle = {Kritik der praktischen Vernunft. Kritik der Urtheilskraft},
+ bookauthor = {Kant, Immanuel},
+ maintitle = {Kants Werke. Akademie Textausgabe},
+ volume = 5,
+ publisher = {Walter de Gruyter},
+ location = {Berlin},
+ pages = {1-163},
+ shorthand = {KpV},
+ hyphenation = {german},
+ shorttitle = {Kritik der praktischen Vernunft},
+ annotation = {An edition of Kant's \emph{Collected Works}, volume five. This
+ is an inbook entry which explicitly refers to the
+ \emph{Critique of Practical Reason} only, not to the entire
+ fifth volume. Note the author and bookauthor
+ fields in the database file. By default, the
+ bookauthor is omitted if the values of the
+ author and bookauthor fields are identical},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'An edition of Kant''s *Collected Works*, volume five. This is
+ an inbook entry which explicitly refers to the *Critique of
+ Practical Reason* only, not to the entire fifth volume. Note the
+ author and bookauthor fields in the database file. By default, the
+ bookauthor is omitted if the values of the author and bookauthor
+ fields are identical'
+ author:
+ - family: Kant
+ given: Immanuel
+ container-author:
+ - family: Kant
+ given: Immanuel
+ container-title: Kants Werke. Akademie Textausgabe
+ id: 'kant:kpv'
+ issued: 1968
+ language: 'de-DE'
+ page: '1-163'
+ publisher: Walter de Gruyter
+ publisher-place: Berlin
+ title: Kritik der praktischen Vernunft
+ title-short: Kritik der praktischen Vernunft
+ type: chapter
+ volume: 5
+ volume-title: Kritik der praktischen Vernunft. Kritik der
+ Urtheilskraft
+---
+
+
+```
diff --git a/test/command/biblatex-kant-ku.md b/test/command/biblatex-kant-ku.md
new file mode 100644
index 000000000..57a023d68
--- /dev/null
+++ b/test/command/biblatex-kant-ku.md
@@ -0,0 +1,82 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Kant 1968)
+
+Kant, Immanuel. 1968. “Kritik der Urtheilskraft.” In *Kants Werke.
+Akademie Textausgabe*, by Immanuel Kant, 5:165–485. Berlin: Walter de
+Gruyter.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Kant, 1968)
+
+Kant, I. (1968). Kritik der Urtheilskraft. In *Kants Werke. Akademie
+Textausgabe* (Vol. 5, pp. 165–485). Berlin: Walter de Gruyter.
+
+
+NOTES:
+
+- citeproc
+ - support for the not yet official "volume-title" is missing
+
+- CSL style file
+ - if author and container-author are identical, container-author should be suppressed (apparently csl style file issue; zotero shows same behaviour)
+
+}
+
+@InBook{kant:ku,
+ title = {Kritik der Urtheilskraft},
+ date = 1968,
+ author = {Kant, Immanuel},
+ booktitle = {Kritik der praktischen Vernunft. Kritik der Urtheilskraft},
+ bookauthor = {Kant, Immanuel},
+ maintitle = {Kants Werke. Akademie Textausgabe},
+ volume = 5,
+ publisher = {Walter de Gruyter},
+ location = {Berlin},
+ pages = {165-485},
+ shorthand = {KU},
+ hyphenation = {german},
+ annotation = {An edition of Kant's \emph{Collected Works}, volume five. This
+ is an inbook entry which explicitly refers to the
+ \emph{Critique of Judgment} only, not to the entire fifth
+ volume},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'An edition of Kant''s *Collected Works*, volume five. This is
+ an inbook entry which explicitly refers to the *Critique of
+ Judgment* only, not to the entire fifth volume'
+ author:
+ - family: Kant
+ given: Immanuel
+ container-author:
+ - family: Kant
+ given: Immanuel
+ container-title: Kants Werke. Akademie Textausgabe
+ id: 'kant:ku'
+ issued: 1968
+ language: 'de-DE'
+ page: '165-485'
+ publisher: Walter de Gruyter
+ publisher-place: Berlin
+ title: Kritik der Urtheilskraft
+ type: chapter
+ volume: 5
+ volume-title: Kritik der praktischen Vernunft. Kritik der
+ Urtheilskraft
+---
+
+
+```
diff --git a/test/command/biblatex-kastenholz.md b/test/command/biblatex-kastenholz.md
new file mode 100644
index 000000000..bd3c1463c
--- /dev/null
+++ b/test/command/biblatex-kastenholz.md
@@ -0,0 +1,126 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Kastenholz and Hünenberger 2006)
+
+Kastenholz, M. A., and Philippe H. Hünenberger. 2006. “Computation of
+Methodologyindependent Ionic Solvation Free Energies from Molecular
+Simulations: I. the Electrostatic Potential in Molecular Liquids.”
+*J. Chem. Phys.* 124.
+doi:[10.1063/1.2172593](https://doi.org/10.1063/1.2172593 "10.1063/1.2172593").
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Kastenholz & Hünenberger, 2006)
+
+Kastenholz, M. A., & Hünenberger, P. H. (2006). Computation of
+methodologyindependent ionic solvation free energies from molecular
+simulations: I. the electrostatic potential in molecular liquids.
+*J. Chem. Phys.*, *124*.
+doi:[10.1063/1.2172593](https://doi.org/10.1063/1.2172593 "10.1063/1.2172593")
+
+
+NOTES:
+
+- biblio2xaml
+ - fix conversion of "\hyphen”
+ - the string "doi:" should not appear as part of the content of the "doi" field
+
+}
+
+@string{ jchph = {J.~Chem. Phys.} }
+
+@Article{kastenholz,
+ author = {Kastenholz, M. A. and H{\"u}nenberger, Philippe H.},
+ title = {Computation of methodology\hyphen independent ionic solvation
+ free energies from molecular simulations},
+ journaltitle = jchph,
+ date = 2006,
+ subtitle = {I. {The} electrostatic potential in molecular liquids},
+ volume = 124,
+ eid = 124106,
+ doi = {10.1063/1.2172593},
+ hyphenation = {american},
+ indextitle = {Computation of ionic solvation free energies},
+ annotation = {An article entry with an eid and a
+ doi field. Note that the \textsc{doi} is transformed
+ into a clickable link if hyperref support has been
+ enabled},
+ abstract = {The computation of ionic solvation free energies from
+ atomistic simulations is a surprisingly difficult problem that
+ has found no satisfactory solution for more than 15 years. The
+ reason is that the charging free energies evaluated from such
+ simulations are affected by very large errors. One of these is
+ related to the choice of a specific convention for summing up
+ the contributions of solvent charges to the electrostatic
+ potential in the ionic cavity, namely, on the basis of point
+ charges within entire solvent molecules (M scheme) or on the
+ basis of individual point charges (P scheme). The use of an
+ inappropriate convention may lead to a charge-independent
+ offset in the calculated potential, which depends on the
+ details of the summation scheme, on the quadrupole-moment
+ trace of the solvent molecule, and on the approximate form
+ used to represent electrostatic interactions in the
+ system. However, whether the M or P scheme (if any) represents
+ the appropriate convention is still a matter of on-going
+ debate. The goal of the present article is to settle this
+ long-standing controversy by carefully analyzing (both
+ analytically and numerically) the properties of the
+ electrostatic potential in molecular liquids (and inside
+ cavities within them).},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- abstract: 'The computation of ionic solvation free energies from
+ atomistic simulations is a surprisingly difficult problem that has
+ found no satisfactory solution for more than 15 years. The reason is
+ that the charging free energies evaluated from such simulations are
+ affected by very large errors. One of these is related to the choice
+ of a specific convention for summing up the contributions of solvent
+ charges to the electrostatic potential in the ionic cavity, namely,
+ on the basis of point charges within entire solvent molecules (M
+ scheme) or on the basis of individual point charges (P scheme). The
+ use of an inappropriate convention may lead to a charge-independent
+ offset in the calculated potential, which depends on the details of
+ the summation scheme, on the quadrupole-moment trace of the solvent
+ molecule, and on the approximate form used to represent
+ electrostatic interactions in the system. However, whether the M or
+ P scheme (if any) represents the appropriate convention is still a
+ matter of on-going debate. The goal of the present article is to
+ settle this long-standing controversy by carefully analyzing (both
+ analytically and numerically) the properties of the electrostatic
+ potential in molecular liquids (and inside cavities within them).'
+ annote: 'An article entry with an eid and a doi field. Note that the
+ [doi]{.smallcaps} is transformed into a clickable link if hyperref
+ support has been enabled'
+ author:
+ - family: Kastenholz
+ given: M. A.
+ - family: Hünenberger
+ given: Philippe H.
+ container-title: J. Chem. Phys.
+ doi: 10.1063/1.2172593
+ id: kastenholz
+ issued: 2006
+ language: 'en-US'
+ title: 'Computation of methodology-independent ionic solvation free
+ energies from molecular simulations: I. The electrostatic potential
+ in molecular liquids'
+ title-short: 'Computation of methodology-independent ionic solvation
+ free energies from molecular simulations'
+ type: 'article-journal'
+ volume: 124
+---
+
+
+```
diff --git a/test/command/biblatex-knuth-ct-a.md b/test/command/biblatex-knuth-ct-a.md
new file mode 100644
index 000000000..ffcc09ea6
--- /dev/null
+++ b/test/command/biblatex-knuth-ct-a.md
@@ -0,0 +1,78 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Knuth 1984)
+
+Knuth, Donald E. 1984. *Computers & Typesetting*. Vol. A. Reading,
+Mass.: Addison-Wesley.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Knuth, 1984)
+
+Knuth, D. E. (1984). *Computers & typesetting* (Vol. A). Reading, Mass.:
+Addison-Wesley.
+
+
+NOTES:
+
+- volume-title currently not implemented by chicago-author-date.csl and apa.csl.
+
+}
+
+@Book{knuth:ct:a,
+ author = {Knuth, Donald E.},
+ title = {The {\TeX} book},
+ date = 1984,
+ maintitle = {Computers \& Typesetting},
+ volume = {A},
+ publisher = {Addison-Wesley},
+ location = {Reading, Mass.},
+ hyphenation = {american},
+ sortyear = {1984-1},
+ sorttitle = {Computers & Typesetting A},
+ indexsorttitle= {The TeXbook},
+ indextitle = {\protect\TeX book, The},
+ shorttitle = {\TeX book},
+ annotation = {The first volume of a five-volume book. Note the
+ sorttitle and sortyear fields. We want this
+ volume to be listed after the entry referring to the entire
+ five-volume set. Also note the indextitle and
+ indexsorttitle fields. Indexing packages that don't
+ generate robust index entries require some control sequences
+ to be protected from expansion},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'The first volume of a five-volume book. Note the sorttitle
+ and sortyear fields. We want this volume to be listed after the
+ entry referring to the entire five-volume set. Also note the
+ indextitle and indexsorttitle fields. Indexing packages that don''t
+ generate robust index entries require some control sequences to be
+ protected from expansion'
+ author:
+ - family: Knuth
+ given: Donald E.
+ id: 'knuth:ct:a'
+ issued: 1984
+ language: 'en-US'
+ publisher: 'Addison-Wesley'
+ publisher-place: 'Reading, Mass.'
+ title: 'Computers & typesetting'
+ type: book
+ volume: A
+ volume-title: The TeX book
+---
+
+
+```
diff --git a/test/command/biblatex-knuth-ct-b.md b/test/command/biblatex-knuth-ct-b.md
new file mode 100644
index 000000000..59b50b580
--- /dev/null
+++ b/test/command/biblatex-knuth-ct-b.md
@@ -0,0 +1,70 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2015-03-08:
+
+(Knuth 1986)
+
+Knuth, Donald E. 1986. *Computers & Typesetting*. Vol. B. Reading,
+Mass.: Addison-Wesley.
+
+
+Formatted with pandoc and apa.csl, 2015-03-08:
+
+(Knuth, 1986)
+
+Knuth, D. E. (1986). *Computers & typesetting* (Vol. B). Reading, Mass.:
+Addison-Wesley.
+
+
+NOTES:
+
+- volume-title currently not implemented by chicago-author-date.csl and apa.csl.
+
+}
+
+@Book{knuth:ct:b,
+ author = {Knuth, Donald E.},
+ title = {\TeX: {T}he Program},
+ date = 1986,
+ maintitle = {Computers \& Typesetting},
+ volume = {B},
+ publisher = {Addison-Wesley},
+ location = {Reading, Mass.},
+ hyphenation = {american},
+ sortyear = {1986-1},
+ sorttitle = {Computers & Typesetting B},
+ indexsorttitle= {TeX: The Program},
+ shorttitle = {\TeX},
+ annotation = {The second volume of a five-volume book. Note the
+ sorttitle and sortyear fields. Also note the
+ indexsorttitle field},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'The second volume of a five-volume book. Note the sorttitle
+ and sortyear fields. Also note the indexsorttitle field'
+ author:
+ - family: Knuth
+ given: Donald E.
+ id: 'knuth:ct:b'
+ issued: 1986
+ language: 'en-US'
+ publisher: 'Addison-Wesley'
+ publisher-place: 'Reading, Mass.'
+ title: 'Computers & typesetting'
+ title-short: TeX
+ type: book
+ volume: B
+ volume-title: 'TeX: The program'
+---
+
+
+```
diff --git a/test/command/biblatex-knuth-ct-c.md b/test/command/biblatex-knuth-ct-c.md
new file mode 100644
index 000000000..181076b5f
--- /dev/null
+++ b/test/command/biblatex-knuth-ct-c.md
@@ -0,0 +1,69 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2015-03-08:
+
+(Knuth 1986)
+
+Knuth, Donald E. 1986. *Computers & Typesetting*. Vol. C. Reading,
+Mass.: Addison-Wesley.
+
+
+Formatted with pandoc and apa.csl, 2015-03-08:
+
+(Knuth, 1986)
+
+Knuth, D. E. (1986). *Computers & typesetting* (Vol. C). Reading, Mass.:
+Addison-Wesley.
+
+
+NOTES:
+
+- volume-title currently not implemented by chicago-author-date.csl and apa.csl.
+
+}
+
+@Book{knuth:ct:c,
+ author = {Knuth, Donald E.},
+ title = {The {METAFONTbook}},
+ date = 1986,
+ maintitle = {Computers \& Typesetting},
+ volume = {C},
+ publisher = {Addison-Wesley},
+ location = {Reading, Mass.},
+ hyphenation = {american},
+ sortyear = {1986-2},
+ sorttitle = {Computers & Typesetting C},
+ indextitle = {METAFONTbook, The},
+ shorttitle = {{METAFONTbook}},
+ annotation = {The third volume of a five-volume book. Note the
+ sorttitle and sortyear fields as well as the
+ indextitle field},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'The third volume of a five-volume book. Note the sorttitle
+ and sortyear fields as well as the indextitle field'
+ author:
+ - family: Knuth
+ given: Donald E.
+ id: 'knuth:ct:c'
+ issued: 1986
+ language: 'en-US'
+ publisher: 'Addison-Wesley'
+ publisher-place: 'Reading, Mass.'
+ title: 'Computers & typesetting'
+ type: book
+ volume: C
+ volume-title: The METAFONTbook
+---
+
+
+```
diff --git a/test/command/biblatex-knuth-ct-d.md b/test/command/biblatex-knuth-ct-d.md
new file mode 100644
index 000000000..b8e297162
--- /dev/null
+++ b/test/command/biblatex-knuth-ct-d.md
@@ -0,0 +1,71 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2015-03-08:
+
+(Knuth 1986)
+
+Knuth, Donald E. 1986. *Computers & Typesetting*. Vol. D. Reading,
+Mass.: Addison-Wesley.
+
+
+Formatted with pandoc and apa.csl, 2015-03-08:
+
+(Knuth, 1986)
+
+Knuth, D. E. (1986). *Computers & typesetting* (Vol. D). Reading, Mass.:
+Addison-Wesley.
+
+
+NOTES:
+
+- biblio2yaml
+ - Should letters following a colon, such as the "T" in "{{METAFONT}: {T}he Program}" be protected by default? -- I'm not sure ...
+
+- volume-title currently not implemented by chicago-author-date.csl and apa.csl.
+
+}
+
+@Book{knuth:ct:d,
+ author = {Knuth, Donald E.},
+ title = {{METAFONT}: {T}he Program},
+ date = 1986,
+ maintitle = {Computers \& Typesetting},
+ volume = {D},
+ publisher = {Addison-Wesley},
+ location = {Reading, Mass.},
+ hyphenation = {american},
+ sortyear = {1986-3},
+ sorttitle = {Computers & Typesetting D},
+ shorttitle = {{METAFONT}},
+ annotation = {The fourth volume of a five-volume book. Note the
+ sorttitle and sortyear fields},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'The fourth volume of a five-volume book. Note the sorttitle
+ and sortyear fields'
+ author:
+ - family: Knuth
+ given: Donald E.
+ id: 'knuth:ct:d'
+ issued: 1986
+ language: 'en-US'
+ publisher: 'Addison-Wesley'
+ publisher-place: 'Reading, Mass.'
+ title: 'Computers & typesetting'
+ title-short: METAFONT
+ type: book
+ volume: D
+ volume-title: 'METAFONT: The program'
+---
+
+
+```
diff --git a/test/command/biblatex-knuth-ct-e.md b/test/command/biblatex-knuth-ct-e.md
new file mode 100644
index 000000000..26c156375
--- /dev/null
+++ b/test/command/biblatex-knuth-ct-e.md
@@ -0,0 +1,66 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2015-03-08:
+
+(Knuth 1986)
+
+Knuth, Donald E. 1986. *Computers & Typesetting*. Vol. E. Reading,
+Mass.: Addison-Wesley.
+
+
+Formatted with pandoc and apa.csl, 2015-03-08:
+
+(Knuth, 1986)
+
+Knuth, D. E. (1986). *Computers & typesetting* (Vol. E). Reading, Mass.:
+Addison-Wesley.
+
+
+NOTES:
+
+- volume-title currently not implemented by chicago-author-date.csl and apa.csl.
+
+}
+
+@Book{knuth:ct:e,
+ author = {Knuth, Donald E.},
+ title = {Computer Modern Typefaces},
+ date = 1986,
+ maintitle = {Computers \& Typesetting},
+ volume = {E},
+ publisher = {Addison-Wesley},
+ location = {Reading, Mass.},
+ hyphenation = {american},
+ sortyear = {1986-4},
+ sorttitle = {Computers & Typesetting E},
+ annotation = {The fifth volume of a five-volume book. Note the
+ sorttitle and sortyear fields},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'The fifth volume of a five-volume book. Note the sorttitle
+ and sortyear fields'
+ author:
+ - family: Knuth
+ given: Donald E.
+ id: 'knuth:ct:e'
+ issued: 1986
+ language: 'en-US'
+ publisher: 'Addison-Wesley'
+ publisher-place: 'Reading, Mass.'
+ title: 'Computers & typesetting'
+ type: book
+ volume: E
+ volume-title: Computer modern typefaces
+---
+
+
+```
diff --git a/test/command/biblatex-knuth-ct-related.md b/test/command/biblatex-knuth-ct-related.md
new file mode 100644
index 000000000..4c5ce19f9
--- /dev/null
+++ b/test/command/biblatex-knuth-ct-related.md
@@ -0,0 +1,72 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Knuth 1984–1986)
+
+Knuth, Donald E. 1984–1986. *Computers & Typesetting*. 5. Reading,
+Mass.: Addison-Wesley.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Knuth, 1984–1986)
+
+Knuth, D. E. (1984–1986). *Computers & typesetting* (1-5). Reading,
+Mass.: Addison-Wesley.
+
+
+NOTES:
+
+- biblio2yaml
+ - related = {...}, relatedtype = {multivolume}, -- no counterpart in CSL
+
+- citeproc
+ - term "vols." missing
+
+}
+
+@Book{knuth:ct:related,
+ author = {Knuth, Donald E.},
+ title = {Computers \& Typesetting},
+ date = {1984/1986},
+ volumes = 5,
+ publisher = {Addison-Wesley},
+ location = {Reading, Mass.},
+ hyphenation = {american},
+ sortyear = {1984-0},
+ sorttitle = {Computers & Typesetting},
+ indexsorttitle= {Computers & Typesetting},
+ related = {knuth:ct:a,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e},
+ relatedtype = {multivolume},
+ annotation = {A five-volume book cited as a whole and related to its
+ individual volumes. Note the related and
+ relatedtype fields},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'A five-volume book cited as a whole and related to its
+ individual volumes. Note the related and relatedtype fields'
+ author:
+ - family: Knuth
+ given: Donald E.
+ id: 'knuth:ct:related'
+ issued: 1984/1986
+ language: 'en-US'
+ number-of-volumes: 5
+ publisher: 'Addison-Wesley'
+ publisher-place: 'Reading, Mass.'
+ title: 'Computers & typesetting'
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-knuth-ct.md b/test/command/biblatex-knuth-ct.md
new file mode 100644
index 000000000..856fe54f7
--- /dev/null
+++ b/test/command/biblatex-knuth-ct.md
@@ -0,0 +1,66 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Knuth 1984–1986)
+
+Knuth, Donald E. 1984–1986. *Computers & Typesetting*. 5. Reading,
+Mass.: Addison-Wesley.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Knuth, 1984–1986)
+
+Knuth, D. E. (1984–1986). *Computers & typesetting* (1-5). Reading,
+Mass.: Addison-Wesley.
+
+
+NOTES:
+
+- citeproc
+ - term "vols." is missing
+
+}
+
+@Book{knuth:ct,
+ author = {Knuth, Donald E.},
+ title = {Computers \& Typesetting},
+ date = {1984/1986},
+ volumes = 5,
+ publisher = {Addison-Wesley},
+ location = {Reading, Mass.},
+ hyphenation = {american},
+ sortyear = {1984-0},
+ sorttitle = {Computers & Typesetting},
+ indexsorttitle= {Computers & Typesetting},
+ annotation = {A five-volume book cited as a whole. This is a book
+ entry, note the volumes field},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'A five-volume book cited as a whole. This is a book entry,
+ note the volumes field'
+ author:
+ - family: Knuth
+ given: Donald E.
+ id: 'knuth:ct'
+ issued: 1984/1986
+ language: 'en-US'
+ number-of-volumes: 5
+ publisher: 'Addison-Wesley'
+ publisher-place: 'Reading, Mass.'
+ title: 'Computers & typesetting'
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-kowalik.md b/test/command/biblatex-kowalik.md
new file mode 100644
index 000000000..605d03a1c
--- /dev/null
+++ b/test/command/biblatex-kowalik.md
@@ -0,0 +1,68 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Kowalik and Isard 1995)
+
+Kowalik, F., and M. Isard. 1995. “Estimateur d’un défaut de
+fonctionnement d’un modulateur en quadrature et étage de modulation
+l’utilisant.” French patent request.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Kowalik & Isard, 1995)
+
+Kowalik, F., & Isard, M. (1995, January 11). Estimateur d’un défaut de
+fonctionnement d’un modulateur en quadrature et étage de modulation
+l’utilisant. French patent request.
+
+
+}
+
+@Patent{kowalik,
+ author = {Kowalik, F. and Isard, M.},
+ title = {Estimateur d'un d{\'e}faut de fonctionnement d'un modulateur
+ en quadrature et {\'e}tage de modulation l'utilisant},
+ number = 9500261,
+ date = {1995-01-11},
+ type = {patreqfr},
+ hyphenation = {french},
+ indextitle = {Estimateur d'un d{\'e}faut de fonctionnement},
+ annotation = {This is a patent entry for a French patent request
+ with a full date. The number is given in the number
+ field. Note the format of the type and date
+ fields in the database file. Compare almendro,
+ laufenberg, and sorace},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'This is a patent entry for a French patent request with a
+ full date. The number is given in the number field. Note the format
+ of the type and date fields in the database file. Compare almendro,
+ laufenberg, and sorace'
+ author:
+ - family: Kowalik
+ given: F.
+ - family: Isard
+ given: M.
+ genre: French patent request
+ id: kowalik
+ issued: '1995-01-11'
+ language: 'fr-FR'
+ number: 9500261
+ title: 'Estimateur d''un défaut de fonctionnement d''un modulateur en
+ quadrature et étage de modulation l''utilisant'
+ type: patent
+---
+
+
+```
diff --git a/test/command/biblatex-kullback-related.md b/test/command/biblatex-kullback-related.md
new file mode 100644
index 000000000..f7cffa7e5
--- /dev/null
+++ b/test/command/biblatex-kullback-related.md
@@ -0,0 +1,62 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Kullback 1997)
+
+Kullback, Solomon. 1997. *Information Theory and Statistics*. New York:
+Dover Publications.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Kullback, 1997)
+
+Kullback, S. (1997). *Information theory and statistics*. New York:
+Dover Publications.
+
+
+NOTES:
+
+- related = {kullback}, relatedtype = {origpubin}, -- not possible in CSL
+
+}
+
+@Book{kullback:related,
+ author = {Kullback, Solomon},
+ title = {Information Theory and Statistics},
+ year = 1997,
+ publisher = {Dover Publications},
+ location = {New York},
+ hyphenation = {american},
+ related = {kullback},
+ relatedtype = {origpubin},
+ annotation = {A reprint of the kullback entry. Note the format of
+ the related and relatedtype fields},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A reprint of the kullback entry. Note the format of the
+ related and relatedtype fields
+ author:
+ - family: Kullback
+ given: Solomon
+ id: 'kullback:related'
+ issued: 1997
+ language: 'en-US'
+ publisher: Dover Publications
+ publisher-place: New York
+ title: Information theory and statistics
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-kullback-reprint.md b/test/command/biblatex-kullback-reprint.md
new file mode 100644
index 000000000..e158868f5
--- /dev/null
+++ b/test/command/biblatex-kullback-reprint.md
@@ -0,0 +1,71 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Kullback 1997)
+
+Kullback, Solomon. 1997. *Information Theory and Statistics*. New York:
+Dover Publications.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Kullback, 1997)
+
+Kullback, S. (1997). *Information theory and statistics*. New York:
+Dover Publications.
+
+
+NOTES:
+
+Formatted with chicago-author-date-TEST-20131018.csl
+
+(Kullback [1959] 1997)
+
+Kullback, Solomon. (1959) 1997. *Information Theory and Statistics*. New
+York: Dover Publications.
+
+}
+
+@Book{kullback:reprint,
+ author = {Kullback, Solomon},
+ title = {Information Theory and Statistics},
+ year = 1997,
+ publisher = {Dover Publications},
+ location = {New York},
+ origyear = 1959,
+ origpublisher= {John Wiley \& Sons},
+ hyphenation = {american},
+ annotation = {A reprint of the kullback entry. Note the format of
+ origyear and origpublisher. These fields are
+ not used by the standard bibliography styles},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A reprint of the kullback entry. Note the format of origyear
+ and origpublisher. These fields are not used by the standard
+ bibliography styles
+ author:
+ - family: Kullback
+ given: Solomon
+ id: 'kullback:reprint'
+ issued: 1997
+ language: 'en-US'
+ original-date: 1959
+ original-publisher: 'John Wiley & Sons'
+ publisher: Dover Publications
+ publisher-place: New York
+ title: Information theory and statistics
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-kullback.md b/test/command/biblatex-kullback.md
new file mode 100644
index 000000000..333128acf
--- /dev/null
+++ b/test/command/biblatex-kullback.md
@@ -0,0 +1,52 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Kullback 1959)
+
+Kullback, Solomon. 1959. *Information Theory and Statistics*. New York:
+John Wiley & Sons.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Kullback, 1959)
+
+Kullback, S. (1959). *Information theory and statistics*. New York: John
+Wiley & Sons.
+
+
+}
+
+@Book{kullback,
+ author = {Kullback, Solomon},
+ title = {Information Theory and Statistics},
+ year = 1959,
+ publisher = {John Wiley \& Sons},
+ location = {New York},
+ hyphenation = {american},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Kullback
+ given: Solomon
+ id: kullback
+ issued: 1959
+ language: 'en-US'
+ publisher: 'John Wiley & Sons'
+ publisher-place: New York
+ title: Information theory and statistics
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-laufenberg.md b/test/command/biblatex-laufenberg.md
new file mode 100644
index 000000000..4c7442c78
--- /dev/null
+++ b/test/command/biblatex-laufenberg.md
@@ -0,0 +1,109 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Laufenberg et al. 2006)
+
+Laufenberg, Xaver, Dominique Eynius, Helmut Suelzle, Stephan Usbeck,
+Matthias Spaeth, Miriam Neuser-Hoffmann, Christian Myrzik, et al. 2006.
+“Elektrische Einrichtung und Betriebsverfahren.” European patent.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Laufenberg et al., 2006)
+
+Laufenberg, X., Eynius, D., Suelzle, H., Usbeck, S., Spaeth, M.,
+Neuser-Hoffmann, M., … Ebner, N. (2006, September 13). Elektrische
+Einrichtung und Betriebsverfahren. European patent.
+
+
+NOTES:
+
+- biblio2yaml
+ - Is there any equivalent of "holder" in CSL?
+
+}
+
+@Patent{laufenberg,
+ author = {Laufenberg, Xaver and Eynius, Dominique and Suelzle, Helmut
+ and Usbeck, Stephan and Spaeth, Matthias and Neuser-Hoffmann,
+ Miriam and Myrzik, Christian and Schmid, Manfred and Nietfeld,
+ Franz and Thiel, Alexander and Braun, Harald and Ebner,
+ Norbert},
+ title = {Elektrische Einrichtung und Betriebsverfahren},
+ number = 1700367,
+ date = {2006-09-13},
+ holder = {{Robert Bosch GmbH} and {Daimler Chrysler AG} and {Bayerische
+ Motoren Werke AG}},
+ type = {patenteu},
+ hyphenation = {german},
+ annotation = {This is a patent entry with a holder field.
+ Note the format of the type and location
+ fields in the database file. Compare almendro,
+ sorace, and kowalik},
+ abstract = {The invention relates to an electric device comprising a
+ generator, in particular for use in the vehicle electric
+ system of a motor vehicle and a controller for controlling the
+ generator voltage. The device is equipped with a control zone,
+ in which the voltage is controlled and zones, in which the
+ torque is controlled. The invention also relates to methods
+ for operating a device of this type.},
+ file = {http://v3.espacenet.com/textdoc?IDX=EP1700367},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- abstract: 'The invention relates to an electric device comprising a
+ generator, in particular for use in the vehicle electric system of a
+ motor vehicle and a controller for controlling the generator
+ voltage. The device is equipped with a control zone, in which the
+ voltage is controlled and zones, in which the torque is controlled.
+ The invention also relates to methods for operating a device of this
+ type.'
+ annote: 'This is a patent entry with a holder field. Note the format
+ of the type and location fields in the database file. Compare
+ almendro, sorace, and kowalik'
+ author:
+ - family: Laufenberg
+ given: Xaver
+ - family: Eynius
+ given: Dominique
+ - family: Suelzle
+ given: Helmut
+ - family: Usbeck
+ given: Stephan
+ - family: Spaeth
+ given: Matthias
+ - family: 'Neuser-Hoffmann'
+ given: Miriam
+ - family: Myrzik
+ given: Christian
+ - family: Schmid
+ given: Manfred
+ - family: Nietfeld
+ given: Franz
+ - family: Thiel
+ given: Alexander
+ - family: Braun
+ given: Harald
+ - family: Ebner
+ given: Norbert
+ genre: European patent
+ id: laufenberg
+ issued: '2006-09-13'
+ language: 'de-DE'
+ number: 1700367
+ title: Elektrische Einrichtung und Betriebsverfahren
+ type: patent
+---
+
+
+```
diff --git a/test/command/biblatex-loh.md b/test/command/biblatex-loh.md
new file mode 100644
index 000000000..df56ac27d
--- /dev/null
+++ b/test/command/biblatex-loh.md
@@ -0,0 +1,65 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Loh 1992)
+
+Loh, Nin C. 1992. “High-resolution Micromachined Interferometric
+Accelerometer.” Master’s thesis, Cambridge, Mass.: Massachusetts
+Institute of Technology.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Loh, 1992)
+
+Loh, N. C. (1992). *High-resolution micromachined interferometric
+accelerometer* (Master’s thesis). Massachusetts Institute of Technology,
+Cambridge, Mass.
+
+
+NOTES:
+
+- biblio2yaml
+ - At some point, actual localization of "localization keys" will have to be implemented
+
+}
+
+@Thesis{loh,
+ author = {Loh, Nin C.},
+ title = {High-Resolution Micromachined Interferometric Accelerometer},
+ type = {mathesis},
+ institution = {Massachusetts Institute of Technology},
+ date = 1992,
+ location = {Cambridge, Mass.},
+ hyphenation = {american},
+ annotation = {This is a typical thesis entry for an MA thesis. Note
+ the type field in the database file which uses a
+ localization key},
+}
+^D
+---
+nocite: '[@*]'
+references:
+- annote: This is a typical thesis entry for an MA thesis. Note the type
+ field in the database file which uses a localization key
+ author:
+ - family: Loh
+ given: Nin C.
+ genre: 'Master''s thesis'
+ id: loh
+ issued: 1992
+ language: 'en-US'
+ publisher: Massachusetts Institute of Technology
+ publisher-place: 'Cambridge, Mass.'
+ title: 'High-resolution micromachined interferometric accelerometer'
+ type: thesis
+---
+
+
+```
diff --git a/test/command/biblatex-malinowski.md b/test/command/biblatex-malinowski.md
new file mode 100644
index 000000000..56afc0b79
--- /dev/null
+++ b/test/command/biblatex-malinowski.md
@@ -0,0 +1,67 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Malinowski 1972)
+
+Malinowski, Bronisław. 1972. *Argonauts of the Western Pacific: An
+Account of Native Enterprise and Adventure in the Archipelagoes of
+Melanesian New Guinea*. 8th ed. London: Routledge and Kegan Paul.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Malinowski, 1972)
+
+Malinowski, B. (1972). *Argonauts of the Western Pacific: An account of
+native enterprise and adventure in the Archipelagoes of Melanesian New
+Guinea* (8th ed.). London: Routledge and Kegan Paul.
+
+
+}
+
+@Book{malinowski,
+ author = {Malinowski, Bronis{\l}aw},
+ title = {Argonauts of the {Western Pacific}},
+ date = 1972,
+ edition = 8,
+ publisher = {Routledge {and} Kegan Paul},
+ location = {London},
+ hyphenation = {british},
+ subtitle = {An account of native enterprise and adventure in the
+ {Archipelagoes of Melanesian New Guinea}},
+ shorttitle = {Argonauts},
+ annotation = {This is a book entry. Note the format of the
+ publisher and edition fields as well as the
+ subtitle field},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: This is a book entry. Note the format of the publisher and
+ edition fields as well as the subtitle field
+ author:
+ - family: Malinowski
+ given: Bronisław
+ edition: 8
+ id: malinowski
+ issued: 1972
+ language: 'en-GB'
+ publisher: Routledge and Kegan Paul
+ publisher-place: London
+ title: 'Argonauts of the Western Pacific: An account of native
+ enterprise and adventure in the [Archipelagoes of Melanesian New
+ Guinea]{.nocase}'
+ title-short: Argonauts
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-manual.md b/test/command/biblatex-manual.md
new file mode 100644
index 000000000..2d4f3596c
--- /dev/null
+++ b/test/command/biblatex-manual.md
@@ -0,0 +1,51 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{adapted from http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/examples/biblatex-examples.bib}
+
+@Manual{cms,
+ title = {The {Chicago} Manual of Style},
+ date = 2003,
+ subtitle = {The Essential Guide for Writers, Editors, and Publishers},
+ edition = 15,
+ publisher = {University of Chicago Press},
+ location = {Chicago, Ill.},
+ isbn = {0-226-10403-6},
+ label = {CMS},
+ hyphenation = {american},
+ sorttitle = {Chicago Manual of Style},
+ indextitle = {Chicago Manual of Style, The},
+ shorttitle = {Chicago Manual of Style},
+ annotation = {This is a manual entry without an author or
+ editor. Note the label field in the database
+ file which is provided for author-year citation styles. Also
+ note the sorttitle and indextitle fields. By
+ default, all entries without an author or
+ editor are alphabetized by title but we want
+ this entry to be alphabetized under \enquote*{C} rather than
+ \enquote*{T}. There's also an isbn field},
+}
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'This is a manual entry without an author or editor. Note the
+ label field in the database file which is provided for author-year
+ citation styles. Also note the sorttitle and indextitle fields. By
+ default, all entries without an author or editor are alphabetized by
+ title but we want this entry to be alphabetized under ''C'' rather
+ than ''T''. There''s also an isbn field'
+ edition: 15
+ id: cms
+ isbn: '0-226-10403-6'
+ issued: 2003
+ language: 'en-US'
+ publisher: University of Chicago Press
+ publisher-place: 'Chicago, Ill.'
+ title: 'The Chicago manual of style: The essential guide for writers,
+ editors, and publishers'
+ title-short: Chicago manual of style
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-markey.md b/test/command/biblatex-markey.md
new file mode 100644
index 000000000..8e8c39dab
--- /dev/null
+++ b/test/command/biblatex-markey.md
@@ -0,0 +1,65 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Markey 2005)
+
+Markey, Nicolas. 2005. “Tame the BeaST: The B to X of BibTeX” (version
+1.3). October 16.
+<http://tug.ctan.org/tex-archive/info/bibtex/tamethebeast/ttb_en.pdf>.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Markey, 2005)
+
+Markey, N. (2005, October 16). Tame the BeaST: The B to X of BibTeX.
+Retrieved October 01, 2006, from
+<http://tug.ctan.org/tex-archive/info/bibtex/tamethebeast/ttb_en.pdf>
+
+
+}
+
+@Online{markey,
+ author = {Markey, Nicolas},
+ title = {Tame the {BeaST}},
+ date = {2005-10-16},
+ url =
+ {http://tug.ctan.org/tex-archive/info/bibtex/tamethebeast/ttb_en.pdf},
+ subtitle = {The {B} to {X} of {BibTeX}},
+ version = {1.3},
+ urldate = {2006-10-01},
+ hyphenation = {american},
+ sorttitle = {Tame the Beast},
+ annotation = {An online entry for a tutorial. Note the format of
+ the date field (yyyy-mm-dd) in the database
+ file.},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- accessed: '2006-10-01'
+ annote: 'An online entry for a tutorial. Note the format of the date
+ field (yyyy-mm-dd) in the database file.'
+ author:
+ - family: Markey
+ given: Nicolas
+ id: markey
+ issued: '2005-10-16'
+ language: 'en-US'
+ title: 'Tame the BeaST: The B to X of BibTeX'
+ title-short: Tame the BeaST
+ type: webpage
+ url: 'http://tug.ctan.org/tex-archive/info/bibtex/tamethebeast/ttb_en.pdf'
+ version: 1.3
+---
+
+
+```
diff --git a/test/command/biblatex-maron.md b/test/command/biblatex-maron.md
new file mode 100644
index 000000000..fbc965064
--- /dev/null
+++ b/test/command/biblatex-maron.md
@@ -0,0 +1,70 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Maron 2000)
+
+Maron, Monika. 2000. *Animal Triste*. Translated by Brigitte Goldstein.
+Lincoln: University of Nebraska Press.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Maron, 2000)
+
+Maron, M. (2000). *Animal triste*. (B. Goldstein, Trans.). Lincoln:
+University of Nebraska Press.
+
+
+NOTES:
+
+- origlanguage concatenated with translator, e.g. “translated from the German by …” not possible in CSL
+
+}
+
+@Book{maron,
+ author = {Maron, Monika},
+ title = {Animal Triste},
+ date = 2000,
+ translator = {Brigitte Goldstein},
+ origlanguage = {german},
+ publisher = {University of Nebraska Press},
+ location = {Lincoln},
+ hyphenation = {american},
+ shorttitle = {Animal Triste},
+ annotation = {An English translation of a German novel with a French title.
+ In other words: a book entry with a
+ translator field. Note the origlanguage
+ field which is concatenated with the translator},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'An English translation of a German novel with a French title.
+ In other words: a book entry with a translator field. Note the
+ origlanguage field which is concatenated with the translator'
+ author:
+ - family: Maron
+ given: Monika
+ id: maron
+ issued: 2000
+ language: 'en-US'
+ publisher: University of Nebraska Press
+ publisher-place: Lincoln
+ title: Animal triste
+ title-short: Animal triste
+ translator:
+ - family: Goldstein
+ given: Brigitte
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-massa.md b/test/command/biblatex-massa.md
new file mode 100644
index 000000000..6561a9cb5
--- /dev/null
+++ b/test/command/biblatex-massa.md
@@ -0,0 +1,56 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Massa 2004)
+
+Massa, Werner. 2004. *Crystal Structure Determination*. 2nd ed. Berlin:
+Spinger.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Massa, 2004)
+
+Massa, W. (2004). *Crystal structure determination* (2nd ed.). Berlin:
+Spinger.
+
+
+}
+
+@Book{massa,
+ author = {Werner Massa},
+ title = {Crystal structure determination},
+ date = 2004,
+ edition = 2,
+ publisher = {Spinger},
+ location = {Berlin},
+ hyphenation = {british},
+ annotation = {A book entry with an edition field},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A book entry with an edition field
+ author:
+ - family: Massa
+ given: Werner
+ edition: 2
+ id: massa
+ issued: 2004
+ language: 'en-GB'
+ publisher: Spinger
+ publisher-place: Berlin
+ title: Crystal structure determination
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-moore-related.md b/test/command/biblatex-moore-related.md
new file mode 100644
index 000000000..2146206d4
--- /dev/null
+++ b/test/command/biblatex-moore-related.md
@@ -0,0 +1,66 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Moore 1998)
+
+Moore, Gordon E. 1998. “Cramming More Components onto Integrated
+Circuits.” *Proceedings of the IEEE* 86 (1): 82–85.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Moore, 1998)
+
+Moore, G. E. (1998). Cramming more components onto integrated circuits.
+*Proceedings of the IEEE*, *86*(1), 82–85.
+
+
+NOTES:
+
+- "related = {moore}, relatedtype = {reprintfrom}," – no equivalent implemented in CSL
+
+}
+
+@Article{moore:related,
+ author = {Moore, Gordon E.},
+ title = {Cramming more components onto integrated circuits},
+ journaltitle = {Proceedings of the {IEEE}},
+ year = 1998,
+ volume = 86,
+ number = 1,
+ pages = {82-85},
+ hyphenation = {american},
+ related = {moore},
+ relatedtype = {reprintfrom},
+ annotation = {A reprint of Moore's law. Note the related and
+ relatedtype fields},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'A reprint of Moore''s law. Note the related and relatedtype
+ fields'
+ author:
+ - family: Moore
+ given: Gordon E.
+ container-title: Proceedings of the IEEE
+ id: 'moore:related'
+ issue: 1
+ issued: 1998
+ language: 'en-US'
+ page: '82-85'
+ title: Cramming more components onto integrated circuits
+ type: 'article-journal'
+ volume: 86
+---
+
+
+```
diff --git a/test/command/biblatex-moore.md b/test/command/biblatex-moore.md
new file mode 100644
index 000000000..1e169c9f4
--- /dev/null
+++ b/test/command/biblatex-moore.md
@@ -0,0 +1,56 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Moore 1965)
+
+Moore, Gordon E. 1965. “Cramming More Components onto Integrated
+Circuits.” *Electronics* 38 (8): 114–117.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Moore, 1965)
+
+Moore, G. E. (1965). Cramming more components onto integrated circuits.
+*Electronics*, *38*(8), 114–117.
+
+
+}
+
+@Article{moore,
+ author = {Moore, Gordon E.},
+ title = {Cramming more components onto integrated circuits},
+ journaltitle = {Electronics},
+ year = 1965,
+ volume = 38,
+ number = 8,
+ pages = {114-117},
+ hyphenation = {american},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Moore
+ given: Gordon E.
+ container-title: Electronics
+ id: moore
+ issue: 8
+ issued: 1965
+ language: 'en-US'
+ page: '114-117'
+ title: Cramming more components onto integrated circuits
+ type: 'article-journal'
+ volume: 38
+---
+
+
+```
diff --git a/test/command/biblatex-moraux.md b/test/command/biblatex-moraux.md
new file mode 100644
index 000000000..9e07c3974
--- /dev/null
+++ b/test/command/biblatex-moraux.md
@@ -0,0 +1,94 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Moraux 1979)
+
+Moraux, Paul. 1979. “Le *De Anima* dans la tradition grècque: Quelques
+aspects de l’interpretation du traité, de Theophraste à Themistius.” In
+*Aristotle on Mind and the Senses. Proceedings of the Seventh Symposium
+Aristotelicum*, edited by G. E. R. Lloyd and G. E. L. Owen, 281–324.
+Cambridge: Cambridge University Press.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Moraux, 1979)
+
+Moraux, P. (1979). Le *De Anima* dans la tradition grècque: Quelques
+aspects de l’interpretation du traité, de Theophraste à Themistius. In
+G. E. R. Lloyd & G. E. L. Owen (eds.), *Aristotle on Mind and the
+Senses. Proceedings of the Seventh Symposium Aristotelicum* (pp.
+281–324). Cambridge: Cambridge University Press.
+
+
+NOTES:
+
+- Since case (conversion) can only be specified per entry, not per field, for apa.csl the case of container-title would have to be adjusted manually.
+
+}
+
+@string{ cup = {Cambridge University Press} }
+
+@InProceedings{moraux,
+ author = {Moraux, Paul},
+ editor = {Lloyd, G. E. R. and Owen, G. E. L.},
+ title = {Le \emph{De Anima} dans la tradition gr{\`e}cque},
+ date = 1979,
+ booktitle = {Aristotle on Mind and the Senses},
+ subtitle = {Quelques aspects de l'interpretation du trait{\'e}, de
+ Theophraste {\`a} Themistius},
+ booktitleaddon= {Proceedings of the Seventh Symposium Aristotelicum},
+ eventdate = 1975,
+ publisher = cup,
+ location = {Cambridge},
+ pages = {281-324},
+ keywords = {secondary},
+ hyphenation = {french},
+ indexsorttitle= {De Anima dans la tradition grecque},
+ indextitle = {\emph{De Anima} dans la tradition gr{\`e}cque, Le},
+ shorttitle = {\emph{De Anima} dans la tradition gr{\`e}cque},
+ annotation = {This is a typical inproceedings entry. Note the
+ booksubtitle, shorttitle,
+ indextitle, and indexsorttitle fields. Also
+ note the eventdate field.},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'This is a typical inproceedings entry. Note the booksubtitle,
+ shorttitle, indextitle, and indexsorttitle fields. Also note the
+ eventdate field.'
+ author:
+ - family: Moraux
+ given: Paul
+ container-title: Aristotle on Mind and the Senses. Proceedings of the
+ Seventh Symposium Aristotelicum
+ editor:
+ - family: Lloyd
+ given: G. E. R.
+ - family: Owen
+ given: G. E. L.
+ event-date: 1975
+ id: moraux
+ issued: 1979
+ keyword: secondary
+ language: 'fr-FR'
+ page: '281-324'
+ publisher: Cambridge University Press
+ publisher-place: Cambridge
+ title: 'Le *De Anima* dans la tradition grècque: Quelques aspects de
+ l''interpretation du traité, de Theophraste à Themistius'
+ title-short: '*De Anima* dans la tradition grècque'
+ type: 'paper-conference'
+---
+
+
+```
diff --git a/test/command/biblatex-murray.md b/test/command/biblatex-murray.md
new file mode 100644
index 000000000..297b27aa4
--- /dev/null
+++ b/test/command/biblatex-murray.md
@@ -0,0 +1,104 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Hostetler et al. 1998)
+
+Hostetler, Michael J., Julia E. Wingate, Chuan-Jian Zhong, Jay E.
+Harris, Richard W. Vachet, Michael R. Clark, J. David Londono, et al.
+1998. “Alkanethiolate Gold Cluster Molecules with Core Diameters from
+1.5 to 5.2 nm: Core and Monolayer Properties as a Function of Core
+Size.” *Langmuir* 14 (1): 17–30.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Hostetler et al., 1998)
+
+Hostetler, M. J., Wingate, J. E., Zhong, C.-J., Harris, J. E., Vachet,
+R. W., Clark, M. R., … Murray, R. W. (1998). Alkanethiolate gold cluster
+molecules with core diameters from 1.5 to 5.2 nm: Core and monolayer
+properties as a function of core size. *Langmuir*, *14*(1), 17–30.
+
+
+}
+
+@Article{murray,
+ author = {Hostetler, Michael J. and Wingate, Julia E. and Zhong,
+ Chuan-Jian and Harris, Jay E. and Vachet, Richard W. and
+ Clark, Michael R. and Londono, J. David and Green, Stephen
+ J. and Stokes, Jennifer J. and Wignall, George D. and Glish,
+ Gary L. and Porter, Marc D. and Evans, Neal D. and Murray,
+ Royce W.},
+ title = {Alkanethiolate gold cluster molecules with core diameters from
+ 1.5 to 5.2~{nm}},
+ journaltitle = {Langmuir},
+ date = 1998,
+ subtitle = {Core and monolayer properties as a function of core size},
+ volume = 14,
+ number = 1,
+ pages = {17-30},
+ hyphenation = {american},
+ indextitle = {Alkanethiolate gold cluster molecules},
+ shorttitle = {Alkanethiolate gold cluster molecules},
+ annotation = {An article entry with \arabic{author} authors. By
+ default, long author and editor lists are automatically
+ truncated. This is configurable},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'An article entry with author authors. By default, long author
+ and editor lists are automatically truncated. This is configurable'
+ author:
+ - family: Hostetler
+ given: Michael J.
+ - family: Wingate
+ given: Julia E.
+ - family: Zhong
+ given: 'Chuan-Jian'
+ - family: Harris
+ given: Jay E.
+ - family: Vachet
+ given: Richard W.
+ - family: Clark
+ given: Michael R.
+ - family: Londono
+ given: J. David
+ - family: Green
+ given: Stephen J.
+ - family: Stokes
+ given: Jennifer J.
+ - family: Wignall
+ given: George D.
+ - family: Glish
+ given: Gary L.
+ - family: Porter
+ given: Marc D.
+ - family: Evans
+ given: Neal D.
+ - family: Murray
+ given: Royce W.
+ container-title: Langmuir
+ id: murray
+ issue: 1
+ issued: 1998
+ language: 'en-US'
+ page: '17-30'
+ title: 'Alkanethiolate gold cluster molecules with core diameters from
+ 1.5 to 5.2 [nm]{.nocase}: Core and monolayer properties as a
+ function of core size'
+ title-short: Alkanethiolate gold cluster molecules
+ type: 'article-journal'
+ volume: 14
+---
+
+
+```
diff --git a/test/command/biblatex-nietzsche-historie.md b/test/command/biblatex-nietzsche-historie.md
new file mode 100644
index 000000000..dabcfb83a
--- /dev/null
+++ b/test/command/biblatex-nietzsche-historie.md
@@ -0,0 +1,100 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Nietzsche 1988)
+
+Nietzsche, Friedrich. 1988. “Unzeitgemässe Betrachtungen. Zweites Stück:
+Vom Nutzen und Nachtheil der Historie für das Leben.” In *Sämtliche
+Werke: Kritische Studienausgabe*, by Friedrich Nietzsche, edited by
+Giorgio Colli and Mazzino Montinari, 1:243–334. München; Berlin; New
+York: Deutscher Taschenbuch-Verlag; Walter de Gruyter.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Nietzsche, 1988)
+
+Nietzsche, F. (1988). Unzeitgemässe Betrachtungen. Zweites Stück: Vom
+Nutzen und Nachtheil der Historie für das Leben. In G. Colli & M.
+Montinari (eds.), *Sämtliche Werke: Kritische Studienausgabe* (Vol. 1,
+pp. 243–334). München; Berlin; New York: Deutscher Taschenbuch-Verlag;
+Walter de Gruyter.
+
+
+}
+
+@string{ dtv = {Deutscher Taschenbuch-Verlag} }
+
+@InBook{nietzsche:historie,
+ title = {Unzeitgem{\"a}sse Betrachtungen. Zweites St{\"u}ck},
+ date = 1988,
+ author = {Nietzsche, Friedrich},
+ booktitle = {Die Geburt der Trag{\"o}die. Unzeitgem{\"a}{\ss}e
+ Betrachtungen I--IV. Nachgelassene Schriften 1870--1973},
+ bookauthor = {Nietzsche, Friedrich},
+ editor = {Colli, Giorgio and Montinari, Mazzino},
+ subtitle = {Vom Nutzen und Nachtheil der Historie f{\"u}r das Leben},
+ maintitle = {S{\"a}mtliche Werke},
+ mainsubtitle = {Kritische Studienausgabe},
+ volume = 1,
+ publisher = dtv # { and Walter de Gruyter},
+ location = {M{\"u}nchen and Berlin and New York},
+ pages = {243-334},
+ hyphenation = {german},
+ sortyear = {1988-2},
+ sorttitle = {Werke-01-243},
+ indexsorttitle= {Vom Nutzen und Nachtheil der Historie fur das Leben},
+ indextitle = {Vom Nutzen und Nachtheil der Historie f{\"u}r das Leben},
+ shorttitle = {Vom Nutzen und Nachtheil der Historie},
+ annotation = {A single essay from the critical edition of Nietzsche's works.
+ This inbook entry explicitly refers to an essay found
+ in the first volume. Note the title,
+ booktitle, and maintitle fields. Also note
+ the sorttitle and sortyear fields. We want
+ this entry to be listed after the entry referring to the
+ entire first volume},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'A single essay from the critical edition of Nietzsche''s
+ works. This inbook entry explicitly refers to an essay found in the
+ first volume. Note the title, booktitle, and maintitle fields. Also
+ note the sorttitle and sortyear fields. We want this entry to be
+ listed after the entry referring to the entire first volume'
+ author:
+ - family: Nietzsche
+ given: Friedrich
+ container-author:
+ - family: Nietzsche
+ given: Friedrich
+ container-title: 'Sämtliche Werke: Kritische Studienausgabe'
+ editor:
+ - family: Colli
+ given: Giorgio
+ - family: Montinari
+ given: Mazzino
+ id: 'nietzsche:historie'
+ issued: 1988
+ language: 'de-DE'
+ page: '243-334'
+ publisher: 'Deutscher Taschenbuch-Verlag; Walter de Gruyter'
+ publisher-place: München; Berlin; New York
+ title: 'Unzeitgemässe Betrachtungen. Zweites Stück: Vom Nutzen und
+ Nachtheil der Historie für das Leben'
+ title-short: Vom Nutzen und Nachtheil der Historie
+ type: chapter
+ volume: 1
+ volume-title: 'Die Geburt der Tragödie. Unzeitgemäße Betrachtungen
+ I--IV. Nachgelassene Schriften 1870--1973'
+---
+
+
+```
diff --git a/test/command/biblatex-nietzsche-ksa.md b/test/command/biblatex-nietzsche-ksa.md
new file mode 100644
index 000000000..7dbc92b45
--- /dev/null
+++ b/test/command/biblatex-nietzsche-ksa.md
@@ -0,0 +1,89 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Nietzsche 1988)
+
+Nietzsche, Friedrich. 1988. *Sämtliche Werke: Kritische Studienausgabe*.
+Edited by Giorgio Colli and Mazzino Montinari. 2nd ed. 15. München;
+Berlin; New York: Deutscher Taschenbuch-Verlag; Walter de Gruyter.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Nietzsche, 1988)
+
+Nietzsche, F. (1988). *Sämtliche Werke: Kritische Studienausgabe*. (G.
+Colli & M. Montinari, eds.) (2nd ed., 1-15). München; Berlin; New York:
+Deutscher Taschenbuch-Verlag; Walter de Gruyter.
+
+
+NOTES:
+
+- biblio2yaml
+ - term "vols." missing
+
+}
+
+@string{ dtv = {Deutscher Taschenbuch-Verlag} }
+
+@Book{nietzsche:ksa,
+ author = {Nietzsche, Friedrich},
+ title = {S{\"a}mtliche Werke},
+ date = 1988,
+ editor = {Colli, Giorgio and Montinari, Mazzino},
+ edition = 2,
+ volumes = 15,
+ publisher = dtv # { and Walter de Gruyter},
+ location = {M{\"u}nchen and Berlin and New York},
+ hyphenation = {german},
+ sortyear = {1988-0},
+ sorttitle = {Werke-00-000},
+ indexsorttitle= {Samtliche Werke},
+ subtitle = {Kritische Studienausgabe},
+ annotation = {The critical edition of Nietzsche's works. This is a
+ book entry referring to a 15-volume work as a
+ whole. Note the volumes field and the format of the
+ publisher and location fields in the
+ database file. Also note the sorttitle and
+ sortyear fields which are used to fine-tune the
+ sorting order of the bibliography. We want this item listed
+ first in the bibliography},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'The critical edition of Nietzsche''s works. This is a book
+ entry referring to a 15-volume work as a whole. Note the volumes
+ field and the format of the publisher and location fields in the
+ database file. Also note the sorttitle and sortyear fields which are
+ used to fine-tune the sorting order of the bibliography. We want
+ this item listed first in the bibliography'
+ author:
+ - family: Nietzsche
+ given: Friedrich
+ edition: 2
+ editor:
+ - family: Colli
+ given: Giorgio
+ - family: Montinari
+ given: Mazzino
+ id: 'nietzsche:ksa'
+ issued: 1988
+ language: 'de-DE'
+ number-of-volumes: 15
+ publisher: 'Deutscher Taschenbuch-Verlag; Walter de Gruyter'
+ publisher-place: München; Berlin; New York
+ title: 'Sämtliche Werke: Kritische Studienausgabe'
+ title-short: Sämtliche Werke
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-nietzsche-ksa1.md b/test/command/biblatex-nietzsche-ksa1.md
new file mode 100644
index 000000000..51b4a1f5a
--- /dev/null
+++ b/test/command/biblatex-nietzsche-ksa1.md
@@ -0,0 +1,95 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2015-03-08:
+
+(Nietzsche 1988)
+
+Nietzsche, Friedrich. 1988. *Sämtliche Werke: Kritische Studienausgabe*.
+Edited by Giorgio Colli and Mazzino Montinari. 2nd ed. Vol. 1. München;
+Berlin; New York: Deutscher Taschenbuch-Verlag; Walter de Gruyter.
+
+
+Formatted with pandoc and apa.csl, 2015-03-08:
+
+(Nietzsche, 1988)
+
+Nietzsche, F. (1988). *Sämtliche Werke: Kritische Studienausgabe*. (G.
+Colli & M. Montinari, eds., F. Nietzsche) (2nd ed., Vol. 1). München;
+Berlin; New York: Deutscher Taschenbuch-Verlag; Walter de Gruyter.
+
+
+NOTES:
+
+- volume-title currently not implemented by chicago-author-date.csl and apa.csl.
+
+}
+
+@string{ dtv = {Deutscher Taschenbuch-Verlag} }
+
+@Book{nietzsche:ksa1,
+ author = {Nietzsche, Friedrich},
+ title = {Die Geburt der Trag{\"o}die. Unzeitgem{\"a}{\ss}e
+ Betrachtungen I--IV. Nachgelassene Schriften 1870--1973},
+ date = 1988,
+ editor = {Colli, Giorgio and Montinari, Mazzino},
+ maintitle = {S{\"a}mtliche Werke},
+ mainsubtitle = {Kritische Studienausgabe},
+ volume = 1,
+ edition = 2,
+ publisher = dtv # { and Walter de Gruyter},
+ location = {M{\"u}nchen and Berlin and New York},
+ hyphenation = {german},
+ sortyear = {1988-1},
+ sorttitle = {Werke-01-000},
+ indexsorttitle= {Samtliche Werke I},
+ bookauthor = {Nietzsche, Friedrich},
+ indextitle = {S{\"a}mtliche Werke I},
+ shorttitle = {S{\"a}mtliche Werke I},
+ annotation = {A single volume from the critical edition of Nietzsche's
+ works. This book entry explicitly refers to the first
+ volume only. Note the title and maintitle
+ fields. Also note the sorttitle and sortyear
+ fields. We want this entry to be listed after the entry
+ referring to the entire edition},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'A single volume from the critical edition of Nietzsche''s
+ works. This book entry explicitly refers to the first volume only.
+ Note the title and maintitle fields. Also note the sorttitle and
+ sortyear fields. We want this entry to be listed after the entry
+ referring to the entire edition'
+ author:
+ - family: Nietzsche
+ given: Friedrich
+ container-author:
+ - family: Nietzsche
+ given: Friedrich
+ edition: 2
+ editor:
+ - family: Colli
+ given: Giorgio
+ - family: Montinari
+ given: Mazzino
+ id: 'nietzsche:ksa1'
+ issued: 1988
+ language: 'de-DE'
+ publisher: 'Deutscher Taschenbuch-Verlag; Walter de Gruyter'
+ publisher-place: München; Berlin; New York
+ title: 'Sämtliche Werke: Kritische Studienausgabe'
+ type: book
+ volume: 1
+ volume-title: 'Die Geburt der Tragödie. Unzeitgemäße Betrachtungen
+ I--IV. Nachgelassene Schriften 1870--1973'
+---
+
+
+```
diff --git a/test/command/biblatex-nussbaum.md b/test/command/biblatex-nussbaum.md
new file mode 100644
index 000000000..6e356d3da
--- /dev/null
+++ b/test/command/biblatex-nussbaum.md
@@ -0,0 +1,63 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Nussbaum 1978)
+
+Nussbaum, Martha. 1978. *Aristotle’s “De Motu Animalium”*. Princeton:
+Princeton University Press.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Nussbaum, 1978)
+
+Nussbaum, M. (1978). *Aristotle’s “De Motu Animalium”*. Princeton:
+Princeton University Press.
+
+
+}
+
+@string{ pup = {Princeton University Press} }
+
+@Book{nussbaum,
+ author = {Nussbaum, Martha},
+ title = {Aristotle's \mkbibquote{De Motu Animalium}},
+ date = 1978,
+ publisher = pup,
+ location = {Princeton},
+ keywords = {secondary},
+ hyphenation = {american},
+ sorttitle = {Aristotle's De Motu Animalium},
+ indexsorttitle= {Aristotle's De Motu Animalium},
+ annotation = {A book entry. Note the sorttitle and
+ indexsorttitle fields and the markup of the quotes in
+ the database file},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A book entry. Note the sorttitle and indexsorttitle fields and
+ the markup of the quotes in the database file
+ author:
+ - family: Nussbaum
+ given: Martha
+ id: nussbaum
+ issued: 1978
+ keyword: secondary
+ language: 'en-US'
+ publisher: Princeton University Press
+ publisher-place: Princeton
+ title: 'Aristotle''s "De Motu Animalium"'
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-online.md b/test/command/biblatex-online.md
new file mode 100644
index 000000000..97706c890
--- /dev/null
+++ b/test/command/biblatex-online.md
@@ -0,0 +1,64 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{adapted from http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/examples/biblatex-examples.bib}
+
+@online{markey,
+ Annotation = {An online entry for a tutorial. Note the format of the date field (yyyy-mm-dd) in the database file.},
+ Author = {Markey, Nicolas},
+ Date = {2005-10-16},
+ Hyphenation = {american},
+ Sorttitle = {Tame the Beast},
+ Subtitle = {The {B} to {X} of {BibTeX}},
+ Title = {Tame the {BeaST}},
+ Url = {http://tug.ctan.org/tex-archive/info/bibtex/tamethebeast/ttb_en.pdf},
+ Urldate = {2006-10-01},
+ Version = {1.3},
+}
+
+@online{CTAN,
+ Annotation = {This is an online entry. The \textsc{url}, which is given in the url field, is transformed into a clickable link if hyperref support has been enabled. Note the format of the urldate field (yyyy-mm-dd) in the database file. Also note the label field which may be used as a fallback by citation styles which need an author and\slash or a year},
+ Date = 2006,
+ Hyphenation = {american},
+ Label = {CTAN},
+ Subtitle = {The {Comprehensive TeX Archive Network}},
+ Title = {{CTAN}},
+ Url = {http://www.ctan.org},
+ Urldate = {2006-10-01},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- accessed: '2006-10-01'
+ annote: 'An online entry for a tutorial. Note the format of the date
+ field (yyyy-mm-dd) in the database file.'
+ author:
+ - family: Markey
+ given: Nicolas
+ id: markey
+ issued: '2005-10-16'
+ language: 'en-US'
+ title: 'Tame the BeaST: The B to X of BibTeX'
+ title-short: Tame the BeaST
+ type: webpage
+ url: 'http://tug.ctan.org/tex-archive/info/bibtex/tamethebeast/ttb_en.pdf'
+ version: 1.3
+- accessed: '2006-10-01'
+ annote: 'This is an online entry. The [url]{.smallcaps}, which is
+ given in the url field, is transformed into a clickable link if
+ hyperref support has been enabled. Note the format of the urldate
+ field (yyyy-mm-dd) in the database file. Also note the label field
+ which may be used as a fallback by citation styles which need an
+ author and/or a year'
+ id: CTAN
+ issued: 2006
+ language: 'en-US'
+ title: 'CTAN: The Comprehensive TeX Archive Network'
+ title-short: CTAN
+ type: webpage
+ url: 'http://www.ctan.org'
+---
+
+
+```
diff --git a/test/command/biblatex-options-url-false-doi-false.md b/test/command/biblatex-options-url-false-doi-false.md
new file mode 100644
index 000000000..259665e87
--- /dev/null
+++ b/test/command/biblatex-options-url-false-doi-false.md
@@ -0,0 +1,57 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Entry contains url and doi fields; these should be discarded since the
+options field specifies url=false, doi=false.
+
+Exception: As in standard biblatex, in online entries url should never be
+discarded, even if options contains url=false.
+
+}
+
+@article{item1,
+ Author = {Author, Andy},
+ Date = {2012},
+ Doi = {1234/5678.90},
+ Journal = {Journal},
+ Options = {url=false, doi=false},
+ Title = {Title, Any Entry Type Except online},
+ Url = {http://foo.bar}
+}
+
+@online{item2,
+ Author = {Author, Andy},
+ Date = {2012},
+ Doi = {1234/5678.90},
+ Journal = {Journal},
+ Options = {url=false, doi=false},
+ Title = {Title, Entry Type online},
+ Url = {http://foo.bar}
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Author
+ given: Andy
+ container-title: Journal
+ id: item1
+ issued: 2012
+ title: 'Title, any entry type except online'
+ type: 'article-journal'
+- author:
+ - family: Author
+ given: Andy
+ container-title: Journal
+ id: item2
+ issued: 2012
+ title: 'Title, entry type online'
+ type: webpage
+ url: 'http://foo.bar'
+---
+
+
+```
diff --git a/test/command/biblatex-padhye.md b/test/command/biblatex-padhye.md
new file mode 100644
index 000000000..6afc5e5ef
--- /dev/null
+++ b/test/command/biblatex-padhye.md
@@ -0,0 +1,117 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Padhye, Firoiu, and Towsley 1999)
+
+Padhye, Jitendra, Victor Firoiu, and Don Towsley. 1999. “A Stochastic
+Model of TCP Reno Congestion Avoidance and Control.” Technical report
+99-02. Amherst, Mass.: University of Massachusetts.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Padhye, Firoiu, & Towsley, 1999)
+
+Padhye, J., Firoiu, V., & Towsley, D. (1999). *A stochastic model of TCP
+Reno congestion avoidance and control* (technical report No. 99-02).
+Amherst, Mass.: University of Massachusetts.
+
+}
+
+@Report{padhye,
+ author = {Padhye, Jitendra and Firoiu, Victor and Towsley, Don},
+ title = {A Stochastic Model of {TCP Reno} Congestion Avoidance and
+ Control},
+ type = {techreport},
+ institution = {University of Massachusetts},
+ date = 1999,
+ number = {99-02},
+ location = {Amherst, Mass.},
+ hyphenation = {american},
+ sorttitle = {A Stochastic Model of TCP Reno Congestion Avoidance and
+ Control},
+ indextitle = {Stochastic Model of {TCP Reno} Congestion Avoidance and Control,
+ A},
+ annotation = {This is a report entry for a technical report. Note
+ the format of the type field in the database file
+ which uses a localization key. The number of the report is
+ given in the number field. Also note the
+ sorttitle and indextitle fields},
+ abstract = {The steady state performance of a bulk transfer TCP flow
+ (i.e., a flow with a large amount of data to send, such as FTP
+ transfers) may be characterized by three quantities. The first
+ is the send rate, which is the amount of data sent by the
+ sender in unit time. The second is the throughput, which is
+ the amount of data received by the receiver in unit time. Note
+ that the throughput will always be less than or equal to the
+ send rate due to losses. Finally, the number of non-duplicate
+ packets received by the receiver in unit time gives us the
+ goodput of the connection. The goodput is always less than or
+ equal to the throughput, since the receiver may receive two
+ copies of the same packet due to retransmissions by the
+ sender. In a previous paper, we presented a simple model for
+ predicting the steady state send rate of a bulk transfer TCP
+ flow as a function of loss rate and round trip time. In this
+ paper, we extend that work in two ways. First, we analyze the
+ performance of bulk transfer TCP flows using more precise,
+ stochastic analysis. Second, we build upon the previous
+ analysis to provide both an approximate formula as well as a
+ more accurate stochastic model for the steady state throughput
+ of a bulk transfer TCP flow.},
+ file = {ftp://gaia.cs.umass.edu/pub/Padhey99-markov.ps},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- abstract: 'The steady state performance of a bulk transfer TCP flow
+ (i.e., a flow with a large amount of data to send, such as FTP
+ transfers) may be characterized by three quantities. The first is
+ the send rate, which is the amount of data sent by the sender in
+ unit time. The second is the throughput, which is the amount of data
+ received by the receiver in unit time. Note that the throughput will
+ always be less than or equal to the send rate due to losses.
+ Finally, the number of non-duplicate packets received by the
+ receiver in unit time gives us the goodput of the connection. The
+ goodput is always less than or equal to the throughput, since the
+ receiver may receive two copies of the same packet due to
+ retransmissions by the sender. In a previous paper, we presented a
+ simple model for predicting the steady state send rate of a bulk
+ transfer TCP flow as a function of loss rate and round trip time. In
+ this paper, we extend that work in two ways. First, we analyze the
+ performance of bulk transfer TCP flows using more precise,
+ stochastic analysis. Second, we build upon the previous analysis to
+ provide both an approximate formula as well as a more accurate
+ stochastic model for the steady state throughput of a bulk transfer
+ TCP flow.'
+ annote: This is a report entry for a technical report. Note the format
+ of the type field in the database file which uses a localization
+ key. The number of the report is given in the number field. Also
+ note the sorttitle and indextitle fields
+ author:
+ - family: Padhye
+ given: Jitendra
+ - family: Firoiu
+ given: Victor
+ - family: Towsley
+ given: Don
+ genre: technical report
+ id: padhye
+ issued: 1999
+ language: 'en-US'
+ number: '99-02'
+ publisher: University of Massachusetts
+ publisher-place: 'Amherst, Mass.'
+ title: A stochastic model of TCP Reno congestion avoidance and control
+ type: report
+---
+
+
+```
diff --git a/test/command/biblatex-patent.md b/test/command/biblatex-patent.md
new file mode 100644
index 000000000..c351e61cb
--- /dev/null
+++ b/test/command/biblatex-patent.md
@@ -0,0 +1,158 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{adapted from http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/examples/biblatex-examples.bib
+
+TODO: Is there a CSL counterpart for the biblatex field "holder"?}
+
+
+@patent{almendro,
+ Annotation = {This is a patent entry with a location field. The number is given in the number field. Note the format of the location field in the database file. Compare laufenberg, sorace, and kowalik},
+ Author = {Almendro, José L. and Martín, Jacinto and Sánchez, Alberto and Nozal, Fernando},
+ Date = 1998,
+ Hyphenation = {german},
+ Location = {countryfr and countryuk and countryde},
+ Number = {EU-29702195U},
+ Title = {Elektromagnetisches Signalhorn}}
+
+@patent{kowalik,
+ Annotation = {This is a patent entry for a French patent request with a full date. The number is given in the number field. Note the format of the type and date fields in the database file. Compare almendro, laufenberg, and sorace},
+ Author = {Kowalik, F. and Isard, M.},
+ Date = {1995-01-11},
+ Hyphenation = {french},
+ Indextitle = {Estimateur d'un défaut de fonctionnement},
+ Number = 9500261,
+ Title = {Estimateur d'un défaut de fonctionnement d'un modulateur en quadrature et étage de modulation l'utilisant},
+ Type = {patreqfr}}
+
+@patent{laufenberg,
+ Annotation = {This is a patent entry with a holder field. Note the format of the type and location fields in the database file. Compare almendro, sorace, and kowalik},
+ Author = {Laufenberg, Xaver and Eynius, Dominique and Suelzle, Helmut and Usbeck, Stephan and Spaeth, Matthias and Neuser-Hoffmann, Miriam and Myrzik, Christian and Schmid, Manfred and Nietfeld, Franz and Thiel, Alexander and Braun, Harald and Ebner, Norbert},
+ Date = {2006-09-13},
+ File = {http://v3.espacenet.com/textdoc?IDX=EP1700367},
+ Holder = {{Robert Bosch GmbH} and {Daimler Chrysler AG} and {Bayerische Motoren Werke AG}},
+ Hyphenation = {german},
+ Number = 1700367,
+ Title = {Elektrische Einrichtung und Betriebsverfahren},
+ Type = {patenteu},
+ Abstract = {The invention relates to an electric device comprising a
+ generator, in particular for use in the vehicle electric
+ system of a motor vehicle and a controller for controlling the
+ generator voltage. The device is equipped with a control zone,
+ in which the voltage is controlled and zones, in which the
+ torque is controlled. The invention also relates to methods
+ for operating a device of this type.}}
+
+@patent{sorace,
+ Annotation = {This is a patent entry with a holder field. Note the format of the type and date fields in the database file. Compare almendro, laufenberg, and kowalik},
+ Author = {Sorace, Ronald E. and Reinhardt, Victor S. and Vaughn, Steven A.},
+ Date = {1997-09-16},
+ Date-Modified = {2013-10-16 13:44:15 +0000},
+ Holder = {{Hughes Aircraft Company}},
+ Hyphenation = {american},
+ Number = 5668842,
+ Title = {High-Speed Digital-to-{RF} Converter},
+ Type = {patentus}}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'This is a patent entry with a location field. The number is
+ given in the number field. Note the format of the location field in
+ the database file. Compare laufenberg, sorace, and kowalik'
+ author:
+ - family: Almendro
+ given: José L.
+ - family: Martín
+ given: Jacinto
+ - family: Sánchez
+ given: Alberto
+ - family: Nozal
+ given: Fernando
+ id: almendro
+ issued: 1998
+ jurisdiction: France; United Kingdom; Germany
+ language: 'de-DE'
+ number: 'EU-29702195U'
+ title: Elektromagnetisches Signalhorn
+ type: patent
+- annote: 'This is a patent entry for a French patent request with a
+ full date. The number is given in the number field. Note the format
+ of the type and date fields in the database file. Compare almendro,
+ laufenberg, and sorace'
+ author:
+ - family: Kowalik
+ given: F.
+ - family: Isard
+ given: M.
+ genre: French patent request
+ id: kowalik
+ issued: '1995-01-11'
+ language: 'fr-FR'
+ number: 9500261
+ title: 'Estimateur d''un défaut de fonctionnement d''un modulateur en
+ quadrature et étage de modulation l''utilisant'
+ type: patent
+- abstract: 'The invention relates to an electric device comprising a
+ generator, in particular for use in the vehicle electric system of a
+ motor vehicle and a controller for controlling the generator
+ voltage. The device is equipped with a control zone, in which the
+ voltage is controlled and zones, in which the torque is controlled.
+ The invention also relates to methods for operating a device of this
+ type.'
+ annote: 'This is a patent entry with a holder field. Note the format
+ of the type and location fields in the database file. Compare
+ almendro, sorace, and kowalik'
+ author:
+ - family: Laufenberg
+ given: Xaver
+ - family: Eynius
+ given: Dominique
+ - family: Suelzle
+ given: Helmut
+ - family: Usbeck
+ given: Stephan
+ - family: Spaeth
+ given: Matthias
+ - family: 'Neuser-Hoffmann'
+ given: Miriam
+ - family: Myrzik
+ given: Christian
+ - family: Schmid
+ given: Manfred
+ - family: Nietfeld
+ given: Franz
+ - family: Thiel
+ given: Alexander
+ - family: Braun
+ given: Harald
+ - family: Ebner
+ given: Norbert
+ genre: European patent
+ id: laufenberg
+ issued: '2006-09-13'
+ language: 'de-DE'
+ number: 1700367
+ title: Elektrische Einrichtung und Betriebsverfahren
+ type: patent
+- annote: 'This is a patent entry with a holder field. Note the format
+ of the type and date fields in the database file. Compare almendro,
+ laufenberg, and kowalik'
+ author:
+ - family: Sorace
+ given: Ronald E.
+ - family: Reinhardt
+ given: Victor S.
+ - family: Vaughn
+ given: Steven A.
+ genre: U.S. patent
+ id: sorace
+ issued: '1997-09-16'
+ language: 'en-US'
+ number: 5668842
+ title: 'High-speed digital-to-RF converter'
+ type: patent
+---
+
+
+```
diff --git a/test/command/biblatex-periodical.md b/test/command/biblatex-periodical.md
new file mode 100644
index 000000000..938e29666
--- /dev/null
+++ b/test/command/biblatex-periodical.md
@@ -0,0 +1,30 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{excerpt from http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/examples/biblatex-examples.bib
+
+@periodical{jcg,
+ Annotation = {This is a periodical entry with an issn field.},
+ Issn = {0097-8493},
+ Issuetitle = {Semantic {3D} Media and Content},
+ Number = 4,
+ Title = {Computers and Graphics},
+ Volume = 35,
+ Year = 2011}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: This is a periodical entry with an issn field.
+ container-title: Computers and Graphics
+ id: jcg
+ issn: '0097-8493'
+ issue: 4
+ issued: 2011
+ title: Semantic 3D media and content
+ type: 'article-journal'
+ volume: 35
+---
+
+
+```
diff --git a/test/command/biblatex-piccato.md b/test/command/biblatex-piccato.md
new file mode 100644
index 000000000..4f4efcedf
--- /dev/null
+++ b/test/command/biblatex-piccato.md
@@ -0,0 +1,59 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Piccato 2001)
+
+Piccato, Pablo. 2001. *City of Suspects: Crime in Mexico City,
+1900–1931*. Durham; London: Duke University Press.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Piccato, 2001)
+
+Piccato, P. (2001). *City of suspects: Crime in Mexico City, 1900–1931*.
+Durham; London: Duke University Press.
+
+
+}
+
+@Book{piccato,
+ author = {Piccato, Pablo},
+ title = {City of Suspects},
+ date = 2001,
+ publisher = {Duke University Press},
+ location = {Durham and London},
+ hyphenation = {american},
+ subtitle = {Crime in {Mexico City}, 1900--1931},
+ shorttitle = {City of Suspects},
+ annotation = {This is a book entry. Note the format of the
+ location field in the database file},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: This is a book entry. Note the format of the location field in
+ the database file
+ author:
+ - family: Piccato
+ given: Pablo
+ id: piccato
+ issued: 2001
+ language: 'en-US'
+ publisher: Duke University Press
+ publisher-place: Durham; London
+ title: 'City of suspects: Crime in Mexico City, 1900--1931'
+ title-short: City of suspects
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-pines.md b/test/command/biblatex-pines.md
new file mode 100644
index 000000000..80802fec6
--- /dev/null
+++ b/test/command/biblatex-pines.md
@@ -0,0 +1,77 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Pines 1979)
+
+Pines, Shlomo. 1979. “The Limitations of Human Knowledge According to
+Al-Farabi, ibn Bajja, and Maimonides.” In *Studies in Medieval Jewish
+History and Literature*, edited by Isadore Twersky, 82–109. Cambridge,
+Mass.: Harvard University Press.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Pines, 1979)
+
+Pines, S. (1979). The limitations of human knowledge according to
+Al-Farabi, ibn Bajja, and Maimonides. In I. Twersky (Ed.), *Studies in
+medieval Jewish history and literature* (pp. 82–109). Cambridge, Mass.:
+Harvard University Press.
+
+
+}
+
+@string{ hup = {Harvard University Press} }
+
+@InCollection{pines,
+ author = {Pines, Shlomo},
+ editor = {Twersky, Isadore},
+ title = {The Limitations of Human Knowledge According to {Al-Farabi}, {ibn
+ Bajja}, and {Maimonides}},
+ date = 1979,
+ booktitle = {Studies in Medieval {Jewish} History and Literature},
+ publisher = hup,
+ location = {Cambridge, Mass.},
+ pages = {82-109},
+ keywords = {secondary},
+ hyphenation = {american},
+ indextitle = {Limitations of Human Knowledge According to {Al-Farabi}, {ibn
+ Bajja}, and {Maimonides}, The},
+ shorttitle = {Limitations of Human Knowledge},
+ annotation = {A typical incollection entry. Note the
+ indextitle field},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A typical incollection entry. Note the indextitle field
+ author:
+ - family: Pines
+ given: Shlomo
+ container-title: Studies in medieval Jewish history and literature
+ editor:
+ - family: Twersky
+ given: Isadore
+ id: pines
+ issued: 1979
+ keyword: secondary
+ language: 'en-US'
+ page: '82-109'
+ publisher: Harvard University Press
+ publisher-place: 'Cambridge, Mass.'
+ title: 'The limitations of human knowledge according to Al-Farabi,
+ [ibn Bajja]{.nocase}, and Maimonides'
+ title-short: Limitations of human knowledge
+ type: chapter
+---
+
+
+```
diff --git a/test/command/biblatex-quotes.md b/test/command/biblatex-quotes.md
new file mode 100644
index 000000000..5fb6a9078
--- /dev/null
+++ b/test/command/biblatex-quotes.md
@@ -0,0 +1,44 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{excerpt from http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/examples/biblatex-examples.bib
+
+\mkbibquote{} should be replaced by a matching set of quotation marks that can be used by citeproc for quote substitution and flipflopping. English smart double quotation marks seem best, as they cannot be confused with apostrophes.
+
+\enquote{}, \enquote*{} should be replaced by a matching set of quotation marks, too: “foo”, ‘bar’.
+}
+
+@string{pup = {Princeton University Press}}
+
+@book{nussbaum,
+ Annotation = {A book entry. Note the sorttitle and indexsorttitle fields and the markup of the quotes in the database file},
+ Author = {Nussbaum, Martha},
+ Date = 1978,
+ Hyphenation = {american},
+ Indexsorttitle = {Aristotle's De Motu Animalium},
+ Keywords = {secondary},
+ Location = {Princeton},
+ Publisher = pup,
+ Sorttitle = {Aristotle's De Motu Animalium},
+ Title = {Aristotle's \mkbibquote{De Motu Animalium}}}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A book entry. Note the sorttitle and indexsorttitle fields and
+ the markup of the quotes in the database file
+ author:
+ - family: Nussbaum
+ given: Martha
+ id: nussbaum
+ issued: 1978
+ keyword: secondary
+ language: 'en-US'
+ publisher: Princeton University Press
+ publisher-place: Princeton
+ title: 'Aristotle''s "De Motu Animalium"'
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-reese.md b/test/command/biblatex-reese.md
new file mode 100644
index 000000000..884b32905
--- /dev/null
+++ b/test/command/biblatex-reese.md
@@ -0,0 +1,71 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Reese 1958)
+
+Reese, Trevor R. 1958. “Georgia in Anglo-Spanish Diplomacy, 1736-1739.”
+*William and Mary Quarterly, 3* 15: 168–190.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Reese, 1958)
+
+Reese, T. R. (1958). Georgia in Anglo-Spanish diplomacy, 1736-1739.
+*William and Mary Quarterly, 3*, *15*, 168–190.
+
+
+NOTES:
+
+- biblio2yaml
+ - series field: still not entirely satisfactory.
+ Could we map this to some existing CSL variable, and have the CSL styles handle this? "edition", maybe ??
+
+}
+
+@Article{reese,
+ author = {Reese, Trevor R.},
+ title = {Georgia in {Anglo-Spanish} Diplomacy, 1736-1739},
+ journaltitle = {William and Mary Quarterly},
+ date = 1958,
+ series = 3,
+ volume = 15,
+ pages = {168-190},
+ hyphenation = {american},
+ annotation = {An article entry with a series and a
+ volume field. Note the format of the series. If the
+ value of the series field is an integer, this number
+ is printed as an ordinal and the string \enquote*{series} is
+ appended automatically},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'An article entry with a series and a volume field. Note the
+ format of the series. If the value of the series field is an
+ integer, this number is printed as an ordinal and the string
+ ''series'' is appended automatically'
+ author:
+ - family: Reese
+ given: Trevor R.
+ collection-title: 3rd series
+ container-title: William and Mary Quarterly
+ id: reese
+ issued: 1958
+ language: 'en-US'
+ page: '168-190'
+ title: 'Georgia in Anglo-Spanish diplomacy, 1736-1739'
+ type: 'article-journal'
+ volume: 15
+---
+
+
+```
diff --git a/test/command/biblatex-report.md b/test/command/biblatex-report.md
new file mode 100644
index 000000000..ab1a652b2
--- /dev/null
+++ b/test/command/biblatex-report.md
@@ -0,0 +1,119 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{excerpt from http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/examples/biblatex-examples.bib
+
+TODO: Where to map "file" field?
+}
+
+@report{chiu,
+ Annotation = {This is a report entry for a research report. Note the format of the type field in the database file which uses a localization key. The number of the report is given in the number field. Also note the sorttitle and indextitle fields},
+ Author = {Chiu, Willy W. and Chow, We Min},
+ Date = 1978,
+ Hyphenation = {american},
+ Indextitle = {Hybrid Hierarchical Model, A},
+ Institution = {IBM},
+ Number = {RC-6947},
+ Sorttitle = {Hybrid Hierarchical Model of a Multiple Virtual Storage (MVS) Operating System},
+ Title = {A Hybrid Hierarchical Model of a {Multiple Virtual Storage} ({MVS}) Operating System},
+ Type = {resreport}}
+
+@report{padhye,
+ Annotation = {This is a report entry for a technical report. Note the format of the type field in the database file which uses a localization key. The number of the report is given in the number field. Also note the sorttitle and indextitle fields},
+ Author = {Padhye, Jitendra and Firoiu, Victor and Towsley, Don},
+ Date = 1999,
+ File = {ftp://gaia.cs.umass.edu/pub/Padhey99-markov.ps},
+ Hyphenation = {american},
+ Indextitle = {Stochastic Model of TCP Reno Congestion Avoidance and Control, A},
+ Institution = {University of Massachusetts},
+ Location = {Amherst, Mass.},
+ Number = {99-02},
+ Sorttitle = {A Stochastic Model of TCP Reno Congestion Avoidance and Control},
+ Title = {A Stochastic Model of {TCP Reno} Congestion Avoidance and Control},
+ Type = {techreport},
+ Abstract = {The steady state performance of a bulk transfer TCP flow
+ (i.e., a flow with a large amount of data to send, such as FTP
+ transfers) may be characterized by three quantities. The first
+ is the send rate, which is the amount of data sent by the
+ sender in unit time. The second is the throughput, which is
+ the amount of data received by the receiver in unit time. Note
+ that the throughput will always be less than or equal to the
+ send rate due to losses. Finally, the number of non-duplicate
+ packets received by the receiver in unit time gives us the
+ goodput of the connection. The goodput is always less than or
+ equal to the throughput, since the receiver may receive two
+ copies of the same packet due to retransmissions by the
+ sender. In a previous paper, we presented a simple model for
+ predicting the steady state send rate of a bulk transfer TCP
+ flow as a function of loss rate and round trip time. In this
+ paper, we extend that work in two ways. First, we analyze the
+ performance of bulk transfer TCP flows using more precise,
+ stochastic analysis. Second, we build upon the previous
+ analysis to provide both an approximate formula as well as a
+ more accurate stochastic model for the steady state throughput
+ of a bulk transfer TCP flow.}}
+^D
+---
+nocite: '[@*]'
+references:
+- annote: This is a report entry for a research report. Note the format
+ of the type field in the database file which uses a localization
+ key. The number of the report is given in the number field. Also
+ note the sorttitle and indextitle fields
+ author:
+ - family: Chiu
+ given: Willy W.
+ - family: Chow
+ given: We Min
+ genre: research report
+ id: chiu
+ issued: 1978
+ language: 'en-US'
+ number: 'RC-6947'
+ publisher: IBM
+ title: A hybrid hierarchical model of a Multiple Virtual Storage (MVS)
+ operating system
+ type: report
+- abstract: 'The steady state performance of a bulk transfer TCP flow
+ (i.e., a flow with a large amount of data to send, such as FTP
+ transfers) may be characterized by three quantities. The first is
+ the send rate, which is the amount of data sent by the sender in
+ unit time. The second is the throughput, which is the amount of data
+ received by the receiver in unit time. Note that the throughput will
+ always be less than or equal to the send rate due to losses.
+ Finally, the number of non-duplicate packets received by the
+ receiver in unit time gives us the goodput of the connection. The
+ goodput is always less than or equal to the throughput, since the
+ receiver may receive two copies of the same packet due to
+ retransmissions by the sender. In a previous paper, we presented a
+ simple model for predicting the steady state send rate of a bulk
+ transfer TCP flow as a function of loss rate and round trip time. In
+ this paper, we extend that work in two ways. First, we analyze the
+ performance of bulk transfer TCP flows using more precise,
+ stochastic analysis. Second, we build upon the previous analysis to
+ provide both an approximate formula as well as a more accurate
+ stochastic model for the steady state throughput of a bulk transfer
+ TCP flow.'
+ annote: This is a report entry for a technical report. Note the format
+ of the type field in the database file which uses a localization
+ key. The number of the report is given in the number field. Also
+ note the sorttitle and indextitle fields
+ author:
+ - family: Padhye
+ given: Jitendra
+ - family: Firoiu
+ given: Victor
+ - family: Towsley
+ given: Don
+ genre: technical report
+ id: padhye
+ issued: 1999
+ language: 'en-US'
+ number: '99-02'
+ publisher: University of Massachusetts
+ publisher-place: 'Amherst, Mass.'
+ title: A stochastic model of TCP Reno congestion avoidance and control
+ type: report
+---
+
+
+```
diff --git a/test/command/biblatex-salam.md b/test/command/biblatex-salam.md
new file mode 100644
index 000000000..7da076ca3
--- /dev/null
+++ b/test/command/biblatex-salam.md
@@ -0,0 +1,69 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Salam 1968)
+
+Salam, Abdus. 1968. “Weak and Electromagnetic Interactions.” In
+*Elementary Particle Theory: Relativistic Groups and Analyticity.
+Proceedings of the Eighth Nobel Symposium*, edited by Nils Svartholm,
+367–377. Stockholm: Almquist & Wiksell.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Salam, 1968)
+
+Salam, A. (1968). Weak and electromagnetic interactions. In N. Svartholm
+(Ed.), *Elementary particle theory: Relativistic groups and analyticity.
+Proceedings of the eighth Nobel symposium* (pp. 367–377). Stockholm:
+Almquist & Wiksell.
+
+
+}
+
+@InProceedings{salam,
+ author = {Salam, Abdus},
+ editor = {Svartholm, Nils},
+ title = {Weak and Electromagnetic Interactions},
+ date = 1968,
+ booktitle = {Elementary particle theory},
+ booksubtitle = {Relativistic groups and analyticity},
+ booktitleaddon= {Proceedings of the Eighth {Nobel} Symposium},
+ eventdate = {1968-05-19/1968-05-25},
+ venue = {Aspen{\"a}sgarden, Lerum},
+ publisher = {Almquist \& Wiksell},
+ location = {Stockholm},
+ pages = {367-377},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Salam
+ given: Abdus
+ container-title: 'Elementary particle theory: Relativistic groups and
+ analyticity. Proceedings of the eighth Nobel symposium'
+ editor:
+ - family: Svartholm
+ given: Nils
+ event-date: '1968-05-19/1968-05-25'
+ event-place: 'Aspenäsgarden, Lerum'
+ id: salam
+ issued: 1968
+ page: '367-377'
+ publisher: 'Almquist & Wiksell'
+ publisher-place: Stockholm
+ title: Weak and electromagnetic interactions
+ type: 'paper-conference'
+---
+
+
+```
diff --git a/test/command/biblatex-sarfraz.md b/test/command/biblatex-sarfraz.md
new file mode 100644
index 000000000..7484df833
--- /dev/null
+++ b/test/command/biblatex-sarfraz.md
@@ -0,0 +1,65 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Sarfraz and Razzak 2002)
+
+Sarfraz, M., and M. F. A. Razzak. 2002. “Technical Section: An Algorithm
+for Automatic Capturing of the Font Outlines.” *Computers and Graphics*
+26 (5): 795–804.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Sarfraz & Razzak, 2002)
+
+Sarfraz, M., & Razzak, M. F. A. (2002). Technical section: An algorithm
+for automatic capturing of the font outlines. *Computers and Graphics*,
+*26*(5), 795–804.
+
+
+}
+
+@Article{sarfraz,
+ author = {M. Sarfraz and M. F. A. Razzak},
+ title = {Technical section: {An} algorithm for automatic capturing of
+ the font outlines},
+ year = 2002,
+ volume = 26,
+ number = 5,
+ pages = {795-804},
+ issn = {0097-8493},
+ journal = {Computers and Graphics},
+ annotation = {An article entry with an issn field},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: An article entry with an issn field
+ author:
+ - family: Sarfraz
+ given: M.
+ - family: Razzak
+ given: M. F. A.
+ container-title: Computers and Graphics
+ id: sarfraz
+ issn: '0097-8493'
+ issue: 5
+ issued: 2002
+ page: '795-804'
+ title: 'Technical section: An algorithm for automatic capturing of the
+ font outlines'
+ title-short: Technical section
+ type: 'article-journal'
+ volume: 26
+---
+
+
+```
diff --git a/test/command/biblatex-shore.md b/test/command/biblatex-shore.md
new file mode 100644
index 000000000..19321ca75
--- /dev/null
+++ b/test/command/biblatex-shore.md
@@ -0,0 +1,66 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Shore 1991)
+
+Shore, Bradd. 1991. “Twice-born, Once Conceived: Meaning Construction
+and Cultural Cognition.” *American Anthropologist, New Series* 93 (1)
+(March): 9–27.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Shore, 1991)
+
+Shore, B. (1991). Twice-born, once conceived: Meaning construction and
+cultural cognition. *American Anthropologist, new series*, *93*(1),
+9–27.
+
+
+}
+
+@Article{shore,
+ author = {Shore, Bradd},
+ title = {Twice-Born, Once Conceived},
+ journaltitle = {American Anthropologist},
+ date = {1991-03},
+ subtitle = {Meaning Construction and Cultural Cognition},
+ series = {newseries},
+ volume = 93,
+ number = 1,
+ pages = {9-27},
+ annotation = {An article entry with series,
+ volume, and number fields. Note the format
+ of the series which is a localization key},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'An article entry with series, volume, and number fields. Note
+ the format of the series which is a localization key'
+ author:
+ - family: Shore
+ given: Bradd
+ collection-title: new series
+ container-title: American Anthropologist
+ id: shore
+ issue: 1
+ issued: '1991-03'
+ page: '9-27'
+ title: 'Twice-born, once conceived: Meaning construction and cultural
+ cognition'
+ title-short: 'Twice-born, once conceived'
+ type: 'article-journal'
+ volume: 93
+---
+
+
+```
diff --git a/test/command/biblatex-sigfridsson.md b/test/command/biblatex-sigfridsson.md
new file mode 100644
index 000000000..47e674f5c
--- /dev/null
+++ b/test/command/biblatex-sigfridsson.md
@@ -0,0 +1,106 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Sigfridsson and Ryde 1998)
+
+Sigfridsson, Emma, and Ulf Ryde. 1998. “Comparison of Methods for
+Deriving Atomic Charges from the Electrostatic Potential and Moments.”
+*Journal of Computational Chemistry* 19 (4): 377–395.
+doi:[10.1002/(SICI)1096-987X(199803)19:4\<377::AID-JCC1\>3.0.CO;2-P](https://doi.org/10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P "10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P").
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Sigfridsson & Ryde, 1998)
+
+Sigfridsson, E., & Ryde, U. (1998). Comparison of methods for deriving
+atomic charges from the electrostatic potential and moments. *Journal of
+Computational Chemistry*, *19*(4), 377–395.
+doi:[10.1002/(SICI)1096-987X(199803)19:4\<377::AID-JCC1\>3.0.CO;2-P](https://doi.org/10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P "10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P")
+
+
+NOTES:
+
+- biblio2xaml
+ - the string "doi:" should not appear as part of the content of the "doi" field
+
+}
+
+@Article{sigfridsson,
+ author = {Sigfridsson, Emma and Ryde, Ulf},
+ title = {Comparison of methods for deriving atomic charges from the
+ electrostatic potential and moments},
+ journaltitle = {Journal of Computational Chemistry},
+ date = 1998,
+ volume = 19,
+ number = 4,
+ pages = {377-395},
+ doi = {10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P},
+ hyphenation = {american},
+ indextitle = {Methods for deriving atomic charges},
+ annotation = {An article entry with volume,
+ number, and doi fields. Note that the
+ \textsc{doi} is transformed into a clickable link if
+ hyperref support has been enabled},
+ abstract = {Four methods for deriving partial atomic charges from the
+ quantum chemical electrostatic potential (CHELP, CHELPG,
+ Merz-Kollman, and RESP) have been compared and critically
+ evaluated. It is shown that charges strongly depend on how and
+ where the potential points are selected. Two alternative
+ methods are suggested to avoid the arbitrariness in the
+ point-selection schemes and van der Waals exclusion radii:
+ CHELP-BOW, which also estimates the charges from the
+ electrostatic potential, but with potential points that are
+ Boltzmann-weighted after their occurrence in actual
+ simulations using the energy function of the program in which
+ the charges will be used, and CHELMO, which estimates the
+ charges directly from the electrostatic multipole
+ moments. Different criteria for the quality of the charges are
+ discussed.},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- abstract: 'Four methods for deriving partial atomic charges from the
+ quantum chemical electrostatic potential (CHELP, CHELPG,
+ Merz-Kollman, and RESP) have been compared and critically evaluated.
+ It is shown that charges strongly depend on how and where the
+ potential points are selected. Two alternative methods are suggested
+ to avoid the arbitrariness in the point-selection schemes and van
+ der Waals exclusion radii: CHELP-BOW, which also estimates the
+ charges from the electrostatic potential, but with potential points
+ that are Boltzmann-weighted after their occurrence in actual
+ simulations using the energy function of the program in which the
+ charges will be used, and CHELMO, which estimates the charges
+ directly from the electrostatic multipole moments. Different
+ criteria for the quality of the charges are discussed.'
+ annote: 'An article entry with volume, number, and doi fields. Note
+ that the [doi]{.smallcaps} is transformed into a clickable link if
+ hyperref support has been enabled'
+ author:
+ - family: Sigfridsson
+ given: Emma
+ - family: Ryde
+ given: Ulf
+ container-title: Journal of Computational Chemistry
+ doi: '10.1002/(SICI)1096-987X(199803)19:4\<377::AID-JCC1\>3.0.CO;2-P'
+ id: sigfridsson
+ issue: 4
+ issued: 1998
+ language: 'en-US'
+ page: '377-395'
+ title: Comparison of methods for deriving atomic charges from the
+ electrostatic potential and moments
+ type: 'article-journal'
+ volume: 19
+---
+
+
+```
diff --git a/test/command/biblatex-sorace.md b/test/command/biblatex-sorace.md
new file mode 100644
index 000000000..2f003c063
--- /dev/null
+++ b/test/command/biblatex-sorace.md
@@ -0,0 +1,65 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Sorace, Reinhardt, and Vaughn 1997)
+
+Sorace, Ronald E., Victor S. Reinhardt, and Steven A. Vaughn. 1997.
+“High-speed Digital-to-RF Converter.” U.S. patent.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Sorace, Reinhardt, & Vaughn, 1997)
+
+Sorace, R. E., Reinhardt, V. S., & Vaughn, S. A. (1997, September 16).
+High-speed digital-to-RF converter. U.S. patent.
+
+
+}
+
+@Patent{sorace,
+ author = {Sorace, Ronald E. and Reinhardt, Victor S. and Vaughn, Steven
+ A.},
+ title = {High-Speed Digital-to-{RF} Converter},
+ number = 5668842,
+ date = {1997-09-16},
+ holder = {{Hughes Aircraft Company}},
+ type = {patentus},
+ hyphenation = {american},
+ annotation = {This is a patent entry with a holder field.
+ Note the format of the type and date fields
+ in the database file. Compare almendro,
+ laufenberg, and kowalik},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'This is a patent entry with a holder field. Note the format
+ of the type and date fields in the database file. Compare almendro,
+ laufenberg, and kowalik'
+ author:
+ - family: Sorace
+ given: Ronald E.
+ - family: Reinhardt
+ given: Victor S.
+ - family: Vaughn
+ given: Steven A.
+ genre: U.S. patent
+ id: sorace
+ issued: '1997-09-16'
+ language: 'en-US'
+ number: 5668842
+ title: 'High-speed digital-to-RF converter'
+ type: patent
+---
+
+
+```
diff --git a/test/command/biblatex-spiegelberg.md b/test/command/biblatex-spiegelberg.md
new file mode 100644
index 000000000..d17c30eab
--- /dev/null
+++ b/test/command/biblatex-spiegelberg.md
@@ -0,0 +1,74 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Spiegelberg 1969)
+
+Spiegelberg, Herbert. 1969. ““Intention” und “Intentionalität” in der
+Scholastik, bei Brentano und Husserl.” *Studia Philosophica* 29:
+189–216.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Spiegelberg, 1969)
+
+Spiegelberg, H. (1969). “Intention” und “Intentionalität” in der
+Scholastik, bei Brentano und Husserl. *Studia Philosophica*, *29*,
+189–216.
+
+
+NOTES:
+
+- citeproc
+ - flipflopping of quotes incorrect
+
+}
+
+@Article{spiegelberg,
+ author = {Spiegelberg, Herbert},
+ title = {\mkbibquote{Intention} und \mkbibquote{Intentionalit{\"a}t} in
+ der Scholastik, bei Brentano und Husserl},
+ journaltitle = {Studia Philosophica},
+ date = 1969,
+ volume = 29,
+ pages = {189-216},
+ hyphenation = {german},
+ sorttitle = {Intention und Intentionalitat in der Scholastik, bei Brentano
+ und Husserl},
+ indexsorttitle= {Intention und Intentionalitat in der Scholastik, bei Brentano
+ und Husserl},
+ shorttitle = {Intention und Intentionalit{\"a}t},
+ annotation = {An article entry. Note the sorttitle and
+ indexsorttitle fields and the markup of the quotes in
+ the database file},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: An article entry. Note the sorttitle and indexsorttitle fields
+ and the markup of the quotes in the database file
+ author:
+ - family: Spiegelberg
+ given: Herbert
+ container-title: Studia Philosophica
+ id: spiegelberg
+ issued: 1969
+ language: 'de-DE'
+ page: '189-216'
+ title: '"Intention" und "Intentionalität" in der Scholastik, bei
+ Brentano und Husserl'
+ title-short: Intention und Intentionalität
+ type: 'article-journal'
+ volume: 29
+---
+
+
+```
diff --git a/test/command/biblatex-springer.md b/test/command/biblatex-springer.md
new file mode 100644
index 000000000..9ee1f684a
--- /dev/null
+++ b/test/command/biblatex-springer.md
@@ -0,0 +1,58 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Springer 1950)
+
+Springer, Otto. 1950. “Mediaeval Pilgrim Routes from Scandinavia to
+Rome.” *Mediaeval Studies* 12: 92–122.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Springer, 1950)
+
+Springer, O. (1950). Mediaeval pilgrim routes from Scandinavia to Rome.
+*Mediaeval Studies*, *12*, 92–122.
+
+
+}
+
+@Article{springer,
+ author = {Springer, Otto},
+ title = {Mediaeval Pilgrim Routes from {Scandinavia} to {Rome}},
+ journaltitle = {Mediaeval Studies},
+ date = 1950,
+ volume = 12,
+ pages = {92-122},
+ hyphenation = {british},
+ shorttitle = {Mediaeval Pilgrim Routes},
+ annotation = {A plain article entry},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A plain article entry
+ author:
+ - family: Springer
+ given: Otto
+ container-title: Mediaeval Studies
+ id: springer
+ issued: 1950
+ language: 'en-GB'
+ page: '92-122'
+ title: Mediaeval pilgrim routes from Scandinavia to Rome
+ title-short: Mediaeval pilgrim routes
+ type: 'article-journal'
+ volume: 12
+---
+
+
+```
diff --git a/test/command/biblatex-strings.md b/test/command/biblatex-strings.md
new file mode 100644
index 000000000..d8748334c
--- /dev/null
+++ b/test/command/biblatex-strings.md
@@ -0,0 +1,46 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{excerpt from http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/examples/biblatex-examples.bib}
+
+@string{anch-ie = {Angew.~Chem. Int.~Ed.}}
+
+@article{herrmann,
+ Author = {Herrmann, Wolfgang A. and Öfele, Karl and Schneider, Sabine K. and Herdtweck, Eberhardt and Hoffmann, Stephan D.},
+ Date = 2006,
+ Hyphenation = {english},
+ Indextitle = {Carbocyclic carbene as an efficient catalyst, A},
+ Journaltitle = anch-ie,
+ Number = 23,
+ Pages = {3859-3862},
+ Title = {A Carbocyclic Carbene as an Efficient Catalyst Ligand for {C--C} Coupling Reactions},
+ Volume = 45}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Herrmann
+ given: Wolfgang A.
+ - family: Öfele
+ given: Karl
+ - family: Schneider
+ given: Sabine K.
+ - family: Herdtweck
+ given: Eberhardt
+ - family: Hoffmann
+ given: Stephan D.
+ container-title: Angew. Chem. Int. Ed.
+ id: herrmann
+ issue: 23
+ issued: 2006
+ language: 'en-US'
+ page: '3859-3862'
+ title: 'A carbocyclic carbene as an efficient catalyst ligand for C--C
+ coupling reactions'
+ type: 'article-journal'
+ volume: 45
+---
+
+
+```
diff --git a/test/command/biblatex-test-case-conversion.md b/test/command/biblatex-test-case-conversion.md
new file mode 100644
index 000000000..7e10ebf60
--- /dev/null
+++ b/test/command/biblatex-test-case-conversion.md
@@ -0,0 +1,73 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+ - bibtex and biblatex
+ - expect titles in title case
+ - styles use titles as is, or convert them to sentence case
+ - strings wrapped {} are not converted
+ - all CSL styles at <http://github.com/citation-style-language/styles>
+ and <https://www.zotero.org/styles/>
+ - expect titles in sentence case
+ - styles use titles as is, or convert them to title case
+ - except for (hardcoded) list of stop words, see
+ <http://citationstyles.org/downloads/specification.html#title-case-conversion>
+ - citeproc-js (MLZ only?) also recognizes a markup syntax for
+ suppressing title-case changes on a range of text (see
+ <https://forums.zotero.org/discussion/21991/excessive-capitalization-of-citation-titles/#Item_22>):
+ - `<span class="nocase"/>lowercase</span>`
+ - Proposal:
+ - When converting to yaml, convert English titles to sentence case,
+ - for all strings wrapped in {} where {} is not part of a latex
+ command, ...
+ - ... when starting with an uppercase letter: suppress
+conversion, remove the {}
+ - ... when starting with a lowercase letter ("nm", "iPod"):
+ suppress conversion, replace the {} with
+ <span class="nocase"/></span>
+ - Note: Camel case ("iPod") needs to be protected in
+ bibtex/biblatex anyway; the only "extension" (wrt bibtex/biblatex
+ specs) we'd be introducing is wrapping lowercase-only strings in
+ {}, something that is never necessary on the latex side but
+ won't break anything there either.
+ - citeproc-hs/pandoc-citeproc should be modified to honour this new
+ syntax and suppress conversion to title case for strings wrapped
+ in `<span class="nocase"/></span>`.
+ - Expected output, using one of the title-case CSL styles, here
+ chicago-author-date.csl:
+
+ Author, Ann. 2013. “A Title, in English, with a Proper Name and
+an
+ ACRONYM and a camelCase Word and Some Units, 400 nm, 3 cm, and
+a Quote,
+ *Alea iacta est*.” *Journal*.
+ }
+
+@article{item1,
+ Author = {Author, Ann},
+ Date = {2013},
+ Hyphenation = {english},
+ Journaltitle = {Journal},
+ Title = {A Title, in {English}, with a {Proper Name} and an {ACRONYM}
+and a {camelCase} Word and Some Units, 400~{nm}, 3~{cm}, and a Quote,
+\textit{{Alea} {iacta est}}}
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Author
+ given: Ann
+ container-title: Journal
+ id: item1
+ issued: 2013
+ language: 'en-US'
+ title: 'A title, in English, with a Proper Name and an ACRONYM and a
+ [camelCase]{.nocase} word and some units, 400 [nm]{.nocase},
+ 3 [cm]{.nocase}, and a quote, *Alea [iacta est]{.nocase}*'
+ type: 'article-journal'
+---
+
+
+```
diff --git a/test/command/biblatex-textnormal.md b/test/command/biblatex-textnormal.md
new file mode 100644
index 000000000..c70e9d6d4
--- /dev/null
+++ b/test/command/biblatex-textnormal.md
@@ -0,0 +1,17 @@
+```
+% pandoc -f biblatex -t markdown -s
+@book{item1,
+ Title = {The Title \textnormal{of this book}},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- id: item1
+ title: 'The title [of this book]{.nodecor}'
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-thesis.md b/test/command/biblatex-thesis.md
new file mode 100644
index 000000000..e4ee0cf13
--- /dev/null
+++ b/test/command/biblatex-thesis.md
@@ -0,0 +1,68 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{excerpted from http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/examples/biblatex-examples.bib
+
+TODO: Uppercase letters follwing hyphens need to be converted to lowercase, too (e.g., "r" in "High-Resolution". -- Same for citeproc when doing title-case conversion!)
+}
+
+@thesis{geer,
+ Annotation = {This is a typical thesis entry for a PhD thesis. Note the type field in the database file which uses a localization key. Also note the format of the printed name and compare the useprefix option in the options field as well as vangennep},
+ Author = {de Geer, Ingrid},
+ Date = 1985,
+ Hyphenation = {british},
+ Institution = {Uppsala Universitet},
+ Location = {Uppsala},
+ Options = {useprefix=false},
+ Subtitle = {The {Orkney} Earldom of the Twelfth Century. {A} Musicological Study},
+ Title = {Earl, Saint, Bishop, Skald~-- and Music},
+ Type = {phdthesis}}
+
+@thesis{loh,
+ Annotation = {This is a typical thesis entry for an MA thesis. Note the type field in the database file which uses a localization key},
+ Author = {Loh, Nin C.},
+ Date = 1992,
+ Hyphenation = {american},
+ Institution = {Massachusetts Institute of Technology},
+ Location = {Cambridge, Mass.},
+ Title = {High-Resolution Micromachined Interferometric Accelerometer},
+ Type = {mathesis}}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: This is a typical thesis entry for a PhD thesis. Note the type
+ field in the database file which uses a localization key. Also note
+ the format of the printed name and compare the useprefix option in
+ the options field as well as vangennep
+ author:
+ - dropping-particle: de
+ family: Geer
+ given: Ingrid
+ genre: PhD thesis
+ id: geer
+ issued: 1985
+ language: 'en-GB'
+ publisher: Uppsala Universitet
+ publisher-place: Uppsala
+ title: 'Earl, saint, bishop, skald -- and music: The Orkney earldom of
+ the twelfth century. A musicological study'
+ title-short: 'Earl, saint, bishop, skald -- and music'
+ type: thesis
+- annote: This is a typical thesis entry for an MA thesis. Note the type
+ field in the database file which uses a localization key
+ author:
+ - family: Loh
+ given: Nin C.
+ genre: 'Master''s thesis'
+ id: loh
+ issued: 1992
+ language: 'en-US'
+ publisher: Massachusetts Institute of Technology
+ publisher-place: 'Cambridge, Mass.'
+ title: 'High-resolution micromachined interferometric accelerometer'
+ type: thesis
+---
+
+
+```
diff --git a/test/command/biblatex-title-and-shorttitle.md b/test/command/biblatex-title-and-shorttitle.md
new file mode 100644
index 000000000..7daa44134
--- /dev/null
+++ b/test/command/biblatex-title-and-shorttitle.md
@@ -0,0 +1,76 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+TODO:
+Slight inconsistency:
+When a biblatex “title” field contains a colon, the part before the colon is mapped to CSL “title-short”.
+When there’s a biblatex “title” and a “subtitle” field, CSL “title-short” is not set, though it would make at least as much sense to map “title” (without “subtitle”) to CSL “title-short” in this case.
+
+CSL “container-title-short” could also be set
+- from biblatex “shortjournal”
+- for inbook, incollection etc. from the “shorttitle” field of the crossreferenced book, collection etc. entry (see item5, item6)
+... but it might not really be worth it, “container-title-short” not being used once in my sample of 70+ CSL styles.
+
+}
+
+@book{item4,
+ Shorttitle = {The Shorttitle},
+ Subtitle = {And a Subtitle, in Two Separate Fields; plus a Separate “Shorttitle” Field},
+ Title = {The Title: With a Colon in the “Title” Field}}
+
+@book{item3,
+ Subtitle = {And a Subtitle, in two separate fields},
+ Title = {The Title: With a Colon in the “title” field}}
+
+@book{item2,
+ Subtitle = {The Subtitle, In Two Separate fields},
+ Title = {The Title}}
+
+@book{item1,
+ Title = {The Title: And the Subtitle, all in the “title” Field}}
+
+@inbook{item5,
+ Title = {The inbook Title: And the Subtitle, all in the “title” Field},
+ Crossref = {item6}}
+
+@book{item6,
+ Title = {The Title: And the Subtitle, all in the “title” Field},
+ Shorttitle = {The Shorttitle},
+}
+^D
+---
+nocite: '[@*]'
+references:
+- id: item4
+ title: 'The title: With a colon in the "title" field: And a subtitle,
+ in two separate fields; plus a separate "shorttitle" field'
+ title-short: The shorttitle
+ type: book
+- id: item3
+ title: 'The title: With a colon in the "title" field: And a subtitle,
+ in two separate fields'
+ title-short: The title
+ type: book
+- id: item2
+ title: 'The title: The subtitle, in two separate fields'
+ title-short: The title
+ type: book
+- id: item1
+ title: 'The title: And the subtitle, all in the "title" field'
+ title-short: The title
+ type: book
+- container-title: 'The title: And the subtitle, all in the "title"
+ field'
+ id: item5
+ title: 'The inbook title: And the subtitle, all in the "title" field'
+ title-short: The inbook title
+ type: chapter
+- id: item6
+ title: 'The title: And the subtitle, all in the "title" field'
+ title-short: The shorttitle
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-vangennep-related.md b/test/command/biblatex-vangennep-related.md
new file mode 100644
index 000000000..d23698d0b
--- /dev/null
+++ b/test/command/biblatex-vangennep-related.md
@@ -0,0 +1,69 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(van Gennep 1909)
+
+van Gennep, Arnold. 1909. *Les rites de passage*. Paris: Nourry.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(van Gennep, 1909)
+
+van Gennep, A. (1909). *Les rites de passage*. Paris: Nourry.
+
+NOTES:
+
+- biblio2yaml
+ - "related = {vizedom:related}, relatedtype = {bytranslator}": no equivalent implemented in CSL
+ - "options = {useprefix}," is shorthand for "options = {useprefix=true},"
+
+
+}
+
+@Book{vangennep:related,
+ author = {van Gennep, Arnold},
+ title = {Les rites de passage},
+ date = 1909,
+ publisher = {Nourry},
+ location = {Paris},
+ options = {useprefix},
+ hyphenation = {french},
+ related = {vizedom:related},
+ relatedtype = {bytranslator},
+ sorttitle = {Rites de passage},
+ indextitle = {Rites de passage, Les},
+ shorttitle = {Rites de passage},
+ annotation = {A variant of the vangennep entry related to its
+ translation. Note the format of the related and
+ relatedtype fields},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A variant of the vangennep entry related to its translation.
+ Note the format of the related and relatedtype fields
+ author:
+ - family: Gennep
+ given: Arnold
+ non-dropping-particle: van
+ id: 'vangennep:related'
+ issued: 1909
+ language: 'fr-FR'
+ publisher: Nourry
+ publisher-place: Paris
+ title: Les rites de passage
+ title-short: Rites de passage
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-vangennep-trans.md b/test/command/biblatex-vangennep-trans.md
new file mode 100644
index 000000000..21fe69d1f
--- /dev/null
+++ b/test/command/biblatex-vangennep-trans.md
@@ -0,0 +1,69 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(van Gennep 1960)
+
+van Gennep, Arnold. 1960. *The Rites of Passage*. Translated by Monika
+B. Vizedom and Gabrielle L. Caffee. University of Chicago Press.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(van Gennep, 1960)
+
+van Gennep, A. (1960). *The rites of passage*. (M. B. Vizedom & G. L.
+Caffee, Trans.). University of Chicago Press.
+
+
+}
+
+@Book{vangennep:trans,
+ author = {van Gennep, Arnold},
+ title = {The Rites of Passage},
+ year = 1960,
+ translator = {Vizedom, Monika B. and Caffee, Gabrielle L.},
+ language = {english},
+ origlanguage = {french},
+ publisher = {University of Chicago Press},
+ options = {useprefix},
+ indextitle = {Rites of Passage, The},
+ sorttitle = {Rites of Passage},
+ shorttitle = {Rites of Passage},
+ hyphenation = {american},
+ annotation = {A translation of the vangennep entry. Note the
+ translator and origlanguage fields. Compare
+ with the vangennep:related entry.},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'A translation of the vangennep entry. Note the translator and
+ origlanguage fields. Compare with the vangennep:related entry.'
+ author:
+ - family: Gennep
+ given: Arnold
+ non-dropping-particle: van
+ id: 'vangennep:trans'
+ issued: 1960
+ language: 'en-US'
+ publisher: University of Chicago Press
+ title: The rites of passage
+ title-short: Rites of passage
+ translator:
+ - family: Vizedom
+ given: Monika B.
+ - family: Caffee
+ given: Gabrielle L.
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-vangennep.md b/test/command/biblatex-vangennep.md
new file mode 100644
index 000000000..4470d21fc
--- /dev/null
+++ b/test/command/biblatex-vangennep.md
@@ -0,0 +1,61 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(van Gennep 1909)
+
+van Gennep, Arnold. 1909. *Les rites de passage*. Paris: Nourry.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(van Gennep, 1909)
+
+van Gennep, A. (1909). *Les rites de passage*. Paris: Nourry.
+
+
+}
+
+@Book{vangennep,
+ author = {van Gennep, Arnold},
+ title = {Les rites de passage},
+ date = 1909,
+ publisher = {Nourry},
+ location = {Paris},
+ options = {useprefix},
+ hyphenation = {french},
+ sorttitle = {Rites de passage},
+ indextitle = {Rites de passage, Les},
+ shorttitle = {Rites de passage},
+ annotation = {A book entry. Note the format of the printed name and
+ compare the useprefix option in the options
+ field as well as brandt and geer},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A book entry. Note the format of the printed name and compare
+ the useprefix option in the options field as well as brandt and geer
+ author:
+ - family: Gennep
+ given: Arnold
+ non-dropping-particle: van
+ id: vangennep
+ issued: 1909
+ language: 'fr-FR'
+ publisher: Nourry
+ publisher-place: Paris
+ title: Les rites de passage
+ title-short: Rites de passage
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-vazques-de-parga-mvbook.md b/test/command/biblatex-vazques-de-parga-mvbook.md
new file mode 100644
index 000000000..54e4f68e0
--- /dev/null
+++ b/test/command/biblatex-vazques-de-parga-mvbook.md
@@ -0,0 +1,75 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Vázques de Parga, Lacarra, and Uría Ríu 1993)
+
+Vázques de Parga, Luis, José María Lacarra, and Juan Uría Ríu. 1993.
+*Las Peregrinaciones a Santiago de Compostela*. 3. Pamplona: Iberdrola.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Vázques de Parga, Lacarra, & Uría Ríu, 1993)
+
+Vázques de Parga, L., Lacarra, J. M., & Uría Ríu, J. (1993). *Las
+Peregrinaciones a Santiago de Compostela* (1-3). Pamplona: Iberdrola.
+
+
+NOTES:
+
+- citeproc
+ - term "vols." missing
+
+}
+
+@mvbook{vazques-de-parga,
+ author = {V{\'a}zques{ de }Parga, Luis and Lacarra, Jos{\'e} Mar{\'i}a
+ and Ur{\'i}a R{\'i}u, Juan},
+ title = {Las Peregrinaciones a Santiago de Compostela},
+ date = 1993,
+ volumes = 3,
+ note = {Ed. facs. de la realizada en 1948--49},
+ publisher = {Iberdrola},
+ location = {Pamplona},
+ hyphenation = {spanish},
+ sorttitle = {Peregrinaciones a Santiago de Compostela},
+ indextitle = {Peregrinaciones a Santiago de Compostela, Las},
+ shorttitle = {Peregrinaciones},
+ annotation = {A multivolume book cited as a whole. This is a book
+ entry with volumes, note,
+ sorttitle, and indextitle fields},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'A multivolume book cited as a whole. This is a book entry
+ with volumes, note, sorttitle, and indextitle fields'
+ author:
+ - family: Vázques de Parga
+ given: Luis
+ - family: Lacarra
+ given: José María
+ - family: Uría Ríu
+ given: Juan
+ id: 'vazques-de-parga'
+ issued: 1993
+ language: 'es-ES'
+ note: 'Ed. facs. de la realizada en 1948--49'
+ number-of-volumes: 3
+ publisher: Iberdrola
+ publisher-place: Pamplona
+ title: Las Peregrinaciones a Santiago de Compostela
+ title-short: Peregrinaciones
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-vazques-de-parga.md b/test/command/biblatex-vazques-de-parga.md
new file mode 100644
index 000000000..49cccd2ef
--- /dev/null
+++ b/test/command/biblatex-vazques-de-parga.md
@@ -0,0 +1,74 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Vázques de Parga, Lacarra, and Uría Ríu 1993)
+
+Vázques de Parga, Luis, José María Lacarra, and Juan Uría Ríu. 1993.
+*Las Peregrinaciones a Santiago de Compostela*. 3. Pamplona: Iberdrola.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Vázques de Parga, Lacarra, & Uría Ríu, 1993)
+
+Vázques de Parga, L., Lacarra, J. M., & Uría Ríu, J. (1993). *Las
+Peregrinaciones a Santiago de Compostela* (1-3). Pamplona: Iberdrola.
+
+
+NOTES:
+
+- citeproc
+ - term "vols." missing
+
+}
+
+@Book{vazques-de-parga,
+ author = {V{\'a}zques{ de }Parga, Luis and Lacarra, Jos{\'e} Mar{\'i}a
+ and Ur{\'i}a R{\'i}u, Juan},
+ title = {Las Peregrinaciones a Santiago de Compostela},
+ date = 1993,
+ volumes = 3,
+ note = {Ed. facs. de la realizada en 1948--49},
+ publisher = {Iberdrola},
+ location = {Pamplona},
+ hyphenation = {spanish},
+ sorttitle = {Peregrinaciones a Santiago de Compostela},
+ indextitle = {Peregrinaciones a Santiago de Compostela, Las},
+ shorttitle = {Peregrinaciones},
+ annotation = {A multivolume book cited as a whole. This is a book
+ entry with volumes, note,
+ sorttitle, and indextitle fields},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'A multivolume book cited as a whole. This is a book entry
+ with volumes, note, sorttitle, and indextitle fields'
+ author:
+ - family: Vázques de Parga
+ given: Luis
+ - family: Lacarra
+ given: José María
+ - family: Uría Ríu
+ given: Juan
+ id: 'vazques-de-parga'
+ issued: 1993
+ language: 'es-ES'
+ note: 'Ed. facs. de la realizada en 1948--49'
+ number-of-volumes: 3
+ publisher: Iberdrola
+ publisher-place: Pamplona
+ title: Las Peregrinaciones a Santiago de Compostela
+ title-short: Peregrinaciones
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-video.md b/test/command/biblatex-video.md
new file mode 100644
index 000000000..e4dd251ca
--- /dev/null
+++ b/test/command/biblatex-video.md
@@ -0,0 +1,19 @@
+```
+% pandoc -f biblatex -t markdown -s
+@video{x1,title={blah}}
+@movie{x2,title={blah}}
+
+^D
+---
+nocite: '[@*]'
+references:
+- id: x1
+ title: Blah
+ type: motion_picture
+- id: x2
+ title: Blah
+ type: motion_picture
+---
+
+
+```
diff --git a/test/command/biblatex-vizedom-related.md b/test/command/biblatex-vizedom-related.md
new file mode 100644
index 000000000..105a1e84d
--- /dev/null
+++ b/test/command/biblatex-vizedom-related.md
@@ -0,0 +1,68 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Vizedom and Caffee 1960)
+
+Vizedom, Monika B., and Gabrielle L. Caffee, trans. 1960. *The Rites of
+Passage*. University of Chicago Press.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Vizedom & Caffee, 1960)
+
+Vizedom, M. B., & Caffee, G. L. (Trans.). (1960). *The rites of
+passage*. University of Chicago Press.
+
+
+NOTES:
+
+- biblio2yaml
+ - "related = {vangennep}, relatedtype = {translationof}": no equivalent implemented in CSL
+
+}
+
+@Book{vizedom:related,
+ title = {The Rites of Passage},
+ year = 1960,
+ translator = {Vizedom, Monika B. and Caffee, Gabrielle L.},
+ language = {english},
+ publisher = {University of Chicago Press},
+ hyphenation = {american},
+ options = {usetranslator},
+ related = {vangennep},
+ relatedtype = {translationof},
+ indextitle = {Rites of Passage, The},
+ sorttitle = {Rites of Passage},
+ shorttitle = {Rites of Passage},
+ annotation = {A translated work from vangennep. Note the format of
+ the related and relatedtype fields},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A translated work from vangennep. Note the format of the
+ related and relatedtype fields
+ id: 'vizedom:related'
+ issued: 1960
+ language: 'en-US'
+ publisher: University of Chicago Press
+ title: The rites of passage
+ title-short: Rites of passage
+ translator:
+ - family: Vizedom
+ given: Monika B.
+ - family: Caffee
+ given: Gabrielle L.
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-wassenberg.md b/test/command/biblatex-wassenberg.md
new file mode 100644
index 000000000..26ceb218f
--- /dev/null
+++ b/test/command/biblatex-wassenberg.md
@@ -0,0 +1,83 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Wassenberg and Sanders 2010)
+
+Wassenberg, Jan, and Peter Sanders. 2010. “Faster Radix Sort via Virtual
+Memory and Write-combining” (version 1). August 17.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Wassenberg & Sanders, 2010)
+
+Wassenberg, J., & Sanders, P. (2010, August 17). Faster radix sort via
+virtual memory and write-combining.
+
+
+NOTES:
+
+- biblio2yaml
+ - "eprinttype = {arxiv}, eprintclass = {cs.DS}, eprint = {1008.2849v1}" should be used to reconstruct a Url: http://arxiv.org/abs/1008.2849v1 ("cs.DS" does not seem to be essential)
+
+}
+
+@Online{wassenberg,
+ author = {Wassenberg, Jan and Sanders, Peter},
+ title = {Faster Radix Sort via Virtual Memory and Write-Combining},
+ date = {2010-08-17},
+ version = 1,
+ hyphenation = {american},
+ eprinttype = {arxiv},
+ eprintclass = {cs.DS},
+ eprint = {1008.2849v1},
+ annotation = {A recent online reference from arXiv using the new
+ (April 2007 onward) identifier format. Note the
+ eprint, eprinttype, and eprintclass
+ fields. Also note that the arXiv reference is transformed into
+ a clickable link if hyperref support has been
+ enabled},
+ abstract = {Sorting algorithms are the deciding factor for the performance
+ of common operations such as removal of duplicates or database
+ sort-merge joins. This work focuses on 32-bit integer keys,
+ optionally paired with a 32-bit value. We present a fast radix
+ sorting algorithm that builds upon a microarchitecture-aware
+ variant of counting sort},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- abstract: 'Sorting algorithms are the deciding factor for the
+ performance of common operations such as removal of duplicates or
+ database sort-merge joins. This work focuses on 32-bit integer keys,
+ optionally paired with a 32-bit value. We present a fast radix
+ sorting algorithm that builds upon a microarchitecture-aware variant
+ of counting sort'
+ annote: 'A recent online reference from arXiv using the new (April
+ 2007 onward) identifier format. Note the eprint, eprinttype, and
+ eprintclass fields. Also note that the arXiv reference is
+ transformed into a clickable link if hyperref support has been
+ enabled'
+ author:
+ - family: Wassenberg
+ given: Jan
+ - family: Sanders
+ given: Peter
+ id: wassenberg
+ issued: '2010-08-17'
+ language: 'en-US'
+ title: 'Faster radix sort via virtual memory and write-combining'
+ type: webpage
+ url: 'http://arxiv.org/abs/1008.2849v1'
+ version: 1
+---
+
+
+```
diff --git a/test/command/biblatex-weinberg.md b/test/command/biblatex-weinberg.md
new file mode 100644
index 000000000..5048122ed
--- /dev/null
+++ b/test/command/biblatex-weinberg.md
@@ -0,0 +1,52 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Weinberg 1967)
+
+Weinberg, Steven. 1967. “A Model of Leptons.” *Phys. Rev. Lett.* 19:
+1264–1266.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Weinberg, 1967)
+
+Weinberg, S. (1967). A model of leptons. *Phys. Rev. Lett.*, *19*,
+1264–1266.
+
+
+}
+
+@Article{weinberg,
+ author = {Weinberg, Steven},
+ title = {A Model of Leptons},
+ journaltitle = {Phys.~Rev.~Lett.},
+ date = 1967,
+ volume = 19,
+ pages = {1264-1266},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Weinberg
+ given: Steven
+ container-title: Phys. Rev. Lett.
+ id: weinberg
+ issued: 1967
+ page: '1264-1266'
+ title: A model of leptons
+ type: 'article-journal'
+ volume: 19
+---
+
+
+```
diff --git a/test/command/biblatex-westfahl-frontier.md b/test/command/biblatex-westfahl-frontier.md
new file mode 100644
index 000000000..46db9a8a3
--- /dev/null
+++ b/test/command/biblatex-westfahl-frontier.md
@@ -0,0 +1,60 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Westfahl 2000)
+
+Westfahl, Gary, ed. 2000. *Space and Beyond: The Frontier Theme in
+Science Fiction*. Westport, Conn.; London: Greenwood.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Westfahl, 2000)
+
+Westfahl, G. (Ed.). (2000). *Space and beyond: The frontier theme in
+science fiction*. Westport, Conn.; London: Greenwood.
+
+
+}
+
+@Collection{westfahl:frontier,
+ editor = {Westfahl, Gary},
+ title = {Space and Beyond},
+ date = 2000,
+ subtitle = {The Frontier Theme in Science Fiction},
+ publisher = {Greenwood},
+ location = {Westport, Conn. and London},
+ hyphenation = {american},
+ booktitle = {Space and Beyond},
+ booksubtitle = {The Frontier Theme in Science Fiction},
+ annotation = {This is a collection entry. Note the format of the
+ location field as well as the subtitle and
+ booksubtitle fields},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: This is a collection entry. Note the format of the location
+ field as well as the subtitle and booksubtitle fields
+ editor:
+ - family: Westfahl
+ given: Gary
+ id: 'westfahl:frontier'
+ issued: 2000
+ language: 'en-US'
+ publisher: Greenwood
+ publisher-place: 'Westport, Conn.; London'
+ title: 'Space and beyond: The frontier theme in science fiction'
+ title-short: Space and beyond
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-westfahl-space.md b/test/command/biblatex-westfahl-space.md
new file mode 100644
index 000000000..d50ed1448
--- /dev/null
+++ b/test/command/biblatex-westfahl-space.md
@@ -0,0 +1,106 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Westfahl 2000a) (Westfahl 2000b)
+
+Westfahl, Gary. 2000a. “The True Frontier: Confronting and Avoiding the
+Realities of Space in American Science Fiction Films.” In *Space and
+Beyond: The Frontier Theme in Science Fiction*, edited by Gary Westfahl,
+55–65. Westport, Conn.; London: Greenwood.
+
+———, ed. 2000b. *Space and Beyond: The Frontier Theme in Science
+Fiction*. Westport, Conn.; London: Greenwood.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Westfahl, 2000) (Westfahl, 2000)
+
+Westfahl, G. (2000). The true frontier: Confronting and avoiding the
+realities of space in American science fiction films. In G. Westfahl
+(Ed.), *Space and beyond: The frontier theme in science fiction* (pp.
+55–65). Westport, Conn.; London: Greenwood.
+
+Westfahl, G. (Ed.). (2000). *Space and beyond: The frontier theme in
+science fiction*. Westport, Conn.; London: Greenwood.
+
+
+}
+
+@InCollection{westfahl:space,
+ author = {Westfahl, Gary},
+ title = {The True Frontier},
+ subtitle = {Confronting and Avoiding the Realities of Space in {American}
+ Science Fiction Films},
+ pages = {55-65},
+ crossref = {westfahl:frontier},
+ hyphenation = {american},
+ indextitle = {True Frontier, The},
+ annotation = {A cross-referenced article from a collection. This is
+ an incollection entry with a crossref
+ field. Note the subtitle and indextitle
+ fields},
+}
+
+@Collection{westfahl:frontier,
+ editor = {Westfahl, Gary},
+ title = {Space and Beyond},
+ date = 2000,
+ subtitle = {The Frontier Theme in Science Fiction},
+ publisher = {Greenwood},
+ location = {Westport, Conn. and London},
+ hyphenation = {american},
+ booktitle = {Space and Beyond},
+ booksubtitle = {The Frontier Theme in Science Fiction},
+ annotation = {This is a collection entry. Note the format of the
+ location field as well as the subtitle and
+ booksubtitle fields},
+}
+^D
+---
+nocite: '[@*]'
+references:
+- annote: 'A cross-referenced article from a collection. This is an
+ incollection entry with a crossref field. Note the subtitle and
+ indextitle fields'
+ author:
+ - family: Westfahl
+ given: Gary
+ container-title: 'Space and beyond: The frontier theme in science
+ fiction'
+ editor:
+ - family: Westfahl
+ given: Gary
+ id: 'westfahl:space'
+ issued: 2000
+ language: 'en-US'
+ page: '55-65'
+ publisher: Greenwood
+ publisher-place: 'Westport, Conn.; London'
+ title: 'The true frontier: Confronting and avoiding the realities of
+ space in American science fiction films'
+ title-short: The true frontier
+ type: chapter
+- annote: This is a collection entry. Note the format of the location
+ field as well as the subtitle and booksubtitle fields
+ editor:
+ - family: Westfahl
+ given: Gary
+ id: 'westfahl:frontier'
+ issued: 2000
+ language: 'en-US'
+ publisher: Greenwood
+ publisher-place: 'Westport, Conn.; London'
+ title: 'Space and beyond: The frontier theme in science fiction'
+ title-short: Space and beyond
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-wilde.md b/test/command/biblatex-wilde.md
new file mode 100644
index 000000000..f83b11681
--- /dev/null
+++ b/test/command/biblatex-wilde.md
@@ -0,0 +1,65 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Wilde 1899)
+
+Wilde, Oscar. 1899. *The Importance of Being Earnest: A Trivial Comedy
+for Serious People*. English and American Drama of the Nineteenth
+Century. Leonard Smithers and Company.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Wilde, 1899)
+
+Wilde, O. (1899). *The importance of being earnest: A trivial comedy for
+serious people*. Leonard Smithers and Company.
+
+
+NOTES:
+
+- biblio2yaml
+ - From "eprint = {4HIWAAAAYAAJ}, eprinttype = {googlebooks}", a url could be reconstructed, shortest form: http://books.google.com?id=4HIWAAAAYAAJ
+
+}
+
+@Book{wilde,
+ author = {Wilde, Oscar},
+ title = {The Importance of Being Earnest: {A} Trivial Comedy for Serious
+ People},
+ year = 1899,
+ series = {English and American drama of the Nineteenth Century},
+ publisher = {Leonard Smithers {and} Company},
+ eprint = {4HIWAAAAYAAJ},
+ eprinttype = {googlebooks},
+ annotation = {A book with eprint and eprinttype
+ fields.},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A book with eprint and eprinttype fields.
+ author:
+ - family: Wilde
+ given: Oscar
+ collection-title: English and american drama of the nineteenth century
+ id: wilde
+ issued: 1899
+ publisher: Leonard Smithers and Company
+ title: 'The importance of being earnest: A trivial comedy for serious
+ people'
+ title-short: The importance of being earnest
+ type: book
+ url: 'http://books.google.com?id=4HIWAAAAYAAJ'
+---
+
+
+```
diff --git a/test/command/biblatex-worman.md b/test/command/biblatex-worman.md
new file mode 100644
index 000000000..8e1bb8360
--- /dev/null
+++ b/test/command/biblatex-worman.md
@@ -0,0 +1,60 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Worman 2002)
+
+Worman, Nancy. 2002. *The Cast of Character: Style in Greek Literature*.
+Austin: University of Texas Press.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Worman, 2002)
+
+Worman, N. (2002). *The cast of character: Style in Greek literature*.
+Austin: University of Texas Press.
+
+
+}
+
+@Book{worman,
+ author = {Worman, Nancy},
+ title = {The Cast of Character},
+ date = 2002,
+ publisher = {University of Texas Press},
+ location = {Austin},
+ hyphenation = {american},
+ sorttitle = {Cast of Character},
+ indextitle = {Cast of Character, The},
+ subtitle = {Style in {Greek} Literature},
+ shorttitle = {Cast of Character},
+ annotation = {A book entry. Note the sorttitle and
+ indextitle fields},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- annote: A book entry. Note the sorttitle and indextitle fields
+ author:
+ - family: Worman
+ given: Nancy
+ id: worman
+ issued: 2002
+ language: 'en-US'
+ publisher: University of Texas Press
+ publisher-place: Austin
+ title: 'The cast of character: Style in Greek literature'
+ title-short: Cast of character
+ type: book
+---
+
+
+```
diff --git a/test/command/biblatex-yoon.md b/test/command/biblatex-yoon.md
new file mode 100644
index 000000000..0a4648126
--- /dev/null
+++ b/test/command/biblatex-yoon.md
@@ -0,0 +1,67 @@
+```
+% pandoc -f biblatex -t markdown -s
+@comment{
+
+Adapted from biblatex-example.bib
+
+
+Formatted with pandoc and chicago-author-date.csl, 2013-10-23:
+
+(Yoon et al. 2006)
+
+Yoon, Myeong S., Dowook Ryu, Jeongryul Kim, and Kyo Han Ahn. 2006.
+“Palladium Pincer Complexes with Reduced Bond Angle Strain: Efficient
+Catalysts for the Heck Reaction.” *Organometallics* 25 (10): 2409–2411.
+
+
+Formatted with pandoc and apa.csl, 2013-10-23:
+
+(Yoon, Ryu, Kim, & Ahn, 2006)
+
+Yoon, M. S., Ryu, D., Kim, J., & Ahn, K. H. (2006). Palladium pincer
+complexes with reduced bond angle strain: Efficient catalysts for the
+Heck reaction. *Organometallics*, *25*(10), 2409–2411.
+
+
+}
+
+@Article{yoon,
+ author = {Yoon, Myeong S. and Ryu, Dowook and Kim, Jeongryul and Ahn,
+ Kyo Han},
+ title = {Palladium pincer complexes with reduced bond angle strain:
+ efficient catalysts for the {Heck} reaction},
+ journaltitle = {Organometallics},
+ date = 2006,
+ volume = 25,
+ number = 10,
+ pages = {2409-2411},
+ indextitle = {Palladium pincer complexes},
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Yoon
+ given: Myeong S.
+ - family: Ryu
+ given: Dowook
+ - family: Kim
+ given: Jeongryul
+ - family: Ahn
+ given: Kyo Han
+ container-title: Organometallics
+ id: yoon
+ issue: 10
+ issued: 2006
+ page: '2409-2411'
+ title: 'Palladium pincer complexes with reduced bond angle strain:
+ Efficient catalysts for the Heck reaction'
+ title-short: Palladium pincer complexes with reduced bond angle strain
+ type: 'article-journal'
+ volume: 25
+---
+
+
+```
diff --git a/test/command/biblio.bib b/test/command/biblio.bib
new file mode 100644
index 000000000..4eb2ba0d0
--- /dev/null
+++ b/test/command/biblio.bib
@@ -0,0 +1,26 @@
+@Book{item1,
+author="John Doe",
+title="First Book",
+year="2005",
+address="Cambridge",
+publisher="Cambridge University Press"
+}
+
+@Article{item2,
+author="John Doe",
+title="Article",
+year="2006",
+journal="Journal of Generic Studies",
+volume="6",
+pages="33-34"
+}
+
+@InCollection{пункт3,
+author="John Doe and Jenny Roe",
+title="Why Water Is Wet",
+booktitle="Third Book",
+editor="Sam Smith",
+publisher="Oxford University Press",
+address="Oxford",
+year="2007"
+}
diff --git a/test/command/bibtex-basic.md b/test/command/bibtex-basic.md
new file mode 100644
index 000000000..7872d9489
--- /dev/null
+++ b/test/command/bibtex-basic.md
@@ -0,0 +1,71 @@
+```
+% pandoc -f biblatex -t markdown -s
+@Book{item1,
+author="John Doe",
+title="First Book",
+year="2005",
+address="Cambridge",
+publisher="Cambridge University Press"
+}
+
+@Article{item2,
+author="John Doe",
+title="Article",
+year="2006",
+journal="Journal of Generic Studies",
+volume="6",
+pages="33-34"
+}
+
+@InCollection{пункт3,
+author="John Doe and Jenny Roe",
+title="Why Water Is Wet",
+booktitle="Third Book",
+editor="Sam Smith",
+publisher="Oxford University Press",
+address="Oxford",
+year="2007"
+}
+
+^D
+---
+nocite: '[@*]'
+references:
+- author:
+ - family: Doe
+ given: John
+ id: item1
+ issued: 2005
+ publisher: Cambridge University Press
+ publisher-place: Cambridge
+ title: First book
+ type: book
+- author:
+ - family: Doe
+ given: John
+ container-title: Journal of Generic Studies
+ id: item2
+ issued: 2006
+ page: '33-34'
+ title: Article
+ type: 'article-journal'
+ volume: 6
+- author:
+ - family: Doe
+ given: John
+ - family: Roe
+ given: Jenny
+ container-title: Third book
+ editor:
+ - family: Smith
+ given: Sam
+ id: пункт3
+ issued: 2007
+ publisher: Oxford University Press
+ publisher-place: Oxford
+ title: Why water is wet
+ type: chapter
+---
+
+
+```
diff --git a/test/command/bioethics.csl b/test/command/bioethics.csl
new file mode 100644
index 000000000..d5cc0774d
--- /dev/null
+++ b/test/command/bioethics.csl
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="utf-8"?>
+<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" page-range-format="minimal-two" demote-non-dropping-particle="never" default-locale="en-GB">
+ <info>
+ <title>Bioethics</title>
+ <id>http://www.zotero.org/styles/bioethics</id>
+ <link href="http://www.zotero.org/styles/bioethics" rel="self"/>
+ <link href="http://www.zotero.org/styles/journal-of-roman-archaeology-b" rel="template"/>
+ <link href="http://onlinelibrary.wiley.com/journal/10.1111/(ISSN)1467-8519/homepage/ForAuthors.html" rel="documentation"/>
+ <author>
+ <name>Patrick O'Brien</name>
+ </author>
+ <category citation-format="note"/>
+ <category field="anthropology"/>
+ <issn>0269-9702</issn>
+ <eissn>1467-8519</eissn>
+ <updated>2017-07-12T11:26:44+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>
+ <macro name="editor">
+ <names variable="editor">
+ <name sort-separator=", " initialize-with="." delimiter=", "/>
+ <label form="short" prefix=", "/>
+ <substitute>
+ <text macro="container-author"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="container-author">
+ <names variable="container-author" delimiter=", ">
+ <name sort-separator=", " initialize-with="." delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="author">
+ <names variable="author">
+ <name initialize-with="."/>
+ <substitute>
+ <text macro="editor"/>
+ <text variable="title"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="editor-short">
+ <names variable="editor">
+ <name form="short" sort-separator=", " delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="container-author-short">
+ <names variable="container-author" delimiter=", ">
+ <name form="short" sort-separator=", " delimiter=", "/>
+ <et-al font-style="italic"/>
+ </names>
+ </macro>
+ <macro name="author-short">
+ <names variable="author">
+ <name form="short" sort-separator=", " delimiter=", "/>
+ <et-al font-style="italic"/>
+ <substitute>
+ <text macro="editor-short"/>
+ <text macro="container-author-short"/>
+ <text variable="title-short" font-style="italic"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="collection">
+ <group delimiter=" " suffix=", ">
+ <text variable="collection-title"/>
+ <text variable="collection-number"/>
+ </group>
+ </macro>
+ <macro name="encyclopedia">
+ <group delimiter=" ">
+ <choose>
+ <if variable="title-short" match="any">
+ <text variable="title" form="short" font-style="italic"/>
+ </if>
+ <else>
+ <text variable="container-title" font-style="italic"/>
+ </else>
+ </choose>
+ <text variable="volume"/>
+ <date variable="issued" prefix="(" suffix=")">
+ <date-part name="year"/>
+ </date>
+ <text variable="page" suffix=","/>
+ <text variable="title" prefix="s.v. " quotes="true"/>
+ <text macro="author" prefix="(" suffix=")"/>
+ </group>
+ </macro>
+ <macro name="title">
+ <choose>
+ <if type="book thesis" match="any">
+ <text variable="title" font-style="italic"/>
+ </if>
+ <else-if type="webpage post-weblog" match="any">
+ <date form="text" variable="issued" suffix=". "/>
+ <text variable="title" font-style="italic" suffix=". "/>
+ <text variable="container-title" font-style="italic"/>
+ </else-if>
+ <else-if type="article-journal article-magazine article-newspaper" match="any">
+ <group delimiter=". ">
+ <text variable="title" quotes="false"/>
+ <group delimiter=" ">
+ <text variable="container-title" form="short" strip-periods="true" font-style="italic"/>
+ <group delimiter="; ">
+ <text macro="year-date"/>
+ <group delimiter=": ">
+ <group>
+ <text variable="volume"/>
+ <text variable="issue" prefix="(" suffix=")"/>
+ </group>
+ <text variable="page"/>
+ </group>
+ </group>
+ </group>
+ </group>
+ </else-if>
+ <else-if type="chapter paper-conference" match="any">
+ <group delimiter=". " suffix=". ">
+ <text macro="year-date"/>
+ <text variable="title" quotes="false"/>
+ </group>
+ <group delimiter=". ">
+ <group delimiter=" ">
+ <text term="in" text-case="capitalize-first"/>
+ <text macro="editor"/>
+ </group>
+ <text variable="container-title"/>
+ </group>
+ </else-if>
+ <else>
+ <text variable="title" font-style="italic" font-weight="bold"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="publisher">
+ <choose>
+ <if variable="collection-title" match="any">
+ <text macro="collection"/>
+ </if>
+ <else-if type="thesis">
+ <text variable="genre" suffix=","/>
+ <text variable="publisher"/>
+ </else-if>
+ <else>
+ <group delimiter=": ">
+ <text variable="publisher-place"/>
+ <text variable="publisher"/>
+ </group>
+ </else>
+ </choose>
+ </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>
+ <macro name="locator">
+ <choose>
+ <if locator="page">
+ <text variable="locator" prefix=": "/>
+ </if>
+ <else-if locator="paragraph">
+ <text variable="locator" prefix="§"/>
+ </else-if>
+ <else-if type="webpage post-weblog" match="any">
+ <group delimiter=" " prefix=". ">
+ <group delimiter=": ">
+ <text term="available at" text-case="capitalize-first"/>
+ <text variable="URL"/>
+ </group>
+ <group delimiter=" " prefix="[" suffix="]">
+ <text term="accessed" text-case="capitalize-first"/>
+ <date form="text" variable="accessed"/>
+ </group>
+ </group>
+ </else-if>
+ <else>
+ <text variable="page" prefix=": "/>
+ </else>
+ </choose>
+ </macro>
+ <citation and="symbol" delimiter-precedes-et-al="always" delimiter-precedes-last="always" et-al-min="3" et-al-use-first="1">
+ <layout delimiter="; " suffix=".">
+ <choose>
+ <if type="entry-dictionary entry-encyclopedia" match="any">
+ <text macro="encyclopedia"/>
+ </if>
+ <else-if position="ibid-with-locator">
+ <group delimiter=" ">
+ <text term="ibid" suffix="."/>
+ <text macro="locator"/>
+ </group>
+ </else-if>
+ <else-if position="ibid">
+ <text term="ibid" suffix="."/>
+ </else-if>
+ <else-if position="subsequent">
+ <group delimiter=" ">
+ <text macro="author-short"/>
+ <group prefix="(" suffix=")" delimiter=" ">
+ <text term="cited"/>
+ <group delimiter="&#160;">
+ <text term="note" form="short"/>
+ <text variable="first-reference-note-number"/>
+ </group>
+ </group>
+ <text macro="locator"/>
+ </group>
+ </else-if>
+ <else>
+ <text macro="author" suffix=". "/>
+ <text macro="title"/>
+ <text macro="publisher" prefix=". "/>
+ <text macro="locator"/>
+ </else>
+ </choose>
+ </layout>
+ </citation>
+</style>
diff --git a/test/command/chicago-annotated-bibliography.csl b/test/command/chicago-annotated-bibliography.csl
new file mode 100644
index 000000000..5e891c09e
--- /dev/null
+++ b/test/command/chicago-annotated-bibliography.csl
@@ -0,0 +1,1207 @@
+<?xml version="1.0" encoding="utf-8"?>
+<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" demote-non-dropping-particle="never" page-range-format="chicago">
+ <info>
+ <title>Chicago Manual of Style 16th edition (note, annotated bibliography)</title>
+ <id>http://www.zotero.org/styles/chicago-annotated-bibliography</id>
+ <link href="http://www.zotero.org/styles/chicago-annotated-bibliography" rel="self"/>
+ <link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
+ <author>
+ <name>Julian Onions</name>
+ <email>julian.onions@gmail.com</email>
+ </author>
+ <contributor>
+ <name>Simon Kornblith</name>
+ <email>simon@simonster.com</email>
+ </contributor>
+ <contributor>
+ <name>Elena Razlogova</name>
+ <email>elena.razlogova@gmail.com</email>
+ </contributor>
+ <contributor>
+ <name>Frank Bennett</name>
+ <email>biercenator@gmail.com</email>
+ </contributor>
+ <contributor>
+ <name>Andrew Dunning</name>
+ <email>andrew.dunning@utoronto.ca</email>
+ </contributor>
+ <category citation-format="note"/>
+ <category field="generic-base"/>
+ <summary>Chicago format with short notes and annotated bibliography</summary>
+ <updated>2012-10-25T21:15:26+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="editor" form="verb-short">ed.</term>
+ <term name="translator" form="verb-short">trans.</term>
+ <term name="editortranslator" form="verb-short">
+ <single>ed. and trans.</single>
+ <multiple>ed. and trans.</multiple>
+ </term>
+ <term name="editortranslator" form="verb">
+ <single>Edited and translated by</single>
+ <multiple>Edited and translated by</multiple>
+ </term>
+ <term name="translator" form="short">trans.</term>
+ </terms>
+ </locale>
+ <macro name="editor-translator">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <choose>
+ <if variable="container-author reviewed-author" match="any">
+ <group>
+ <names variable="container-author reviewed-author">
+ <label form="verb-short" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </group>
+ </if>
+ </choose>
+ </group>
+ <names variable="editor translator" delimiter=", ">
+ <label form="verb-short" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </group>
+ </macro>
+ <macro name="secondary-contributors-note">
+ <choose>
+ <if type="chapter paper-conference" match="none">
+ <text macro="editor-translator"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="container-contributors-note">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <text macro="editor-translator"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="secondary-contributors">
+ <choose>
+ <if type="chapter paper-conference" match="none">
+ <names variable="editor translator" delimiter=". ">
+ <label form="verb" text-case="capitalize-first" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </if>
+ </choose>
+ </macro>
+ <macro name="container-contributors">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <group delimiter=", ">
+ <choose>
+ <if variable="author">
+ <choose>
+ <if variable="container-author" match="any">
+ <names variable="container-author">
+ <label form="verb-short" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </if>
+ </choose>
+ <!--This includes page numers after the container author, e.g. for Introductions -->
+ <choose>
+ <if variable="container-author author" match="all">
+ <group delimiter=". ">
+ <text variable="page"/>
+ <names variable="editor translator" delimiter=", ">
+ <label form="verb" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </group>
+ </if>
+ <else>
+ <names variable="editor translator" delimiter=", ">
+ <label form="verb" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="recipient-note">
+ <names variable="recipient" delimiter=", ">
+ <label form="verb" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="contributors-note">
+ <group delimiter=" ">
+ <names variable="author">
+ <name and="text" sort-separator=", " delimiter=", "/>
+ <label form="short" prefix=", "/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ </substitute>
+ </names>
+ <text macro="recipient-note"/>
+ </group>
+ </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="verb-short" prefix=", "/>
+ </names>
+ </macro>
+ <macro name="recipient">
+ <group delimiter=" ">
+ <choose>
+ <if type="personal_communication">
+ <choose>
+ <if variable="genre">
+ <text variable="genre" text-case="capitalize-first"/>
+ </if>
+ <else>
+ <text term="letter" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ <text macro="recipient-note"/>
+ </group>
+ </macro>
+ <macro name="contributors">
+ <group delimiter=". ">
+ <names variable="author">
+ <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
+ <substitute>
+ <text macro="editor"/>
+ <text macro="translator"/>
+ </substitute>
+ </names>
+ <text macro="recipient"/>
+ </group>
+ </macro>
+ <macro name="recipient-short">
+ <names variable="recipient">
+ <label form="verb" text-case="lowercase" suffix=" "/>
+ <name form="short" and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="contributors-short">
+ <group delimiter=" ">
+ <names variable="author">
+ <name form="short" and="text" delimiter=", "/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ </substitute>
+ </names>
+ <text macro="recipient-short"/>
+ </group>
+ </macro>
+ <macro name="contributors-sort">
+ <names variable="author">
+ <name name-as-sort-order="all" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <text macro="title"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="interviewer-note">
+ <names variable="interviewer" delimiter=", ">
+ <label form="verb" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="interviewer">
+ <names variable="interviewer" delimiter=", ">
+ <label form="verb" text-case="capitalize-first" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="title-note">
+ <choose>
+ <if variable="title" match="none">
+ <text variable="genre"/>
+ </if>
+ <else-if type="bill book graphic legislation motion_picture report song" match="any">
+ <text variable="title" text-case="title" font-style="italic"/>
+ <group delimiter=" " prefix=", ">
+ <text term="version"/>
+ <text variable="version"/>
+ </group>
+ </else-if>
+ <else-if type="legal_case interview" match="any">
+ <text variable="title"/>
+ </else-if>
+ <else-if variable="reviewed-author">
+ <text variable="title" font-style="italic" prefix="review of "/>
+ </else-if>
+ <else>
+ <text variable="title" text-case="title" quotes="true"/>
+ </else>
+ </choose>
+ </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 report 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">
+ <group delimiter=", ">
+ <text variable="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-if>
+ <else-if type="legal_case interview" match="any">
+ <text variable="title"/>
+ </else-if>
+ <else>
+ <text variable="title" text-case="title" quotes="true"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="title-short">
+ <choose>
+ <if variable="title" match="none">
+ <choose>
+ <if type="interview">
+ <text term="interview"/>
+ </if>
+ <else-if type="manuscript speech" match="any">
+ <text variable="genre" form="short"/>
+ </else-if>
+ <else-if type="personal_communication">
+ <text macro="issued"/>
+ </else-if>
+ </choose>
+ </if>
+ <else-if type="bill book graphic legislation motion_picture report song" match="any">
+ <text variable="title" text-case="title" form="short" font-style="italic"/>
+ </else-if>
+ <else-if type="legal_case interview" match="any">
+ <text variable="title"/>
+ </else-if>
+ <else>
+ <text variable="title" text-case="title" form="short" quotes="true"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="date-disambiguate">
+ <choose>
+ <if disambiguate="true">
+ <text macro="issued"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="description-note">
+ <group delimiter=", ">
+ <text macro="interviewer-note"/>
+ <text variable="medium"/>
+ <choose>
+ <if variable="title" match="none"/>
+ <else-if type="manuscript thesis speech" match="any"/>
+ <else>
+ <text variable="genre"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <macro name="description">
+ <group delimiter=", ">
+ <group delimiter=". ">
+ <text macro="interviewer"/>
+ <text variable="medium" text-case="capitalize-first"/>
+ </group>
+ <choose>
+ <if variable="title" match="none"/>
+ <else-if type="thesis speech" match="any"/>
+ <else>
+ <text variable="genre" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <macro name="container-title-note">
+ <group delimiter=" ">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <text term="in"/>
+ </if>
+ </choose>
+ <choose>
+ <if type="legal_case" match="none">
+ <text variable="container-title" text-case="title" font-style="italic"/>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="container-title">
+ <group delimiter=" ">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <text term="in" text-case="capitalize-first"/>
+ </if>
+ </choose>
+ <choose>
+ <if type="legal_case" match="none">
+ <text variable="container-title" text-case="title" font-style="italic"/>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="collection-title">
+ <choose>
+ <if match="none" type="article-journal">
+ <choose>
+ <if match="none" is-numeric="collection-number">
+ <group delimiter=", ">
+ <text variable="collection-title" text-case="title"/>
+ <text variable="collection-number"/>
+ </group>
+ </if>
+ <else>
+ <group delimiter=" ">
+ <text variable="collection-title" text-case="title"/>
+ <text variable="collection-number"/>
+ </group>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="collection-title-journal">
+ <choose>
+ <if type="article-journal">
+ <group delimiter=" ">
+ <text variable="collection-title"/>
+ <text variable="collection-number"/>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="edition-note">
+ <choose>
+ <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
+ <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>
+ </if>
+ </choose>
+ </macro>
+ <macro name="edition">
+ <choose>
+ <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
+ <choose>
+ <if is-numeric="edition">
+ <group delimiter=" ">
+ <number variable="edition" form="ordinal"/>
+ <text term="edition" form="short"/>
+ </group>
+ </if>
+ <else>
+ <text variable="edition" text-case="capitalize-first" suffix="."/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-note-join-with-space">
+ <choose>
+ <if type="article-journal" variable="volume" match="all">
+ <choose>
+ <if match="none" variable="collection-title">
+ <text macro="locators-note"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-note-join-with-comma">
+ <choose>
+ <if type="article-journal" match="none">
+ <text macro="locators-note"/>
+ </if>
+ <else-if type="article-journal">
+ <choose>
+ <if variable="volume" match="none">
+ <text macro="locators-note"/>
+ </if>
+ <else-if match="any" variable="collection-title">
+ <text macro="locators-note"/>
+ </else-if>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="locators-note">
+ <choose>
+ <if type="article-journal">
+ <group delimiter=", ">
+ <text macro="collection-title-journal"/>
+ <number variable="volume"/>
+ <group delimiter=" ">
+ <text term="issue" form="short"/>
+ <number variable="issue"/>
+ </group>
+ </group>
+ </if>
+ <else-if type="legal_case">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <number variable="volume"/>
+ <text variable="container-title"/>
+ <text variable="page"/>
+ </group>
+ <text variable="locator"/>
+ </group>
+ </else-if>
+ <else-if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
+ <group delimiter=", ">
+ <text macro="edition-note"/>
+ <group delimiter=" ">
+ <text term="volume" form="short"/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ <choose>
+ <if variable="locator" match="none">
+ <group delimiter=" ">
+ <number variable="number-of-volumes" form="numeric"/>
+ <text term="volume" form="short" plural="true"/>
+ </group>
+ </if>
+ </choose>
+ </group>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="locators-join-with-space">
+ <choose>
+ <if type="article-journal" variable="volume" match="all">
+ <choose>
+ <if match="none" variable="collection-title">
+ <text macro="locators"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-join-with-comma">
+ <choose>
+ <if type="legal_case chapter paper-conference" match="any">
+ <text macro="locators"/>
+ </if>
+ <else-if type="article-journal">
+ <choose>
+ <if variable="volume" match="none">
+ <text macro="locators"/>
+ </if>
+ <else-if match="any" variable="collection-title">
+ <text macro="locators"/>
+ </else-if>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="locators-join-with-period">
+ <choose>
+ <if type="legal_case article-journal chapter paper-conference" match="none">
+ <text macro="locators"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators">
+ <choose>
+ <if type="article-journal">
+ <group delimiter=", ">
+ <text macro="collection-title-journal"/>
+ <number variable="volume"/>
+ <group delimiter=" ">
+ <text term="issue" form="short"/>
+ <number variable="issue"/>
+ </group>
+ </group>
+ </if>
+ <else-if type="legal_case">
+ <group delimiter=" ">
+ <number variable="volume"/>
+ <text variable="container-title"/>
+ <text variable="page"/>
+ </group>
+ </else-if>
+ <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <group delimiter=". ">
+ <text macro="edition"/>
+ <group delimiter=" ">
+ <text term="volume" form="short" text-case="capitalize-first"/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ <group delimiter=" ">
+ <number variable="number-of-volumes" form="numeric"/>
+ <text term="volume" form="short" plural="true"/>
+ </group>
+ </group>
+ </else-if>
+ <else-if type="chapter paper-conference" match="any">
+ <group delimiter=". ">
+ <text macro="edition"/>
+ <choose>
+ <if variable="page" match="none">
+ <group delimiter=" ">
+ <text term="volume" form="short" text-case="capitalize-first"/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ </if>
+ </choose>
+ </group>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="locators-newspaper">
+ <choose>
+ <if type="article-newspaper">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <number variable="edition"/>
+ <text term="edition"/>
+ </group>
+ <group delimiter=" ">
+ <text term="section" form="short"/>
+ <text variable="section"/>
+ </group>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="event-note">
+ <text variable="event"/>
+ </macro>
+ <macro name="event">
+ <choose>
+ <if variable="title">
+ <group delimiter=" ">
+ <text term="presented at"/>
+ <text variable="event"/>
+ </group>
+ </if>
+ <else>
+ <group delimiter=" ">
+ <text term="presented at" text-case="capitalize-first"/>
+ <text variable="event"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="originally-published">
+ <group delimiter=", ">
+ <group delimiter=": ">
+ <text variable="original-publisher-place"/>
+ <text variable="original-publisher"/>
+ </group>
+ <date variable="original-date" form="text" date-parts="year"/>
+ </group>
+ </macro>
+ <macro name="reprint-note">
+ <!--needs localization-->
+ <choose>
+ <if variable="original-date issued" match="all">
+ <choose>
+ <!--for whatever reason in notes, when we have both original and new publishers, reprint doesn't appear-->
+ <if variable="original-publisher original-publisher-place" match="none">
+ <text value="repr."/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="reprint">
+ <!--needs localization-->
+ <choose>
+ <if variable="original-date issued" match="all">
+ <text value="reprint" text-case="capitalize-first"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="publisher">
+ <choose>
+ <if type="thesis">
+ <text variable="publisher"/>
+ </if>
+ <else-if type="speech">
+ <text variable="event-place"/>
+ </else-if>
+ <else>
+ <group delimiter=": ">
+ <text variable="publisher-place"/>
+ <text variable="publisher"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="issued">
+ <choose>
+ <if variable="issued">
+ <choose>
+ <if type="graphic report" match="any">
+ <date variable="issued" form="text"/>
+ </if>
+ <else-if type="legal_case">
+ <group delimiter=" ">
+ <text variable="authority"/>
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </group>
+ </else-if>
+ <else-if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song thesis" match="any">
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </else-if>
+ <else>
+ <date variable="issued" form="text"/>
+ </else>
+ </choose>
+ </if>
+ <else-if variable="status">
+ <text variable="status"/>
+ </else-if>
+ <else-if variable="accessed URL" match="all"/>
+ <else>
+ <text term="no date" form="short"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="point-locators-subsequent">
+ <choose>
+ <if type="legal_case"/>
+ <else-if variable="locator">
+ <choose>
+ <if locator="page" match="none">
+ <group delimiter=" ">
+ <choose>
+ <if type="bill book graphic legislation motion_picture report song" match="any">
+ <choose>
+ <if variable="volume">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <text term="volume" form="short"/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ <label variable="locator" form="short"/>
+ </group>
+ </if>
+ <else>
+ <label variable="locator" form="short"/>
+ </else>
+ </choose>
+ </if>
+ <else>
+ <label variable="locator" form="short"/>
+ </else>
+ </choose>
+ <text variable="locator"/>
+ </group>
+ </if>
+ <else-if type="bill book graphic legislation motion_picture report song" match="any">
+ <group delimiter=":">
+ <number variable="volume" form="numeric"/>
+ <text variable="locator"/>
+ </group>
+ </else-if>
+ <else>
+ <text variable="locator"/>
+ </else>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="point-locators-join-with-colon">
+ <choose>
+ <if type="article-journal">
+ <choose>
+ <if variable="locator page" match="any">
+ <choose>
+ <if variable="volume issue" match="any">
+ <text macro="point-locators"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="point-locators-join-with-comma">
+ <choose>
+ <if type="article-journal" match="none">
+ <text macro="point-locators"/>
+ </if>
+ <else-if variable="volume issue" match="none">
+ <text macro="point-locators"/>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="point-locators">
+ <choose>
+ <if variable="locator" match="none">
+ <choose>
+ <if type="article-journal chapter paper-conference" match="any">
+ <text variable="page"/>
+ </if>
+ </choose>
+ </if>
+ <else-if type="article-journal">
+ <group delimiter=" ">
+ <choose>
+ <if locator="page" match="none">
+ <label variable="locator" form="short" suffix=" "/>
+ </if>
+ </choose>
+ <text variable="locator"/>
+ </group>
+ </else-if>
+ <else-if type="legal_case"/>
+ <else>
+ <group delimiter=" ">
+ <choose>
+ <if locator="page" match="none">
+ <label variable="locator" form="short"/>
+ </if>
+ </choose>
+ <text variable="locator"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="locators-chapter">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <choose>
+ <if variable="author container-author" match="all"/>
+ <else>
+ <choose>
+ <if variable="page">
+ <number variable="volume" suffix=":"/>
+ <text variable="page"/>
+ </if>
+ </choose>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-journal-join-with-colon">
+ <choose>
+ <if type="article-journal">
+ <choose>
+ <if variable="volume issue" match="any">
+ <text variable="page"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-journal-join-with-comma">
+ <choose>
+ <if type="article-journal">
+ <choose>
+ <if variable="volume issue" match="none">
+ <text variable="page"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="archive-note">
+ <choose>
+ <if type="thesis">
+ <group delimiter=" ">
+ <text variable="archive"/>
+ <text variable="archive_location" prefix="(" suffix=")"/>
+ </group>
+ </if>
+ <else>
+ <group delimiter=", ">
+ <text variable="archive_location"/>
+ <text variable="archive"/>
+ <text variable="archive-place"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="archive">
+ <choose>
+ <if type="thesis">
+ <group delimiter=" ">
+ <text variable="archive"/>
+ <text variable="archive_location" prefix="(" suffix=")"/>
+ </group>
+ </if>
+ <else>
+ <group delimiter=". ">
+ <text variable="archive_location" text-case="capitalize-first"/>
+ <text variable="archive"/>
+ <text variable="archive-place"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="issue-note-join-with-space">
+ <choose>
+ <if type="article-journal legal_case manuscript thesis" variable="publisher-place publisher" match="any">
+ <!--Chicago doesn't use publisher/place for Newspapers and we want the date delimited by a comma-->
+ <choose>
+ <if type="article-newspaper" match="none">
+ <choose>
+ <if type="article-journal" match="none">
+ <text macro="issue-note"/>
+ </if>
+ <else-if variable="issue volume" match="any">
+ <text macro="issue-note"/>
+ </else-if>
+ </choose>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="issue-note-join-with-comma">
+ <choose>
+ <if type="article-journal legal_case manuscript thesis" variable="publisher-place publisher" match="none">
+ <text macro="issue-note"/>
+ </if>
+ <else-if type="article-newspaper">
+ <text macro="issue-note"/>
+ </else-if>
+ <else-if type="article-journal">
+ <choose>
+ <if variable="volume issue" match="none">
+ <text macro="issue-note"/>
+ </if>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="issue-note">
+ <choose>
+ <if type="legal_case" match="any">
+ <text macro="issued" prefix="(" suffix=")"/>
+ </if>
+ <else-if type="article-journal">
+ <choose>
+ <if variable="volume issue" match="any">
+ <text macro="issued" prefix="(" suffix=")"/>
+ </if>
+ <else>
+ <text macro="issued"/>
+ </else>
+ </choose>
+ </else-if>
+ <else-if type="article-newspaper">
+ <text macro="issued"/>
+ </else-if>
+ <else-if variable="publisher-place event-place publisher genre" match="any">
+ <group prefix="(" suffix=")" delimiter=", ">
+ <choose>
+ <if variable="title" match="none"/>
+ <else-if type="manuscript thesis speech" match="any">
+ <text variable="genre"/>
+ </else-if>
+ </choose>
+ <text macro="event-note"/>
+ <group delimiter="; ">
+ <text macro="originally-published"/>
+ <group delimiter=", ">
+ <text macro="reprint-note"/>
+ <text macro="publisher"/>
+ </group>
+ </group>
+ <text macro="issued"/>
+ </group>
+ </else-if>
+ <else>
+ <text macro="issued"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="issue-join-with-space">
+ <choose>
+ <if type="article-journal legal_case" match="any">
+ <choose>
+ <if variable="issue volume" match="any">
+ <text macro="issue"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="issue-join-with-period">
+ <choose>
+ <if type="article-journal legal_case" match="none">
+ <choose>
+ <if type="speech" variable="publisher publisher-place" match="any">
+ <text macro="issue"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="issue-join-with-comma">
+ <choose>
+ <if type="article-journal legal_case" match="none">
+ <choose>
+ <if type="speech" variable="publisher publisher-place" match="none">
+ <text macro="issue"/>
+ </if>
+ </choose>
+ </if>
+ <else-if variable="volume issue" match="none">
+ <text macro="issue"/>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="issue">
+ <choose>
+ <if type="legal_case" match="any">
+ <text macro="issued" prefix="(" suffix=")"/>
+ </if>
+ <else-if type="article-journal">
+ <choose>
+ <if variable="issue volume" match="any">
+ <text macro="issued" prefix="(" suffix=")"/>
+ </if>
+ <else>
+ <text macro="issued"/>
+ </else>
+ </choose>
+ </else-if>
+ <else-if type="speech">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <choose>
+ <if variable="title" match="none"/>
+ <else>
+ <text variable="genre" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ <text macro="event"/>
+ </group>
+ <text variable="event-place"/>
+ <text macro="issued"/>
+ </group>
+ </else-if>
+ <!--Chicago doesn't use publisher/place for Newspapers -->
+ <else-if type="article-newspaper">
+ <text macro="issued"/>
+ </else-if>
+ <else-if variable="publisher-place publisher" match="any">
+ <group delimiter=", ">
+ <choose>
+ <if type="thesis">
+ <text variable="genre" text-case="capitalize-first"/>
+ </if>
+ </choose>
+ <group delimiter=". ">
+ <text macro="originally-published"/>
+ <group delimiter=", ">
+ <text macro="reprint"/>
+ <text macro="publisher"/>
+ </group>
+ </group>
+ <text macro="issued"/>
+ </group>
+ </else-if>
+ <else>
+ <text macro="issued"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="access-note">
+ <group delimiter=", ">
+ <choose>
+ <if type="graphic report" match="any">
+ <text macro="archive-note"/>
+ </if>
+ <else-if type="article-journal bill book chapter legal_case legislation motion_picture paper-conference" match="none">
+ <text macro="archive-note"/>
+ </else-if>
+ </choose>
+ <choose>
+ <if variable="issued" match="none">
+ <group delimiter=" ">
+ <text term="accessed"/>
+ <date variable="accessed" form="text"/>
+ </group>
+ </if>
+ </choose>
+ <choose>
+ <if type="legal_case" match="none">
+ <choose>
+ <if variable="DOI">
+ <text variable="DOI" prefix="doi:"/>
+ </if>
+ <else>
+ <text variable="URL"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="access">
+ <group delimiter=". ">
+ <choose>
+ <if type="graphic report" match="any">
+ <text macro="archive"/>
+ </if>
+ <else-if type="article-journal bill book chapter legal_case legislation motion_picture paper-conference" match="none">
+ <text macro="archive"/>
+ </else-if>
+ </choose>
+ <choose>
+ <if variable="issued" match="none">
+ <group delimiter=" ">
+ <text term="accessed" text-case="capitalize-first"/>
+ <date variable="accessed" form="text"/>
+ </group>
+ </if>
+ </choose>
+ <choose>
+ <if type="legal_case" match="none">
+ <choose>
+ <if variable="DOI">
+ <text variable="DOI" prefix="doi:"/>
+ </if>
+ <else>
+ <text variable="URL"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="case-locator-subsequent">
+ <choose>
+ <if type="legal_case">
+ <text macro="locators-note"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="case-issue-subsequent">
+ <choose>
+ <if type="legal_case">
+ <text macro="issue"/>
+ </if>
+ </choose>
+ </macro>
+ <citation et-al-min="4" et-al-use-first="1" disambiguate-add-names="true">
+ <layout suffix="." delimiter="; ">
+ <choose>
+ <if position="ibid-with-locator">
+ <group delimiter=", ">
+ <text term="ibid"/>
+ <text macro="point-locators-subsequent"/>
+ </group>
+ </if>
+ <else-if position="ibid">
+ <text term="ibid"/>
+ </else-if>
+ <else>
+ <group delimiter=", ">
+ <text macro="contributors-short"/>
+ <group delimiter=" ">
+ <group delimiter=", ">
+ <text macro="title-short"/>
+ <!--if title & author are the same: -->
+ <text macro="date-disambiguate"/>
+ <text macro="case-locator-subsequent"/>
+ </group>
+ <text macro="case-issue-subsequent"/>
+ </group>
+ <text macro="point-locators-subsequent"/>
+ </group>
+ </else>
+ </choose>
+ </layout>
+ </citation>
+ <bibliography hanging-indent="true" et-al-min="11" et-al-use-first="7" subsequent-author-substitute="&#8212;&#8212;&#8212;" entry-spacing="0">
+ <sort>
+ <key macro="contributors-sort"/>
+ <key variable="title"/>
+ <key variable="genre"/>
+ <key variable="issued"/>
+ </sort>
+ <layout suffix=".">
+ <group delimiter=". ">
+ <group delimiter=": ">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <group delimiter=". ">
+ <group delimiter=" ">
+ <group delimiter=", ">
+ <group delimiter=". ">
+ <group delimiter=". ">
+ <text macro="contributors"/>
+ <text macro="title"/>
+ </group>
+ <text macro="description"/>
+ <text macro="secondary-contributors"/>
+ <group delimiter=", ">
+ <text macro="container-title"/>
+ <text macro="container-contributors"/>
+ </group>
+ <text macro="locators-join-with-period"/>
+ </group>
+ <text macro="locators-join-with-comma"/>
+ <text macro="locators-chapter"/>
+ </group>
+ <text macro="locators-join-with-space"/>
+ </group>
+ <text macro="collection-title"/>
+ <text macro="issue-join-with-period"/>
+ </group>
+ <text macro="issue-join-with-space"/>
+ </group>
+ <text macro="issue-join-with-comma"/>
+ <text macro="locators-journal-join-with-comma"/>
+ <text macro="locators-newspaper"/>
+ </group>
+ <text macro="locators-journal-join-with-colon"/>
+ </group>
+ <text macro="access"/>
+ </group>
+ <text variable="note" display="block"/>
+ </layout>
+ </bibliography>
+</style>
diff --git a/test/command/chicago-author-date-with-original-date-and-status.csl b/test/command/chicago-author-date-with-original-date-and-status.csl
new file mode 100644
index 000000000..ba80e654f
--- /dev/null
+++ b/test/command/chicago-author-date-with-original-date-and-status.csl
@@ -0,0 +1,575 @@
+<?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" page-range-format="chicago">
+ <info>
+ <title>Chicago Manual of Style 16th edition (author-date)</title>
+ <id>http://www.zotero.org/styles/chicago-author-date</id>
+ <link href="http://www.zotero.org/styles/chicago-author-date" rel="self"/>
+ <link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
+ <author>
+ <name>Julian Onions</name>
+ <email>julian.onions@gmail.com</email>
+ </author>
+ <contributor>
+ <name>Sebastian Karcher</name>
+ </contributor>
+ <contributor>
+ <name>Richard Karnesky</name>
+ <email>karnesky+zotero@gmail.com</email>
+ <uri>http://arc.nucapt.northwestern.edu/Richard_Karnesky</uri>
+ </contributor>
+ <contributor>
+ <name>Andrew Dunning</name>
+ <email>andrew.dunning@utoronto.ca</email>
+ </contributor>
+ <category citation-format="author-date"/>
+ <category field="generic-base"/>
+ <summary>The author-date variant of the Chicago style</summary>
+ <updated>2014-05-23T03:53:32+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="editor" form="verb-short">ed.</term>
+ <term name="container-author" form="verb">by</term>
+ <term name="translator" form="verb-short">trans.</term>
+ <term name="editortranslator" form="verb">
+ <single>edited and translated by</single>
+ <multiple>edited and translated by</multiple>
+ </term>
+ <term name="translator" form="short">trans.</term>
+ </terms>
+ </locale>
+ <macro name="secondary-contributors">
+ <choose>
+ <if type="chapter paper-conference" match="none">
+ <names variable="editor translator" delimiter=". ">
+ <label form="verb" text-case="capitalize-first" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </if>
+ </choose>
+ </macro>
+ <macro name="container-contributors">
+ <choose>
+ <if type="chapter 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="recipient">
+ <choose>
+ <if type="personal_communication">
+ <choose>
+ <if variable="genre">
+ <text variable="genre" text-case="capitalize-first"/>
+ </if>
+ <else>
+ <text term="letter" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ <names variable="recipient" delimiter=", ">
+ <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </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"/>
+ <text macro="title"/>
+ </substitute>
+ </names>
+ <text macro="recipient"/>
+ </group>
+ </macro>
+ <macro name="contributors-short">
+ <names variable="author">
+ <name form="short" and="text" delimiter=", " initialize-with=". "/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <text macro="title"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="interviewer">
+ <names variable="interviewer" delimiter=", ">
+ <label form="verb" prefix=" " text-case="capitalize-first" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="archive">
+ <group delimiter=". ">
+ <text variable="archive_location" text-case="capitalize-first"/>
+ <text variable="archive"/>
+ <text variable="archive-place"/>
+ </group>
+ </macro>
+ <macro name="access">
+ <group delimiter=". ">
+ <choose>
+ <if type="graphic report" match="any">
+ <text macro="archive"/>
+ </if>
+ <else-if type="article-journal bill book chapter legal_case legislation motion_picture paper-conference" match="none">
+ <text macro="archive"/>
+ </else-if>
+ </choose>
+ <choose>
+ <if variable="issued" match="none">
+ <group delimiter=" ">
+ <text term="accessed" text-case="capitalize-first"/>
+ <date variable="accessed" delimiter=" ">
+ <date-part name="month"/>
+ <date-part name="day"/>
+ </date>
+ </group>
+ </if>
+ </choose>
+ <choose>
+ <if type="legal_case" match="none">
+ <choose>
+ <if variable="DOI">
+ <text variable="DOI" prefix="doi:"/>
+ </if>
+ <else>
+ <text variable="URL"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </group>
+ </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 report 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">
+ <group delimiter=", ">
+ <text variable="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-if>
+ <else-if type="legal_case interview" match="any">
+ <text variable="title"/>
+ </else-if>
+ <else>
+ <text variable="title" text-case="title" quotes="true"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="edition">
+ <choose>
+ <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <choose>
+ <if is-numeric="edition">
+ <group delimiter=" " prefix=". ">
+ <number variable="edition" form="ordinal"/>
+ <text term="edition" form="short" strip-periods="true"/>
+ </group>
+ </if>
+ <else>
+ <text variable="edition" prefix=". "/>
+ </else>
+ </choose>
+ </if>
+ <else-if type="chapter paper-conference" match="any">
+ <choose>
+ <if is-numeric="edition">
+ <group delimiter=" " prefix=", ">
+ <number variable="edition" form="ordinal"/>
+ <text term="edition" form="short"/>
+ </group>
+ </if>
+ <else>
+ <text variable="edition" prefix=", "/>
+ </else>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="locators">
+ <choose>
+ <if type="article-journal">
+ <choose>
+ <if variable="volume">
+ <text variable="volume" prefix=" "/>
+ <group prefix=" (" suffix=")">
+ <choose>
+ <if variable="issue">
+ <text variable="issue"/>
+ </if>
+ <else>
+ <date variable="issued">
+ <date-part name="month"/>
+ </date>
+ </else>
+ </choose>
+ </group>
+ </if>
+ <else-if variable="issue">
+ <group delimiter=" " prefix=", ">
+ <text term="issue" form="short"/>
+ <text variable="issue"/>
+ <date variable="issued" prefix="(" suffix=")">
+ <date-part name="month"/>
+ </date>
+ </group>
+ </else-if>
+ <else>
+ <date variable="issued" prefix=", ">
+ <date-part name="month"/>
+ </date>
+ </else>
+ </choose>
+ </if>
+ <else-if type="legal_case">
+ <text variable="volume" prefix=", "/>
+ <text variable="container-title" prefix=" "/>
+ <text variable="page" prefix=" "/>
+ </else-if>
+ <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <group prefix=". " delimiter=". ">
+ <group>
+ <text term="volume" form="short" text-case="capitalize-first" suffix=" "/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ <group>
+ <number variable="number-of-volumes" form="numeric"/>
+ <text term="volume" form="short" prefix=" " plural="true"/>
+ </group>
+ </group>
+ </else-if>
+ <else-if type="chapter paper-conference" match="any">
+ <choose>
+ <if variable="page" match="none">
+ <group prefix=". ">
+ <text term="volume" form="short" text-case="capitalize-first" suffix=" "/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ </if>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="locators-chapter">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <choose>
+ <if variable="page">
+ <group prefix=", ">
+ <text variable="volume" suffix=":"/>
+ <text variable="page"/>
+ </group>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-article">
+ <choose>
+ <if type="article-newspaper">
+ <group prefix=", " delimiter=", ">
+ <group>
+ <text variable="edition" suffix=" "/>
+ <text term="edition" prefix=" "/>
+ </group>
+ <group>
+ <text term="section" form="short" suffix=" "/>
+ <text variable="section"/>
+ </group>
+ </group>
+ </if>
+ <else-if type="article-journal">
+ <choose>
+ <if variable="volume issue" match="any">
+ <text variable="page" prefix=": "/>
+ </if>
+ <else>
+ <text variable="page" prefix=", "/>
+ </else>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="point-locators">
+ <choose>
+ <if variable="locator">
+ <choose>
+ <if locator="page" match="none">
+ <choose>
+ <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <choose>
+ <if variable="volume">
+ <group>
+ <text term="volume" form="short" suffix=" "/>
+ <number variable="volume" form="numeric"/>
+ <label variable="locator" form="short" prefix=", " suffix=" "/>
+ </group>
+ </if>
+ <else>
+ <label variable="locator" form="short" suffix=" "/>
+ </else>
+ </choose>
+ </if>
+ <else>
+ <label variable="locator" form="short" suffix=" "/>
+ </else>
+ </choose>
+ </if>
+ <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <number variable="volume" form="numeric" suffix=":"/>
+ </else-if>
+ </choose>
+ <text variable="locator"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="container-prefix">
+ <text term="in" text-case="capitalize-first"/>
+ </macro>
+ <macro name="container-title">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <text macro="container-prefix" suffix=" "/>
+ </if>
+ </choose>
+ <choose>
+ <if type="legal_case" match="none">
+ <text variable="container-title" text-case="title" font-style="italic"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="publisher">
+ <group delimiter=": ">
+ <text variable="publisher-place"/>
+ <text variable="publisher"/>
+ </group>
+ </macro>
+ <macro name="date-citation">
+ <choose>
+ <if variable="original-date">
+ <date variable="original-date" prefix="[" suffix="]">
+ <date-part name="year"/>
+ </date>
+ </if>
+ </choose>
+ <choose>
+ <if variable="issued">
+ <date variable="issued" prefix=" ">
+ <date-part name="year"/>
+ </date>
+ </if>
+ <else-if variable="status">
+ <text variable="status" prefix=", "/>
+ </else-if>
+ <else-if variable="accessed">
+ <date variable="accessed" prefix=" ">
+ <date-part name="year"/>
+ </date>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="date-bibliography">
+ <choose>
+ <if variable="original-date">
+ <date variable="original-date" prefix=" (" suffix=") ">
+ <date-part name="year"/>
+ </date>
+ </if>
+ </choose>
+ <choose>
+ <if variable="issued">
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </if>
+ <else-if variable="status">
+ <text variable="status" text-case="capitalize-first"/>
+ </else-if>
+ <else-if variable="accessed">
+ <date variable="accessed">
+ <date-part name="year"/>
+ </date>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="day-month">
+ <date variable="issued">
+ <date-part name="month"/>
+ <date-part name="day" prefix=" "/>
+ </date>
+ </macro>
+ <macro name="collection-title">
+ <choose>
+ <if match="none" type="article-journal">
+ <choose>
+ <if match="none" is-numeric="collection-number">
+ <group delimiter=", ">
+ <text variable="collection-title" text-case="title"/>
+ <text variable="collection-number"/>
+ </group>
+ </if>
+ <else>
+ <group delimiter=" ">
+ <text variable="collection-title" text-case="title"/>
+ <text variable="collection-number"/>
+ </group>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="collection-title-journal">
+ <choose>
+ <if type="article-journal">
+ <group delimiter=" ">
+ <text variable="collection-title"/>
+ <text variable="collection-number"/>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="event">
+ <group>
+ <text term="presented at" suffix=" "/>
+ <text variable="event"/>
+ </group>
+ </macro>
+ <macro name="description">
+ <choose>
+ <if type="interview">
+ <group delimiter=". ">
+ <text macro="interviewer"/>
+ <text variable="medium" text-case="capitalize-first"/>
+ </group>
+ </if>
+ <else>
+ <text variable="medium" text-case="capitalize-first" prefix=". "/>
+ </else>
+ </choose>
+ <choose>
+ <if variable="title" match="none"/>
+ <else-if type="thesis personal_communication speech" match="any"/>
+ <else>
+ <group delimiter=" " prefix=". ">
+ <text variable="genre" text-case="capitalize-first"/>
+ <choose>
+ <if type="report">
+ <text variable="number"/>
+ </if>
+ </choose>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="issue">
+ <choose>
+ <if type="legal_case">
+ <text variable="authority" prefix=". "/>
+ </if>
+ <else-if type="speech">
+ <group prefix=". " delimiter=", ">
+ <group delimiter=" ">
+ <text variable="genre" text-case="capitalize-first"/>
+ <text macro="event"/>
+ </group>
+ <text variable="event-place"/>
+ <text macro="day-month"/>
+ </group>
+ </else-if>
+ <else-if type="article-newspaper article-magazine personal_communication" match="any">
+ <text macro="day-month" prefix=", "/>
+ </else-if>
+ <else>
+ <group prefix=". " delimiter=", ">
+ <choose>
+ <if type="thesis">
+ <text variable="genre" text-case="capitalize-first"/>
+ </if>
+ </choose>
+ <text macro="publisher"/>
+ </group>
+ </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">
+ <layout prefix="(" suffix=")" delimiter="; ">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <text macro="contributors-short"/>
+ <text macro="date-citation"/>
+ </group>
+ <text macro="point-locators"/>
+ </group>
+ </layout>
+ </citation>
+ <bibliography hanging-indent="true" et-al-min="11" et-al-use-first="7" subsequent-author-substitute="&#8212;&#8212;&#8212;" entry-spacing="0">
+ <sort>
+ <key macro="contributors"/>
+ <key variable="original-date"/>
+ <key variable="issued"/>
+ </sort>
+ <layout suffix=".">
+ <group delimiter=". ">
+ <text macro="contributors"/>
+ <text macro="date-bibliography" text-case="capitalize-first"/>
+ <text macro="title"/>
+ </group>
+ <text macro="description"/>
+ <text macro="secondary-contributors" prefix=". "/>
+ <text macro="container-title" prefix=". "/>
+ <text macro="container-contributors"/>
+ <text macro="edition"/>
+ <text macro="locators-chapter"/>
+ <text macro="collection-title-journal" prefix=", " suffix=", "/>
+ <text macro="locators"/>
+ <text macro="collection-title" prefix=". "/>
+ <text macro="issue"/>
+ <text macro="locators-article"/>
+ <text macro="access" prefix=". "/>
+ </layout>
+ </bibliography>
+</style>
diff --git a/test/command/chicago-fullnote-bibliography.csl b/test/command/chicago-fullnote-bibliography.csl
new file mode 100644
index 000000000..5bcfe59b3
--- /dev/null
+++ b/test/command/chicago-fullnote-bibliography.csl
@@ -0,0 +1,1182 @@
+<?xml version="1.0" encoding="utf-8"?>
+<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" demote-non-dropping-particle="never" page-range-format="chicago">
+ <info>
+ <title>Chicago Manual of Style 16th edition (full note)</title>
+ <id>http://www.zotero.org/styles/chicago-fullnote-bibliography</id>
+ <link href="http://www.zotero.org/styles/chicago-fullnote-bibliography" rel="self"/>
+ <link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
+ <author>
+ <name>Julian Onions</name>
+ <email>julian.onions@gmail.com</email>
+ </author>
+ <contributor>
+ <name>Simon Kornblith</name>
+ <email>simon@simonster.com</email>
+ </contributor>
+ <contributor>
+ <name>Elena Razlogova</name>
+ <email>elena.razlogova@gmail.com</email>
+ </contributor>
+ <contributor>
+ <name>Frank Bennett</name>
+ <email>biercenator@gmail.com</email>
+ </contributor>
+ <contributor>
+ <name>Andrew Dunning</name>
+ <email>andrew.dunning@utoronto.ca</email>
+ </contributor>
+ <category citation-format="note"/>
+ <category field="generic-base"/>
+ <summary>Chicago format with full notes and bibliography</summary>
+ <updated>2014-05-15T18:02:53+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="editor" form="verb-short">ed.</term>
+ <term name="translator" form="verb-short">trans.</term>
+ <term name="editortranslator" form="verb-short">
+ <single>ed. and trans.</single>
+ <multiple>ed. and trans.</multiple>
+ </term>
+ <term name="editortranslator" form="verb">
+ <single>Edited and translated by</single>
+ <multiple>Edited and translated by</multiple>
+ </term>
+ <term name="translator" form="short">trans.</term>
+ </terms>
+ </locale>
+ <macro name="editor-translator">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <choose>
+ <if variable="container-author reviewed-author" match="any">
+ <group>
+ <names variable="container-author reviewed-author">
+ <label form="verb-short" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </group>
+ </if>
+ </choose>
+ </group>
+ <names variable="editor translator" delimiter=", ">
+ <label form="verb-short" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </group>
+ </macro>
+ <macro name="secondary-contributors-note">
+ <choose>
+ <if type="chapter paper-conference" match="none">
+ <text macro="editor-translator"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="container-contributors-note">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <text macro="editor-translator"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="secondary-contributors">
+ <choose>
+ <if type="chapter paper-conference" match="none">
+ <names variable="editor translator" delimiter=". ">
+ <label form="verb" text-case="capitalize-first" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </if>
+ </choose>
+ </macro>
+ <macro name="container-contributors">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <group delimiter=", ">
+ <choose>
+ <if variable="author">
+ <choose>
+ <if variable="container-author" match="any">
+ <names variable="container-author">
+ <label form="verb-short" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </if>
+ </choose>
+ <!--This includes page numers after the container author, e.g. for Introductions -->
+ <choose>
+ <if variable="container-author author" match="all">
+ <group delimiter=". ">
+ <text variable="page"/>
+ <names variable="editor translator" delimiter=", ">
+ <label form="verb" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </group>
+ </if>
+ <else>
+ <names variable="editor translator" delimiter=", ">
+ <label form="verb" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="recipient-note">
+ <names variable="recipient" delimiter=", ">
+ <label form="verb" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="contributors-note">
+ <group delimiter=" ">
+ <names variable="author">
+ <name and="text" sort-separator=", " delimiter=", "/>
+ <label form="short" prefix=", "/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ </substitute>
+ </names>
+ <text macro="recipient-note"/>
+ </group>
+ </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="verb-short" prefix=", "/>
+ </names>
+ </macro>
+ <macro name="recipient">
+ <group delimiter=" ">
+ <choose>
+ <if type="personal_communication">
+ <choose>
+ <if variable="genre">
+ <text variable="genre" text-case="capitalize-first"/>
+ </if>
+ <else>
+ <text term="letter" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ <text macro="recipient-note"/>
+ </group>
+ </macro>
+ <macro name="contributors">
+ <group delimiter=". ">
+ <names variable="author">
+ <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
+ <substitute>
+ <text macro="editor"/>
+ <text macro="translator"/>
+ </substitute>
+ </names>
+ <text macro="recipient"/>
+ </group>
+ </macro>
+ <macro name="recipient-short">
+ <names variable="recipient">
+ <label form="verb" text-case="lowercase" suffix=" "/>
+ <name form="short" and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="contributors-short">
+ <group delimiter=" ">
+ <names variable="author">
+ <name form="short" and="text" delimiter=", "/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ </substitute>
+ </names>
+ <text macro="recipient-short"/>
+ </group>
+ </macro>
+ <macro name="contributors-sort">
+ <names variable="author">
+ <name name-as-sort-order="all" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <text macro="title"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="interviewer-note">
+ <names variable="interviewer" delimiter=", ">
+ <label form="verb" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="interviewer">
+ <names variable="interviewer" delimiter=", ">
+ <label form="verb" text-case="capitalize-first" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="title-note">
+ <choose>
+ <if variable="title" match="none">
+ <text variable="genre"/>
+ </if>
+ <else-if type="bill book graphic legislation motion_picture report song" match="any">
+ <text variable="title" text-case="title" font-style="italic"/>
+ <group delimiter=" " prefix=", ">
+ <text term="version"/>
+ <text variable="version"/>
+ </group>
+ </else-if>
+ <else-if type="legal_case interview" match="any">
+ <text variable="title"/>
+ </else-if>
+ <else-if variable="reviewed-author">
+ <text variable="title" font-style="italic" prefix="review of "/>
+ </else-if>
+ <else>
+ <text variable="title" text-case="title" quotes="true"/>
+ </else>
+ </choose>
+ </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 report 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">
+ <group delimiter=", ">
+ <text variable="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-if>
+ <else-if type="legal_case interview" match="any">
+ <text variable="title"/>
+ </else-if>
+ <else>
+ <text variable="title" text-case="title" quotes="true"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="title-short">
+ <choose>
+ <if variable="title" match="none">
+ <choose>
+ <if type="interview">
+ <text term="interview"/>
+ </if>
+ <else-if type="manuscript speech" match="any">
+ <text variable="genre" form="short"/>
+ </else-if>
+ <else-if type="personal_communication">
+ <text macro="issued"/>
+ </else-if>
+ </choose>
+ </if>
+ <else-if type="bill book graphic legislation motion_picture report song" match="any">
+ <text variable="title" text-case="title" form="short" font-style="italic"/>
+ </else-if>
+ <else-if type="legal_case interview" match="any">
+ <text variable="title"/>
+ </else-if>
+ <else>
+ <text variable="title" text-case="title" form="short" quotes="true"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="date-disambiguate">
+ <choose>
+ <if disambiguate="true">
+ <text macro="issued"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="description-note">
+ <group delimiter=", ">
+ <text macro="interviewer-note"/>
+ <text variable="medium"/>
+ <choose>
+ <if variable="title" match="none"/>
+ <else-if type="thesis speech" match="any"/>
+ <else>
+ <text variable="genre"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <macro name="description">
+ <group delimiter=", ">
+ <group delimiter=". ">
+ <text macro="interviewer"/>
+ <text variable="medium" text-case="capitalize-first"/>
+ </group>
+ <choose>
+ <if variable="title" match="none"/>
+ <else-if type="thesis speech" match="any"/>
+ <else>
+ <text variable="genre" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <macro name="container-title-note">
+ <group delimiter=" ">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <text term="in"/>
+ </if>
+ </choose>
+ <choose>
+ <if type="legal_case" match="none">
+ <text variable="container-title" text-case="title" font-style="italic"/>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="container-title">
+ <group delimiter=" ">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <text term="in" text-case="capitalize-first"/>
+ </if>
+ </choose>
+ <choose>
+ <if type="legal_case" match="none">
+ <text variable="container-title" text-case="title" font-style="italic"/>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="collection-title">
+ <choose>
+ <if match="none" type="article-journal">
+ <choose>
+ <if match="none" is-numeric="collection-number">
+ <group delimiter=", ">
+ <text variable="collection-title" text-case="title"/>
+ <text variable="collection-number"/>
+ </group>
+ </if>
+ <else>
+ <group delimiter=" ">
+ <text variable="collection-title" text-case="title"/>
+ <text variable="collection-number"/>
+ </group>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="collection-title-journal">
+ <choose>
+ <if type="article-journal">
+ <group delimiter=" ">
+ <text variable="collection-title"/>
+ <text variable="collection-number"/>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="edition-note">
+ <choose>
+ <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
+ <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>
+ </if>
+ </choose>
+ </macro>
+ <macro name="edition">
+ <choose>
+ <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
+ <choose>
+ <if is-numeric="edition">
+ <group delimiter=" ">
+ <number variable="edition" form="ordinal"/>
+ <text term="edition" form="short"/>
+ </group>
+ </if>
+ <else>
+ <text variable="edition" text-case="capitalize-first" suffix="."/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-note-join-with-space">
+ <choose>
+ <if type="article-journal" variable="volume" match="all">
+ <choose>
+ <if match="none" variable="collection-title">
+ <text macro="locators-note"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-note-join-with-comma">
+ <choose>
+ <if type="article-journal" match="none">
+ <text macro="locators-note"/>
+ </if>
+ <else-if type="article-journal">
+ <choose>
+ <if variable="volume" match="none">
+ <text macro="locators-note"/>
+ </if>
+ <else-if match="any" variable="collection-title">
+ <text macro="locators-note"/>
+ </else-if>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="locators-note">
+ <choose>
+ <if type="article-journal">
+ <group delimiter=", ">
+ <text macro="collection-title-journal"/>
+ <number variable="volume"/>
+ <group delimiter=" ">
+ <text term="issue" form="short"/>
+ <number variable="issue"/>
+ </group>
+ </group>
+ </if>
+ <else-if type="legal_case">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <number variable="volume"/>
+ <text variable="container-title"/>
+ <text variable="page"/>
+ </group>
+ <text variable="locator"/>
+ </group>
+ </else-if>
+ <else-if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
+ <group delimiter=", ">
+ <text macro="edition-note"/>
+ <group delimiter=" ">
+ <text term="volume" form="short"/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ <choose>
+ <if variable="locator" match="none">
+ <group delimiter=" ">
+ <number variable="number-of-volumes" form="numeric"/>
+ <text term="volume" form="short" plural="true"/>
+ </group>
+ </if>
+ </choose>
+ </group>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="locators-join-with-space">
+ <choose>
+ <if type="article-journal" variable="volume" match="all">
+ <choose>
+ <if match="none" variable="collection-title">
+ <text macro="locators"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-join-with-comma">
+ <choose>
+ <if type="legal_case chapter paper-conference" match="any">
+ <text macro="locators"/>
+ </if>
+ <else-if type="article-journal">
+ <choose>
+ <if variable="volume" match="none">
+ <text macro="locators"/>
+ </if>
+ <else-if match="any" variable="collection-title">
+ <text macro="locators"/>
+ </else-if>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="locators-join-with-period">
+ <choose>
+ <if type="legal_case article-journal chapter paper-conference" match="none">
+ <text macro="locators"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators">
+ <choose>
+ <if type="article-journal">
+ <group delimiter=", ">
+ <text macro="collection-title-journal"/>
+ <number variable="volume"/>
+ <group delimiter=" ">
+ <text term="issue" form="short"/>
+ <number variable="issue"/>
+ </group>
+ </group>
+ </if>
+ <else-if type="legal_case">
+ <group delimiter=" ">
+ <number variable="volume"/>
+ <text variable="container-title"/>
+ <text variable="page"/>
+ </group>
+ </else-if>
+ <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <group delimiter=". ">
+ <text macro="edition"/>
+ <group delimiter=" ">
+ <text term="volume" form="short" text-case="capitalize-first"/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ <group delimiter=" ">
+ <number variable="number-of-volumes" form="numeric"/>
+ <text term="volume" form="short" plural="true"/>
+ </group>
+ </group>
+ </else-if>
+ <else-if type="chapter paper-conference" match="any">
+ <group delimiter=". ">
+ <text macro="edition"/>
+ <choose>
+ <if variable="page" match="none">
+ <group delimiter=" ">
+ <text term="volume" form="short" text-case="capitalize-first"/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ </if>
+ </choose>
+ </group>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="locators-newspaper">
+ <choose>
+ <if type="article-newspaper">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <number variable="edition"/>
+ <text term="edition"/>
+ </group>
+ <group delimiter=" ">
+ <text term="section" form="short"/>
+ <text variable="section"/>
+ </group>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="event">
+ <group delimiter=" ">
+ <text term="presented at"/>
+ <text variable="event"/>
+ </group>
+ </macro>
+ <macro name="publisher">
+ <choose>
+ <if type="thesis">
+ <text variable="publisher"/>
+ </if>
+ <else-if type="speech">
+ <text variable="event-place"/>
+ </else-if>
+ <else>
+ <group delimiter=": ">
+ <text variable="publisher-place"/>
+ <text variable="publisher"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="issued">
+ <choose>
+ <if variable="issued">
+ <choose>
+ <if type="graphic report" match="any">
+ <date variable="issued" form="text"/>
+ </if>
+ <else-if type="legal_case">
+ <group delimiter=" ">
+ <text variable="authority"/>
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </group>
+ </else-if>
+ <else-if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song thesis" match="any">
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </else-if>
+ <else>
+ <date variable="issued" form="text"/>
+ </else>
+ </choose>
+ </if>
+ <else-if variable="accessed URL" match="all"/>
+ <else>
+ <text term="no date" form="short"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="point-locators-subsequent">
+ <choose>
+ <if variable="locator">
+ <choose>
+ <if locator="page" match="none">
+ <group delimiter=" ">
+ <choose>
+ <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <choose>
+ <if variable="volume">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <text term="volume" form="short"/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ <label variable="locator" form="short"/>
+ </group>
+ </if>
+ <else>
+ <label variable="locator" form="short"/>
+ </else>
+ </choose>
+ </if>
+ <else>
+ <label variable="locator" form="short"/>
+ </else>
+ </choose>
+ <text variable="locator"/>
+ </group>
+ </if>
+ <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <group delimiter=":">
+ <number variable="volume" form="numeric"/>
+ <text variable="locator"/>
+ </group>
+ </else-if>
+ <else>
+ <text variable="locator"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="point-locators-join-with-colon">
+ <choose>
+ <if type="article-journal">
+ <choose>
+ <if variable="locator page" match="any">
+ <choose>
+ <if variable="volume issue" match="any">
+ <text macro="point-locators"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="point-locators-join-with-comma">
+ <choose>
+ <if type="article-journal" match="none">
+ <text macro="point-locators"/>
+ </if>
+ <else-if variable="volume issue" match="none">
+ <text macro="point-locators"/>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="point-locators">
+ <choose>
+ <if variable="locator" match="none">
+ <choose>
+ <if type="article-journal chapter paper-conference" match="any">
+ <text variable="page"/>
+ </if>
+ </choose>
+ </if>
+ <else-if type="article-journal">
+ <group delimiter=" ">
+ <choose>
+ <if locator="page" match="none">
+ <label variable="locator" form="short" suffix=" "/>
+ </if>
+ </choose>
+ <text variable="locator"/>
+ </group>
+ </else-if>
+ <else-if type="legal_case"/>
+ <else>
+ <group delimiter=" ">
+ <choose>
+ <if locator="page" match="none">
+ <label variable="locator" form="short"/>
+ </if>
+ </choose>
+ <text variable="locator"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="locators-chapter">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <choose>
+ <if variable="author container-author" match="all"/>
+ <else>
+ <choose>
+ <if variable="page">
+ <number variable="volume" suffix=":"/>
+ <text variable="page"/>
+ </if>
+ </choose>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-journal-join-with-colon">
+ <choose>
+ <if type="article-journal">
+ <choose>
+ <if variable="volume issue" match="any">
+ <text variable="page"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-journal-join-with-comma">
+ <choose>
+ <if type="article-journal">
+ <choose>
+ <if variable="volume issue" match="none">
+ <text variable="page"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="archive-note">
+ <choose>
+ <if type="thesis">
+ <group delimiter=" ">
+ <text variable="archive"/>
+ <text variable="archive_location" prefix="(" suffix=")"/>
+ </group>
+ </if>
+ <else>
+ <group delimiter=", ">
+ <text variable="archive_location"/>
+ <text variable="archive"/>
+ <text variable="archive-place"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="archive">
+ <choose>
+ <if type="thesis">
+ <group delimiter=" ">
+ <text variable="archive"/>
+ <text variable="archive_location" prefix="(" suffix=")"/>
+ </group>
+ </if>
+ <else>
+ <group delimiter=". ">
+ <text variable="archive_location" text-case="capitalize-first"/>
+ <text variable="archive"/>
+ <text variable="archive-place"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="issue-note-join-with-space">
+ <choose>
+ <if type="article-journal legal_case" variable="publisher-place publisher" match="any">
+ <!--Chicago doesn't use publisher/place for Newspapers and we want the date delimited by a comma-->
+ <choose>
+ <if type="article-newspaper" match="none">
+ <choose>
+ <if type="article-journal" match="none">
+ <text macro="issue-note"/>
+ </if>
+ <else-if variable="issue volume" match="any">
+ <text macro="issue-note"/>
+ </else-if>
+ </choose>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="issue-note-join-with-comma">
+ <choose>
+ <if type="article-journal legal_case" variable="publisher-place publisher" match="none">
+ <text macro="issue-note"/>
+ </if>
+ <else-if type="article-newspaper">
+ <text macro="issue-note"/>
+ </else-if>
+ <else-if type="article-journal">
+ <choose>
+ <if variable="volume issue" match="none">
+ <text macro="issue-note"/>
+ </if>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="issue-note">
+ <choose>
+ <if type="legal_case" match="any">
+ <text macro="issued" prefix="(" suffix=")"/>
+ </if>
+ <else-if type="article-journal">
+ <choose>
+ <if variable="volume issue" match="any">
+ <text macro="issued" prefix="(" suffix=")"/>
+ </if>
+ <else>
+ <text macro="issued"/>
+ </else>
+ </choose>
+ </else-if>
+ <else-if type="article-newspaper">
+ <text macro="issued"/>
+ </else-if>
+ <else-if variable="publisher-place event-place publisher genre" match="any">
+ <group prefix="(" suffix=")" delimiter=", ">
+ <group delimiter=" ">
+ <choose>
+ <if variable="title" match="none"/>
+ <else-if type="thesis speech" match="any">
+ <text variable="genre"/>
+ </else-if>
+ </choose>
+ <text macro="event"/>
+ </group>
+ <text macro="publisher"/>
+ <text macro="issued"/>
+ </group>
+ </else-if>
+ <else>
+ <text macro="issued"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="issue-join-with-space">
+ <choose>
+ <if type="article-journal legal_case" match="any">
+ <choose>
+ <if variable="issue volume" match="any">
+ <text macro="issue"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="issue-join-with-period">
+ <choose>
+ <if type="article-journal legal_case" match="none">
+ <choose>
+ <if type="speech" variable="publisher publisher-place" match="any">
+ <text macro="issue"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="issue-join-with-comma">
+ <choose>
+ <if type="article-journal legal_case" match="none">
+ <choose>
+ <if type="speech" variable="publisher publisher-place" match="none">
+ <text macro="issue"/>
+ </if>
+ </choose>
+ </if>
+ <else-if variable="volume issue" match="none">
+ <text macro="issue"/>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="issue">
+ <choose>
+ <if type="legal_case" match="any">
+ <text macro="issued" prefix="(" suffix=")"/>
+ </if>
+ <else-if type="article-journal">
+ <choose>
+ <if variable="issue volume" match="any">
+ <text macro="issued" prefix="(" suffix=")"/>
+ </if>
+ <else>
+ <text macro="issued"/>
+ </else>
+ </choose>
+ </else-if>
+ <else-if type="speech">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <choose>
+ <if variable="title" match="none"/>
+ <else>
+ <text variable="genre" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ <text macro="event"/>
+ </group>
+ <text variable="event-place"/>
+ <text macro="issued"/>
+ </group>
+ </else-if>
+ <!--Chicago doesn't use publisher/place for Newspapers -->
+ <else-if type="article-newspaper">
+ <text macro="issued"/>
+ </else-if>
+ <else-if variable="publisher-place publisher" match="any">
+ <group delimiter=", ">
+ <choose>
+ <if type="thesis">
+ <text variable="genre" text-case="capitalize-first"/>
+ </if>
+ </choose>
+ <text macro="publisher"/>
+ <text macro="issued"/>
+ </group>
+ </else-if>
+ <else>
+ <text macro="issued"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="access-note">
+ <group delimiter=", ">
+ <choose>
+ <if type="graphic report" match="any">
+ <text macro="archive-note"/>
+ </if>
+ <else-if type="article-journal bill book chapter legal_case legislation motion_picture paper-conference" match="none">
+ <text macro="archive-note"/>
+ </else-if>
+ </choose>
+ <choose>
+ <if variable="issued" match="none">
+ <group delimiter=" ">
+ <text term="accessed"/>
+ <date variable="accessed" form="text"/>
+ </group>
+ </if>
+ </choose>
+ <choose>
+ <if type="legal_case" match="none">
+ <choose>
+ <if variable="DOI">
+ <text variable="DOI" prefix="doi:"/>
+ </if>
+ <else>
+ <text variable="URL"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="access">
+ <group delimiter=". ">
+ <choose>
+ <if type="graphic report" match="any">
+ <text macro="archive"/>
+ </if>
+ <else-if type="article-journal bill book chapter legal_case legislation motion_picture paper-conference" match="none">
+ <text macro="archive"/>
+ </else-if>
+ </choose>
+ <choose>
+ <if variable="issued" match="none">
+ <group delimiter=" ">
+ <text term="accessed" text-case="capitalize-first"/>
+ <date variable="accessed" form="text"/>
+ </group>
+ </if>
+ </choose>
+ <choose>
+ <if type="legal_case" match="none">
+ <choose>
+ <if variable="DOI">
+ <text variable="DOI" prefix="doi:"/>
+ </if>
+ <else>
+ <text variable="URL"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="case-locator-subsequent">
+ <choose>
+ <if type="legal_case">
+ <text macro="locators-note"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="case-issue-subsequent">
+ <choose>
+ <if type="legal_case">
+ <text macro="issue"/>
+ </if>
+ </choose>
+ </macro>
+ <citation et-al-min="4" et-al-use-first="1" disambiguate-add-names="true">
+ <layout suffix="." delimiter="; ">
+ <choose>
+ <if position="ibid-with-locator">
+ <group delimiter=", ">
+ <text term="ibid"/>
+ <text macro="point-locators-subsequent"/>
+ </group>
+ </if>
+ <else-if position="ibid">
+ <text term="ibid"/>
+ </else-if>
+ <else-if position="subsequent">
+ <group delimiter=", ">
+ <text macro="contributors-short"/>
+ <group delimiter=" ">
+ <group delimiter=", ">
+ <text macro="title-short"/>
+ <!--if title & author are the same: -->
+ <text macro="date-disambiguate"/>
+ <text macro="case-locator-subsequent"/>
+ </group>
+ <text macro="case-issue-subsequent"/>
+ </group>
+ <text macro="point-locators-subsequent"/>
+ </group>
+ </else-if>
+ <else>
+ <group delimiter=", ">
+ <group delimiter=": ">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <group delimiter=", ">
+ <group delimiter=", ">
+ <text macro="contributors-note"/>
+ <text macro="title-note"/>
+ </group>
+ <text macro="description-note"/>
+ <text macro="secondary-contributors-note"/>
+ <text macro="container-title-note"/>
+ <text macro="container-contributors-note"/>
+ </group>
+ <text macro="locators-note-join-with-space"/>
+ </group>
+ <text macro="locators-note-join-with-comma"/>
+ <text macro="collection-title"/>
+ <text macro="issue-note-join-with-comma"/>
+ </group>
+ <text macro="issue-note-join-with-space"/>
+ </group>
+ <text macro="locators-newspaper"/>
+ <text macro="point-locators-join-with-comma"/>
+ </group>
+ <text macro="point-locators-join-with-colon"/>
+ </group>
+ <text macro="access-note"/>
+ </group>
+ </else>
+ </choose>
+ </layout>
+ </citation>
+ <bibliography hanging-indent="true" et-al-min="11" et-al-use-first="7" subsequent-author-substitute="&#8212;&#8212;&#8212;" entry-spacing="0">
+ <sort>
+ <key macro="contributors-sort"/>
+ <key variable="title"/>
+ <key variable="genre"/>
+ <key variable="issued"/>
+ </sort>
+ <layout suffix=".">
+ <group delimiter=". ">
+ <group delimiter=": ">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <group delimiter=". ">
+ <group delimiter=" ">
+ <group delimiter=", ">
+ <group delimiter=". ">
+ <group delimiter=". ">
+ <text macro="contributors"/>
+ <text macro="title"/>
+ </group>
+ <text macro="description"/>
+ <text macro="secondary-contributors"/>
+ <group delimiter=", ">
+ <text macro="container-title"/>
+ <text macro="container-contributors"/>
+ </group>
+ <text macro="locators-join-with-period"/>
+ </group>
+ <text macro="locators-join-with-comma"/>
+ <text macro="locators-chapter"/>
+ </group>
+ <text macro="locators-join-with-space"/>
+ </group>
+ <text macro="collection-title"/>
+ <text macro="issue-join-with-period"/>
+ </group>
+ <text macro="issue-join-with-space"/>
+ </group>
+ <text macro="issue-join-with-comma"/>
+ <text macro="locators-journal-join-with-comma"/>
+ <text macro="locators-newspaper"/>
+ </group>
+ <text macro="locators-journal-join-with-colon"/>
+ </group>
+ <text macro="access"/>
+ </group>
+ </layout>
+ </bibliography>
+</style>
diff --git a/test/command/chicago-note-bibliography.csl b/test/command/chicago-note-bibliography.csl
new file mode 100644
index 000000000..faf70949f
--- /dev/null
+++ b/test/command/chicago-note-bibliography.csl
@@ -0,0 +1,1005 @@
+<?xml version="1.0" encoding="utf-8"?>
+<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" demote-non-dropping-particle="sort-only">
+ <info>
+ <title>Chicago Manual of Style (note)</title>
+ <id>http://www.zotero.org/styles/chicago-note-bibliography</id>
+ <link href="http://www.zotero.org/styles/chicago-note-bibliography" rel="self"/>
+ <link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
+ <author>
+ <name>Julian Onions</name>
+ <email>julian.onions@gmail.com</email>
+ </author>
+ <contributor>
+ <name>Simon Kornblith</name>
+ <email>simon@simonster.com</email>
+ </contributor>
+ <contributor>
+ <name>Elena Razlogova</name>
+ <email>elena.razlogova@gmail.com</email>
+ </contributor>
+ <contributor>
+ <name>Frank Bennett</name>
+ <email>biercenator@gmail.com</email>
+ </contributor>
+ <category citation-format="note"/>
+ <category field="generic-base"/>
+ <summary>Chicago format with short notes and bibliography</summary>
+ <updated>2012-10-25T21:15:26+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="editortranslator" form="verb-short">
+ <single>trans. and ed.</single>
+ <multiple>trans. and ed.</multiple>
+ </term>
+ <term name="editortranslator" form="verb">
+ <single> Translated and edited by</single>
+ <multiple> Translated and edited by</multiple>
+ </term>
+ <term name="editor" form="verb-short">ed.</term>
+ <term name="translator" form="verb-short">trans.</term>
+ </terms>
+ </locale>
+ <macro name="editor-translator">
+ <group delimiter=", ">
+ <choose>
+ <if variable="author">
+ <group delimiter=" ">
+ <choose>
+ <if variable="container-author">
+ <group>
+ <names variable="container-author">
+ <label form="verb-short" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </group>
+ </if>
+ </choose>
+ </group>
+ <names variable="editor translator" delimiter=", ">
+ <label form="verb-short" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="secondary-contributors-note">
+ <choose>
+ <if type="chapter paper-conference" match="none">
+ <text macro="editor-translator"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="container-contributors-note">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <text macro="editor-translator"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="secondary-contributors">
+ <choose>
+ <if type="chapter paper-conference" match="none">
+ <group delimiter=". ">
+ <choose>
+ <if variable="author">
+ <names variable="editor translator" delimiter=". ">
+ <label form="verb" text-case="capitalize-first" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </if>
+ </choose>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="container-contributors">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <group delimiter=", ">
+ <choose>
+ <if variable="author">
+ <choose>
+ <if variable="container-author">
+ <names variable="container-author">
+ <label form="verb-short" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </if>
+ </choose>
+ <!--This includes page numers after the container author, e.g. for Introductions -->
+ <choose>
+ <if variable="container-author author" match="all">
+ <group delimiter=". ">
+ <text variable="page"/>
+ <names variable="editor translator" delimiter=", ">
+ <label form="verb" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </group>
+ </if>
+ <else>
+ <names variable="editor translator" delimiter=", ">
+ <label form="verb" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="recipient-note">
+ <names variable="recipient" delimiter=", ">
+ <label form="verb" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="contributors-note">
+ <group delimiter=" ">
+ <names variable="author">
+ <name and="text" sort-separator=", " delimiter=", "/>
+ <label form="short" prefix=", "/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ </substitute>
+ </names>
+ <text macro="recipient-note"/>
+ </group>
+ </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="verb-short" prefix=", "/>
+ </names>
+ </macro>
+ <macro name="recipient">
+ <group delimiter=" ">
+ <choose>
+ <if type="personal_communication">
+ <choose>
+ <if variable="genre">
+ <text variable="genre" text-case="capitalize-first"/>
+ </if>
+ <else>
+ <text term="letter" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ <text macro="recipient-note"/>
+ </group>
+ </macro>
+ <macro name="contributors">
+ <group delimiter=". ">
+ <names variable="author">
+ <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
+ <substitute>
+ <text macro="editor"/>
+ <text macro="translator"/>
+ </substitute>
+ </names>
+ <text macro="recipient"/>
+ </group>
+ </macro>
+ <macro name="recipient-short">
+ <names variable="recipient">
+ <label form="verb" text-case="lowercase" suffix=" "/>
+ <name form="short" and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="contributors-short">
+ <group delimiter=" ">
+ <names variable="author">
+ <name form="short" and="text" delimiter=", "/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ </substitute>
+ </names>
+ <text macro="recipient-short"/>
+ </group>
+ </macro>
+ <macro name="contributors-sort">
+ <names variable="author">
+ <name name-as-sort-order="all" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="interviewer-note">
+ <names variable="interviewer" delimiter=", ">
+ <label form="verb" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="interviewer">
+ <names variable="interviewer" delimiter=", ">
+ <label form="verb" text-case="capitalize-first" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="title-note">
+ <choose>
+ <if variable="title" match="none">
+ <text variable="genre"/>
+ </if>
+ <else-if type="bill book graphic legislation motion_picture report song" match="any">
+ <text variable="title" text-case="title" font-style="italic"/>
+ <text variable="version" prefix=" , version " suffix=""/>
+ <!--This isn't localized because we don't have a version term. While not ideal, it should work for many languages and is better than not including a term.-->
+ </else-if>
+ <else-if type="legal_case">
+ <text variable="title"/>
+ </else-if>
+ <else>
+ <text variable="title" text-case="title" quotes="true"/>
+ </else>
+ </choose>
+ </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 report song" match="any">
+ <text variable="title" text-case="title" font-style="italic"/>
+ <text variable="version" prefix=" (version " suffix=")"/>
+ </else-if>
+ <else-if type="legal_case">
+ <text variable="title"/>
+ </else-if>
+ <else>
+ <text variable="title" text-case="title" quotes="true"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="title-short">
+ <choose>
+ <if variable="title" match="none">
+ <choose>
+ <if type="interview">
+ <text term="interview" text-case="lowercase"/>
+ </if>
+ <else-if type="manuscript speech" match="any">
+ <text variable="genre" form="short"/>
+ </else-if>
+ <else-if type="personal_communication">
+ <text macro="issued"/>
+ </else-if>
+ </choose>
+ </if>
+ <else-if type="bill book graphic legislation motion_picture report song" match="any">
+ <text variable="title" text-case="title" form="short" font-style="italic"/>
+ </else-if>
+ <else-if type="legal_case">
+ <text variable="title"/>
+ </else-if>
+ <else>
+ <text variable="title" text-case="title" form="short" quotes="true"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="description-note">
+ <group delimiter=", ">
+ <text macro="interviewer-note"/>
+ <text variable="medium"/>
+ <choose>
+ <if variable="title" match="none"/>
+ <else-if type="thesis speech" match="any"/>
+ <else>
+ <text variable="genre"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <macro name="description">
+ <group delimiter=", ">
+ <group delimiter=". ">
+ <text macro="interviewer"/>
+ <text variable="medium" text-case="capitalize-first"/>
+ </group>
+ <choose>
+ <if variable="title" match="none"/>
+ <else-if type="thesis speech" match="any"/>
+ <else>
+ <text variable="genre" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <macro name="container-title-note">
+ <group delimiter=" ">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <text term="in" text-case="lowercase"/>
+ </if>
+ </choose>
+ <choose>
+ <if type="legal_case" match="none">
+ <text variable="container-title" text-case="title" font-style="italic"/>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="container-title">
+ <group delimiter=" ">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <text term="in" text-case="capitalize-first"/>
+ </if>
+ </choose>
+ <choose>
+ <if type="legal_case" match="none">
+ <text variable="container-title" text-case="title" font-style="italic"/>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="collection-title">
+ <group delimiter=" ">
+ <text variable="collection-title" text-case="title"/>
+ <text variable="collection-number"/>
+ </group>
+ </macro>
+ <macro name="edition-note">
+ <choose>
+ <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
+ <choose>
+ <if is-numeric="edition">
+ <group delimiter=" ">
+ <number variable="edition" form="ordinal"/>
+ <text term="edition" form="short"/>
+ </group>
+ </if>
+ <else>
+ <number variable="edition" suffix="."/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="edition">
+ <choose>
+ <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
+ <choose>
+ <if is-numeric="edition">
+ <group delimiter=" ">
+ <number variable="edition" form="ordinal"/>
+ <text term="edition" form="short"/>
+ </group>
+ </if>
+ <else>
+ <number variable="edition" text-case="capitalize-first" suffix="."/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-note-join-with-space">
+ <choose>
+ <if type="article-journal">
+ <text macro="locators-note"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-note-join-with-comma">
+ <choose>
+ <if type="article-journal" match="none">
+ <text macro="locators-note"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-note">
+ <choose>
+ <if type="article-journal">
+ <group delimiter=", ">
+ <number variable="volume"/>
+ <group delimiter=" ">
+ <text term="issue" form="short"/>
+ <number variable="issue"/>
+ </group>
+ </group>
+ </if>
+ <else-if type="legal_case">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <number variable="volume"/>
+ <text variable="container-title"/>
+ <text variable="page"/>
+ </group>
+ <text variable="locator"/>
+ </group>
+ </else-if>
+ <else-if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <text term="volume" form="short"/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ <choose>
+ <if variable="locator" match="none">
+ <group delimiter=" ">
+ <number variable="number-of-volumes" form="numeric"/>
+ <text term="volume" form="short" plural="true"/>
+ </group>
+ </if>
+ </choose>
+ <text macro="edition-note"/>
+ </group>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="locators-join-with-space">
+ <choose>
+ <if type="article-journal">
+ <text macro="locators"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-join-with-comma">
+ <choose>
+ <if type="legal_case">
+ <text macro="locators"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-join-with-period">
+ <choose>
+ <if type="legal_case article-journal" match="none">
+ <text macro="locators"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators">
+ <choose>
+ <if type="article-journal">
+ <group delimiter=", ">
+ <number variable="volume"/>
+ <group delimiter=" ">
+ <text term="issue" form="short"/>
+ <number variable="issue"/>
+ </group>
+ </group>
+ </if>
+ <else-if type="legal_case">
+ <group delimiter=" ">
+ <number variable="volume"/>
+ <text variable="container-title"/>
+ <text variable="page"/>
+ </group>
+ </else-if>
+ <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <group delimiter=". ">
+ <group delimiter=" ">
+ <text term="volume" form="short" text-case="capitalize-first"/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ <group delimiter=" ">
+ <number variable="number-of-volumes" form="numeric"/>
+ <text term="volume" form="short" plural="true"/>
+ </group>
+ <text macro="edition"/>
+ </group>
+ </else-if>
+ <else-if type="chapter paper-conference" match="any">
+ <group delimiter=". ">
+ <choose>
+ <if variable="page" match="none">
+ <group delimiter=" ">
+ <text term="volume" form="short" text-case="capitalize-first"/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ </if>
+ </choose>
+ <text macro="edition"/>
+ </group>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="locators-newspaper">
+ <choose>
+ <if type="article-newspaper">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <number variable="edition"/>
+ <text term="edition"/>
+ </group>
+ <group delimiter=" ">
+ <text term="section" form="short"/>
+ <text variable="section"/>
+ </group>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="event">
+ <group delimiter=" ">
+ <text term="presented at"/>
+ <text variable="event"/>
+ </group>
+ </macro>
+ <macro name="publisher">
+ <choose>
+ <if type="thesis">
+ <text variable="publisher"/>
+ </if>
+ <else>
+ <group delimiter=": ">
+ <text variable="publisher-place"/>
+ <text variable="publisher"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="issued">
+ <choose>
+ <if variable="issued">
+ <choose>
+ <if type="graphic report" match="any">
+ <date variable="issued">
+ <date-part name="month" suffix=" "/>
+ <date-part name="day" suffix=", "/>
+ <date-part name="year"/>
+ </date>
+ </if>
+ <else-if type="legal_case">
+ <group delimiter=" ">
+ <text variable="authority"/>
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </group>
+ </else-if>
+ <else-if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song thesis" match="any">
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </else-if>
+ <else>
+ <date variable="issued">
+ <date-part name="month" suffix=" "/>
+ <date-part name="day" suffix=", "/>
+ <date-part name="year"/>
+ </date>
+ </else>
+ </choose>
+ </if>
+ <else-if variable="accessed URL" match="all">
+ </else-if>
+ <else>
+ <text term="no date" form="short"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="point-locators-subsequent">
+ <choose>
+ <if variable="locator">
+ <choose>
+ <if locator="page" match="none">
+ <group delimiter=" ">
+ <choose>
+ <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <choose>
+ <if variable="volume">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <text term="volume" form="short" text-case="lowercase"/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ <label variable="locator" form="short"/>
+ </group>
+ </if>
+ <else>
+ <label variable="locator" form="short"/>
+ </else>
+ </choose>
+ </if>
+ <else>
+ <label variable="locator" form="short"/>
+ </else>
+ </choose>
+ <text variable="locator"/>
+ </group>
+ </if>
+ <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <group delimiter=":">
+ <number variable="volume" form="numeric"/>
+ <text variable="locator"/>
+ </group>
+ </else-if>
+ <else>
+ <text variable="locator"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="point-locators-join-with-colon">
+ <choose>
+ <if type="article-journal">
+ <choose>
+ <if variable="locator page" match="any">
+ <text macro="point-locators"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="point-locators-join-with-comma">
+ <choose>
+ <if type="article-journal" match="none">
+ <text macro="point-locators"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="point-locators">
+ <choose>
+ <if variable="locator" match="none">
+ <choose>
+ <if type="article-journal chapter paper-conference" match="any">
+ <text variable="page"/>
+ </if>
+ </choose>
+ </if>
+ <else-if type="article-journal">
+ <group delimiter=" ">
+ <choose>
+ <if locator="page" match="none">
+ <label variable="locator" form="short" suffix=" "/>
+ </if>
+ </choose>
+ <text variable="locator"/>
+ </group>
+ </else-if>
+ <else-if type="legal_case"/>
+ <else>
+ <group delimiter=" ">
+ <choose>
+ <if locator="page" match="none">
+ <label variable="locator" form="short"/>
+ </if>
+ </choose>
+ <text variable="locator"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="locators-chapter">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <choose>
+ <if variable="page">
+ <number variable="volume" suffix=":"/>
+ <text variable="page"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-journal">
+ <choose>
+ <if type="article-journal">
+ <text variable="page"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="archive-note">
+ <choose>
+ <if type="thesis">
+ <group delimiter=" ">
+ <text variable="archive"/>
+ <text variable="archive_location" prefix="(" suffix=")"/>
+ </group>
+ </if>
+ <else>
+ <group delimiter=", ">
+ <text variable="archive_location"/>
+ <text variable="archive"/>
+ <text variable="archive-place"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="archive">
+ <choose>
+ <if type="thesis">
+ <group delimiter=" ">
+ <text variable="archive"/>
+ <text variable="archive_location" prefix="(" suffix=")"/>
+ </group>
+ </if>
+ <else>
+ <group delimiter=". ">
+ <text variable="archive_location" text-case="capitalize-first"/>
+ <text variable="archive"/>
+ <text variable="archive-place"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="issue-note-join-with-space">
+ <choose>
+ <if type="article-journal legal_case" variable="publisher-place publisher" match="any">
+ <text macro="issue-note"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="issue-note-join-with-comma">
+ <choose>
+ <if type="article-journal legal_case" variable="publisher-place publisher" match="none">
+ <text macro="issue-note"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="issue-note">
+ <choose>
+ <if type="article-journal legal_case" match="any">
+ <text macro="issued" prefix="(" suffix=")"/>
+ </if>
+ <else-if variable="publisher-place publisher" match="any">
+ <group prefix="(" suffix=")" delimiter=", ">
+ <group delimiter=" ">
+ <choose>
+ <if variable="title" match="none"/>
+ <else-if type="thesis speech" match="any">
+ <text variable="genre"/>
+ </else-if>
+ </choose>
+ <text macro="event"/>
+ </group>
+ <text macro="publisher"/>
+ <text macro="issued"/>
+ </group>
+ </else-if>
+ <else>
+ <text macro="issued"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="issue-join-with-space">
+ <choose>
+ <if type="article-journal legal_case">
+ <text macro="issue"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="issue-join-with-period">
+ <choose>
+ <if type="article-journal legal_case" match="none">
+ <choose>
+ <if type="speech" variable="publisher publisher-place" match="any">
+ <text macro="issue"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="issue-join-with-comma">
+ <choose>
+ <if type="article-journal legal_case" match="none">
+ <choose>
+ <if type="speech" variable="publisher publisher-place" match="none">
+ <text macro="issue"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="issue">
+ <choose>
+ <if type="article-journal legal_case" match="any">
+ <text macro="issued" prefix=" (" suffix=")"/>
+ </if>
+ <else-if type="speech">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <choose>
+ <if variable="title" match="none"/>
+ <else>
+ <text variable="genre" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ <text macro="event"/>
+ </group>
+ <text variable="event-place"/>
+ <text macro="issued"/>
+ </group>
+ </else-if>
+ <else-if variable="publisher-place publisher" match="any">
+ <group delimiter=", ">
+ <choose>
+ <if type="thesis">
+ <text variable="genre" text-case="capitalize-first"/>
+ </if>
+ </choose>
+ <text macro="publisher"/>
+ <text macro="issued"/>
+ </group>
+ </else-if>
+ <else>
+ <text macro="issued"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="access-note">
+ <group delimiter=", ">
+ <choose>
+ <if type="graphic report" match="any">
+ <text macro="archive-note"/>
+ </if>
+ <else-if type="article-journal article-magazine article-newspaper bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="none">
+ <text macro="archive-note"/>
+ </else-if>
+ </choose>
+ <choose>
+ <if variable="issued" match="none">
+ <group delimiter=" ">
+ <text term="accessed"/>
+ <date variable="accessed">
+ <date-part name="month" suffix=" "/>
+ <date-part name="day" suffix=", "/>
+ <date-part name="year"/>
+ </date>
+ </group>
+ </if>
+ </choose>
+ <choose>
+ <if type="legal_case" match="none">
+ <choose>
+ <if variable="DOI">
+ <text variable="DOI" prefix="doi:"/>
+ </if>
+ <else>
+ <text variable="URL"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="access">
+ <group delimiter=". ">
+ <choose>
+ <if type="graphic report" match="any">
+ <text macro="archive"/>
+ </if>
+ <else-if type="article-journal article-magazine article-newspaper bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="none">
+ <text macro="archive"/>
+ </else-if>
+ </choose>
+ <choose>
+ <if variable="issued" match="none">
+ <group delimiter=" ">
+ <text term="accessed" text-case="capitalize-first"/>
+ <date variable="accessed">
+ <date-part name="month" suffix=" "/>
+ <date-part name="day" suffix=", "/>
+ <date-part name="year"/>
+ </date>
+ </group>
+ </if>
+ </choose>
+ <choose>
+ <if type="legal_case" match="none">
+ <choose>
+ <if variable="DOI">
+ <text variable="DOI" prefix="doi:"/>
+ </if>
+ <else>
+ <text variable="URL"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="case-locator-subsequent">
+ <choose>
+ <if type="legal_case">
+ <text macro="locators-note"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="case-issue-subsequent">
+ <choose>
+ <if type="legal_case">
+ <text macro="issue"/>
+ </if>
+ </choose>
+ </macro>
+ <citation et-al-min="4" et-al-use-first="1" disambiguate-add-names="true">
+ <layout suffix="." delimiter="; ">
+ <choose>
+ <if position="ibid-with-locator">
+ <group delimiter=", ">
+ <text term="ibid"/>
+ <text macro="point-locators-subsequent"/>
+ </group>
+ </if>
+ <else-if position="ibid">
+ <text term="ibid"/>
+ </else-if>
+ <else>
+ <group delimiter=", ">
+ <text macro="contributors-short"/>
+ <group delimiter=" ">
+ <group delimiter=", ">
+ <text macro="title-short"/>
+ <text macro="case-locator-subsequent"/>
+ </group>
+ <text macro="case-issue-subsequent"/>
+ </group>
+ <text macro="point-locators-subsequent"/>
+ </group>
+ </else>
+ </choose>
+ </layout>
+ </citation>
+ <bibliography hanging-indent="true" et-al-min="11" et-al-use-first="7" subsequent-author-substitute="&#8212;&#8212;&#8212;" entry-spacing="0">
+ <sort>
+ <key macro="contributors-sort"/>
+ <key variable="title"/>
+ <key variable="genre"/>
+ <key variable="issued"/>
+ </sort>
+ <layout suffix=".">
+ <group delimiter=". ">
+ <group delimiter=": ">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <group delimiter=". ">
+ <group delimiter=" ">
+ <group delimiter=", ">
+ <group delimiter=". ">
+ <group delimiter=" ">
+ <group delimiter=". ">
+ <text macro="contributors"/>
+ <text macro="title"/>
+ </group>
+ <text macro="description"/>
+ </group>
+ <text macro="secondary-contributors"/>
+ <group delimiter=", ">
+ <text macro="container-title"/>
+ <text macro="container-contributors"/>
+ <text macro="locators-chapter"/>
+ </group>
+ <text macro="locators-join-with-period"/>
+ </group>
+ <text macro="locators-join-with-comma"/>
+ </group>
+ <text macro="locators-join-with-space"/>
+ </group>
+ <text macro="collection-title"/>
+ <text macro="issue-join-with-period"/>
+ </group>
+ <text macro="issue-join-with-space"/>
+ </group>
+ <text macro="issue-join-with-comma"/>
+ <text macro="locators-newspaper"/>
+ </group>
+ <text macro="locators-journal"/>
+ </group>
+ <text macro="access"/>
+ </group>
+ </layout>
+ </bibliography>
+</style>
diff --git a/test/command/chinese-gb7714-2005-numeric.csl b/test/command/chinese-gb7714-2005-numeric.csl
new file mode 100644
index 000000000..de295ea60
--- /dev/null
+++ b/test/command/chinese-gb7714-2005-numeric.csl
@@ -0,0 +1,213 @@
+<?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="zh-CN">
+ <info>
+ <title>Chinese Std GB/T 7714-2005 (numeric, Chinese)</title>
+ <id>http://www.zotero.org/styles/chinese-gb7714-2005-numeric</id>
+ <link href="http://www.zotero.org/styles/chinese-gb7714-2005-numeric" rel="self"/>
+ <link href="http://gradschool.ustc.edu.cn/ylb/material/xw/wdxz/19.pdf" rel="documentation"/>
+ <author>
+ <name>heromyth</name>
+ <email>zxpmyth@yahoo.com.cn</email>
+ </author>
+ <category citation-format="numeric"/>
+ <category field="engineering"/>
+ <category field="generic-base"/>
+ <category field="science"/>
+ <summary>This style just partly implemented what the Chinese GB/T 7714-2005 requires.</summary>
+ <updated>2012-10-11T09:38:41+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>
+ <macro name="author">
+ <names variable="author">
+ <name initialize-with=" " name-as-sort-order="all" sort-separator=" " delimiter=", " delimiter-precedes-last="always">
+ <name-part name="family" text-case="uppercase"/>
+ </name>
+ </names>
+ </macro>
+ <macro name="recipient">
+ <names variable="recipient">
+ <name name-as-sort-order="all" sort-separator=" " delimiter=", " delimiter-precedes-last="always"/>
+ <label form="short" prefix=", " text-case="lowercase"/>
+ </names>
+ </macro>
+ <macro name="interviewer">
+ <names variable="interviewer">
+ <name name-as-sort-order="all" sort-separator=" " delimiter=", " delimiter-precedes-last="always"/>
+ <label form="short" prefix=", " text-case="lowercase"/>
+ </names>
+ </macro>
+ <macro name="composer">
+ <names variable="composer">
+ <name name-as-sort-order="all" sort-separator=" " delimiter=", " delimiter-precedes-last="always"/>
+ <label form="short" prefix=", " text-case="lowercase"/>
+ </names>
+ </macro>
+ <macro name="original-author">
+ <names variable="original-author">
+ <name name-as-sort-order="all" sort-separator=" " delimiter=", " delimiter-precedes-last="always"/>
+ <label form="short" prefix=", " text-case="lowercase"/>
+ </names>
+ </macro>
+ <macro name="title">
+ <text variable="title"/>
+ </macro>
+ <macro name="titleField">
+ <choose>
+ <if type="report">
+ <text macro="title" suffix="[R]. "/>
+ </if>
+ <else-if type="thesis">
+ <text macro="title" suffix="[D]. "/>
+ </else-if>
+ <else-if type="bill legislation" match="any">
+ <text variable="number" suffix=", "/>
+ <text macro="title" suffix="[S]"/>
+ </else-if>
+ <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <text macro="title" suffix="[M]. "/>
+ </else-if>
+ <else-if type="paper-conference">
+ <text macro="title" suffix="[C]//"/>
+ </else-if>
+ <else-if type="chapter paper-conference" match="any">
+ <text macro="title" suffix="[G]//"/>
+ </else-if>
+ <else-if type="webpage">
+ <text macro="title" suffix="[EB/OL]. "/>
+ </else-if>
+ <else-if type="patent">
+ <text macro="title"/>
+ <text variable="number" prefix=": 中国, " suffix="[P]. "/>
+ </else-if>
+ <else>
+ <text macro="title" suffix="[J]. "/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="secondaryAuthor">
+ <names variable="editor">
+ <name initialize-with=" " name-as-sort-order="all" sort-separator=" " delimiter=", " delimiter-precedes-last="always">
+ <name-part name="family" text-case="uppercase"/>
+ </name>
+ </names>
+ <names variable="translator">
+ <name name-as-sort-order="all" sort-separator=" " delimiter=", " delimiter-precedes-last="always" suffix=", 译"/>
+ </names>
+ </macro>
+ <macro name="publisher">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <text variable="container-title" suffix=". "/>
+ </if>
+ <else-if type="report">
+ <text variable="collection-title" suffix=", "/>
+ <text variable="number" suffix=", "/>
+ </else-if>
+ <else-if type="bill legislation" match="any">
+ <text variable="container-title" prefix=". "/>
+ </else-if>
+ <else>
+ <text variable="container-title" suffix=", "/>
+ </else>
+ </choose>
+ <!--
+
+<text variable="event" suffix="event "/>
+<text variable="event-place" suffix="event-place "/>
+<text variable="original-title" suffix="original-title"/>
+
+ -->
+ <text variable="publisher-place" suffix=": "/>
+ <group delimiter=", ">
+ <text variable="publisher"/>
+ <choose>
+ <if type="webpage" variable="container-title" match="all">
+ <date variable="issued" suffix=". ">
+ <date-part name="year"/>
+ <date-part name="month" form="numeric-leading-zeros" prefix="-"/>
+ <date-part name="day" form="numeric-leading-zeros" prefix="-"/>
+ </date>
+ </if>
+ <else-if type="webpage"/>
+ <else-if type="patent">
+ <date variable="issued">
+ <date-part name="year"/>
+ <date-part name="month" form="numeric-leading-zeros" prefix="-"/>
+ <date-part name="day" form="numeric-leading-zeros" prefix="-"/>
+ </date>
+ </else-if>
+ <else-if variable="publisher">
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </else-if>
+ <else-if type="bill legislation" match="any"/>
+ <else>
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </else>
+ </choose>
+ </group>
+ <text variable="volume" prefix=", "/>
+ <text variable="issue" prefix="(" suffix=")"/>
+ </macro>
+ <macro name="pageField">
+ <text variable="page"/>
+ </macro>
+ <macro name="referenceDate">
+ <choose>
+ <if type="webpage">
+ <date variable="issued" prefix="(" suffix=")">
+ <date-part name="year"/>
+ <date-part name="month" form="numeric-leading-zeros" prefix="-"/>
+ <date-part name="day" form="numeric-leading-zeros" prefix="-"/>
+ </date>
+ <date variable="accessed" prefix="[" suffix="]">
+ <date-part name="year"/>
+ <date-part name="month" form="numeric-leading-zeros" prefix="-"/>
+ <date-part name="day" form="numeric-leading-zeros" prefix="-"/>
+ </date>
+ </if>
+ </choose>
+ </macro>
+ <macro name="access">
+ <choose>
+ <if variable="DOI">
+ <text variable="DOI" prefix="doi:"/>
+ </if>
+ <else-if variable="URL">
+ <text variable="URL"/>
+ </else-if>
+ </choose>
+ </macro>
+ <citation collapse="citation-number">
+ <sort>
+ <key variable="citation-number" sort="ascending"/>
+ </sort>
+ <layout vertical-align="sup" prefix="[" suffix="]" delimiter=",">
+ <text variable="citation-number"/>
+ </layout>
+ </citation>
+ <bibliography et-al-min="4" et-al-use-first="3" second-field-align="flush" entry-spacing="0">
+ <layout suffix=".">
+ <text variable="citation-number" prefix="[" suffix="]"/>
+ <text macro="author" suffix=". "/>
+ <text macro="titleField"/>
+ <text macro="secondaryAuthor" suffix=". "/>
+ <text variable="edition" prefix="第" suffix="版. "/>
+ <text macro="publisher"/>
+ <text macro="pageField" prefix=": "/>
+ <text macro="referenceDate"/>
+ <choose>
+ <if type="webpage" match="any">
+ <text macro="access" prefix=". "/>
+ </if>
+ </choose>
+ <text macro="recipient"/>
+ <text macro="interviewer"/>
+ <text macro="composer"/>
+ <text macro="original-author"/>
+ </layout>
+ </bibliography>
+</style>
diff --git a/test/command/citeproc-7a.md b/test/command/citeproc-7a.md
new file mode 100644
index 000000000..fc4e799cf
--- /dev/null
+++ b/test/command/citeproc-7a.md
@@ -0,0 +1,42 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: command/chicago-fullnote-bibliography.csl
+references:
+ - id: test
+ title: Test
+ author:
+ family: Doe
+ given: John
+---
+
+Test [@test, 12].
+
+Test [@test, 12].
+
+Test.^[asdfasdf]
+
+Test [@test, 12].
+^D
+Test.[^1]
+
+Test.[^2]
+
+Test.[^3]
+
+Test.[^4]
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-test .csl-entry}
+Doe, John. "Test," n.d.
+:::
+:::
+
+[^1]: John Doe, "Test," n.d., 12.
+
+[^2]: Ibid.
+
+[^3]: asdfasdf
+
+[^4]: Doe, "Test," 12.
+```
diff --git a/test/command/citeproc-7b.md b/test/command/citeproc-7b.md
new file mode 100644
index 000000000..a8768f562
--- /dev/null
+++ b/test/command/citeproc-7b.md
@@ -0,0 +1,36 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: command/bioethics.csl
+references:
+ - id: test
+ title: Test
+ author:
+ family: Doe
+ given: John
+---
+
+Irrelevant.^[note]
+
+Test [@test, 12].
+
+Test.^[asdfasdf]
+
+Test [@test, 12].
+^D
+Irrelevant.[^1]
+
+Test.[^2]
+
+Test.[^3]
+
+Test.[^4]
+
+[^1]: note
+
+[^2]: J. Doe. ***Test***: 12.
+
+[^3]: asdfasdf
+
+[^4]: Doe (cited n. 2) : 12.
+```
diff --git a/test/command/din-1505-2.csl b/test/command/din-1505-2.csl
new file mode 100644
index 000000000..8d175738f
--- /dev/null
+++ b/test/command/din-1505-2.csl
@@ -0,0 +1,406 @@
+<?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="de-DE">
+ <info>
+ <title>DIN 1505-2 (author-date, German)</title>
+ <id>http://www.zotero.org/styles/din-1505-2</id>
+ <link href="http://www.zotero.org/styles/din-1505-2" rel="self"/>
+ <link href="http://www.bui.haw-hamburg.de/fileadmin/redaktion/diplom/Lorenzen__litverz.pdf" rel="documentation"/>
+ <link href="http://bibliothek.fh-potsdam.de/fileadmin/fhp_bib/dokumente/Schulungen/wissenschaftliches_Arbeiten/Zitieren_Lorenzen.pdf" rel="documentation"/>
+ <link href="http://www.uni-muenster.de/imperia/md/content/fachbereich_physik/didaktik_physik/materialien/materialschlichting/zitierregeln.pdf" rel="documentation"/>
+ <link href="http://forums.zotero.org/discussion/1857" rel="documentation"/>
+ <author>
+ <name>Sven Rothe</name>
+ <email>mmoole@googlemail.com</email>
+ </author>
+ <contributor>
+ <name>Julian Onions</name>
+ <email>julian.onions@gmail.com</email>
+ </contributor>
+ <category citation-format="author-date"/>
+ <category field="generic-base"/>
+ <summary>Style following DIN 1505-2, for other media types on additional standards
+ Hinweise zur Benutzung:
+ * Zitieren von Gesetzen:
+ - hier müssen manuell §, Abs und S. zur Seitenangabe beim Zitieren eingetragen werden
+ - im Kurzbeleg wird der Kurztitel verwendet, dafür keine Autoren eintragen!
+ - als Jahresangabe wird 'Datum des Inkrafttretens' herangezogen, Verwenden nur bei Verweis auf nicht z.Z. gültige Gesetze, z.B. (idF. v. 12.12.1972)
+ * Zitieren von Normen und Standards - nicht vollständig nach DIN 1505
+ - Nutzen Sie den Typ 'Bericht' - als Abhilfe, da es keinen Typ 'Standard' gibt.
+ - als Autor die Kurzbezeichnung inkl. Nummer und Jahr eingeben (z.B. VDI 2222-1997), Vorname leer, Jahr leer
+ - als Titel den ausführlichen Titel bei Bedarf (z.B. VDI Richtlinie 2222 Blatt 1 - Konstruktionsmethodik - Methodisches Entwickeln von Lösungsprinzipien)</summary>
+ <!-- This is just a beginning to try to have a DIN 1505 citation style,
+ Feel free to send me any comments, suggestions etc...
+ todo:
+ * basic media types (book, journal article, etc..)
+ * more media types (according DINxxx) audio video etc...
+ * fine tuning
+ * correcting errors
+ known bugs, help appreciated
+ * Abbreviations (Mitarb.) & (Hrsg. der Reihe) are missing (contributor, seriesEditor labels)
+ * "contributor" is not valid as a name variable , nevertheless it works but doesnt validate!
+ * author etc. first names should not be abbreviated
+ * reviewed author seems to be not available as variable (newspaper article)
+ * thesis type does notoffer a PLACE or FACULTY as variable!
+ how to show the place if it is not included in the University title!?!?
+ * thesis type: publisher (university), genre (type) dont seem to get through!?
+ -->
+ <!-- useful things:
+ non breaking space: &#160;
+ narrow no break space: uni202F / &#8239; - but this is not supported widely!
+ em dash: &#8212;
+ space: &#032;
+ tab: &#009;
+
+ -->
+ <updated>2012-09-27T22:06:38+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="de">
+ <terms>
+ <term name="anonymous" form="short">o.&#160;A.</term>
+ <term name="no date" form="short">o.&#160;J.</term>
+ <term name="collection-editor" form="short">Hrsg.</term>
+ <term name="retrieved">abgerufen am</term>
+ <term name="composer" form="short">Komp.</term>
+ <term name="composer" form="long">Komponist</term>
+ </terms>
+ </locale>
+ <macro name="author">
+ <names variable="author" delimiter=" ; ">
+ <name name-as-sort-order="all" sort-separator=", " delimiter=" ; " delimiter-precedes-last="always" font-variant="small-caps"/>
+ <label form="short" prefix=" (" suffix=")"/>
+ </names>
+ </macro>
+ <macro name="author-container">
+ <names variable="container-author" delimiter=" ; ">
+ <name name-as-sort-order="all" sort-separator=", " initialize-with=". " delimiter=" ; " delimiter-precedes-last="always" font-variant="small-caps"/>
+ <label form="short" prefix=" (" suffix=")"/>
+ </names>
+ </macro>
+ <macro name="editor">
+ <names variable="editor" delimiter=" ; ">
+ <name name-as-sort-order="all" sort-separator=", " initialize-with=". " delimiter=" ; " delimiter-precedes-last="always" font-variant="small-caps"/>
+ <label form="short" prefix=" (" suffix=")"/>
+ <!-- needed: Label should appear as suffix to EVERY name...!-->
+ </names>
+ </macro>
+ <macro name="editor-collection">
+ <names variable="collection-editor" delimiter=" ; ">
+ <name name-as-sort-order="all" sort-separator=", " initialize-with=". " delimiter=" ; " delimiter-precedes-last="always" font-variant="small-caps"/>
+ <label form="short" prefix=" (" suffix=")"/>
+ <!-- needed: Label should appear as suffix to EVERY name...!-->
+ </names>
+ </macro>
+ <macro name="composer">
+ <names variable="composer" delimiter=" ; ">
+ <name name-as-sort-order="all" sort-separator=", " delimiter=" ; " delimiter-precedes-last="always" font-variant="small-caps"/>
+ <label form="long" prefix=" (" suffix=")"/>
+ <!-- needed: Label should appear as suffix to EVERY name...!-->
+ </names>
+ </macro>
+ <!-- <macro name="contributor">
+ <names variable=" " delimiter=" ; ">
+ <name name-as-sort-order="all" sort-separator=", " initialize-with=". " delimiter=" ; "
+ delimiter-precedes-last="always" font-variant="small-caps"/>
+ <label form="short" prefix=" (" suffix=")"/>
+ </names>
+ </macro>-->
+ <macro name="translator">
+ <names variable="translator" delimiter=" ; ">
+ <name name-as-sort-order="all" sort-separator=", " initialize-with=". " delimiter=" ; " delimiter-precedes-last="always" font-variant="small-caps"/>
+ <label form="short" prefix=" (" suffix=")"/>
+ <!-- needed: Label should appear as suffix to EVERY name...!-->
+ </names>
+ </macro>
+ <macro name="recipient">
+ <names variable="recipient" delimiter=" ; ">
+ <name name-as-sort-order="all" sort-separator=", " initialize-with=". " delimiter=" ; " delimiter-precedes-last="always" font-variant="small-caps"/>
+ <!--<label form="long" prefix=" (" suffix=")"/>-->
+ <!-- needed: Label should appear as suffix to EVERY name...!-->
+ </names>
+ </macro>
+ <macro name="author-short">
+ <names variable="author">
+ <name form="short" and="symbol" delimiter=", " initialize-with=". " delimiter-precedes-last="never" font-variant="small-caps"/>
+ <et-al font-variant="normal"/>
+ <substitute>
+ <names variable="editor" font-variant="small-caps"/>
+ <names variable="translator" font-variant="small-caps"/>
+ <choose>
+ <if type="bill book graphic legal_case motion_picture report song" match="any">
+ <text variable="title" form="short" font-style="italic"/>
+ </if>
+ <else-if type="bill legal_case legislation" match="any">
+ <text variable="title" form="short" font-style="normal"/>
+ </else-if>
+ <else>
+ <text variable="title" form="short" quotes="true"/>
+ </else>
+ </choose>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="access">
+ <group>
+ <text term="retrieved" suffix=" "/>
+ <date variable="accessed">
+ <date-part name="year" form="long" suffix="-"/>
+ <date-part name="month" form="numeric-leading-zeros" suffix="-"/>
+ <date-part name="day" form="numeric-leading-zeros"/>
+ </date>
+ <!--<date variable="accessed" form="numeric" date-parts="year-month-day"/> // dd.mm.yyy -->
+ </group>
+ </macro>
+ <macro name="title">
+ <choose>
+ <if type="bill legislation" match="any">
+ <group delimiter=" &#8212; ">
+ <text variable="title-short" font-style="normal"/>
+ <text variable="title"/>
+ </group>
+ </if>
+ <else-if type="book graphic legal_case motion_picture report song" match="any">
+ <text variable="title" font-style="italic"/>
+ </else-if>
+ <else>
+ <text variable="title"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="genre">
+ <choose>
+ <if type="report thesis manuscript map" match="any">
+ <group>
+ <text variable="genre"/>
+ <!--<text term="number" form="short" suffix=" "/>-->
+ <text variable="number" prefix=" Nr. "/>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="volumes">
+ <group delimiter=" ">
+ <text term="volume" form="short" plural="false"/>
+ <number variable="volume" form="numeric"/>
+ <number variable="number-of-volumes" form="numeric" prefix="v. "/>
+ </group>
+ </macro>
+ <macro name="edition">
+ <group>
+ <number variable="edition" form="numeric" suffix=". "/>
+ <text term="edition" form="short" plural="false"/>
+ </group>
+ </macro>
+ <macro name="pages">
+ <choose>
+ <if type="chapter paper-conference article-journal" match="any">
+ <label variable="page" form="short" suffix="&#160;"/>
+ <text variable="page"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="dimensions">
+ <group>
+ <text variable="dimensions"/>
+ </group>
+ </macro>
+ <macro name="medium">
+ <group>
+ <text variable="medium"/>
+ </group>
+ </macro>
+ <macro name="scale">
+ <group>
+ <text term="scale"/>
+ <text prefix=" " variable="scale"/>
+ </group>
+ </macro>
+ <macro name="recipient-show">
+ <choose>
+ <if type="personal_communication">
+ <choose>
+ <if variable="genre">
+ <text variable="genre" text-case="capitalize-first"/>
+ </if>
+ <else>
+ <text term="letter" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ <text macro="recipient" prefix=", "/>
+ </macro>
+ <macro name="cite-year">
+ <group>
+ <choose>
+ <if type="bill legislation" match="any">
+ <date variable="issued" prefix=" (" suffix=")">
+ <date-part name="year" prefix="idF. v. "/>
+ </date>
+ </if>
+ <else>
+ <date variable="issued" prefix=", ">
+ <date-part name="year"/>
+ </date>
+ <text variable="year-suffix"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <macro name="bibliography-year">
+ <date variable="issued" form="numeric" date-parts="year"/>
+ <text variable="year-suffix"/>
+ </macro>
+ <macro name="locator">
+ <group>
+ <choose>
+ <if type="bill legislation" match="any">
+ <text variable="locator" prefix=" "/>
+ </if>
+ <else>
+ <label variable="locator" form="short" prefix=", "/>
+ <text variable="locator" prefix=" "/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="false" disambiguate-add-givenname="false" collapse="year">
+ <sort>
+ <key macro="author"/>
+ <key variable="issued"/>
+ </sort>
+ <layout prefix="(" suffix=")" delimiter="; ">
+ <group>
+ <text macro="author-short"/>
+ <text macro="cite-year"/>
+ <text macro="locator"/>
+ </group>
+ </layout>
+ </citation>
+ <bibliography hanging-indent="true" et-al-min="9" et-al-use-first="8">
+ <sort>
+ <key macro="author"/>
+ <key variable="issued"/>
+ <key variable="title"/>
+ </sort>
+ <layout>
+ <group delimiter=" ; " suffix=":">
+ <text macro="author"/>
+ <choose>
+ <if type="bill book graphic legal_case legislation manuscript map motion_picture report song thesis webpage" match="any">
+ <!-- except type="chapter article " etc.... -->
+ <text macro="editor"/>
+ <text macro="editor-collection"/>
+ <text macro="composer"/>
+ </if>
+ </choose>
+ <!-- <text macro="contributor"/> -->
+ <text macro="translator"/>
+ </group>
+ <choose>
+ <!-- Tabelle 1 aus litverz.ps -->
+ <if type="bill book broadcast graphic legal_case legislation manuscript map motion_picture report song" match="any">
+ <text prefix=" " macro="title"/>
+ <text prefix=", " variable="collection-title" font-style="italic"/>
+ <!--Reihe-->
+ <text prefix=" (" macro="genre" suffix=")"/>
+ <text prefix=". " macro="volumes"/>
+ <text prefix=". " macro="edition"/>
+ <text prefix=". " macro="medium"/>
+ <text prefix=". " macro="dimensions"/>
+ <text prefix=". " variable="publisher-place"/>
+ <text prefix="&#160;: " variable="publisher"/>
+ <text macro="bibliography-year" prefix=", "/>
+ <!-- " (1. Gesamttitel mit Zählung)"
+ " (2. Gesamttitel mit Zählung)" -->
+ <text prefix=" &#8211;&#160;" macro="scale"/>
+ <text prefix=". &#8212;&#160;" variable="note"/>
+ <text prefix=" &#8212;&#160;ISBN&#160;" variable="ISBN"/>
+ </if>
+ <!-- Tabelle 3 aus litverz.ps -->
+ <else-if type="chapter paper-conference" match="any">
+ <text prefix=" " macro="title" suffix="."/>
+ <text prefix=". " term="in" text-case="capitalize-all" suffix=": "/>
+ <!-- verfahre nach Tabelle 1... -->
+ <group delimiter=" ; " suffix=": ">
+ <text macro="author-container"/>
+ <text macro="editor"/>
+ <text macro="editor-collection"/>
+ </group>
+ <text variable="container-title" font-style="italic"/>
+ <text prefix=", " variable="collection-title" font-style="italic"/>
+ <!-- Reihe -->
+ <text prefix=". " macro="volumes"/>
+ <!-- <text prefix=" : " variable="title of volumes"/> what is this? -->
+ <text prefix=". " macro="edition"/>
+ <text prefix=". " variable="publisher-place"/>
+ <text prefix="&#160;: " variable="publisher"/>
+ <text macro="bibliography-year" prefix=", "/>
+ <!-- " (1. Gesamttitel mit Zählung)"
+ " (2. Gesamttitel mit Zählung)" -->
+ <text prefix=". &#8212;&#160;" variable="note"/>
+ <text prefix=" &#8212;&#160;ISBN&#160;" variable="ISBN"/>
+ <text prefix=", " macro="pages"/>
+ </else-if>
+ <!-- Tabelle 5 aus litverz.ps - Hochschulschriften
+ (Diplomarbeiten, Dissertationen, Master-A., unverö. Studienarbeiten -->
+ <else-if type="thesis" match="any">
+ <text prefix=" " macro="title" font-style="italic"/>
+ <text prefix=". " macro="edition"/>
+ <text prefix=". " variable="publisher-place"/>
+ <text prefix=", " variable="publisher" form="long"/>
+ <!-- <text prefix=", " variable="faculty"/> -->
+ <text prefix=", " macro="genre"/>
+ <text macro="bibliography-year" prefix=", "/>
+ <text prefix=". &#8212;&#160;" variable="note"/>
+ </else-if>
+ <else-if type="webpage post post-weblog" match="any">
+ <text prefix=" " macro="title" suffix=". " font-style="italic"/>
+ <text prefix="URL " variable="URL"/>
+ <text prefix=". - " macro="access"/>
+ <text prefix=". &#8212;&#160;" variable="container-title"/>
+ <text prefix=". &#8212;&#160;" variable="note"/>
+ </else-if>
+ <!-- Tabelle 2 aus litverz.ps UND -->
+ <!-- Tabelle 4 aus litverz.ps - Schriften von Tagungen, Konferenzen, Symposien, ...-->
+ <else-if type="article article-journal article-magazine article-newspaper" match="any">
+ <text prefix=" " variable="title"/>
+ <!-- " : Zusatz zum Sachtitel"
+ ". Angabe des Teils"
+ " (Gesamttitelangabe)" -->
+ <group>
+ <text prefix=". " term="in" text-case="capitalize-first" suffix=": "/>
+ <text macro="editor" suffix=" "/>
+ <text variable="container-title" font-style="italic"/>
+ <text prefix=", " variable="collection-title" font-style="italic" suffix="."/>
+ <!--", unterreihe der zeitschrift/zeitung" -->
+ </group>
+ <text prefix=" " macro="volumes"/>
+ <text prefix=". " variable="publisher-place"/>
+ <text prefix=", " variable="publisher" form="long"/>
+ <text macro="bibliography-year" prefix=" (" suffix=")"/>
+ <text prefix=", Nr.&#160;" variable="issue"/>
+ <text prefix=", " macro="pages"/>
+ <text prefix=". &#8212;&#160;" variable="note"/>
+ <text prefix=" &#8212;&#160;ISBN&#160;" variable="ISBN"/>
+ </else-if>
+ <!-- keiner der oben genannten fälle -->
+ <else>
+ <group suffix=".">
+ <text prefix=" " macro="title"/>
+ <text prefix=", " macro="editor"/>
+ <text prefix=". " macro="recipient-show"/>
+ </group>
+ <group prefix=" " suffix=".">
+ <text variable="container-title" font-style="italic"/>
+ <group prefix=", ">
+ <text variable="volume" font-style="italic"/>
+ <text variable="issue" prefix="(" suffix=")"/>
+ </group>
+ <text prefix=", " macro="pages"/>
+ </group>
+ </else>
+ </choose>
+ </layout>
+ </bibliography>
+</style>
diff --git a/test/command/harvard-university-of-kent.csl b/test/command/harvard-university-of-kent.csl
new file mode 100644
index 000000000..0243de136
--- /dev/null
+++ b/test/command/harvard-university-of-kent.csl
@@ -0,0 +1,253 @@
+<?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>University of Kent - Harvard</title>
+ <id>http://www.zotero.org/styles/harvard-university-of-kent</id>
+ <link href="http://www.zotero.org/styles/harvard-university-of-kent" rel="self"/>
+ <link href="http://www.zotero.org/styles/harvard-cardiff-university-biosi" rel="template"/>
+ <link href="http://www.kent.ac.uk/ai/Harvard-Style-Guide-July-2014.pdf" rel="documentation"/>
+ <author>
+ <name>Sebastian Karcher</name>
+ </author>
+ <category citation-format="author-date"/>
+ <category field="generic-base"/>
+ <summary>The Harvard author-date style - adapted for the University of Kent</summary>
+ <updated>2012-09-27T22:06:38+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>
+ <macro name="editor">
+ <names variable="editor" delimiter=", ">
+ <name name-as-sort-order="all" and="text" sort-separator=", " initialize-with=". " delimiter=", " delimiter-precedes-last="never"/>
+ <label form="short" prefix=" "/>
+ </names>
+ </macro>
+ <macro name="author">
+ <names variable="author">
+ <name name-as-sort-order="all" and="text" sort-separator=", " initialize-with="." delimiter-precedes-last="never" delimiter=", "/>
+ <label form="short" prefix=" "/>
+ <et-al font-style="italic"/>
+ <substitute>
+ <names variable="editor"/>
+ <text macro="title-substitute"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="author-short">
+ <names variable="author">
+ <name form="short" and="text" delimiter=", " delimiter-precedes-last="never" initialize-with=". "/>
+ <et-al font-style="italic"/>
+ <substitute>
+ <names variable="editor"/>
+ <text macro="title-substitute"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="access">
+ <choose>
+ <if variable="URL">
+ <group delimiter=" ">
+ <group delimiter=": ">
+ <text term="available at" text-case="capitalize-first"/>
+ <text variable="URL"/>
+ </group>
+ <group prefix="[" suffix="]" delimiter=": ">
+ <text term="accessed" text-case="capitalize-first"/>
+ <date variable="accessed">
+ <date-part name="day" suffix=" "/>
+ <date-part name="month" suffix=" "/>
+ <date-part name="year"/>
+ </date>
+ </group>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="title">
+ <choose>
+ <if type="bill book graphic legal_case legislation motion_picture report song thesis webpage" match="any">
+ <text variable="title" font-style="italic" text-case="title"/>
+ </if>
+ <else>
+ <text variable="title"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="title-substitute">
+ <choose>
+ <if type="bill book graphic legal_case legislation motion_picture report song thesis webpage" match="any">
+ <text variable="title" font-style="italic" text-case="title"/>
+ </if>
+ <else-if type="broadcast">
+ <choose>
+ <if variable="container-title">
+ <text variable="title"/>
+ </if>
+ <else>
+ <text variable="title" font-style="italic"/>
+ </else>
+ </choose>
+ </else-if>
+ <else>
+ <text variable="title"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="publisher">
+ <choose>
+ <if type="thesis">
+ <text variable="publisher"/>
+ </if>
+ <else-if type="graphic">
+ <text variable="archive"/>
+ </else-if>
+ <else>
+ <group delimiter=": ">
+ <text variable="publisher-place"/>
+ <text variable="publisher"/>
+ </group>
+ </else>
+ </choose>
+ </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>
+ <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>
+ <macro name="online">
+ <choose>
+ <if variable="medium">
+ <text variable="medium" prefix="[" suffix="]"/>
+ </if>
+ <else-if variable="URL">
+ <text term="online" text-case="capitalize-first" prefix="[" suffix="]"/>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="broadcast-info">
+ <choose>
+ <if type="broadcast">
+ <group delimiter=". ">
+ <text variable="container-title" font-style="italic"/>
+ <text variable="number"/>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="pages">
+ <group>
+ <label variable="page" form="short" suffix=" "/>
+ <text variable="page"/>
+ </group>
+ </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=", ">
+ <group delimiter=" ">
+ <text macro="author-short"/>
+ <text macro="year-date"/>
+ </group>
+ <group>
+ <label variable="locator" form="short"/>
+ <text variable="locator"/>
+ </group>
+ </group>
+ </layout>
+ </citation>
+ <bibliography et-al-min="4" et-al-use-first="1" hanging-indent="true">
+ <sort>
+ <key macro="author"/>
+ <key variable="title"/>
+ </sort>
+ <layout suffix=".">
+ <text macro="author"/>
+ <date variable="issued" prefix=" (" suffix=").">
+ <date-part name="year"/>
+ </date>
+ <choose>
+ <if type="book broadcast graphic legal_case motion_picture report song" match="any">
+ <group prefix=" " delimiter=". " suffix=".">
+ <text macro="title"/>
+ <text macro="broadcast-info"/>
+ <text macro="online"/>
+ <group delimiter=" ">
+ <text term="volume" form="short" text-case="capitalize-first"/>
+ <text variable="volume"/>
+ </group>
+ <text macro="edition"/>
+ <text macro="editor"/>
+ <text variable="collection-title"/>
+ <text variable="collection-number" prefix="Number "/>
+ <text macro="publisher"/>
+ <text variable="dimensions"/>
+ </group>
+ </if>
+ <else-if type="chapter paper-conference" match="any">
+ <text macro="title" prefix=" " suffix="."/>
+ <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"/>
+ <text macro="edition"/>
+ <group suffix="." delimiter=", ">
+ <text macro="publisher"/>
+ <text macro="pages"/>
+ </group>
+ </group>
+ </else-if>
+ <else-if type="thesis">
+ <group prefix=" " delimiter=". " suffix=".">
+ <text macro="title"/>
+ <group delimiter=", ">
+ <text variable="genre"/>
+ <text macro="publisher"/>
+ </group>
+ </group>
+ </else-if>
+ <else-if type="webpage">
+ <group prefix=" " suffix=".">
+ <group delimiter=" " suffix=".">
+ <text macro="title"/>
+ <text macro="online"/>
+ </group>
+ <text macro="edition"/>
+ </group>
+ </else-if>
+ <else>
+ <group suffix=".">
+ <text macro="title" prefix=" "/>
+ <text macro="editor" prefix=" "/>
+ </group>
+ <group prefix=" " suffix=".">
+ <group delimiter=" ">
+ <text variable="container-title" font-style="italic"/>
+ <text macro="online"/>
+ </group>
+ <text variable="volume" font-weight="bold" prefix=" "/>
+ <text variable="page" prefix=":"/>
+ </group>
+ </else>
+ </choose>
+ <text prefix=". " macro="access" suffix="."/>
+ </layout>
+ </bibliography>
+</style>
diff --git a/test/command/ieee.csl b/test/command/ieee.csl
new file mode 100644
index 000000000..0bde51130
--- /dev/null
+++ b/test/command/ieee.csl
@@ -0,0 +1,339 @@
+<?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">
+ <info>
+ <title>IEEE</title>
+ <id>http://www.zotero.org/styles/ieee</id>
+ <link href="http://www.zotero.org/styles/ieee" rel="self"/>
+ <link href="http://www.ieee.org/documents/style_manual.pdf" rel="documentation"/>
+ <link href="http://www.ieee.org/documents/auinfo07.pdf" rel="documentation"/>
+ <author>
+ <name>Michael Berkowitz</name>
+ <email>mberkowi@gmu.edu</email>
+ </author>
+ <contributor>
+ <name>Julian Onions</name>
+ <email>julian.onions@gmail.com</email>
+ </contributor>
+ <contributor>
+ <name>Rintze Zelle</name>
+ <uri>http://twitter.com/rintzezelle</uri>
+ </contributor>
+ <contributor>
+ <name>Stephen Frank</name>
+ <uri>http://www.zotero.org/sfrank</uri>
+ </contributor>
+ <contributor>
+ <name>Sebastian Karcher</name>
+ </contributor>
+ <category citation-format="numeric"/>
+ <category field="engineering"/>
+ <category field="generic-base"/>
+ <updated>2013-12-17T18:04:02+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="chapter" form="short">ch.</term>
+ <term name="presented at">presented at the</term>
+ <term name="available at">available</term>
+ </terms>
+ </locale>
+ <!-- Macros -->
+ <macro name="edition">
+ <choose>
+ <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
+ <choose>
+ <if is-numeric="edition">
+ <group delimiter=" ">
+ <number variable="edition" form="ordinal"/>
+ <text term="edition" form="short"/>
+ </group>
+ </if>
+ <else>
+ <text variable="edition" text-case="capitalize-first" suffix="."/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="issued">
+ <choose>
+ <if type="article-journal report" match="any">
+ <date variable="issued">
+ <date-part name="month" form="short" suffix=" "/>
+ <date-part name="year" form="long"/>
+ </date>
+ </if>
+ <else-if type=" bill book chapter graphic legal_case legislation motion_picture paper-conference song thesis" match="any">
+ <date variable="issued">
+ <date-part name="year" form="long"/>
+ </date>
+ </else-if>
+ <else>
+ <date variable="issued">
+ <date-part name="day" form="numeric-leading-zeros" suffix="-"/>
+ <date-part name="month" form="short" suffix="-" strip-periods="true"/>
+ <date-part name="year" form="long"/>
+ </date>
+ </else>
+ </choose>
+ </macro>
+ <macro name="author">
+ <names variable="author">
+ <name initialize-with=". " delimiter=", " and="text"/>
+ <label form="short" prefix=", " text-case="capitalize-first"/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="editor">
+ <names variable="editor">
+ <name initialize-with=". " delimiter=", " and="text"/>
+ <label form="short" prefix=", " text-case="capitalize-first"/>
+ </names>
+ </macro>
+ <macro name="locators">
+ <group delimiter=", ">
+ <text macro="edition"/>
+ <group delimiter=" ">
+ <text term="volume" form="short"/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ <group delimiter=" ">
+ <number variable="number-of-volumes" form="numeric"/>
+ <text term="volume" form="short" plural="true"/>
+ </group>
+ <group delimiter=" ">
+ <text term="issue" form="short"/>
+ <number variable="issue" form="numeric"/>
+ </group>
+ </group>
+ </macro>
+ <macro name="title">
+ <choose>
+ <if type="bill book graphic legal_case legislation motion_picture song" match="any">
+ <text variable="title" font-style="italic"/>
+ </if>
+ <else>
+ <text variable="title" quotes="true"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="publisher">
+ <choose>
+ <if type=" bill book chapter graphic legal_case legislation motion_picture paper-conference song" match="any">
+ <group delimiter=": ">
+ <text variable="publisher-place"/>
+ <text variable="publisher"/>
+ </group>
+ </if>
+ <else>
+ <group delimiter=", ">
+ <text variable="publisher"/>
+ <text variable="publisher-place"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="event">
+ <choose>
+ <if type="paper-conference speech" match="any">
+ <choose>
+ <!-- Published Conference Paper -->
+ <if variable="container-title">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <text term="in"/>
+ <text variable="container-title" font-style="italic"/>
+ </group>
+ <text variable="event-place"/>
+ </group>
+ </if>
+ <!-- Unpublished Conference Paper -->
+ <else>
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <text term="presented at"/>
+ <text variable="event"/>
+ </group>
+ <text variable="event-place"/>
+ </group>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="access">
+ <choose>
+ <if type="webpage">
+ <choose>
+ <if variable="URL">
+ <group delimiter=". ">
+ <text term="online" prefix="[" suffix="]" text-case="capitalize-first"/>
+ <group delimiter=": ">
+ <text term="available at" text-case="capitalize-first"/>
+ <text variable="URL"/>
+ </group>
+ <group prefix="[" suffix="]" delimiter=": ">
+ <text term="accessed" text-case="capitalize-first"/>
+ <date variable="accessed">
+ <date-part name="day" form="numeric-leading-zeros" suffix="-"/>
+ <date-part name="month" form="short" suffix="-" strip-periods="true"/>
+ <date-part name="year" form="long"/>
+ </date>
+ </group>
+ </group>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="page">
+ <group>
+ <label variable="page" form="short" suffix=" "/>
+ <text variable="page"/>
+ </group>
+ </macro>
+ <macro name="citation-locator">
+ <group delimiter=" ">
+ <choose>
+ <if locator="page">
+ <label variable="locator" form="short"/>
+ </if>
+ <else>
+ <label variable="locator" form="short" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ <text variable="locator"/>
+ </group>
+ </macro>
+ <!-- Citation -->
+ <citation collapse="citation-number">
+ <sort>
+ <key variable="citation-number"/>
+ </sort>
+ <layout delimiter=", ">
+ <group prefix="[" suffix="]" delimiter=", ">
+ <text variable="citation-number"/>
+ <text macro="citation-locator"/>
+ </group>
+ </layout>
+ </citation>
+ <!-- Bibliography -->
+ <bibliography entry-spacing="0" second-field-align="flush">
+ <layout suffix=".">
+ <!-- Citation Number -->
+ <text variable="citation-number" prefix="[" suffix="]"/>
+ <!-- Author(s) -->
+ <text macro="author" suffix=", "/>
+ <!-- Rest of Citation -->
+ <choose>
+ <!-- Specific Formats -->
+ <if type="article-journal">
+ <group delimiter=", ">
+ <text macro="title"/>
+ <text variable="container-title" font-style="italic" form="short"/>
+ <text macro="locators"/>
+ <text macro="page"/>
+ <text macro="issued"/>
+ </group>
+ </if>
+ <else-if type="paper-conference speech" match="any">
+ <group delimiter=", ">
+ <text macro="title"/>
+ <text macro="event"/>
+ <text macro="issued"/>
+ <text macro="locators"/>
+ <text macro="page"/>
+ </group>
+ </else-if>
+ <else-if type="report">
+ <group delimiter=", ">
+ <text macro="title"/>
+ <text macro="publisher"/>
+ <group delimiter=" ">
+ <text variable="genre"/>
+ <text variable="number"/>
+ </group>
+ <text macro="issued"/>
+ </group>
+ </else-if>
+ <else-if type="thesis">
+ <group delimiter=", ">
+ <text macro="title"/>
+ <text variable="genre"/>
+ <text macro="publisher"/>
+ <text macro="issued"/>
+ </group>
+ </else-if>
+ <else-if type="webpage post-weblog" match="any">
+ <group delimiter=", " suffix=". ">
+ <text macro="title"/>
+ <text variable="container-title" font-style="italic"/>
+ <text macro="issued"/>
+ </group>
+ <text macro="access"/>
+ </else-if>
+ <else-if type="patent">
+ <group delimiter=", ">
+ <text macro="title"/>
+ <text variable="number"/>
+ <text macro="issued"/>
+ </group>
+ </else-if>
+ <!-- Generic/Fallback Formats -->
+ <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <group delimiter=", " suffix=". ">
+ <text macro="title"/>
+ <text macro="locators"/>
+ </group>
+ <group delimiter=", ">
+ <text macro="publisher"/>
+ <text macro="issued"/>
+ <text macro="page"/>
+ </group>
+ </else-if>
+ <else-if type="article-magazine article-newspaper broadcast interview manuscript map patent personal_communication song speech thesis webpage" match="any">
+ <group delimiter=", ">
+ <text macro="title"/>
+ <text variable="container-title" font-style="italic"/>
+ <text macro="locators"/>
+ <text macro="publisher"/>
+ <text macro="page"/>
+ <text macro="issued"/>
+ </group>
+ </else-if>
+ <else-if type="chapter paper-conference" match="any">
+ <group delimiter=", " suffix=", ">
+ <text macro="title"/>
+ <group delimiter=" ">
+ <text term="in"/>
+ <text variable="container-title" font-style="italic"/>
+ </group>
+ <text macro="locators"/>
+ </group>
+ <text macro="editor" suffix=" "/>
+ <group delimiter=", ">
+ <text macro="publisher"/>
+ <text macro="issued"/>
+ <text macro="page"/>
+ </group>
+ </else-if>
+ <else>
+ <group delimiter=", " suffix=". ">
+ <text macro="title"/>
+ <text variable="container-title" font-style="italic"/>
+ <text macro="locators"/>
+ </group>
+ <group delimiter=", ">
+ <text macro="publisher"/>
+ <text macro="page"/>
+ <text macro="issued"/>
+ </group>
+ </else>
+ </choose>
+ </layout>
+ </bibliography>
+</style>
diff --git a/test/command/issue160.csl b/test/command/issue160.csl
new file mode 100644
index 000000000..32446e057
--- /dev/null
+++ b/test/command/issue160.csl
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" default-locale="en-US">
+ <info>
+ <title>Issue 160 Test Style</title>
+ <id>issue-160-test</id>
+ <category citation-format="label"/>
+ <updated>2017-02-04T19:31:46+0000</updated>
+ </info>
+ <citation>
+ <layout prefix="[" suffix="]" delimiter=",">
+ <text variable="citation-label"/>
+ </layout>
+ </citation>
+ <bibliography>
+ <layout>
+ <text variable="citation-label" prefix="[" suffix="] "/>
+ <group delimiter=". " suffix=".">
+ <names variable="author">
+ <name delimiter=", " delimiter-precedes-last="always"/>
+ </names>
+ <text variable="title"/>
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </group>
+ </layout>
+ </bibliography>
+</style>
diff --git a/test/command/issue437.csl b/test/command/issue437.csl
new file mode 100644
index 000000000..396ff441c
--- /dev/null
+++ b/test/command/issue437.csl
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<style xmlns="http://purl.org/net/xbiblio/csl" class="note" default-locale="en-US" version="1.0">
+ <info>
+ <title>Minimal style to reproduce bug</title>
+ <id>http://www.example.org/styles/minimal-test-style</id>
+ <author>
+ <name>Nicolas Chachereau</name>
+ <email>nicolas@nchachereau.ch</email>
+ </author>
+ <updated>2020-01-27T14:27:45+01:00</updated>
+ </info>
+ <citation>
+ <layout>
+ <group delimiter=", ">
+ <names variable="author"/>
+ <text variable="title"/>
+ <text variable="publisher-place"/>
+ <date variable="issued" form="numeric" date-parts="year"/>
+ <group delimiter="&#160;">
+ <number variable="number-of-pages"/>
+ <label variable="number-of-pages"/>
+ </group>
+ </group>
+ </layout>
+ </citation>
+</style>
diff --git a/test/command/issue58.csl b/test/command/issue58.csl
new file mode 100644
index 000000000..b18500cc8
--- /dev/null
+++ b/test/command/issue58.csl
@@ -0,0 +1,553 @@
+<?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" page-range-format="chicago">
+ <info>
+ <title>Chicago Manual of Style 16th edition (author-date) modif 2014-06-30</title>
+ <id></id>
+ <link href="" rel="self"/>
+ <link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
+ <author>
+ <name>Julian Onions</name>
+ <email>julian.onions@gmail.com</email>
+ </author>
+ <contributor>
+ <name>Sebastian Karcher</name>
+ </contributor>
+ <contributor>
+ <name>Richard Karnesky</name>
+ <email>karnesky+zotero@gmail.com</email>
+ <uri>http://arc.nucapt.northwestern.edu/Richard_Karnesky</uri>
+ </contributor>
+ <contributor>
+ <name>Andrew Dunning</name>
+ <email>andrew.dunning@utoronto.ca</email>
+ </contributor>
+ <category citation-format="author-date"/>
+ <category field="generic-base"/>
+ <summary>The author-date variant of the Chicago style</summary>
+ <updated>2014-05-23T03:53:32+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="editor" form="verb-short">ed.</term>
+ <term name="container-author" form="verb">by</term>
+ <term name="translator" form="verb-short">trans.</term>
+ <term name="editortranslator" form="verb">
+ <single>edited and translated by</single>
+ <multiple>edited and translated by</multiple>
+ </term>
+ <term name="translator" form="short">trans.</term>
+ </terms>
+ </locale>
+ <macro name="secondary-contributors">
+ <choose>
+ <if type="chapter paper-conference" match="none">
+ <names variable="editor translator" delimiter=". ">
+ <label form="verb" text-case="capitalize-first" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </if>
+ </choose>
+ </macro>
+ <macro name="container-contributors">
+ <choose>
+ <if type="chapter 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="recipient">
+ <choose>
+ <if type="personal_communication">
+ <choose>
+ <if variable="genre">
+ <text variable="genre" text-case="capitalize-first"/>
+ </if>
+ <else>
+ <text term="letter" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ <names variable="recipient" delimiter=", ">
+ <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="noauthor-container-title">
+ <choose>
+ <if variable="container-title">
+ <choose>
+ <if type="article-journal article-magazine article-newspaper" match="any">
+ <text macro="container-title"/>
+ </if>
+ </choose>
+ </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"/>
+ <text macro="noauthor-container-title"/>
+ <text macro="title"/>
+ </substitute>
+ </names>
+ <text macro="recipient"/>
+ </group>
+ </macro>
+ <macro name="contributors-short">
+ <names variable="author">
+ <name form="short" and="text" delimiter=", " initialize-with=". "/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <text macro="noauthor-container-title"/>
+ <text macro="title"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="interviewer">
+ <names variable="interviewer" delimiter=", ">
+ <label form="verb" prefix=" " text-case="capitalize-first" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="archive">
+ <group delimiter=". ">
+ <text variable="archive_location" text-case="capitalize-first"/>
+ <text variable="archive"/>
+ <text variable="archive-place"/>
+ </group>
+ </macro>
+ <macro name="access">
+ <group delimiter=". ">
+ <choose>
+ <if type="graphic report" match="any">
+ <text macro="archive"/>
+ </if>
+ <else-if type="article-journal bill book chapter legal_case legislation motion_picture paper-conference" match="none">
+ <text macro="archive"/>
+ </else-if>
+ </choose>
+ <choose>
+ <if variable="issued" match="none">
+ <group delimiter=" ">
+ <text term="accessed" text-case="capitalize-first"/>
+ <date variable="accessed" delimiter=" ">
+ <date-part name="month"/>
+ <date-part name="day"/>
+ </date>
+ </group>
+ </if>
+ </choose>
+ <choose>
+ <if type="legal_case" match="none">
+ <choose>
+ <if variable="DOI">
+ <text variable="DOI" prefix="doi:"/>
+ </if>
+ <else>
+ <text variable="URL"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </group>
+ </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 report 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">
+ <group delimiter=", ">
+ <text variable="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-if>
+ <else-if type="legal_case interview" match="any">
+ <text variable="title"/>
+ </else-if>
+ <else>
+ <text variable="title" text-case="title" quotes="true"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="edition">
+ <choose>
+ <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <choose>
+ <if is-numeric="edition">
+ <group delimiter=" " prefix=". ">
+ <number variable="edition" form="ordinal"/>
+ <text term="edition" form="short" strip-periods="true"/>
+ </group>
+ </if>
+ <else>
+ <text variable="edition" prefix=". "/>
+ </else>
+ </choose>
+ </if>
+ <else-if type="chapter paper-conference" match="any">
+ <choose>
+ <if is-numeric="edition">
+ <group delimiter=" " prefix=", ">
+ <number variable="edition" form="ordinal"/>
+ <text term="edition" form="short"/>
+ </group>
+ </if>
+ <else>
+ <text variable="edition" prefix=", "/>
+ </else>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="locators">
+ <choose>
+ <if type="article-journal">
+ <choose>
+ <if variable="volume">
+ <text variable="volume" prefix=" "/>
+ <group prefix=" (" suffix=")">
+ <choose>
+ <if variable="issue">
+ <text variable="issue"/>
+ </if>
+ <else>
+ <date variable="issued">
+ <date-part name="month"/>
+ </date>
+ </else>
+ </choose>
+ </group>
+ </if>
+ <else-if variable="issue">
+ <group delimiter=" " prefix=", ">
+ <text term="issue" form="short"/>
+ <text variable="issue"/>
+ <date variable="issued" prefix="(" suffix=")">
+ <date-part name="month"/>
+ </date>
+ </group>
+ </else-if>
+ <else>
+ <date variable="issued" prefix=", ">
+ <date-part name="month"/>
+ </date>
+ </else>
+ </choose>
+ </if>
+ <else-if type="legal_case">
+ <text variable="volume" prefix=", "/>
+ <text variable="container-title" prefix=" "/>
+ <text variable="page" prefix=" "/>
+ </else-if>
+ <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <group prefix=". " delimiter=". ">
+ <group>
+ <text term="volume" form="short" text-case="capitalize-first" suffix=" "/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ <group>
+ <number variable="number-of-volumes" form="numeric"/>
+ <text term="volume" form="short" prefix=" " plural="true"/>
+ </group>
+ </group>
+ </else-if>
+ <else-if type="chapter paper-conference" match="any">
+ <choose>
+ <if variable="page" match="none">
+ <group prefix=". ">
+ <text term="volume" form="short" text-case="capitalize-first" suffix=" "/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ </if>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="locators-chapter">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <choose>
+ <if variable="page">
+ <group prefix=", ">
+ <text variable="volume" suffix=":"/>
+ <text variable="page"/>
+ </group>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-article">
+ <choose>
+ <if type="article-newspaper">
+ <group prefix=", " delimiter=", ">
+ <group>
+ <text variable="edition" suffix=" "/>
+ <text term="edition" prefix=" "/>
+ </group>
+ <group>
+ <text term="section" form="short" suffix=" "/>
+ <text variable="section"/>
+ </group>
+ </group>
+ </if>
+ <else-if type="article-journal">
+ <choose>
+ <if variable="volume issue" match="any">
+ <text variable="page" prefix=": "/>
+ </if>
+ <else>
+ <text variable="page" prefix=", "/>
+ </else>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="point-locators">
+ <choose>
+ <if variable="locator">
+ <choose>
+ <if locator="page" match="none">
+ <choose>
+ <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <choose>
+ <if variable="volume">
+ <group>
+ <text term="volume" form="short" suffix=" "/>
+ <number variable="volume" form="numeric"/>
+ <label variable="locator" form="short" prefix=", " suffix=" "/>
+ </group>
+ </if>
+ <else>
+ <label variable="locator" form="short" suffix=" "/>
+ </else>
+ </choose>
+ </if>
+ <else>
+ <label variable="locator" form="short" suffix=" "/>
+ </else>
+ </choose>
+ </if>
+ <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <number variable="volume" form="numeric" suffix=":"/>
+ </else-if>
+ </choose>
+ <text variable="locator"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="container-prefix">
+ <text term="in" text-case="capitalize-first"/>
+ </macro>
+ <macro name="container-title">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <text macro="container-prefix" suffix=" "/>
+ </if>
+ </choose>
+ <choose>
+ <if type="legal_case" match="none">
+ <text variable="container-title" text-case="title" font-style="italic"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="publisher">
+ <group delimiter=": ">
+ <text variable="publisher-place"/>
+ <text variable="publisher"/>
+ </group>
+ </macro>
+ <macro name="date">
+ <choose>
+ <if variable="issued">
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </if>
+ <else-if variable="accessed">
+ <date variable="accessed">
+ <date-part name="year"/>
+ </date>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="day-month">
+ <date variable="issued">
+ <date-part name="month"/>
+ <date-part name="day" prefix=" "/>
+ </date>
+ </macro>
+ <macro name="collection-title">
+ <choose>
+ <if match="none" type="article-journal">
+ <choose>
+ <if match="none" is-numeric="collection-number">
+ <group delimiter=", ">
+ <text variable="collection-title" text-case="title"/>
+ <text variable="collection-number"/>
+ </group>
+ </if>
+ <else>
+ <group delimiter=" ">
+ <text variable="collection-title" text-case="title"/>
+ <text variable="collection-number"/>
+ </group>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="collection-title-journal">
+ <choose>
+ <if type="article-journal">
+ <group delimiter=" ">
+ <text variable="collection-title"/>
+ <text variable="collection-number"/>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="event">
+ <group>
+ <text term="presented at" suffix=" "/>
+ <text variable="event"/>
+ </group>
+ </macro>
+ <macro name="description">
+ <choose>
+ <if type="interview">
+ <group delimiter=". ">
+ <text macro="interviewer"/>
+ <text variable="medium" text-case="capitalize-first"/>
+ </group>
+ </if>
+ <else>
+ <text variable="medium" text-case="capitalize-first" prefix=". "/>
+ </else>
+ </choose>
+ <choose>
+ <if variable="title" match="none"/>
+ <else-if type="thesis personal_communication speech" match="any"/>
+ <else>
+ <group delimiter=" " prefix=". ">
+ <text variable="genre" text-case="capitalize-first"/>
+ <choose>
+ <if type="report">
+ <text variable="number"/>
+ </if>
+ </choose>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="issue">
+ <choose>
+ <if type="legal_case">
+ <text variable="authority" prefix=". "/>
+ </if>
+ <else-if type="speech">
+ <group prefix=". " delimiter=", ">
+ <group delimiter=" ">
+ <text variable="genre" text-case="capitalize-first"/>
+ <text macro="event"/>
+ </group>
+ <text variable="event-place"/>
+ <text macro="day-month"/>
+ </group>
+ </else-if>
+ <else-if type="article-newspaper article-magazine personal_communication" match="any">
+ <text macro="day-month" prefix=", "/>
+ </else-if>
+ <else>
+ <group prefix=". " delimiter=", ">
+ <choose>
+ <if type="thesis">
+ <text variable="genre" text-case="capitalize-first"/>
+ </if>
+ </choose>
+ <text macro="publisher"/>
+ </group>
+ </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">
+ <layout prefix="(" suffix=")" delimiter="; ">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <text macro="contributors-short"/>
+ <text macro="date"/>
+ </group>
+ <text macro="point-locators"/>
+ </group>
+ </layout>
+ </citation>
+ <bibliography hanging-indent="true" et-al-min="11" et-al-use-first="7" subsequent-author-substitute="&#8212;&#8212;&#8212;" entry-spacing="0">
+ <sort>
+ <key macro="contributors"/>
+ <key variable="issued"/>
+ </sort>
+ <layout suffix=".">
+ <group delimiter=". ">
+ <text macro="contributors"/>
+ <text macro="date"/>
+ <text macro="title"/>
+ </group>
+ <text macro="description"/>
+ <text macro="secondary-contributors" prefix=". "/>
+ <text macro="container-title" prefix=". "/>
+ <text macro="container-contributors"/>
+ <text macro="edition"/>
+ <text macro="locators-chapter"/>
+ <text macro="collection-title-journal" prefix=", " suffix=", "/>
+ <text macro="locators"/>
+ <text macro="collection-title" prefix=". "/>
+ <text macro="issue"/>
+ <text macro="locators-article"/>
+ <text macro="access" prefix=". "/>
+ </layout>
+ </bibliography>
+</style>
diff --git a/test/command/jats.csl b/test/command/jats.csl
new file mode 100644
index 000000000..64872863c
--- /dev/null
+++ b/test/command/jats.csl
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="utf-8"?>
+<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" default-locale="en-US">
+ <info>
+ <title>Journal Article Tag Suite</title>
+ <title-short>JATS</title-short>
+ <id>http://www.zotero.org/styles/journal-article-tag-suite</id>
+ <link href="https://github.com/MartinPaulEve/JATS-CSL/blob/master/jats.csl" rel="self"/>
+ <link rel="documentation" href="http://jats.nlm.nih.gov/archiving/tag-library/1.0/index.html"/>
+ <author>
+ <name>Martin Paul Eve</name>
+ <email>martin@martineve.com</email>
+ </author>
+ <category citation-format="numeric"/>
+ <category field="medicine"/>
+ <category field="biology"/>
+ <summary>Use this style to generate bibliographic data in Journal Article Tagging Suite (JATS) 1.0 XML format</summary>
+ <updated>2014-06-21T17:41:26+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. Originally by Martin Fenner.</rights>
+ </info>
+ <locale xml:lang="en">
+ <terms>
+ <term name="et-al">{{jats}}&lt;etal/&gt;{{/jats}}</term>
+ </terms>
+ </locale>
+ <macro name="citation-number">
+ <text variable="citation-number" prefix="{{jats}}id=&quot;ref-{{/jats}}" suffix="{{jats}}&quot;&gt;{{/jats}}"/>
+ </macro>
+ <macro name="author">
+ <names variable="author">
+ <name prefix="{{jats}}&lt;name&gt;{{/jats}}" suffix="{{jats}}&lt;/name&gt;{{/jats}}" name-as-sort-order="all" sort-separator="">
+ <name-part name="family" text-case="capitalize-first" prefix="{{jats}}&lt;surname&gt;{{/jats}}" suffix="{{jats}}&lt;/surname&gt;{{/jats}}"/>
+ <name-part name="given" text-case="capitalize-first" prefix="{{jats}}&lt;given-names&gt;{{/jats}}" suffix="{{jats}}&lt;/given-names&gt;{{/jats}}"/>
+ </name>
+ <substitute>
+ <names variable="editor"/>
+ </substitute>
+ </names>
+ </macro>
+
+ <macro name="editor">
+ <names variable="editor" prefix="{{jats}}&lt;person-group person-group-type=&quot;editor&quot;&gt;{{/jats}}" suffix="{{jats}}&lt;/person-group&gt;{{/jats}}">
+ <name prefix="{{jats}}&lt;name&gt;{{/jats}}" suffix="{{jats}}&lt;/name&gt;{{/jats}}" name-as-sort-order="all" sort-separator="">
+ <name-part name="family" text-case="capitalize-first" prefix="{{jats}}&lt;surname&gt;{{/jats}}" suffix="{{jats}}&lt;/surname&gt;{{/jats}}"/>
+ <name-part name="given" text-case="capitalize-first" prefix="{{jats}}&lt;given-names&gt;{{/jats}}" suffix="{{jats}}&lt;/given-names&gt;{{/jats}}"/>
+ </name>
+ <substitute>
+ <names variable="editor"/>
+ </substitute>
+ </names>
+ </macro>
+
+ <macro name="editor">
+ <group delimiter=": ">
+ <names variable="editor">
+ <name prefix="{{jats}}&lt;name&gt;{{/jats}}" suffix="{{jats}}&lt;/name&gt;{{/jats}}" name-as-sort-order="all" sort-separator="">
+ <name-part name="family" text-case="capitalize-first" prefix="{{jats}}&lt;surname&gt;{{/jats}}" suffix="{{jats}}&lt;/surname&gt;{{/jats}}"/>
+ <name-part name="given" text-case="capitalize-first" prefix="{{jats}}&lt;given-names&gt;{{/jats}}" suffix="{{jats}}&lt;given-names&gt;{{/jats}}"/>
+ </name>
+ </names>
+ </group>
+ </macro>
+ <macro name="title">
+ <choose>
+ <if type="book" match="any">
+ <group prefix="{{jats}}&lt;source&gt;{{/jats}}" suffix="{{jats}}&lt;/source&gt;{{/jats}}">
+ <text variable="title"/>
+ </group>
+ </if>
+ <else>
+ <group prefix="{{jats}}&lt;article-title&gt;{{/jats}}" suffix="{{jats}}&lt;/article-title&gt;{{/jats}}">
+ <text variable="title"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="container-title">
+ <text variable="container-title" form="short" prefix="{{jats}}&lt;source&gt;{{/jats}}" suffix="{{jats}}&lt;/source&gt;{{/jats}}"/>
+ </macro>
+ <macro name="publisher">
+ <text variable="publisher" prefix="{{jats}}&lt;publisher-name&gt;{{/jats}}" suffix="{{jats}}&lt;/publisher-name&gt;{{/jats}}"/>
+ <text variable="publisher-place" prefix="{{jats}}&lt;publisher-loc&gt;{{/jats}}" suffix="{{jats}}&lt;/publisher-loc&gt;{{/jats}}"/>
+ </macro>
+ <macro name="link">
+ <choose>
+ <if match="any" variable="DOI">
+ <group prefix="{{jats}}&lt;pub-id pub-id-type=&quot;doi&quot;&gt;{{/jats}}" suffix="{{jats}}&lt;/pub-id&gt;{{/jats}}">
+ <text variable="DOI"/>
+ </group>
+ </if>
+ </choose>
+ <choose>
+ <if match="any" variable="PMID">
+ <group prefix="{{jats}}&lt;ext-link ext-link-type=&quot;pmid&quot; {{/jats}}" suffix="{{jats}}&lt;/ext-link&gt;{{/jats}}">
+ <text variable="PMID" prefix="{{jats}}xlink:href=&quot;http://www.ncbi.nlm.nih.gov/pubmed/{{/jats}}" suffix="{{jats}}&quot; xlink:type=&quot;simple&quot;&gt;{{/jats}}"/>
+ <text variable="PMID"/>
+ </group>
+ </if>
+ </choose>
+ <choose>
+ <if variable="URL" match="any">
+ <group prefix="{{jats}}&lt;ext-link ext-link-type=&quot;uri&quot; {{/jats}}" suffix="{{jats}}&lt;/ext-link&gt;{{/jats}}">
+ <text variable="URL" prefix="{{jats}}xlink:href=&quot;{{/jats}}" suffix="{{jats}}&quot; xlink:type=&quot;simple&quot;&gt;{{/jats}}"/>
+ <text variable="URL"/>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="date">
+ <choose>
+ <if type="article-journal article-magazine article-newspaper report patent book" match="any">
+ <group prefix="{{jats}}&lt;date&gt;{{/jats}}" suffix="{{jats}}&lt;/date&gt;{{/jats}}">
+ <date variable="issued">
+ <date-part name="day" form="numeric-leading-zeros" prefix="{{jats}}&lt;day&gt;{{/jats}}" suffix="{{jats}}&lt;/day&gt;{{/jats}}"/>
+ <date-part name="month" form="numeric-leading-zeros" prefix="{{jats}}&lt;month&gt;{{/jats}}" suffix="{{jats}}&lt;/month&gt;{{/jats}}"/>
+ <date-part name="year" prefix="{{jats}}&lt;year&gt;{{/jats}}" suffix="{{jats}}&lt;/year&gt;{{/jats}}"/>
+ </date>
+ </group>
+ </if>
+ <else>
+ <group prefix="{{jats}}&lt;date-in-citation content-type=&quot;access-date&quot;{{/jats}}" suffix="{{jats}}&lt;/date-in-citation&gt;{{/jats}}">
+ <date variable="accessed" prefix="{{jats}} iso-8601-date=&quot;{{/jats}}" suffix="{{jats}}&quot;&gt;{{/jats}}">
+ <date-part name="year"/>
+ <date-part name="month" form="numeric-leading-zeros" prefix="{{jats}}-{{/jats}}"/>
+ <date-part name="day" form="numeric-leading-zeros" prefix="{{jats}}-{{/jats}}"/>
+ </date>
+ <date variable="accessed">
+ <date-part name="day" prefix="{{jats}}&lt;day&gt;{{/jats}}" suffix="{{jats}}&lt;/day&gt;{{/jats}}"/>
+ <date-part name="month" form="numeric-leading-zeros" prefix="{{jats}}&lt;month&gt;{{/jats}}" suffix="{{jats}}&lt;/month&gt;{{/jats}}"/>
+ <date-part name="year" prefix="{{jats}}&lt;year&gt;{{/jats}}" suffix="{{jats}}&lt;/year&gt;{{/jats}}"/>
+ </date>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="location">
+ <choose>
+ <if type="article-journal article-magazine" match="any">
+ <text variable="volume" prefix="{{jats}}&lt;volume&gt;{{/jats}}" suffix="{{jats}}&lt;/volume&gt;{{/jats}}"/>
+ <text variable="issue" prefix="{{jats}}&lt;issue&gt;{{/jats}}" suffix="{{jats}}&lt;/issue&gt;{{/jats}}"/>
+ </if>
+ </choose>
+ <choose>
+ <if type="article-journal article-magazine article-newspaper chapter" match="any">
+ <text variable="page-first" prefix="{{jats}}&lt;fpage&gt;{{/jats}}" suffix="{{jats}}&lt;/fpage&gt;{{/jats}}"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="publication-type">
+ <group prefix="{{jats}} publication-type=&quot;{{/jats}}" suffix="{{jats}}&quot;&gt;{{/jats}}">
+ <choose>
+ <if type="article-journal article-magazine article-newspaper" match="any">
+ <text value="journal"/>
+ </if>
+ <else-if type="book" match="any">
+ <text value="book"/>
+ </else-if>
+ <else-if type="chapter" match="any">
+ <text value="bookchapter"/>
+ </else-if>
+ <else-if type="dataset" match="any">
+ <text value="dataset"/>
+ </else-if>
+ <else-if type="patent" match="any">
+ <text value="patent"/>
+ </else-if>
+ <else-if type="report" match="any">
+ <text value="report"/>
+ </else-if>
+ <else-if type="review" match="any">
+ <text value="review"/>
+ </else-if>
+ <else>
+ <text value="standard"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <citation collapse="citation-number">
+ <sort>
+ <key variable="citation-number"/>
+ </sort>
+ <layout delimiter=",">
+ <group prefix="{{jats}}&lt;xref ref-type=&quot;bibr&quot; rid=&quot;{{/jats}}" suffix="{{jats}}&lt;/xref&gt;{{/jats}}">
+ <text variable="citation-number" prefix="{{jats}}ref-{{/jats}}" suffix="{{jats}}&quot;&gt;{{/jats}}"/>
+ <text variable="citation-number"/>
+ </group>
+ </layout>
+ </citation>
+ <bibliography sort-separator="">
+ <layout>
+ <group prefix="{{jats}}&lt;ref {{/jats}}" suffix="{{jats}}&lt;/ref&gt;{{/jats}}">
+ <text macro="citation-number"/>
+ <group prefix="{{jats}}&lt;element-citation{{/jats}}" suffix="{{jats}}&lt;/element-citation&gt;{{/jats}}">
+ <text macro="publication-type"/>
+ <text macro="author" prefix="{{jats}}&lt;person-group person-group-type=&quot;author&quot;&gt;{{/jats}}" suffix="{{jats}}&lt;/person-group&gt;{{/jats}}"/>
+ <text macro="title" />
+ <text macro="container-title"/>
+ <text macro="editor"/>
+ <text macro="publisher"/>
+ <text macro="date"/>
+ <text macro="location"/>
+ <text macro="link"/>
+ </group>
+ </group>
+ </layout>
+ </bibliography>
+</style>
+
diff --git a/test/command/le-tapuscrit-note.csl b/test/command/le-tapuscrit-note.csl
new file mode 100644
index 000000000..b0680b44d
--- /dev/null
+++ b/test/command/le-tapuscrit-note.csl
@@ -0,0 +1,496 @@
+<?xml version="1.0" encoding="utf-8"?>
+<style xmlns="http://purl.org/net/xbiblio/csl" class="note" default-locale="fr-FR" version="1.0" page-range-format="expanded">
+ <info>
+ <title>Le tapuscrit (École des hautes études en sciences sociales) (note, French)</title>
+ <title-short>Tapuscrit-EHESS</title-short>
+ <id>http://www.zotero.org/styles/le-tapuscrit-note</id>
+ <link href="http://www.zotero.org/styles/le-tapuscrit-note" rel="self"/>
+ <link href="http://www.editions.ehess.fr/ouvrages/ouvrage/le-tapuscrit/" rel="documentation"/>
+ <author>
+ <name>Franziska Heimburger</name>
+ <email>zotero@franziska.fr</email>
+ </author>
+ <category citation-format="note"/>
+ <category field="social_science"/>
+ <category field="generic-base"/>
+ <updated>2018-07-12T11:20:37+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="ordinal-01">ère</term>
+ <term name="ordinal-02">e</term>
+ <term name="ordinal-03">e</term>
+ <term name="ordinal-04">e</term>
+ <term name="cited">op.&#160;cit.</term>
+ <term name="page" form="short">p.</term>
+ <term name="editor" form="short">
+ <single>ed.</single>
+ <multiple>eds.</multiple>
+ </term>
+ <term name="in">dans</term>
+ </terms>
+ </locale>
+ <macro name="author">
+ <choose>
+ <if variable="author">
+ <names variable="author">
+ <name form="long" and="text" delimiter-precedes-last="never" sort-separator=" "/>
+ </names>
+ </if>
+ <else-if variable="editor">
+ <names variable="editor">
+ <name form="long" and="text" delimiter-precedes-last="never" sort-separator=" "/>
+ <label form="short" prefix="&#160;(" suffix=".)"/>
+ </names>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="author-bib">
+ <choose>
+ <if variable="author">
+ <names variable="author">
+ <name name-as-sort-order="all" form="long" and="text" delimiter-precedes-last="never" sort-separator=" ">
+ <name-part name="family" font-variant="small-caps"/>
+ </name>
+ </names>
+ </if>
+ <else-if variable="editor">
+ <names variable="editor">
+ <name name-as-sort-order="all" form="long" and="text" delimiter-precedes-last="never" sort-separator=" ">
+ <name-part name="family" font-variant="small-caps"/>
+ </name>
+ <label form="short" prefix="&#160;(" suffix=".)"/>
+ </names>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="author-ibid">
+ <choose>
+ <if variable="author">
+ <names variable="author">
+ <name and="text" initialize="true" initialize-with="." delimiter-precedes-last="never" sort-separator=" " font-style="normal"/>
+ </names>
+ </if>
+ <else-if variable="editor">
+ <names variable="editor">
+ <name form="long" and="text" delimiter-precedes-last="never" sort-separator=" "/>
+ <label form="short" prefix="&#160;(" suffix=".)"/>
+ </names>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="editor">
+ <names variable="editor">
+ <name form="long" and="text" delimiter-precedes-last="never" sort-separator=" "/>
+ <label form="short" prefix="&#160;(" suffix=".)"/>
+ </names>
+ </macro>
+ <macro name="translator">
+ <names variable="translator">
+ <name form="long" and="text" delimiter-precedes-last="never" sort-separator=" " prefix=" traduit par "/>
+ </names>
+ </macro>
+ <macro name="title">
+ <choose>
+ <if type="bill book graphic legal_case motion_picture report song" match="any">
+ <text variable="title" text-case="capitalize-first" font-style="italic"/>
+ </if>
+ <else-if type="article-journal article-newspaper article-magazine" match="any">
+ <group delimiter=", ">
+ <text variable="title" text-case="capitalize-first" quotes="true"/>
+ <text variable="container-title" font-style="italic"/>
+ </group>
+ </else-if>
+ <else-if type="thesis" match="any">
+ <group delimiter="">
+ <text variable="title" text-case="capitalize-first" font-style="italic" suffix=","/>
+ <text variable="genre" suffix=", " prefix=" "/>
+ <text variable="publisher"/>
+ </group>
+ </else-if>
+ <else-if type="manuscript" match="any">
+ <group delimiter=",">
+ <text variable="title" text-case="capitalize-first" font-style="italic"/>
+ <text variable="genre" prefix=" [" suffix="]"/>
+ </group>
+ </else-if>
+ <else-if type="chapter entry-dictionary entry-encyclopedia" match="any">
+ <group delimiter="">
+ <text variable="title" text-case="capitalize-first" quotes="true"/>
+ <text value="dans" suffix=" " prefix=" "/>
+ <text macro="editor" suffix=", "/>
+ <text variable="container-title" text-case="capitalize-first" font-style="italic"/>
+ </group>
+ </else-if>
+ <else-if type="webpage post-weblog" match="any">
+ <group delimiter="">
+ <text variable="title" text-case="capitalize-first" font-style="italic" suffix=", "/>
+ <text variable="URL"/>
+ <group prefix=" , ">
+ <date variable="issued">
+ <date-part name="day" suffix=" "/>
+ <date-part name="month" suffix=" "/>
+ <date-part name="year"/>
+ </date>
+ </group>
+ </group>
+ </else-if>
+ <else>
+ <text variable="title" quotes="true"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="pub-place">
+ <choose>
+ <if type="bill book chapter entry-dictionary entry-encyclopedia thesis graphic legal_case manuscript motion_picture paper-conference report song" match="any">
+ <choose>
+ <if variable="publisher-place" match="any">
+ <text variable="publisher-place"/>
+ </if>
+ <else>
+ <text value="s.l."/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="publisher">
+ <choose>
+ <if type="bill book chapter entry-dictionary entry-encyclopedia graphic legal_case motion_picture paper-conference report song" match="any">
+ <text variable="publisher"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="yearpage">
+ <choose>
+ <if type="bill book graphic legal_case motion_picture paper-conference manuscript report song thesis" match="any">
+ <group delimiter=", ">
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ <group>
+ <text term="volume" form="short" suffix="."/>
+ <text variable="number-of-volumes" prefix=". " suffix="/"/>
+ <text variable="volume"/>
+ </group>
+ <choose>
+ <if variable="locator" match="any">
+ <group delimiter="&#8239;">
+ <label variable="locator" form="short"/>
+ <text variable="locator"/>
+ </group>
+ </if>
+ <else-if variable="locator" match="none">
+ <text variable="number-of-pages" suffix="&#160;p"/>
+ </else-if>
+ </choose>
+ </group>
+ </if>
+ <else-if type="chapter entry-dictionary entry-encyclopedia" match="any">
+ <group delimiter=" ">
+ <date variable="issued">
+ <date-part name="year" suffix=", "/>
+ </date>
+ <group>
+ <text term="volume" form="short" suffix="."/>
+ <text variable="number-of-volumes" prefix=". " suffix="/"/>
+ <text variable="volume" suffix=","/>
+ </group>
+ <choose>
+ <if variable="locator" match="any">
+ <group delimiter="&#8239;">
+ <label variable="locator" form="short"/>
+ <text variable="locator"/>
+ </group>
+ </if>
+ <else-if variable="locator" match="none">
+ <label variable="page" form="short"/>
+ <text variable="page"/>
+ </else-if>
+ </choose>
+ </group>
+ </else-if>
+ <else-if type="article-journal" match="any">
+ <group delimiter=" " font-style="normal">
+ <choose>
+ <if variable="locator" match="any">
+ <group delimiter="&#8239;">
+ <label variable="locator" form="short"/>
+ <text variable="locator"/>
+ </group>
+ </if>
+ <else-if variable="locator" match="none">
+ <label variable="page" form="short"/>
+ <text variable="page"/>
+ </else-if>
+ </choose>
+ </group>
+ </else-if>
+ <else-if type="article-newspaper article-magazine" match="any">
+ <date variable="issued">
+ <date-part name="day" suffix=" "/>
+ <date-part name="month" form="short" suffix=" "/>
+ <date-part name="year"/>
+ </date>
+ <group delimiter=" " font-style="normal">
+ <label variable="page" form="short"/>
+ <text variable="page"/>
+ </group>
+ <group delimiter=" " font-style="normal">
+ <choose>
+ <if variable="locator" match="any">
+ <group delimiter="&#8239;">
+ <label variable="locator" form="short"/>
+ <text variable="locator"/>
+ </group>
+ </if>
+ <else-if variable="locator" match="none">
+ <label variable="page" form="short"/>
+ </else-if>
+ </choose>
+ </group>
+ </else-if>
+ <else-if type="webpage post-weblog" match="any">
+ <group delimiter=" " prefix="(" suffix=")">
+ <text value="consulté le" suffix=" " prefix=" "/>
+ <date variable="accessed" form="text">
+ <date-part name="day"/>
+ <date-part name="month"/>
+ <date-part name="year"/>
+ </date>
+ </group>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="yearpage-bib">
+ <choose>
+ <if type="bill book graphic legal_case motion_picture paper-conference report song thesis" match="any">
+ <group delimiter=", ">
+ <group delimiter=", ">
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ <group>
+ <text term="volume" form="short" suffix="."/>
+ <text variable="number-of-volumes" prefix=". " suffix="/"/>
+ <text variable="volume"/>
+ </group>
+ <text variable="number-of-pages" suffix="&#160;p"/>
+ </group>
+ <group>
+ <label variable="locator" form="short"/>
+ <text variable="locator"/>
+ </group>
+ </group>
+ </if>
+ <else-if type="chapter entry-dictionary entry-encyclopedia" match="any">
+ <group delimiter=", ">
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ <group>
+ <text term="volume" form="short" suffix="."/>
+ <text variable="number-of-volumes" prefix=". " suffix="/"/>
+ <text variable="volume"/>
+ </group>
+ <group>
+ <label variable="page" form="short"/>
+ <text variable="page" prefix="&#160;"/>
+ </group>
+ </group>
+ </else-if>
+ <else-if type="article-journal chapter" match="any">
+ <group delimiter=" ">
+ <label variable="page" form="short"/>
+ <text variable="page"/>
+ </group>
+ </else-if>
+ <else-if type="article-newspaper article-magazine" match="any">
+ <group delimiter=" ">
+ <date variable="issued">
+ <date-part name="day" suffix=" "/>
+ <date-part name="month" form="short" suffix=" "/>
+ <date-part name="year"/>
+ </date>
+ <label variable="page" form="short"/>
+ <text variable="page"/>
+ </group>
+ </else-if>
+ <else-if type="manuscript">
+ <group delimiter="" font-style="normal">
+ <choose>
+ <if variable="issued">
+ <date variable="issued">
+ <date-part name="day" suffix=" "/>
+ <date-part name="month" suffix=" "/>
+ <date-part name="year"/>
+ </date>
+ </if>
+ <else>
+ <text value="s. d."/>
+ </else>
+ </choose>
+ </group>
+ </else-if>
+ <else-if type="webpage post-weblog" match="any">
+ <group delimiter=" ">
+ <text value="consulté le" suffix=" " prefix=" "/>
+ <date variable="accessed" form="text">
+ <date-part name="day"/>
+ <date-part name="month"/>
+ <date-part name="year"/>
+ </date>
+ </group>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="edition">
+ <choose>
+ <if type="bill book graphic legal_case motion_picture report song chapter paper-conference" match="any">
+ <choose>
+ <if is-numeric="edition">
+ <group delimiter=" ">
+ <number variable="edition" form="ordinal"/>
+ <text term="edition" form="short"/>
+ </group>
+ </if>
+ <else>
+ <text variable="edition" text-case="capitalize-first" suffix="."/>
+ </else>
+ </choose>
+ </if>
+ <else-if type="article-journal article-magazine" match="any">
+ <group delimiter="">
+ <choose>
+ <if variable="issued">
+ <date variable="issued">
+ <date-part name="day" suffix=" "/>
+ <date-part name="month" suffix=" "/>
+ <date-part name="year"/>
+ </date>
+ <text macro="volume" prefix=", "/>
+ </if>
+ <else>
+ <text macro="volume" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ </group>
+ </else-if>
+ </choose>
+ <text macro="issue" prefix=", "/>
+ </macro>
+ <macro name="volume">
+ <choose>
+ <if is-numeric="volume">
+ <text term="volume" form="short" suffix=".&#160;"/>
+ <text variable="volume"/>
+ </if>
+ <else>
+ <text variable="volume"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="issue">
+ <choose>
+ <if is-numeric="issue">
+ <text term="issue" form="short" suffix="&#160;"/>
+ <text variable="issue"/>
+ </if>
+ <else>
+ <text variable="issue"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="collection">
+ <text variable="collection-title" quotes="true" prefix=" (coll.&#160;" suffix=")"/>
+ </macro>
+ <citation et-al-min="4" et-al-use-first="1">
+ <layout suffix="." delimiter="&#160;; ">
+ <choose>
+ <if position="ibid-with-locator">
+ <group delimiter=", ">
+ <text term="ibid" text-case="capitalize-first" font-style="italic" suffix="."/>
+ <text variable="locator" prefix="p.&#160;"/>
+ </group>
+ </if>
+ <else-if position="ibid">
+ <text term="ibid" text-case="capitalize-first" font-style="italic"/>
+ </else-if>
+ <else-if position="subsequent">
+ <group delimiter=", ">
+ <text macro="author-ibid"/>
+ <choose>
+ <if type="bill book graphic legal_case motion_picture report song thesis manuscript" match="any">
+ <text variable="title" form="short" font-style="italic"/>
+ <text term="cited" font-style="italic" suffix="."/>
+ </if>
+ <else>
+ <text variable="title" text-case="capitalize-first" form="short" quotes="true"/>
+ <text value="art cit"/>
+ </else>
+ </choose>
+ <text variable="locator" prefix="p.&#160;"/>
+ </group>
+ </else-if>
+ <else>
+ <choose>
+ <if type="manuscript">
+ <group delimiter=", ">
+ <text variable="archive"/>
+ <text variable="archive_location"/>
+ <text variable="call-number"/>
+ <text macro="title"/>
+ <text macro="yearpage-bib"/>
+ </group>
+ </if>
+ <else-if type="bill chapter article-journal article-newspaper interview book graphic legal_case motion_picture paper-conference report song thesis webpage post-weblog article-magazine" match="any">
+ <group delimiter=", ">
+ <text macro="author"/>
+ <text macro="title"/>
+ <text macro="translator"/>
+ <text macro="edition"/>
+ <text macro="pub-place"/>
+ <text macro="publisher"/>
+ <text macro="yearpage"/>
+ </group>
+ </else-if>
+ </choose>
+ </else>
+ </choose>
+ </layout>
+ </citation>
+ <bibliography>
+ <sort>
+ <key macro="author" names-min="3" names-use-first="3"/>
+ <key variable="issued" sort="descending"/>
+ </sort>
+ <layout suffix=".">
+ <choose>
+ <if type="manuscript">
+ <group delimiter=", ">
+ <text variable="archive"/>
+ <text variable="archive_location"/>
+ <text variable="call-number"/>
+ <text macro="title"/>
+ <text macro="yearpage-bib"/>
+ </group>
+ </if>
+ <else-if type="bill chapter article-journal article-newspaper interview book graphic legal_case motion_picture paper-conference report song thesis webpage post-weblog article-magazine" match="any">
+ <group delimiter=", ">
+ <text macro="author-bib"/>
+ <text macro="title"/>
+ <text macro="translator"/>
+ <text macro="edition"/>
+ <text macro="pub-place"/>
+ <group delimiter=" ">
+ <text macro="publisher"/>
+ <text macro="collection"/>
+ </group>
+ <text macro="yearpage-bib"/>
+ </group>
+ </else-if>
+ </choose>
+ </layout>
+ </bibliography>
+</style>
diff --git a/test/command/locators.csl b/test/command/locators.csl
new file mode 100644
index 000000000..610ac5bd4
--- /dev/null
+++ b/test/command/locators.csl
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-GB">
+ <info>
+ <title>A CSL to test locator parsing in pandoc-citeproc</title>
+ <title-short>test-locators</title-short>
+ <id>https://example.com/test-locators</id>
+ <link href="https://forums.zotero.org/discussion/4841/new-australian-legal-citation-style/?Focus=20831#Comment_20831" rel="documentation"/>
+ <category citation-format="note"/>
+ </info>
+
+ <locale>
+ <terms>
+ <term name="section" form="short">
+ <single>s</single>
+ <multiple>ss</multiple>
+ </term>
+ </terms>
+ </locale>
+
+ <macro name="locator">
+ <choose>
+ <if locator="section">
+ <!-- s or ss -->
+ <group delimiter=" " prefix=" ">
+ <label variable="locator" form="short" />
+ <text variable="locator" prefix="{" suffix="}" />
+ </group>
+ </if>
+ <else>
+ <text variable="locator" prefix=" {" suffix="}" />
+ </else>
+ </choose>
+ </macro>
+
+ <macro name="title">
+ <text variable="title" suffix=" "/>
+ </macro>
+
+ <citation>
+ <layout prefix="" suffix="." delimiter="; ">
+ <choose>
+ <if position="ibid-with-locator">
+ <text value="ibid-with-locator"/>
+ <text macro="locator"/>
+ </if>
+ <else-if position="ibid">
+ <text value="ibid"/>
+ </else-if>
+ <else-if position="subsequent">
+ <text value="subsequent"/>
+ <text macro="locator"/>
+ </else-if>
+ <else>
+ <text macro="title" />
+ <text macro="locator" />
+ </else>
+ </choose>
+ </layout>
+ </citation>
+ <bibliography>
+ <sort>
+ <key variable="issued"/>
+ </sort>
+ <layout>
+ <text variable="title" />
+ </layout>
+ </bibliography>
+</style>
diff --git a/test/command/modern-humanities-research-association.csl b/test/command/modern-humanities-research-association.csl
new file mode 100644
index 000000000..abdef0dd8
--- /dev/null
+++ b/test/command/modern-humanities-research-association.csl
@@ -0,0 +1,445 @@
+<?xml version="1.0" encoding="utf-8"?>
+<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-GB">
+ <info>
+ <title>Modern Humanities Research Association (note with bibliography)</title>
+ <id>http://www.zotero.org/styles/modern-humanities-research-association</id>
+ <link href="http://www.zotero.org/styles/modern-humanities-research-association" rel="self"/>
+ <link href="http://www.mhra.org.uk/Publications/Books/StyleGuide/download.shtml" rel="documentation"/>
+ <author>
+ <name>Rintze Zelle</name>
+ <uri>http://twitter.com/rintzezelle</uri>
+ </author>
+ <contributor>
+ <name>Sebastian Karcher</name>
+ </contributor>
+ <category citation-format="note"/>
+ <category field="generic-base"/>
+ <summary>MHRA format with full notes and bibliography</summary>
+ <updated>2013-04-16T04:40:01+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="et-al">and others</term>
+ <term name="editor" form="verb-short">ed. by</term>
+ <term name="edition" form="short">edn</term>
+ <term name="translator" form="verb-short">trans. by</term>
+ </terms>
+ </locale>
+ <macro name="author">
+ <group delimiter=". ">
+ <names variable="author">
+ <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
+ <label form="short" prefix=", " suffix="."/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <text macro="title-note"/>
+ </substitute>
+ </names>
+ <text macro="recipient"/>
+ </group>
+ </macro>
+ <macro name="recipient">
+ <group delimiter=" ">
+ <choose>
+ <if type="personal_communication">
+ <choose>
+ <if variable="genre">
+ <text variable="genre" text-case="capitalize-first"/>
+ </if>
+ <else>
+ <text term="letter" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ <text macro="recipient-note"/>
+ </group>
+ </macro>
+ <macro name="contributors-note">
+ <names variable="author">
+ <name and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="never"/>
+ <label form="short" prefix=", "/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <text macro="title-note"/>
+ </substitute>
+ </names>
+ <text macro="recipient-note"/>
+ </macro>
+ <macro name="title-note">
+ <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" quotes="true" text-case="title"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="disambiguate">
+ <choose>
+ <if disambiguate="true">
+ <choose>
+ <if variable="title" match="none">
+ <text macro="issued"/>
+ </if>
+ <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <text variable="title" font-style="italic" text-case="title" form="short"/>
+ </else-if>
+ <else>
+ <text variable="title" quotes="true" text-case="title" form="short"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="title-sort-substitute">
+ <choose>
+ <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <text variable="title" font-style="italic" text-case="title" form="short"/>
+ </if>
+ <else>
+ <text variable="title" quotes="true" text-case="title" form="short"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="editor-translator">
+ <group delimiter=", ">
+ <choose>
+ <if variable="author">
+ <group delimiter=" ">
+ <choose>
+ <if variable="container-author">
+ <group>
+ <names variable="container-author">
+ <label form="verb-short" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </group>
+ </if>
+ </choose>
+ </group>
+ <names variable="editor translator" delimiter=", ">
+ <label form="verb-short" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="collection-title">
+ <text variable="collection-title" text-case="title"/>
+ <text variable="collection-number" prefix=", "/>
+ </macro>
+ <macro name="locators-note">
+ <choose>
+ <if type="article-journal">
+ <text variable="volume"/>
+ </if>
+ <else-if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
+ <group delimiter=", ">
+ <text macro="edition-note"/>
+ <group>
+ <number variable="number-of-volumes" form="numeric"/>
+ <text term="volume" form="short" prefix=" " plural="true"/>
+ </group>
+ </group>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="volume">
+ <choose>
+ <if type="article-journal">
+ <text variable="volume"/>
+ </if>
+ <else-if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
+ <group delimiter=", ">
+ <text macro="edition-note"/>
+ <group>
+ <number variable="number-of-volumes" form="numeric"/>
+ <text term="volume" form="short" prefix=" " plural="true"/>
+ </group>
+ </group>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="issue-note">
+ <choose>
+ <if type="article-journal">
+ <choose>
+ <if variable="volume">
+ <text macro="issued" prefix=" (" suffix=")"/>
+ </if>
+ <else>
+ <text macro="issued" prefix=", "/>
+ </else>
+ </choose>
+ </if>
+ <else-if variable="publisher-place publisher" match="any">
+ <group prefix=" (" suffix=")" delimiter=", ">
+ <group delimiter=" ">
+ <choose>
+ <if variable="title" match="none"/>
+ <else-if type="thesis speech" match="any">
+ <text variable="genre" prefix="unpublished "/>
+ </else-if>
+ </choose>
+ <text macro="event"/>
+ </group>
+ <text macro="publisher"/>
+ <text macro="issued"/>
+ </group>
+ </else-if>
+ <else>
+ <text macro="issued" prefix=", "/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="locators-specific-note">
+ <choose>
+ <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
+ <choose>
+ <if is-numeric="volume">
+ <number variable="volume" form="roman" font-variant="small-caps"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="container-title-note">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <text term="in" text-case="lowercase" suffix=" "/>
+ </if>
+ </choose>
+ <text variable="container-title" font-style="italic"/>
+ </macro>
+ <macro name="edition-note">
+ <choose>
+ <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
+ <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>
+ </if>
+ </choose>
+ </macro>
+ <macro name="editor-note">
+ <names variable="editor">
+ <name and="text" sort-separator=", " delimiter=", "/>
+ <label form="short" prefix=", " suffix="."/>
+ </names>
+ </macro>
+ <macro name="translator-note">
+ <names variable="translator">
+ <name and="text" sort-separator=", " delimiter=", "/>
+ <label form="verb-short" prefix=", " suffix="."/>
+ </names>
+ </macro>
+ <macro name="recipient-note">
+ <names variable="recipient" delimiter=", ">
+ <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="recipient-short">
+ <names variable="recipient">
+ <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
+ <name form="short" and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="contributors-short">
+ <names variable="author">
+ <name form="short" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="never"/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <text macro="title-sort-substitute"/>
+ </substitute>
+ </names>
+ <text macro="recipient-short"/>
+ </macro>
+ <macro name="interviewer-note">
+ <names variable="interviewer" delimiter=", ">
+ <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="locators-newspaper">
+ <choose>
+ <if type="article-newspaper">
+ <group delimiter=", ">
+ <group>
+ <text variable="edition" suffix=" "/>
+ <text term="edition" prefix=" "/>
+ </group>
+ <group>
+ <text term="section" suffix=" "/>
+ <text variable="section"/>
+ </group>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="event">
+ <group>
+ <text term="presented at" suffix=" "/>
+ <text variable="event"/>
+ </group>
+ </macro>
+ <macro name="publisher">
+ <group delimiter=": ">
+ <text variable="publisher-place"/>
+ <text variable="publisher"/>
+ </group>
+ </macro>
+ <macro name="issued">
+ <choose>
+ <if type="graphic report article-newspaper article-magazine personal_communication" match="any">
+ <date variable="issued">
+ <date-part name="day" suffix=" "/>
+ <date-part name="month" suffix=" "/>
+ <date-part name="year"/>
+ </date>
+ </if>
+ <else>
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </else>
+ </choose>
+ </macro>
+ <macro name="pages">
+ <choose>
+ <if type="article-journal">
+ <text variable="page" prefix=", "/>
+ </if>
+ <else>
+ <choose>
+ <if variable="volume">
+ <text variable="page" prefix=", "/>
+ </if>
+ <else>
+ <label variable="page" form="short" prefix=", " suffix=" "/>
+ <text variable="page"/>
+ </else>
+ </choose>
+ </else>
+ </choose>
+ </macro>
+ <macro name="point-locators">
+ <text macro="pages"/>
+ <choose>
+ <if variable="page">
+ <group prefix=" (" suffix=")">
+ <label variable="locator" form="short" suffix=" "/>
+ <text variable="locator"/>
+ </group>
+ </if>
+ <else>
+ <label variable="locator" form="short" prefix=", " suffix=" "/>
+ <text variable="locator"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="point-locators-subsequent">
+ <label variable="locator" form="short" prefix=", " suffix=" "/>
+ <text variable="locator"/>
+ </macro>
+ <macro name="archive-note">
+ <group delimiter=", ">
+ <text variable="archive_location"/>
+ <text variable="archive"/>
+ <text variable="archive-place"/>
+ </group>
+ </macro>
+ <macro name="access-note">
+ <group delimiter=", ">
+ <choose>
+ <if type="article-journal bill chapter legal_case legislation paper-conference" match="none">
+ <text macro="archive-note" prefix=", "/>
+ </if>
+ </choose>
+ </group>
+ <choose>
+ <if variable="DOI">
+ <text variable="DOI" prefix=" &lt;doi:" suffix="&gt;"/>
+ </if>
+ <else>
+ <choose>
+ <if variable="URL">
+ <text variable="URL" prefix=" &lt;" suffix="&gt;"/>
+ <group prefix=" [" suffix="]">
+ <text term="accessed" text-case="lowercase"/>
+ <date variable="accessed">
+ <date-part name="day" prefix=" "/>
+ <date-part name="month" prefix=" "/>
+ <date-part name="year" prefix=" "/>
+ </date>
+ </group>
+ </if>
+ </choose>
+ </else>
+ </choose>
+ </macro>
+ <citation et-al-min="4" et-al-use-first="1" disambiguate-add-names="true" disambiguate-add-givenname="true">
+ <layout prefix="" suffix="." delimiter="; ">
+ <choose>
+ <if position="subsequent">
+ <group delimiter=", ">
+ <text macro="contributors-short"/>
+ <text macro="disambiguate"/>
+ <text macro="locators-specific-note"/>
+ </group>
+ <text macro="point-locators-subsequent"/>
+ </if>
+ <else>
+ <group delimiter=", ">
+ <text macro="contributors-note"/>
+ <text macro="title-note"/>
+ <text macro="container-title-note"/>
+ <text macro="editor-translator"/>
+ <text macro="collection-title"/>
+ <text macro="locators-note"/>
+ </group>
+ <text macro="issue-note"/>
+ <text macro="locators-specific-note" prefix=", "/>
+ <text macro="locators-newspaper" prefix=", "/>
+ <text macro="point-locators"/>
+ <text macro="access-note"/>
+ </else>
+ </choose>
+ </layout>
+ </citation>
+ <bibliography hanging-indent="true" et-al-min="7" et-al-use-first="6" subsequent-author-substitute="---">
+ <sort>
+ <key macro="author"/>
+ <key variable="title"/>
+ </sort>
+ <layout>
+ <group delimiter=", ">
+ <text macro="author"/>
+ <text macro="title-note"/>
+ <text macro="container-title-note"/>
+ <text macro="editor-translator"/>
+ <text macro="collection-title"/>
+ <text macro="volume"/>
+ </group>
+ <text macro="issue-note"/>
+ <text macro="locators-specific-note" prefix=", "/>
+ <text macro="locators-newspaper" prefix=", "/>
+ <text macro="pages"/>
+ <text macro="access-note"/>
+ </layout>
+ </bibliography>
+</style>
diff --git a/test/command/oscola.csl b/test/command/oscola.csl
new file mode 100644
index 000000000..8ff736119
--- /dev/null
+++ b/test/command/oscola.csl
@@ -0,0 +1,680 @@
+<?xml version="1.0" encoding="utf-8"?>
+<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" demote-non-dropping-particle="never" default-locale="en-GB">
+ <info>
+ <title>OSCOLA (Oxford University Standard for Citation of Legal Authorities)</title>
+ <title-short>OSCOLA</title-short>
+ <id>http://www.zotero.org/styles/oscola</id>
+ <link href="http://www.zotero.org/styles/oscola" rel="self"/>
+ <link href="http://www.zotero.org/styles/australian-guide-to-legal-citation" rel="template"/>
+ <link href="http://www.law.ox.ac.uk/publications/oscola.php" rel="documentation"/>
+ <author>
+ <name>Sebastian Karcher</name>
+ </author>
+ <category citation-format="note"/>
+ <category field="law"/>
+ <summary>The OSCOLA Standards. For a Zotero Group showing data-entry in Zotero see: https://www.zotero.org/groups/oscola_samples/items/order/itemType</summary>
+ <updated>2013-11-15T01:14:57+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>
+ <terms>
+ <term name="chapter" form="short">
+ <single>ch.</single>
+ <multiple>chs.</multiple>
+ </term>
+ <term name="section" form="short">
+ <single>s</single>
+ <multiple>ss</multiple>
+ </term>
+ <term name="paragraph" form="short">
+ <single>para</single>
+ <multiple>paras</multiple>
+ </term>
+ <term name="translator" form="short">
+ <single>tr.</single>
+ <multiple>trs.</multiple>
+ </term>
+ <term name="edition" form="short">edn.</term>
+ <term name="et-al">and others</term>
+ </terms>
+ </locale>
+ <!--Authors and Persons-->
+ <macro name="author-note">
+ <!--for bills & hearing this should start with jurisdiction once available-->
+ <choose>
+ <if type="interview">
+ <group delimiter=", ">
+ <names variable="interviewer">
+ <name delimiter-precedes-last="never" and="text" delimiter=", " initialize="false" initialize-with=""/>
+ </names>
+ <names variable="author" prefix="Interview with ">
+ <name delimiter-precedes-last="never" and="text" delimiter=", " initialize="false" initialize-with=""/>
+ </names>
+ </group>
+ </if>
+ <else-if type="personal_communication">
+ <group delimiter=" ">
+ <group delimiter=" from ">
+ <text variable="genre"/>
+ <names variable="author">
+ <name delimiter-precedes-last="never" and="text" delimiter=", " initialize="false" initialize-with=""/>
+ </names>
+ </group>
+ <names variable="recipient" prefix="to ">
+ <name delimiter-precedes-last="never" and="text" delimiter=", " initialize="false" initialize-with=""/>
+ </names>
+ </group>
+ </else-if>
+ <else-if type="broadcast">
+ <text variable="publisher"/>
+ </else-if>
+ <else-if type="legal_case legislation" match="any"/>
+ <else>
+ <names variable="author">
+ <name delimiter-precedes-last="never" and="text" delimiter=", " initialize="false" initialize-with=""/>
+ <label form="short" prefix=" (" suffix=")" strip-periods="true"/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <text macro="title"/>
+ </substitute>
+ </names>
+ </else>
+ </choose>
+ </macro>
+ <macro name="author-short">
+ <choose>
+ <if type="interview">
+ <group delimiter=", ">
+ <names variable="interviewer">
+ <name delimiter-precedes-last="never" and="text" form="short" delimiter=", " initialize="false" initialize-with=""/>
+ </names>
+ <names variable="author" prefix="Interview with ">
+ <name delimiter-precedes-last="never" and="text" form="short" delimiter=", " initialize="false" initialize-with=""/>
+ </names>
+ </group>
+ </if>
+ <else-if type="personal_communication">
+ <group delimiter=" ">
+ <group delimiter=" from ">
+ <text variable="genre"/>
+ <names variable="author">
+ <name delimiter-precedes-last="never" and="text" delimiter=", " form="short" initialize="false" initialize-with=""/>
+ </names>
+ </group>
+ <names variable="recipient" prefix="to ">
+ <name delimiter-precedes-last="never" and="text" delimiter=", " initialize="false" form="short" initialize-with=""/>
+ </names>
+ </group>
+ </else-if>
+ <else-if type="broadcast">
+ <text variable="publisher"/>
+ </else-if>
+ <else>
+ <names variable="author">
+ <name delimiter-precedes-last="never" and="text" delimiter=", " initialize="false" initialize-with="" form="short"/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <text macro="title"/>
+ </substitute>
+ </names>
+ </else>
+ </choose>
+ </macro>
+ <macro name="author">
+ <!--for bills & hearing this should start with jurisdiction once available-->
+ <choose>
+ <if type="interview">
+ <group delimiter=", ">
+ <names variable="interviewer">
+ <name delimiter-precedes-last="never" and="text" delimiter=", " initialize-with="" name-as-sort-order="all" sort-separator=" "/>
+ </names>
+ <names variable="author" prefix="Interview with ">
+ <name delimiter-precedes-last="never" and="text" delimiter=", " initialize="false" initialize-with=""/>
+ </names>
+ </group>
+ </if>
+ <else-if type="personal_communication">
+ <group delimiter=" ">
+ <group delimiter=", ">
+ <names variable="author">
+ <name delimiter-precedes-last="never" and="text" delimiter=", " initialize-with="" name-as-sort-order="all" sort-separator=" "/>
+ </names>
+ <text variable="genre"/>
+ </group>
+ <names variable="recipient" prefix="to ">
+ <name delimiter-precedes-last="never" and="text" delimiter=", " initialize="false" initialize-with=""/>
+ </names>
+ </group>
+ </else-if>
+ <else-if type="broadcast">
+ <text variable="publisher"/>
+ </else-if>
+ <else-if type="legal_case legislation" match="any"/>
+ <else>
+ <names variable="author">
+ <name delimiter-precedes-last="never" and="text" delimiter=", " name-as-sort-order="all" initialize-with="" sort-separator=" "/>
+ <label form="short" prefix=" (" suffix=")" strip-periods="true"/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <text macro="title"/>
+ </substitute>
+ </names>
+ </else>
+ </choose>
+ </macro>
+ <macro name="editor">
+ <choose>
+ <if type="chapter paper-conference entry-encyclopedia" match="none">
+ <names variable="editor translator container-author" delimiter=", ">
+ <name delimiter-precedes-last="never" and="text" delimiter=", " initialize="false" initialize-with=""/>
+ <label form="short" prefix=" " strip-periods="true"/>
+ </names>
+ </if>
+ </choose>
+ </macro>
+ <macro name="editor-chapter">
+ <group>
+ <text term="in" suffix=" "/>
+ <names variable="editor translator container-author" delimiter=", ">
+ <name delimiter-precedes-last="never" and="text" delimiter=", " initialize="false" initialize-with=""/>
+ <label form="short" prefix=" (" suffix=")" strip-periods="true"/>
+ </names>
+ </group>
+ </macro>
+ <!-- Titles -->
+ <macro name="title">
+ <choose>
+ <if type="book motion_picture treaty" match="any">
+ <text variable="title" font-style="italic" text-case="title"/>
+ </if>
+ <else-if type="bill legislation" match="any">
+ <text variable="title"/>
+ </else-if>
+ <else-if type="legal_case">
+ <text variable="title" font-style="italic" strip-periods="true"/>
+ </else-if>
+ <else>
+ <text variable="title" quotes="true" text-case="title"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="title-short">
+ <choose>
+ <if type="book motion_picture treaty" match="any">
+ <text variable="title" font-style="italic" text-case="title" form="short"/>
+ </if>
+ <else-if type="bill legislation" match="any">
+ <text variable="title" form="short"/>
+ </else-if>
+ <else-if type="legal_case">
+ <choose>
+ <if variable="title-short">
+ <text variable="title-short" font-style="italic"/>
+ </if>
+ <else>
+ <text variable="title" font-style="italic"/>
+ </else>
+ </choose>
+ </else-if>
+ <else>
+ <text variable="title" quotes="true" text-case="title" form="short"/>
+ </else>
+ </choose>
+ </macro>
+ <!--Dates-->
+ <macro name="issued-year">
+ <date variable="issued" form="text" date-parts="year"/>
+ </macro>
+ <macro name="issued-full">
+ <date variable="issued" form="text"/>
+ </macro>
+ <macro name="date-parenthesis">
+ <choose>
+ <if type="legal_case article-journal article-magazine" match="any">
+ <choose>
+ <if variable="number authority" match="all">
+ <text macro="issued-year" prefix="[" suffix="]"/>
+ </if>
+ <else-if variable="volume">
+ <text macro="issued-year" prefix="(" suffix=")"/>
+ </else-if>
+ <else-if variable="container-title volume number" match="any">
+ <!--no year in square brackets for unreported case w/o medium neutral citation-->
+ <text macro="issued-year" prefix="[" suffix="]"/>
+ </else-if>
+ </choose>
+ </if>
+ <else-if type="legislation bill" match="any">
+ <text macro="issued-year"/>
+ </else-if>
+ </choose>
+ </macro>
+ <!--publication info -->
+ <macro name="publisher">
+ <choose>
+ <if type="book chapter broadcast personal_communication manuscript paper-conference article-newspaper report legislation motion_picture speech interview thesis entry-encyclopedia webpage post-weblog" match="any">
+ <group delimiter=" ">
+ <group prefix="(" suffix=")" delimiter=", ">
+ <choose>
+ <if type="article-newspaper">
+ <text variable="publisher-place" strip-periods="true"/>
+ <date variable="issued" form="text"/>
+ </if>
+ <else-if type="broadcast personal_communication treaty" match="any">
+ <date variable="issued" form="text"/>
+ </else-if>
+ <else-if type="legislation bill" match="any">
+ <!--this should be jurisdiction we use code instead-->
+ <text variable="container-title" strip-periods="true"/>
+ </else-if>
+ <else>
+ <!--this won't work in Zotero yet, but does no harm -->
+ <names variable="director">
+ <label form="verb" text-case="capitalize-first" suffix=" "/>
+ <name delimiter-precedes-last="never" and="text" delimiter=", " initialize="false" initialize-with=""/>
+ </names>
+ <text macro="editor"/>
+ <choose>
+ <!--if none of these, this we don't want edition either. Might be Loose-Leaf-->
+ <if variable="publisher issued genre container-title" match="any">
+ <text macro="edition"/>
+ </if>
+ </choose>
+ <choose>
+ <if type="speech">
+ <text variable="event"/>
+ <text variable="event-place"/>
+ <text macro="issued-full"/>
+ </if>
+ <else-if type="thesis" match="any">
+ <text variable="genre" strip-periods="true"/>
+ <group delimiter=" ">
+ <text variable="publisher" strip-periods="true"/>
+ <text macro="issued-year"/>
+ </group>
+ </else-if>
+ <else-if type="webpage post-weblog" match="any">
+ <text variable="container-title" font-style="italic"/>
+ <text macro="issued-full"/>
+ </else-if>
+ <else-if type="interview" match="any">
+ <text macro="issued-full"/>
+ </else-if>
+ <else>
+ <group delimiter=" ">
+ <text variable="publisher" strip-periods="true"/>
+ <text macro="issued-year"/>
+ </group>
+ </else>
+ </choose>
+ </else>
+ </choose>
+ </group>
+ <choose>
+ <if type="report interview manuscript" match="any">
+ <group delimiter=" ">
+ <text variable="genre" strip-periods="true"/>
+ <text variable="number"/>
+ </group>
+ </if>
+ </choose>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="looseleaf-note">
+ <choose>
+ <if type="book">
+ <choose>
+ <if variable="publisher issued" match="none">
+ <choose>
+ <if variable="locator">
+ <group delimiter=" ">
+ <label variable="locator" form="short" strip-periods="true"/>
+ <text variable="locator"/>
+ <text variable="edition" prefix="(" suffix=")"/>
+ </group>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="volume-book">
+ <choose>
+ <if type="book chapter report" match="any">
+ <group delimiter=" ">
+ <label variable="volume" form="short" strip-periods="true"/>
+ <text variable="volume"/>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="edition">
+ <choose>
+ <if is-numeric="edition">
+ <group delimiter=" ">
+ <number variable="edition" form="ordinal"/>
+ <label variable="edition" form="short" strip-periods="true"/>
+ </group>
+ </if>
+ <else>
+ <text variable="edition" strip-periods="true"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="book-container">
+ <choose>
+ <if type="chapter paper-conference entry-encyclopedia" match="any">
+ <group>
+ <text macro="editor-chapter" prefix=" "/>
+ <text variable="container-title" font-style="italic" prefix=", "/>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="broadcast-container">
+ <choose>
+ <if type="broadcast" match="any">
+ <text variable="container-title" font-style="italic"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="bill-number">
+ <choose>
+ <if type="bill">
+ <text variable="number" prefix="[" suffix="]"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="article-case-info">
+ <choose>
+ <if type="article-journal article-magazine article-newspaper legal_case" match="any">
+ <group delimiter=", ">
+ <!--Assume that only cases with a Medium Neutral Citation have a docket number -->
+ <choose>
+ <if variable="authority number" match="all">
+ <group delimiter=" ">
+ <text variable="authority" form="short" strip-periods="true"/>
+ <text variable="number"/>
+ </group>
+ </if>
+ </choose>
+ <group delimiter=" ">
+ <text variable="volume"/>
+ <choose>
+ <if type="legal_case">
+ <choose>
+ <if variable="container-title">
+ <text variable="container-title" form="short" strip-periods="true"/>
+ </if>
+ </choose>
+ </if>
+ <else-if type="article-magazine article-newspaper" match="any">
+ <text variable="container-title" font-style="italic"/>
+ </else-if>
+ <else>
+ <text variable="container-title"/>
+ </else>
+ </choose>
+ </group>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="page-first">
+ <choose>
+ <if type="chapter report paper-conference" match="none">
+ <text variable="page-first"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="court">
+ <choose>
+ <if type="legal_case">
+ <choose>
+ <if variable="number" match="none">
+ <text variable="authority" prefix="(" suffix=")" strip-periods="true"/>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locator-basic">
+ <group delimiter=" ">
+ <choose>
+ <if locator="page" match="none">
+ <label variable="locator" form="short" strip-periods="true"/>
+ </if>
+ </choose>
+ <text variable="locator"/>
+ </group>
+ </macro>
+ <macro name="locator-space">
+ <choose>
+ <if type="legal_case">
+ <choose>
+ <if locator="paragraph">
+ <text variable="locator" prefix="[" suffix="]"/>
+ </if>
+ <else-if variable="number container-title volume page" match="all"/>
+ <else-if variable="authority">
+ <text variable="locator"/>
+ </else-if>
+ </choose>
+ </if>
+ <else-if type="legislation book article-journal article-magazine" match="none">
+ <text macro="locator-basic"/>
+ </else-if>
+ <else-if type="book">
+ <choose>
+ <if variable="issued publisher" match="any">
+ <text macro="locator-basic"/>
+ </if>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="locator-comma">
+ <choose>
+ <if type="legal_case">
+ <choose>
+ <if locator="paragraph" match="none">
+ <choose>
+ <if variable="authority" match="none">
+ <text variable="locator"/>
+ </if>
+ <else-if variable="number container-title volume page" match="all">
+ <text variable="locator"/>
+ </else-if>
+ </choose>
+ </if>
+ </choose>
+ </if>
+ <else-if type="legislation article-journal article-magazine" match="any">
+ <text macro="locator-basic"/>
+ </else-if>
+ </choose>
+ </macro>
+ <!--Others -->
+ <macro name="treaty-catchall">
+ <choose>
+ <if type="treaty">
+ <text variable="genre"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="URL">
+ <choose>
+ <if type="legal_case legislation bill" match="none">
+ <choose>
+ <if variable="URL">
+ <group delimiter=" ">
+ <text variable="URL" prefix="&lt;" suffix="&gt;"/>
+ <group delimiter=" ">
+ <text term="accessed"/>
+ <date variable="accessed" form="text"/>
+ </group>
+ </group>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="author-count">
+ <names variable="author">
+ <name form="count"/>
+ <substitute>
+ <names variable="editor"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="sort-type">
+ <!--This should just sort secondary sources first. I'm leaving the rest from AGLC for simplicity-->
+ <choose>
+ <if type="book chapter paper-conference article-magazine article-newspaper article-journal manuscript report speech entry-encyclopedia" match="any">
+ <text value="1"/>
+ </if>
+ <else-if type="legal_case">
+ <text value="2"/>
+ <text variable="title"/>
+ </else-if>
+ <else-if type="bill legislation" match="any">
+ <text value="3"/>
+ <choose>
+ <if type="legislation">
+ <text variable="title"/>
+ </if>
+ </choose>
+ </else-if>
+ <else-if type="treaty">
+ <text value="4"/>
+ </else-if>
+ <else>
+ <text value="1"/>
+ </else>
+ </choose>
+ </macro>
+ <citation et-al-min="4" et-al-use-first="1">
+ <layout suffix="." delimiter="; ">
+ <choose>
+ <if position="ibid-with-locator">
+ <group delimiter=" ">
+ <text term="ibid" strip-periods="true" text-case="lowercase"/>
+ <text variable="locator"/>
+ </group>
+ </if>
+ <else-if position="ibid">
+ <text term="ibid" strip-periods="true" text-case="lowercase"/>
+ </else-if>
+ <else-if position="subsequent">
+ <choose>
+ <if type="legal_case bill legislation treaty" match="any">
+ <!--don't use short form and above note for legal citations -->
+ <group delimiter=" ">
+ <text macro="author-note"/>
+ <text macro="title-short"/>
+ <text macro="looseleaf-note"/>
+ <text variable="first-reference-note-number" prefix="(n " suffix=")"/>
+ <text macro="locator-space"/>
+ </group>
+ </if>
+ <else>
+ <group delimiter=" ">
+ <group delimiter=", ">
+ <text macro="author-short"/>
+ <choose>
+ <if disambiguate="true">
+ <text macro="title-short"/>
+ </if>
+ </choose>
+ </group>
+ <text variable="first-reference-note-number" prefix="(n " suffix=")"/>
+ <text macro="locator-basic"/>
+ </group>
+ </else>
+ </choose>
+ </else-if>
+ <else>
+ <!--general whole citation -->
+ <group delimiter=" ">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <group delimiter=", ">
+ <text macro="author-note"/>
+ <group>
+ <text macro="title"/>
+ <text macro="book-container"/>
+ </group>
+ <text macro="broadcast-container"/>
+ <text macro="volume-book"/>
+ <text macro="looseleaf-note"/>
+ </group>
+ <group delimiter=" ">
+ <text macro="date-parenthesis"/>
+ <text macro="bill-number"/>
+ <text macro="article-case-info"/>
+ <text macro="publisher"/>
+ </group>
+ </group>
+ <text macro="treaty-catchall"/>
+ </group>
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <text macro="page-first"/>
+ <text macro="court"/>
+ <text macro="locator-space"/>
+ </group>
+ <text macro="locator-comma"/>
+ </group>
+ <text macro="URL"/>
+ </group>
+ </else>
+ </choose>
+ </layout>
+ </citation>
+ <bibliography et-al-min="4" et-al-use-first="1" subsequent-author-substitute="&#8212;&#8212;">
+ <sort>
+ <key macro="sort-type"/>
+ <key macro="author" names-min="1" names-use-first="1"/>
+ <key macro="author-count" names-min="2" names-use-first="2"/>
+ <key macro="author"/>
+ <key variable="issued"/>
+ <key variable="title"/>
+ </sort>
+ <layout>
+ <group delimiter=" ">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <group delimiter=", ">
+ <text macro="author"/>
+ <group>
+ <text macro="title"/>
+ <text macro="book-container"/>
+ </group>
+ <text macro="broadcast-container"/>
+ <text macro="volume-book"/>
+ <text macro="looseleaf-note"/>
+ </group>
+ <group delimiter=" ">
+ <text macro="date-parenthesis"/>
+ <text macro="bill-number"/>
+ <text macro="article-case-info"/>
+ <text macro="publisher"/>
+ </group>
+ </group>
+ <text macro="treaty-catchall"/>
+ </group>
+ <group delimiter=" ">
+ <text macro="page-first"/>
+ <text macro="court"/>
+ </group>
+ <text macro="URL"/>
+ </group>
+ </layout>
+ </bibliography>
+</style>
diff --git a/test/command/pandoc-citeproc-118.md b/test/command/pandoc-citeproc-118.md
new file mode 100644
index 000000000..063bb6bbf
--- /dev/null
+++ b/test/command/pandoc-citeproc-118.md
@@ -0,0 +1,28 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- director:
+ family: Hitchcock
+ given: Alfred
+ id: nbn
+ issued:
+ year: 1959
+ language: 'en-US'
+ publisher: 'Metro-Goldwyn-Mayer'
+ publisher-place: USA
+ title: North by Northwest
+ type: motion_picture
+---
+
+[@nbn] is a spy thriller film.
+^D
+(Hitchcock 1959) is a spy thriller film.
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-nbn .csl-entry}
+Hitchcock, Alfred, dir. 1959. *North by Northwest*. USA:
+Metro-Goldwyn-Mayer.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-119.md b/test/command/pandoc-citeproc-119.md
new file mode 100644
index 000000000..8dfdfe421
--- /dev/null
+++ b/test/command/pandoc-citeproc-119.md
@@ -0,0 +1,39 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+bibliography: 'command/biblatex-examples.bib'
+csl: command/apa.csl
+---
+
+@averroes/bland; @averroes/hannes; @averroes/hercz
+
+References {#references .unnumbered}
+==========
+^D
+Averroes (1982); Averroes (1892); Averroes (1869)
+
+References {#references .unnumbered}
+==========
+
+::: {#refs .references .csl-bib-body .hanging-indent line-spacing="2"}
+::: {#ref-averroes/hercz .csl-entry}
+Averroes. (1869). *Drei Abhandlungen über die Conjunction des separaten
+Intellects mit dem Menschen: Von Averroes (Vater und Sohn), aus dem
+Arabischen übersetzt von Samuel Ibn Tibbon*. (J. Hercz, Ed. & Trans.).
+Berlin: S. Hermann.
+:::
+
+::: {#ref-averroes/hannes .csl-entry}
+Averroes. (1892). *Des Averroës Abhandlung: "Über die Möglichkeit der
+Conjunktion" oder "Über den materiellen Intellekt"*. (L. Hannes, Ed. &
+Trans.). Halle an der Saale: C. A. Kaemmerer.
+:::
+
+::: {#ref-averroes/bland .csl-entry}
+Averroes. (1982). *The epistle on the possibility of conjunction with
+the active intellect by Ibn Rushd with the commentary of Moses Narboni*.
+(K. P. Bland, Ed. & Trans.). New York: Jewish Theological Seminary of
+America.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-13.md b/test/command/pandoc-citeproc-13.md
new file mode 100644
index 000000000..7d05aee0a
--- /dev/null
+++ b/test/command/pandoc-citeproc-13.md
@@ -0,0 +1,29 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: 'command/chicago-note-bibliography.csl'
+references:
+- author:
+ family: Author
+ given:
+ - Ann
+ container-title: Journal
+ id: item1
+ issued:
+ - year: 2011
+ title: Title
+ type: 'article-newspaper'
+---
+
+Foo [@item1].
+^D
+Foo.[^1]
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-item1 .csl-entry}
+Author, Ann. "Title." *Journal*, 2011.
+:::
+:::
+
+[^1]: Author, "Title."
+```
diff --git a/test/command/pandoc-citeproc-136.md b/test/command/pandoc-citeproc-136.md
new file mode 100644
index 000000000..b04ff7c71
--- /dev/null
+++ b/test/command/pandoc-citeproc-136.md
@@ -0,0 +1,23 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- id: stanze
+ type: book
+ issued:
+ - year: 1547
+ title: Stanze in lode della donna brutta
+ publisher-place: Florence
+ language: it-IT
+...
+
+@stanze is an anoynymous work.
+^D
+*Stanze in lode della donna brutta* (1547) is an anoynymous work.
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-stanze .csl-entry}
+*Stanze in lode della donna brutta*. 1547. Florence.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-14.md b/test/command/pandoc-citeproc-14.md
new file mode 100644
index 000000000..18c3a91ee
--- /dev/null
+++ b/test/command/pandoc-citeproc-14.md
@@ -0,0 +1,78 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- author:
+ family: Pelikan
+ given: Jaroslav
+ container-title: 'The Christian tradition: A history of the
+ development of doctrine'
+ id: CTv1c2
+ issued:
+ - year: 1971
+ language: 'en-US'
+ page: '34-56'
+ publisher: University of Chicago Press
+ publisher-place: Chicago
+ title: Chapter two
+ type: chapter
+ volume: 1
+ volume-title: 'The emergence of the Catholic tradition (100--600)'
+- author:
+ family: Pelikan
+ given: Jaroslav
+ container-title: 'The Christian tradition: A history of the
+ development of doctrine'
+ id: CTv1
+ issued:
+ - year: 1971
+ language: 'en-US'
+ publisher: University of Chicago Press
+ publisher-place: Chicago
+ title: 'The emergence of the Catholic tradition (100--600)'
+ type: book
+ volume: 1
+- author:
+ family: Pelikan
+ given: Jaroslav
+ id: CT
+ issued:
+ - year: 1971
+ language: 'en-US'
+ publisher: University of Chicago Press
+ publisher-place: Chicago
+ title: 'The Christian tradition: A history of the development of
+ doctrine'
+ type: book
+---
+
+Foo [@CT, 1:12]. Bar [@CTv1, 12]. Baz [@CTv1c2, 12].
+
+References {#references .unnumbered}
+==========
+^D
+Foo (Pelikan 1971b, 1:12). Bar (Pelikan 1971c, 1:12). Baz (Pelikan
+1971a, 12).
+
+References {#references .unnumbered}
+==========
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-CTv1c2 .csl-entry}
+Pelikan, Jaroslav. 1971a. "Chapter Two." In *The Christian Tradition: A
+History of the Development of Doctrine*, 1:34--56. Chicago: University
+of Chicago Press.
+:::
+
+::: {#ref-CT .csl-entry}
+---------. 1971b. *The Christian Tradition: A History of the Development
+of Doctrine*. Chicago: University of Chicago Press.
+:::
+
+::: {#ref-CTv1 .csl-entry}
+---------. 1971c. *The Emergence of the Catholic Tradition (100--600)*.
+*The Christian Tradition: A History of the Development of Doctrine*.
+Vol. 1. Chicago: University of Chicago Press.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-152.md b/test/command/pandoc-citeproc-152.md
new file mode 100644
index 000000000..3e7be2e93
--- /dev/null
+++ b/test/command/pandoc-citeproc-152.md
@@ -0,0 +1,65 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: command/apa.csl
+references:
+- URL: 'http://geekfeminism.wikia.com/wiki/Geek_Feminism'
+ accessed:
+ day: 10
+ month: 4
+ year: 2013
+ container-title: Geek Feminism
+ custom2: ok.mm
+ id: Feminism2013gf
+ issued:
+ day: 10
+ month: 4
+ year: 2013
+ keyword: gender
+ title: Geek Feminism
+ type: webpage
+- URL: 'http://geekfeminism.wikia.com/wiki/Category:Communities'
+ accessed:
+ day: 19
+ month: 10
+ year: 2011
+ container-title: Geek Feminism
+ custom2: gender.mm
+ id: Feminism2011ces
+ issued:
+ day: 14
+ month: 8
+ year: 2011
+ keyword: gender
+ title: Communities
+ type: 'entry-encyclopedia'
+---
+
+Test
+====
+
+I have two citations [@Feminism2013gf; @Feminism2011ces].
+
+References
+==========
+^D
+Test
+====
+
+I have two citations ("Communities," 2011; "Geek Feminism," 2013).
+
+References {#references .unnumbered}
+==========
+
+::: {#refs .references .csl-bib-body .hanging-indent line-spacing="2"}
+::: {#ref-Feminism2011ces .csl-entry}
+Communities. (2011, August 14). In *Geek Feminism*. Retrieved from
+<http://geekfeminism.wikia.com/wiki/Category:Communities>
+:::
+
+::: {#ref-Feminism2013gf .csl-entry}
+Geek Feminism. (2013, April 10). *Geek Feminism*. Retrieved April 10,
+2013, from <http://geekfeminism.wikia.com/wiki/Geek_Feminism>
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-160.md b/test/command/pandoc-citeproc-160.md
new file mode 100644
index 000000000..9f2a29e2c
--- /dev/null
+++ b/test/command/pandoc-citeproc-160.md
@@ -0,0 +1,46 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: command/issue160.csl
+references:
+- author:
+ - family: Doe
+ given: Jane
+ citation-label: Jane11
+ id: item1
+ issued:
+ year: 2011
+ title: A book
+ type: book
+---
+
+No citation-label
+-----------------
+
+Foo [@item1].
+
+Expected
+--------
+
+> Foo \[Jane11\].
+>
+> \[Jane11\] Jane Doe. A book. 2011.
+^D
+No citation-label
+-----------------
+
+Foo \[Jane11\].
+
+Expected
+--------
+
+> Foo \[Jane11\].
+>
+> \[Jane11\] Jane Doe. A book. 2011.
+
+::: {#refs .references .csl-bib-body}
+::: {#ref-item1 .csl-entry}
+\[Jane11\] Jane Doe. A book. 2011.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-175.md b/test/command/pandoc-citeproc-175.md
new file mode 100644
index 000000000..7fc50f2b1
--- /dev/null
+++ b/test/command/pandoc-citeproc-175.md
@@ -0,0 +1,45 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- author:
+ - family: Doe
+ given: Jane
+ container-title: A magazine
+ id: item1
+ issued:
+ - month: 1
+ year: 2011
+ - month: 2
+ year: 2011
+ page: '33-44'
+ title: A title
+ type: 'article-magazine'
+---
+
+Missing en-dash between months
+------------------------------
+
+Foo [@item1].
+
+Expected
+--------
+
+> Doe, Jane. 2011. "A Title." *A Magazine*, January--February.
+^D
+Missing en-dash between months
+------------------------------
+
+Foo (Doe 2011).
+
+Expected
+--------
+
+> Doe, Jane. 2011. "A Title." *A Magazine*, January--February.
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-item1 .csl-entry}
+Doe, Jane. 2011. "A Title." *A Magazine*, January--February 2011.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-197.md b/test/command/pandoc-citeproc-197.md
new file mode 100644
index 000000000..5713d67cc
--- /dev/null
+++ b/test/command/pandoc-citeproc-197.md
@@ -0,0 +1,31 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: 'command/chicago-fullnote-bibliography.csl'
+nocite: '@test'
+references:
+- editor:
+ - family: Abelard
+ given: Peter
+ id: test
+ issued:
+ date-parts:
+ - - 1989
+ publisher: Clarendon Press
+ publisher-place: Oxford
+ title: Test
+ type: book
+---
+
+This is a test [@test].
+^D
+This is a test.[^1]
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-test .csl-entry}
+Abelard, Peter, ed. *Test*. Oxford: Clarendon Press, 1989.
+:::
+:::
+
+[^1]: Peter Abelard, ed., *Test* (Oxford: Clarendon Press, 1989).
+```
diff --git a/test/command/pandoc-citeproc-213.md b/test/command/pandoc-citeproc-213.md
new file mode 100644
index 000000000..2ca2287a1
--- /dev/null
+++ b/test/command/pandoc-citeproc-213.md
@@ -0,0 +1,34 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: 'command/harvard-university-of-kent.csl'
+references:
+- author:
+ - family: Doe
+ given: Ann
+ collection-title: The collection title
+ dimensions: 789 pp.
+ id: doe1
+ issued:
+ - year: 1999
+ publisher: The publisher
+ title: Title
+ type: book
+---
+
+Foo [@doe1].
+
+References {#references .unnumbered}
+==========
+^D
+Foo (Doe 1999).
+
+References {#references .unnumbered}
+==========
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-doe1 .csl-entry}
+Doe, A. (1999). *Title*. The collection title. The publisher. 789 pp.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-25.md b/test/command/pandoc-citeproc-25.md
new file mode 100644
index 000000000..ab0b8c6f8
--- /dev/null
+++ b/test/command/pandoc-citeproc-25.md
@@ -0,0 +1,31 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- author:
+ - family: Author
+ given: Al
+ id: item1
+ issued:
+ date-parts:
+ - - 1998
+ title: 'foo bar baz: bazbaz foo'
+ type: 'article-journal'
+---
+
+Foo [@item1].
+
+References {#references .unnumbered}
+==========
+^D
+Foo (Author 1998).
+
+References {#references .unnumbered}
+==========
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-item1 .csl-entry}
+Author, Al. 1998. "Foo Bar Baz: Bazbaz Foo."
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-250.md b/test/command/pandoc-citeproc-250.md
new file mode 100644
index 000000000..48cf68de1
--- /dev/null
+++ b/test/command/pandoc-citeproc-250.md
@@ -0,0 +1,21 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+link-citations: true
+references:
+- author:
+ family: Doe
+ id: doe
+ title: Title
+---
+
+[@doe]
+^D
+([Doe, n.d.](#ref-doe))
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-doe .csl-entry}
+Doe. n.d. "Title."
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-27.md b/test/command/pandoc-citeproc-27.md
new file mode 100644
index 000000000..ce8c20eff
--- /dev/null
+++ b/test/command/pandoc-citeproc-27.md
@@ -0,0 +1,39 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: command/science.csl
+references:
+- author:
+ - family: AuthorOne
+ given: Joe
+ - family: AuthorTwo
+ given: Jill
+ container-title: Some Journal
+ id: AuthorOne2014
+ issue: X
+ issued:
+ date-parts:
+ - - 2014
+ page: 'XXXX-YYYY'
+ title: Sample Title
+ type: 'article-journal'
+ volume: XX
+---
+
+Minimal example
+===============
+
+Here is some text that needs a citation [@AuthorOne2014].
+^D
+Minimal example
+===============
+
+Here is some text that needs a citation (*1*).
+
+::: {#refs .references .csl-bib-body}
+::: {#ref-AuthorOne2014 .csl-entry}
+[1. ]{.csl-left-margin}[J. AuthorOne, J. AuthorTwo, *Some Journal*, in
+press.]{.csl-right-inline}
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-292.md b/test/command/pandoc-citeproc-292.md
new file mode 100644
index 000000000..cffeb0539
--- /dev/null
+++ b/test/command/pandoc-citeproc-292.md
@@ -0,0 +1,43 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: 'command/sage-harvard.csl'
+references:
+- author:
+ family: Doe
+ id: doe
+ issued:
+ year: 2007
+ type: article
+- author:
+ family: Zoe
+ id: zoe
+ issued:
+ - year: 2009
+ type: article
+- author:
+ family: Roe
+ id: roe
+ issued:
+ - year: 2007
+ type: article
+---
+
+[@zoe; @roe; see for comparison @doe, p. 3]
+^D
+(Roe, 2007; Zoe, 2009; see for comparison Doe, 2007: 3)
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-doe .csl-entry}
+Doe (2007).
+:::
+
+::: {#ref-roe .csl-entry}
+Roe (2007).
+:::
+
+::: {#ref-zoe .csl-entry}
+Zoe (2009).
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-301.md b/test/command/pandoc-citeproc-301.md
new file mode 100644
index 000000000..9d4af0339
--- /dev/null
+++ b/test/command/pandoc-citeproc-301.md
@@ -0,0 +1,25 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- id: test
+ title: Essays presented to N.R. Ker (On Art)
+- id: test2
+ title: '*Test:* An experiment: An abridgement'
+---
+
+@test; @test2
+^D
+"Essays Presented to N.R. Ker (On Art)" (n.d.); "*Test:* An Experiment:
+An Abridgement" (n.d.)
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-test .csl-entry}
+"Essays Presented to N.R. Ker (On Art)." n.d.
+:::
+
+::: {#ref-test2 .csl-entry}
+"*Test:* An Experiment: An Abridgement." n.d.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-307.md b/test/command/pandoc-citeproc-307.md
new file mode 100644
index 000000000..ada3781e4
--- /dev/null
+++ b/test/command/pandoc-citeproc-307.md
@@ -0,0 +1,31 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+lang: 'fr-FR'
+references:
+- author:
+ - family: Bazin
+ given: André
+ container-title: Cahiers du cinéma
+ id: bazin_cybernetique_1954
+ issue: 36
+ issued:
+ date-parts:
+ - - 1954
+ - 6
+ page: '22-27'
+ title: 'La Cybernétique d''André Cayatte'
+ type: 'article-journal'
+---
+
+Bonjour[@bazin_cybernetique_1954] !
+^D
+Bonjour(Bazin 1954) !
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-bazin_cybernetique_1954 .csl-entry}
+Bazin, André. 1954. « La Cybernétique d'André Cayatte ». *Cahiers du
+cinéma*, nᵒ 36 (juin): 22‑27.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-31.md b/test/command/pandoc-citeproc-31.md
new file mode 100644
index 000000000..a06b2ae41
--- /dev/null
+++ b/test/command/pandoc-citeproc-31.md
@@ -0,0 +1,48 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: command/oscola.csl
+references:
+- DOI: 10.1086/504343
+ author:
+ - family: Olson
+ given: Hope A.
+ container-title: Library Quarterly
+ id: item1
+ issue: 1
+ issued:
+ date-parts:
+ - - 2006
+ page: '19-35'
+ title: 'Codes, costs, and critiques: The organization of information
+ in *Library Quarterly*, 1931--2004'
+ title-short: 'Codes, costs, and critiques'
+ type: 'article-magazine'
+ volume: 76
+- id: item2
+ title: Second title
+---
+
+Foo [@item1]. Bar [@item2]. Baz [@item1].
+^D
+Foo.[^1] Bar.[^2] Baz.[^3]
+
+::: {#refs .references .csl-bib-body}
+::: {#ref-item1 .csl-entry}
+Olson HA, 'Codes, Costs, and Critiques: The Organization of Information
+in *Library Quarterly*, 1931--2004' (2006) 76 *Library Quarterly* 19
+:::
+
+::: {#ref-item2 .csl-entry}
+'Second Title'
+:::
+:::
+
+[^1]: Hope A Olson, 'Codes, Costs, and Critiques: The Organization of
+ Information in *Library Quarterly*, 1931--2004' (2006) 76 *Library
+ Quarterly* 19.
+
+[^2]: 'Second Title'.
+
+[^3]: Olson (n 1).
+```
diff --git a/test/command/pandoc-citeproc-312.md b/test/command/pandoc-citeproc-312.md
new file mode 100644
index 000000000..dfc4fe25c
--- /dev/null
+++ b/test/command/pandoc-citeproc-312.md
@@ -0,0 +1,171 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: command/apa.csl
+nocite: '@*'
+references:
+- author:
+ - literal: NN
+ id: Y
+ issued:
+ - year: 1950
+ title: 'Date: Year'
+ title-short: Date
+ type: webpage
+- author:
+ - literal: NN
+ id: Y/Y
+ issued:
+ - year: 1951
+ - year: 1952
+ title: 'Date range: Year'
+ title-short: Date range
+ type: webpage
+- author:
+ - literal: NN
+ id: YM
+ issued:
+ - month: 1
+ year: 1953
+ title: 'Date: Year+month'
+ title-short: Date
+ type: webpage
+- author:
+ - literal: NN
+ id: YM/YM
+ issued:
+ - month: 1
+ year: 1954
+ - month: 2
+ year: 1955
+ title: 'Date range: Year+month'
+ title-short: Date range
+ type: webpage
+- author:
+ - literal: NN
+ id: YM/YM_same
+ issued:
+ - month: 1
+ year: 1956
+ - month: 2
+ year: 1956
+ title: 'Date range: Year+month, same year'
+ title-short: Date range
+ type: webpage
+- author:
+ - literal: NN
+ id: YMD
+ issued:
+ - day: 15
+ month: 1
+ year: 1958
+ title: 'Date: Year+month+day'
+ title-short: Date
+ type: webpage
+- author:
+ - literal: NN
+ id: YMD/YMD
+ issued:
+ - day: 15
+ month: 1
+ year: 1959
+ - day: 16
+ month: 2
+ year: 1960
+ title: 'Date range: Year+month+day'
+ title-short: Date range
+ type: webpage
+- author:
+ - literal: NN
+ id: YMD/YMD_same
+ issued:
+ - day: 15
+ month: 1
+ year: 1961
+ - day: 16
+ month: 1
+ year: 1962
+ title: 'Date range: Year+month+day, same month'
+ title-short: Date range
+ type: webpage
+- author:
+ - literal: NN
+ id: YS
+ issued:
+ - season: 3
+ year: 1963
+ title: 'Date: Year+season'
+ title-short: Date
+ type: webpage
+- author:
+ - literal: NN
+ id: YS/YS
+ issued:
+ - season: 1
+ year: 1964
+ - season: 4
+ year: 1965
+ title: 'Date range: Year+season'
+ title-short: Date range
+ type: webpage
+- author:
+ - literal: NN
+ id: YS/YS_same
+ issued:
+ - season: 2
+ year: 1966
+ - season: 4
+ year: 1966
+ title: 'Date range: Year+season, same year'
+ title-short: Date range
+ type: webpage
+---
+
+^D
+::: {#refs .references .csl-bib-body .hanging-indent line-spacing="2"}
+::: {#ref-Y .csl-entry}
+NN. (1950). Date: Year.
+:::
+
+::: {#ref-Y/Y .csl-entry}
+NN. (1951--1952). Date range: Year.
+:::
+
+::: {#ref-YM .csl-entry}
+NN. (1953, January). Date: Year+month.
+:::
+
+::: {#ref-YM/YM .csl-entry}
+NN. (1954--1955, January--February). Date range: Year+month.
+:::
+
+::: {#ref-YM/YM_same .csl-entry}
+NN. (1956, January--February). Date range: Year+month, same year.
+:::
+
+::: {#ref-YMD .csl-entry}
+NN. (1958, January 15). Date: Year+month+day.
+:::
+
+::: {#ref-YMD/YMD .csl-entry}
+NN. (1959--1960, January 15--February 16). Date range: Year+month+day.
+:::
+
+::: {#ref-YMD/YMD_same .csl-entry}
+NN. (1961--1962, January 15--16). Date range: Year+month+day, same
+month.
+:::
+
+::: {#ref-YS .csl-entry}
+NN. (1963, Autumn). Date: Year+season.
+:::
+
+::: {#ref-YS/YS .csl-entry}
+NN. (1964--1965, Spring--Winter). Date range: Year+season.
+:::
+
+::: {#ref-YS/YS_same .csl-entry}
+NN. (1966, Summer--Winter). Date range: Year+season, same year.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-320.md b/test/command/pandoc-citeproc-320.md
new file mode 100644
index 000000000..5e6ffdb6b
--- /dev/null
+++ b/test/command/pandoc-citeproc-320.md
@@ -0,0 +1,254 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: command/apa.csl
+references:
+- author:
+ - family: Benjamin
+ given: A. S.
+ id: itemA1
+- author:
+ - family: Yaakov
+ given: D.
+ non-dropping-particle: ben
+ id: itemA2
+- author:
+ - family: Brown
+ given: J. R.
+ id: itemA3
+- author:
+ - family: Browning
+ given: A. R.
+ id: itemA4
+- author:
+ - family: Girard
+ given: 'J.-B.'
+ id: itemA5
+- author:
+ - family: 'Girard-Perregaux'
+ given: A. S.
+ id: itemA6
+- author:
+ - family: Ibn Abdulaziz
+ given: T.
+ id: itemA7
+- author:
+ - family: Ibn Nidal
+ given: A. K. M.
+ id: itemA8
+- author:
+ - family: López
+ given: M. E.
+ id: itemA9
+- author:
+ - family: López de Molina
+ given: G.
+ id: itemA10
+- author:
+ - family: Singh
+ given: Y.
+ id: itemA11
+- author:
+ - family: Singh Siddhu
+ given: N.
+ id: itemA12
+- author:
+ - family: Villafuerte
+ given: S. A.
+ id: itemA13
+- author:
+ - family: 'Villa-Lobos'
+ given: J.
+ id: itemA14
+- author:
+ - family: Macalister
+ given: Donald
+ id: itemB1
+- author:
+ - family: MacAlister
+ given: Paul
+ id: itemB2
+- author:
+ - family: Macauley
+ given: Catharine
+ id: itemB3
+- author:
+ - family: Macmillan
+ given: Harold
+ id: itemB4
+- author:
+ - family: Madison
+ given: James
+ id: itemB5
+- author:
+ - family: McAllister
+ given: Ward
+ id: itemB6
+- author:
+ - family: McAuley
+ given: Catherine
+ id: itemB7
+- author:
+ - family: McMillan
+ given: Edwin M.
+ id: itemB8
+- author:
+ - family: 'Sainte-Beuve'
+ given: 'Charles-Augustin'
+ id: itemC1
+- author:
+ - family: 'Saint-Gaudens'
+ given: Augustus
+ id: itemC2
+- author:
+ - family: 'Saint-Saëns'
+ given: Camille
+ id: itemC3
+- author:
+ - dropping-particle: de
+ family: San Martin
+ given: José
+ id: itemC4
+- author:
+ - family: St. Denis
+ given: Ruth
+ id: itemC5
+- author:
+ - family: St. Laurent
+ given: Louis Stephen
+ id: itemC6
+---
+
+Foo
+[@itemA1; @itemA2; @itemA3; @itemA4; @itemA5; @itemA6; @itemA7; @itemA8; @itemA9; @itemA10; @itemA11; @itemA12; @itemA13; @itemA14].
+
+Foo
+[@itemB1; @itemB2; @itemB3; @itemB4; @itemB5; @itemB6; @itemB7; @itemB8].
+
+Foo [@itemC1; @itemC2; @itemC3; @itemC4; @itemC5; @itemC6].
+^D
+Foo (ben Yaakov, n.d.; Benjamin, n.d.; Brown, n.d.; Browning, n.d.;
+Girard, n.d.; Girard-Perregaux, n.d.; Ibn Abdulaziz, n.d.; Ibn Nidal,
+n.d.; López de Molina, n.d.; López, n.d.; Singh Siddhu, n.d.; Singh,
+n.d.; Villafuerte, n.d.; Villa-Lobos, n.d.).
+
+Foo (Macalister, n.d.; MacAlister, n.d.; Macauley, n.d.; Macmillan,
+n.d.; Madison, n.d.; McAllister, n.d.; McAuley, n.d.; McMillan, n.d.).
+
+Foo (Sainte-Beuve, n.d.; Saint-Gaudens, n.d.; Saint-Saëns, n.d.; San
+Martin, n.d.; St. Denis, n.d.; St. Laurent, n.d.).
+
+::: {#refs .references .csl-bib-body .hanging-indent line-spacing="2"}
+::: {#ref-itemA2 .csl-entry}
+ben Yaakov, D. (n.d.).
+:::
+
+::: {#ref-itemA1 .csl-entry}
+Benjamin, A. S. (n.d.).
+:::
+
+::: {#ref-itemA3 .csl-entry}
+Brown, J. R. (n.d.).
+:::
+
+::: {#ref-itemA4 .csl-entry}
+Browning, A. R. (n.d.).
+:::
+
+::: {#ref-itemA5 .csl-entry}
+Girard, J.-B. (n.d.).
+:::
+
+::: {#ref-itemA6 .csl-entry}
+Girard-Perregaux, A. S. (n.d.).
+:::
+
+::: {#ref-itemA7 .csl-entry}
+Ibn Abdulaziz, T. (n.d.).
+:::
+
+::: {#ref-itemA8 .csl-entry}
+Ibn Nidal, A. K. M. (n.d.).
+:::
+
+::: {#ref-itemA10 .csl-entry}
+López de Molina, G. (n.d.).
+:::
+
+::: {#ref-itemA9 .csl-entry}
+López, M. E. (n.d.).
+:::
+
+::: {#ref-itemB1 .csl-entry}
+Macalister, D. (n.d.).
+:::
+
+::: {#ref-itemB2 .csl-entry}
+MacAlister, P. (n.d.).
+:::
+
+::: {#ref-itemB3 .csl-entry}
+Macauley, C. (n.d.).
+:::
+
+::: {#ref-itemB4 .csl-entry}
+Macmillan, H. (n.d.).
+:::
+
+::: {#ref-itemB5 .csl-entry}
+Madison, J. (n.d.).
+:::
+
+::: {#ref-itemB6 .csl-entry}
+McAllister, W. (n.d.).
+:::
+
+::: {#ref-itemB7 .csl-entry}
+McAuley, C. (n.d.).
+:::
+
+::: {#ref-itemB8 .csl-entry}
+McMillan, E. M. (n.d.).
+:::
+
+::: {#ref-itemC1 .csl-entry}
+Sainte-Beuve, C.-A. (n.d.).
+:::
+
+::: {#ref-itemC2 .csl-entry}
+Saint-Gaudens, A. (n.d.).
+:::
+
+::: {#ref-itemC3 .csl-entry}
+Saint-Saëns, C. (n.d.).
+:::
+
+::: {#ref-itemC4 .csl-entry}
+San Martin, J. de. (n.d.).
+:::
+
+::: {#ref-itemA12 .csl-entry}
+Singh Siddhu, N. (n.d.).
+:::
+
+::: {#ref-itemA11 .csl-entry}
+Singh, Y. (n.d.).
+:::
+
+::: {#ref-itemC5 .csl-entry}
+St. Denis, R. (n.d.).
+:::
+
+::: {#ref-itemC6 .csl-entry}
+St. Laurent, L. S. (n.d.).
+:::
+
+::: {#ref-itemA13 .csl-entry}
+Villafuerte, S. A. (n.d.).
+:::
+
+::: {#ref-itemA14 .csl-entry}
+Villa-Lobos, J. (n.d.).
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-320a.md b/test/command/pandoc-citeproc-320a.md
new file mode 100644
index 000000000..1c3b47de0
--- /dev/null
+++ b/test/command/pandoc-citeproc-320a.md
@@ -0,0 +1,87 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- author:
+ - family: ʾUdhrī
+ given: Jamīl
+ non-dropping-particle: 'al-'
+ note: ayn
+ id: item1
+- author:
+ - family: ʿUdhrī
+ given: Jamīl
+ non-dropping-particle: 'al-'
+ note: hamza
+ id: item2
+- author:
+ - family: '\''Udhrī'
+ given: Jamīl
+ non-dropping-particle: 'al-'
+ note: straight apostrophe
+ id: item3
+- author:
+ - family: '‘Udhrī'
+ given: Jamīl
+ non-dropping-particle: 'al-'
+ note: inverted apostrophe = opening single curly quote (for ayn)
+ id: item4
+- author:
+ - family: '’Udhrī'
+ given: Jamīl
+ non-dropping-particle: 'al-'
+ note: apostrophe = closing single curly quote (for hamza)
+ id: item5
+- author:
+ - family: Uch
+ given: Ann
+ id: item6
+- author:
+ - family: Uebel
+ given: Joe
+ id: item7
+- author:
+ - family: Zzz
+ given: Zoe
+ id: item8
+---
+
+Foo [@item1; @item2; @item3; @item4; @item5; @item6; @item7; @item8].
+^D
+Foo (al-ʾUdhrī, n.d.; al-ʿUdhrī, n.d.; al-\'Udhrī, n.d.; al-'Udhrī,
+n.d.; al-'Udhrī, n.d.; Uch, n.d.; Uebel, n.d.; Zzz, n.d.).
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-item6 .csl-entry}
+Uch, Ann. n.d.
+:::
+
+::: {#ref-item1 .csl-entry}
+ʾUdhrī, Jamīl al-. n.d.
+:::
+
+::: {#ref-item2 .csl-entry}
+ʿUdhrī, Jamīl al-. n.d.
+:::
+
+::: {#ref-item3 .csl-entry}
+\'Udhrī, Jamīl al-. n.d.
+:::
+
+::: {#ref-item4 .csl-entry}
+'Udhrī, Jamīl al-. n.d.
+:::
+
+::: {#ref-item5 .csl-entry}
+'Udhrī, Jamīl al-. n.d.
+:::
+
+::: {#ref-item7 .csl-entry}
+Uebel, Joe. n.d.
+:::
+
+::: {#ref-item8 .csl-entry}
+Zzz, Zoe. n.d.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-322.md b/test/command/pandoc-citeproc-322.md
new file mode 100644
index 000000000..78494f0c4
--- /dev/null
+++ b/test/command/pandoc-citeproc-322.md
@@ -0,0 +1,35 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: command/annales.csl
+references:
+- author:
+ - family: Timmory
+ given: François
+ container-title: 'L''Écran français'
+ id: timmory\_\_justice_1950
+ issue: 272
+ issued:
+ - day: 25
+ month: 9
+ year: 1950
+ language: 'fr-FR'
+ page: 12
+ title: '*Justice est faite* : soyons justes'
+ type: 'article-journal'
+---
+
+Foo[@timmory__justice_1950].
+^D
+Foo.[^1]
+
+::: {#refs .references .csl-bib-body}
+::: {#ref-timmory__justice_1950 .csl-entry}
+François [Timmory]{.smallcaps}, « *Justice est faite* : soyons justes »,
+*L'Écran français*, 1950, nᵒ 272, p. 12.
+:::
+:::
+
+[^1]: François [Timmory]{.smallcaps}, « *Justice est faite* : soyons
+ justes », *L'Écran français*, 1950, nᵒ 272, p. 12.
+```
diff --git a/test/command/pandoc-citeproc-325.md b/test/command/pandoc-citeproc-325.md
new file mode 100644
index 000000000..e8f2f7e8e
--- /dev/null
+++ b/test/command/pandoc-citeproc-325.md
@@ -0,0 +1,30 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- author:
+ - family: Smith
+ given: John
+ id: item1
+ type: book
+- author:
+ - family: Smith
+ given: John
+ id: item2
+ type: book
+---
+
+[@item1; @item2]
+^D
+(Smith, n.d.a, n.d.b)
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-item1 .csl-entry}
+Smith, John. n.d.a.
+:::
+
+::: {#ref-item2 .csl-entry}
+---------. n.d.b.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-327.md b/test/command/pandoc-citeproc-327.md
new file mode 100644
index 000000000..54265dcc1
--- /dev/null
+++ b/test/command/pandoc-citeproc-327.md
@@ -0,0 +1,51 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: 'command/chinese-gb7714-2005-numeric.csl'
+references:
+- ISSN: '1003-1111'
+ URL: 'http://kns.cnki.net/kns/detail/detail.aspx?QueryID=4&CurRec=4&recid=&FileName=CHAN201706006&DbName=CJFDLAST2018&DbCode=CJFQ&yx=Y&pr=&URLID=21.1110.S.20171129.1725.006'
+ abstract: '为了解辽东湾海域底栖动物次级生产力水平和时空分布特点,根据2007年的4月和10月辽东湾海域大型底栖动物调查数据,运用Brey经验公式计算大型底栖动物次级生产力和P/B值,并结合海洋生物指数方法对辽东湾海域进行生境适宜性评价。分析结果表明,该海域大型底栖动物年平均次级生产力为5.59g/(m\~2·年),年平均P/B值为3.16,辽东湾大型底栖动物次级生产力空间分布呈现出自沿岸向中部递增的趋势,P/B值空间分布与底栖动物次级生产力相反,呈现出自沿岸向中部递减的趋势,群落组成中以个体小、生活史短、代谢快的底栖动物为主。'
+ accessed:
+ - day: 27
+ month: 3
+ year: 2018
+ author:
+ - family: 李
+ given: 轶平
+ - family: 于
+ given: 旭光
+ - family: 孙
+ given: 明
+ - family: 郭
+ given: 栋
+ - family: 段
+ given: 妍
+ - family: 董
+ given: 婧
+ container-title: 水产科学
+ id: LiLiaoDongWanHaiYuDiQiDongWuCiJiShengChanLiYanJiuJiShengJingGuaYiXingPingJie2017
+ issue: 06
+ issued:
+ - year: 2017
+ keyword: '次级生产力,大型底栖动物,海洋生物指数方法,AMBI,macrozoobenthos,P/B
+ value,P/B值,secondary productivity'
+ language: 中文;
+ page: '728-734'
+ title: 辽东湾海域底栖动物次级生产力研究及生境适宜性评价
+ type: 'article-journal'
+---
+
+I referenced something here
+[@LiLiaoDongWanHaiYuDiQiDongWuCiJiShengChanLiYanJiuJiShengJingGuaYiXingPingJie2017]
+^D
+I referenced something here^\[1\]^
+
+::: {#refs .references .csl-bib-body}
+::: {#ref-LiLiaoDongWanHaiYuDiQiDongWuCiJiShengChanLiYanJiuJiShengJingGuaYiXingPingJie2017 .csl-entry}
+[\[1\]]{.csl-left-margin}[李轶平, 于旭光, 孙明, 等.
+辽东湾海域底栖动物次级生产力研究及生境适宜性评价\[J\]. 水产科学,
+2017(06): 728--734.]{.csl-right-inline}
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-338.md b/test/command/pandoc-citeproc-338.md
new file mode 100644
index 000000000..3250b680e
--- /dev/null
+++ b/test/command/pandoc-citeproc-338.md
@@ -0,0 +1,35 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: 'command/din-1505-2.csl'
+lang: de
+nocite: '@*'
+pagetitle: Citation
+references:
+- ISBN: '978-3-642-32078-1'
+ author:
+ - family: Wolfinger
+ given: Christine
+ edition: '11., vollst. überarb. Aufl.'
+ id: 'item-1'
+ issued:
+ - year: 2013
+ keyword: UNIX; LINUX
+ number-of-pages: 'XVIII, 529 S. : Ill., graph. Darst.'
+ publisher: Springer Vieweg
+ publisher-place: 'Berlin \[u.a.\]'
+ title: 'Keine Angst vor Linux, Unix: ein Lehrbuch für Linux- und
+ Unix-Anwender'
+ type: book
+---
+
+^D
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-item-1 .csl-entry}
+[Wolfinger, Christine]{.smallcaps}: *Keine Angst vor Linux, Unix: ein
+Lehrbuch für Linux- und Unix-Anwender*. 11., vollst. überarb. Aufl.
+Aufl. Berlin \[u.a.\] : Springer Vieweg, 2013
+--- ISBN [978-3-642-32078-1](https://worldcat.org/isbn/978-3-642-32078-1)
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-351.md b/test/command/pandoc-citeproc-351.md
new file mode 100644
index 000000000..24cc8f99f
--- /dev/null
+++ b/test/command/pandoc-citeproc-351.md
@@ -0,0 +1,27 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: 'command/zeitschrift-fur-kunstgeschichte.csl'
+references:
+- editor:
+ - family: Nietzsche
+ given: Friedrich
+ id: Nie72
+ issued:
+ - year: 1872
+ title: Die geburt
+ type: book
+---
+
+@Nie72
+^D
+Friedrich Nietzsche (ed.)[^1]
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-Nie72 .csl-entry}
+Nietzsche, Friedrich (ed.), *Die geburt*, 1872.
+:::
+:::
+
+[^1]: *Die geburt*, 1872.
+```
diff --git a/test/command/pandoc-citeproc-356.md b/test/command/pandoc-citeproc-356.md
new file mode 100644
index 000000000..4463ef63f
--- /dev/null
+++ b/test/command/pandoc-citeproc-356.md
@@ -0,0 +1,25 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- author:
+ - family: Alice
+ id: foo
+ issued:
+ - year: 2042
+ other-ids:
+ - bar
+ - doz
+ type: book
+---
+
+[@bar]
+^D
+(Alice 2042)
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-foo .csl-entry}
+Alice. 2042.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-360.md b/test/command/pandoc-citeproc-360.md
new file mode 100644
index 000000000..233551304
--- /dev/null
+++ b/test/command/pandoc-citeproc-360.md
@@ -0,0 +1,35 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: 'command/chicago-fullnote-bibliography.csl'
+references:
+- author:
+ - family: 'L''Estrange'
+ given: Michael
+ - family: Merchant
+ given: Stephen
+ id: lestrange2017
+ issued:
+ - day: 18
+ month: 7
+ year: 2017
+ language: 'en-US'
+ title: 2017 Independent Intelligence Review
+ title-short: Independent Intelligence Review
+ type: report
+---
+
+[@lestrange2017]
+^D
+[^1]
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-lestrange2017 .csl-entry}
+L'Estrange, Michael, and Stephen Merchant. *2017 Independent
+Intelligence Review*, July 18, 2017.
+:::
+:::
+
+[^1]: Michael L'Estrange and Stephen Merchant, *2017 Independent
+ Intelligence Review*, July 18, 2017.
+```
diff --git a/test/command/pandoc-citeproc-361.md b/test/command/pandoc-citeproc-361.md
new file mode 100644
index 000000000..d187ffc6b
--- /dev/null
+++ b/test/command/pandoc-citeproc-361.md
@@ -0,0 +1,80 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: command/locators.csl
+references:
+- id: citekey
+ title: Title
+ type: 'article-journal'
+- id: other
+ title: Other
+ type: 'article-journal'
+suppress-bibliography: true
+---
+
+Content[@citekey]
+
+Content[@citekey, 1]
+
+Content[@citekey, 2]
+
+Content[@citekey, 2]
+
+Content[@citekey 2]
+
+Content[@citekey, p. 2]
+
+Content[@citekey p. 2]
+
+Content[@citekey]
+
+Content[@other]
+
+Content[@citekey, 3]
+
+Content[@citekey, 3]
+^D
+Content[^1]
+
+Content[^2]
+
+Content[^3]
+
+Content[^4]
+
+Content[^5]
+
+Content[^6]
+
+Content[^7]
+
+Content[^8]
+
+Content[^9]
+
+Content[^10]
+
+Content[^11]
+
+[^1]: Title.
+
+[^2]: Ibid-with-locator {1}.
+
+[^3]: Ibid-with-locator {2}.
+
+[^4]: Ibid.
+
+[^5]: Ibid.
+
+[^6]: Ibid.
+
+[^7]: Ibid.
+
+[^8]: Subsequent.
+
+[^9]: Other.
+
+[^10]: Subsequent {3}.
+
+[^11]: Ibid.
+```
diff --git a/test/command/pandoc-citeproc-365.md b/test/command/pandoc-citeproc-365.md
new file mode 100644
index 000000000..8d43ab659
--- /dev/null
+++ b/test/command/pandoc-citeproc-365.md
@@ -0,0 +1,39 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: 'command/le-tapuscrit-note.csl'
+references:
+- ISBN: '978-2-912573-52-0'
+ author:
+ - family: Le Gras
+ given: Gwénaëlle
+ call-number: 'Tolbiac - Rez de Jardin - Littérature et art - Magasin -
+ 2010-82178'
+ collection-title: 'Jeux d''acteurs'
+ id: legras_michel_2010
+ issued:
+ - year: 2010
+ language: fre
+ number-of-pages: 128
+ publisher: Scope
+ publisher-place: Paris
+ source: 'BnF Catalogue général (http://catalogue.bnf.fr)'
+ title: 'Michel Simon : l''art de la disgrâce'
+ title-short: Michel Simon
+ type: book
+---
+
+Foo [@legras_michel_2010].
+^D
+Foo.[^1]
+
+::: {#refs .references .csl-bib-body}
+::: {#ref-legras_michel_2010 .csl-entry}
+[Le Gras]{.smallcaps} Gwénaëlle, *Michel Simon : l'art de la disgrâce*,
+Paris, Scope (coll. « Jeux d'acteurs »), 2010, 128 p.
+:::
+:::
+
+[^1]: Gwénaëlle Le Gras, *Michel Simon : l'art de la disgrâce*, Paris,
+ Scope, 2010, 128 p.
+```
diff --git a/test/command/pandoc-citeproc-371.md b/test/command/pandoc-citeproc-371.md
new file mode 100644
index 000000000..c080b25c1
--- /dev/null
+++ b/test/command/pandoc-citeproc-371.md
@@ -0,0 +1,41 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- author:
+ - family: Doe
+ given: Jane
+ id: item1
+ status: in press
+ title: Title one
+ type: book
+- author:
+ - family: Doe
+ given: Jane
+ id: item2
+ issued:
+ - year: 2018
+ title: Title two
+ type: book
+---
+
+Foo [@item2; @item1].
+
+References {#references .unnumbered}
+==========
+^D
+Foo (Doe 2018, in press).
+
+References {#references .unnumbered}
+==========
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-item2 .csl-entry}
+Doe, Jane. 2018. *Title Two*.
+:::
+
+::: {#ref-item1 .csl-entry}
+---------. In press. *Title One*.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-38.md b/test/command/pandoc-citeproc-38.md
new file mode 100644
index 000000000..fae4e49fd
--- /dev/null
+++ b/test/command/pandoc-citeproc-38.md
@@ -0,0 +1,29 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- author:
+ - family: Doe
+ given: Ann
+ - family: Doe
+ given: Ben
+ - family: Roe
+ given: Ron
+ id: a
+ issued:
+ date-parts:
+ - - 2007
+ title: Title
+ type: 'article-journal'
+---
+
+@a
+^D
+Doe, Doe, and Roe (2007)
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-a .csl-entry}
+Doe, Ann, Ben Doe, and Ron Roe. 2007. "Title."
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-386.md b/test/command/pandoc-citeproc-386.md
new file mode 100644
index 000000000..6fab96c07
--- /dev/null
+++ b/test/command/pandoc-citeproc-386.md
@@ -0,0 +1,35 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: 'command/advanced-optical-materials.csl'
+references:
+- DOI: 10.1038/lsa.2012.20
+ ISSN: '2047-7538'
+ author:
+ - family: Ding
+ given: K.
+ - family: Ning
+ given: C. Z.
+ container-title: Light Sci. Appl.
+ id: ding_metallic_2012
+ issue: 7
+ issued:
+ - month: 7
+ year: 2012
+ page: 'e20-e20'
+ title: 'Metallic subwavelength-cavity semiconductor nanolasers'
+ type: 'article-journal'
+ volume: 1
+---
+
+@ding_metallic_2012
+^D
+^\[1\]^
+
+::: {#refs .references .csl-bib-body line-spacing="2"}
+::: {#ref-ding_metallic_2012 .csl-entry}
+[\[1\]]{.csl-left-margin}[K. Ding, C. Z. Ning, *Light Sci. Appl.*
+**2012**, *1*, e20.]{.csl-right-inline}
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-392.md b/test/command/pandoc-citeproc-392.md
new file mode 100644
index 000000000..5b0be6eb7
--- /dev/null
+++ b/test/command/pandoc-citeproc-392.md
@@ -0,0 +1,29 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: command/vancouver.csl
+references:
+- author:
+ - family: James
+ given: M.R.C.E.L.
+ id: james
+- author:
+ - family: MacFarlane
+ given: J. G.
+ id: macfarlane
+---
+
+@james; @macfarlane
+^D
+(1); (2)
+
+::: {#refs .references .csl-bib-body}
+::: {#ref-james .csl-entry}
+[1. ]{.csl-left-margin}[James MRCEL. ]{.csl-right-inline}
+:::
+
+::: {#ref-macfarlane .csl-entry}
+[2. ]{.csl-left-margin}[MacFarlane JG. ]{.csl-right-inline}
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-399.md b/test/command/pandoc-citeproc-399.md
new file mode 100644
index 000000000..0c0840c70
--- /dev/null
+++ b/test/command/pandoc-citeproc-399.md
@@ -0,0 +1,45 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: command/style399.csl
+references:
+- author:
+ - family: One
+ id: one
+- author:
+ - family: Two
+ id: two
+- author:
+ - family: Three
+ id: three
+- author:
+ - family: Four
+ id: four
+- author:
+ - family: Five
+ id: five
+- author:
+ - family: Six
+ id: six
+- author:
+ - family: Seven
+ id: seven
+- author:
+ - family: Eight
+ id: eight
+- author:
+ - family: Nine
+ id: nine
+- author:
+ - family: Ten
+ id: ten
+- author:
+ - family: Eleven
+ id: eleven
+---
+
+Inline citation
+[@one; @two; @three; @four; @five; @six; @seven; @eight; @nine; @ten; @eleven].
+^D
+Inline citation \[1,2,3,4,5,6,7,8,9,10,11\].
+```
diff --git a/test/command/pandoc-citeproc-401.md b/test/command/pandoc-citeproc-401.md
new file mode 100644
index 000000000..b5c36334e
--- /dev/null
+++ b/test/command/pandoc-citeproc-401.md
@@ -0,0 +1,59 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- id: haslanger2012SocialConstructionDebunking
+ type: chapter
+ author:
+ - family: Haslanger
+ given: Sally
+ issued:
+ - year: 2012
+ original-date:
+ - year: 2003
+ title: 'Social Construction: The ‘Debunking’ Project'
+ title-short: Social Construction
+ container-title: 'Resisting Reality: Social Construction and Social Critique'
+ publisher: Oxford University Press
+ publisher-place: Oxford
+ event-place: Oxford
+ page: 113–138
+ ISBN: 978-0-19-989262-4
+
+- id: haslanger2012FeminismMetaphysicsNegotiating
+ type: chapter
+ author:
+ - family: Haslanger
+ given: Sally
+ issued:
+ - year: 2012
+ original-date:
+ - year: 2000
+ title: 'Feminism in Metaphysics: Negotiating the Natural'
+ container-title: 'Resisting Reality: Social Construction and Social Critique'
+ publisher: Oxford University Press
+ publisher-place: Oxford
+ event-place: Oxford
+ page: 139–157
+ ISBN: 978-0-19-989262-4
+ language: en
+...
+
+Haslanger [-@haslanger2012SocialConstructionDebunking; @haslanger2012FeminismMetaphysicsNegotiating] says...
+^D
+Haslanger (\[2003\] 2012, \[2000\] 2012) says...
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-haslanger2012FeminismMetaphysicsNegotiating .csl-entry}
+Haslanger, Sally. (2000) 2012. "Feminism in Metaphysics: Negotiating the
+Natural." In *Resisting Reality: Social Construction and Social
+Critique*, 139--57. Oxford: Oxford University Press.
+:::
+
+::: {#ref-haslanger2012SocialConstructionDebunking .csl-entry}
+---------. (2003) 2012. "Social Construction: The 'Debunking' Project."
+In *Resisting Reality: Social Construction and Social Critique*,
+113--38. Oxford: Oxford University Press.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-408.md b/test/command/pandoc-citeproc-408.md
new file mode 100644
index 000000000..8e3571aeb
--- /dev/null
+++ b/test/command/pandoc-citeproc-408.md
@@ -0,0 +1,39 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- id: smith1
+ type: article-journal
+ author:
+ - family: Smith
+ given: Mary
+ issued:
+ - year: 2019
+ title: Foo
+
+- id: smithsmith
+ type: article-journal
+ author:
+ - family: Smith
+ given: Mary
+ - family: Smith
+ given: John
+ issued:
+ - year: 2019
+ title: Foo bar
+...
+
+[@smithsmith; @smith1]
+^D
+(Smith and Smith 2019; Smith 2019)
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-smith1 .csl-entry}
+Smith, Mary. 2019. "Foo."
+:::
+
+::: {#ref-smithsmith .csl-entry}
+Smith, Mary, and John Smith. 2019. "Foo Bar."
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-416.md b/test/command/pandoc-citeproc-416.md
new file mode 100644
index 000000000..e34401118
--- /dev/null
+++ b/test/command/pandoc-citeproc-416.md
@@ -0,0 +1,61 @@
+```
+% pandoc --citeproc -t markdown-citations
+Blah blah [@item1; @item2; @item3].
+
+# References {-}
+
+---
+title: The Title
+references:
+- id: item1
+ type: article-newspaper
+ author:
+ - family: Doe
+ given: J.
+ issued:
+ - year: 2010
+ month: 12
+ day: 13
+ title: The title
+- id: item2
+ type: article-newspaper
+ author:
+ - family: Doe
+ given: J.
+ issued:
+ - year: 2007
+ month: 12
+ day: 12
+ - year: 2007
+ month: 12
+ day: 13
+ title: The title
+- id: item3
+ type: article-newspaper
+ author:
+ - family: Doe
+ given: J.
+ issued:
+ - year: 2008
+ title: The title
+...
+^D
+Blah blah (Doe 2010, 2007, 2008).
+
+References {#references .unnumbered}
+==========
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-item2 .csl-entry}
+Doe, J. 2007. "The Title," December 12--13, 2007.
+:::
+
+::: {#ref-item3 .csl-entry}
+---------. 2008. "The Title," 2008.
+:::
+
+::: {#ref-item1 .csl-entry}
+---------. 2010. "The Title," December 13, 2010.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-437.md b/test/command/pandoc-citeproc-437.md
new file mode 100644
index 000000000..91b3cbbcf
--- /dev/null
+++ b/test/command/pandoc-citeproc-437.md
@@ -0,0 +1,23 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: command/issue437.csl
+references:
+- author:
+ - family: Smith
+ given: John
+ id: hirt2009
+ issued:
+ - year: 2009
+ publisher: Publishing House
+ publisher-place: Lausanne
+ title: Some Book
+ type: book
+---
+
+> Here is a quote. [@hirt2009]
+^D
+> Here is a quote.[^1]
+
+[^1]: John Smith, Some Book, Lausanne, 2009
+```
diff --git a/test/command/pandoc-citeproc-47.md b/test/command/pandoc-citeproc-47.md
new file mode 100644
index 000000000..478a54bf3
--- /dev/null
+++ b/test/command/pandoc-citeproc-47.md
@@ -0,0 +1,113 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- author:
+ - family: Doe
+ given: A.
+ id: doe
+ issued:
+ date-parts:
+ - - 2000
+ title: Title
+ type: book
+- author:
+ - family: Doe
+ given: A.
+ - family: Poe
+ given: A.
+ id: doepoe
+ issued:
+ date-parts:
+ - - 2000
+ title: Title
+ type: book
+- editor:
+ - family: Doe
+ given: A.
+ id: 'doe-ed'
+ issued:
+ date-parts:
+ - - 2000
+ title: Title
+ type: book
+- author:
+ - family: Doe
+ given: A.
+ - family: Loe
+ given: A.
+ - family: Toe
+ given: A.
+ id: doeloetoe
+ issued:
+ date-parts:
+ - - 2000
+ title: Title
+ type: book
+---
+
+Foo [@doe]. Bar [@doepoe]. Foo [@doe-ed]. Bar [@doeloetoe].
+
+Expected output:
+
+> Doe, A. 2000a. Title.
+>
+> ---------, ed. 2000b. Title.
+>
+> Doe, A., A. Loe, and A. Toe. 2000. Title.
+>
+> Doe, A., and A. Poe. 2000. Title.
+
+(See CMoS, 16e, 15.16, "Single author versus several authors---reference
+list order": "Successive entries by two or more authors in which only
+the first author's name is the same are alphabetized according to the
+coauthors' last names (regardless of how many coauthors there are)." and
+15.18, "The 3-em dash with edited, translated, or compiled works": "The
+chronological order is maintained, regardless of the added abbreviation.
+\[ed., trans., comp., or whatever\]"
+
+References {#references .unnumbered}
+==========
+^D
+Foo (Doe 2000a). Bar (Doe and Poe 2000). Foo (Doe 2000b). Bar (Doe, Loe,
+and Toe 2000).
+
+Expected output:
+
+> Doe, A. 2000a. Title.
+>
+> ---------, ed. 2000b. Title.
+>
+> Doe, A., A. Loe, and A. Toe. 2000. Title.
+>
+> Doe, A., and A. Poe. 2000. Title.
+
+(See CMoS, 16e, 15.16, "Single author versus several authors---reference
+list order": "Successive entries by two or more authors in which only
+the first author's name is the same are alphabetized according to the
+coauthors' last names (regardless of how many coauthors there are)." and
+15.18, "The 3-em dash with edited, translated, or compiled works": "The
+chronological order is maintained, regardless of the added abbreviation.
+\[ed., trans., comp., or whatever\]"
+
+References {#references .unnumbered}
+==========
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-doe .csl-entry}
+Doe, A. 2000a. *Title*.
+:::
+
+::: {#ref-doe-ed .csl-entry}
+---------, ed. 2000b. *Title*.
+:::
+
+::: {#ref-doeloetoe .csl-entry}
+Doe, A., A. Loe, and A. Toe. 2000. *Title*.
+:::
+
+::: {#ref-doepoe .csl-entry}
+Doe, A., and A. Poe. 2000. *Title*.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-51.md b/test/command/pandoc-citeproc-51.md
new file mode 100644
index 000000000..fc7dc2bb1
--- /dev/null
+++ b/test/command/pandoc-citeproc-51.md
@@ -0,0 +1,45 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- author:
+ - family: Doe
+ given: John
+ container-title: Journal of Something
+ id: item1
+ issued:
+ date-parts:
+ - - 1987
+ - - 1988
+ page: '12-34'
+ title: The title
+ type: 'article-journal'
+ volume: 3
+- author:
+ - family: Roe
+ given: Ron
+ container-title: Journal of Something
+ id: item2
+ issued:
+ date-parts:
+ - - 1987
+ page: '12-34'
+ title: The title
+ type: 'article-journal'
+ volume: 4
+---
+
+@item1; @item2
+^D
+Doe (1987--1988); Roe (1987)
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-item1 .csl-entry}
+Doe, John. 1987--1988. "The Title." *Journal of Something* 3: 12--34.
+:::
+
+::: {#ref-item2 .csl-entry}
+Roe, Ron. 1987. "The Title." *Journal of Something* 4: 12--34.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-53.md b/test/command/pandoc-citeproc-53.md
new file mode 100644
index 000000000..295f52049
--- /dev/null
+++ b/test/command/pandoc-citeproc-53.md
@@ -0,0 +1,54 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: command/archeologie-medievale.csl
+references:
+- title: Work A
+ id: a
+ issued:
+ date-parts:
+ - - 2000
+ author:
+ - given: John
+ family: Doe
+ type: book
+- title: Work B
+ id: b
+ issued:
+ date-parts:
+ - - 1990
+ author:
+ - given: Jane
+ family: Roe
+ type: book
+---
+@a @a @b @b @a @a @b @b
+^D
+Doe[^1] Doe[^2] Roe[^3] Roe[^4] Doe[^5] Doe[^6] Roe[^7] Roe[^8]
+
+::: {#refs .references .csl-bib-body}
+::: {#ref-a .csl-entry}
+[[Doe J.]{.smallcaps} ]{.csl-block}[2000, *Work A*,.]{.csl-left-margin}
+:::
+
+::: {#ref-b .csl-entry}
+[[Roe J.]{.smallcaps} ]{.csl-block}[1990, *Work B*,.]{.csl-left-margin}
+:::
+:::
+
+[^1]: 2000
+
+[^2]: *Ibid.*
+
+[^3]: 1990
+
+[^4]: *Ibid.*
+
+[^5]: 2000
+
+[^6]: *Ibid.*
+
+[^7]: 1990
+
+[^8]: *Ibid.*
+```
diff --git a/test/command/pandoc-citeproc-57.md b/test/command/pandoc-citeproc-57.md
new file mode 100644
index 000000000..4232e1ef8
--- /dev/null
+++ b/test/command/pandoc-citeproc-57.md
@@ -0,0 +1,38 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: 'command/chicago-author-date-with-original-date-and-status.csl'
+references:
+- author:
+ - family: Faraday
+ given: Carry
+ container-title: Seven Trips beyond the Asteroid Belt
+ editor:
+ - family: Oring
+ given: James
+ id: 'Faraday-forthcoming'
+ publisher: Launch Press
+ publisher-place: 'Cape Canaveral, FL'
+ status: forthcoming
+ title: Protean photography
+ type: chapter
+---
+
+[@Faraday-forthcoming]
+
+References
+==========
+^D
+(Faraday, forthcoming)
+
+References {#references .unnumbered}
+==========
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-Faraday-forthcoming .csl-entry}
+Faraday, Carry. Forthcoming. "Protean Photography." In *Seven Trips
+Beyond the Asteroid Belt*, edited by James Oring. Cape Canaveral, FL:
+Launch Press.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-58.md b/test/command/pandoc-citeproc-58.md
new file mode 100644
index 000000000..764533173
--- /dev/null
+++ b/test/command/pandoc-citeproc-58.md
@@ -0,0 +1,33 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: command/issue58.csl
+references:
+- id: stanze
+ issued:
+ date-parts:
+ - - 1547
+ language: 'it-IT'
+ publisher-place: Florence
+ title: Stanze in lode della donna brutta
+ type: book
+---
+
+In this item, the title replaces the (unknown) author (see 14.79)
+[@stanze, p. 12].
+
+References
+==========
+^D
+In this item, the title replaces the (unknown) author (see 14.79)
+(*Stanze in lode della donna brutta* 1547, 12).
+
+References {#references .unnumbered}
+==========
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-stanze .csl-entry}
+*Stanze in lode della donna brutta*. 1547. Florence.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-61.md b/test/command/pandoc-citeproc-61.md
new file mode 100644
index 000000000..e96e93be7
--- /dev/null
+++ b/test/command/pandoc-citeproc-61.md
@@ -0,0 +1,79 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: 'command/modern-humanities-research-association.csl'
+references:
+- author:
+ - family: Doe
+ given: John
+ id: doe
+ issued:
+ date-parts:
+ - - 1985
+ publisher: Publisher
+ title: Title
+ type: book
+- author:
+ - family: Roe
+ given: Rob
+ id: roe
+ issued:
+ date-parts:
+ - - 1985
+ publisher: Publisher
+ title: Title
+ type: book
+---
+
+Text
+====
+
+Foo [@doe, VIII, 89]
+
+Foo [@roe, III, 89]
+
+Foo [@doe, LVIII, 89]
+
+Foo [@roe, MVIII, 89]
+
+Foo [@doe, CL, 89]
+
+References
+==========
+^D
+Text
+====
+
+Foo[^1]
+
+Foo[^2]
+
+Foo[^3]
+
+Foo[^4]
+
+Foo[^5]
+
+References {#references .unnumbered}
+==========
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-doe .csl-entry}
+Doe, John, *Title* (Publisher, 1985)
+:::
+
+::: {#ref-roe .csl-entry}
+Roe, Rob, *Title* (Publisher, 1985)
+:::
+:::
+
+[^1]: John Doe, *Title* (Publisher, 1985), VIII, 89.
+
+[^2]: Rob Roe, *Title* (Publisher, 1985), III, 89.
+
+[^3]: Doe, LVIII, 89.
+
+[^4]: Roe, MVIII, 89.
+
+[^5]: Doe, CL, 89.
+```
diff --git a/test/command/pandoc-citeproc-64.md b/test/command/pandoc-citeproc-64.md
new file mode 100644
index 000000000..277b3756d
--- /dev/null
+++ b/test/command/pandoc-citeproc-64.md
@@ -0,0 +1,24 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+bibliography:
+- command/biblio.bib
+nocite: '[@*]'
+---
+
+^D
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-item1 .csl-entry}
+Doe, John. 2005. *First Book*. Cambridge: Cambridge University Press.
+:::
+
+::: {#ref-item2 .csl-entry}
+---------. 2006. "Article." *Journal of Generic Studies* 6: 33--34.
+:::
+
+::: {#ref-пункт3 .csl-entry}
+Doe, John, and Jenny Roe. 2007. "Why Water Is Wet." In *Third Book*,
+edited by Sam Smith. Oxford: Oxford University Press.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-65.md b/test/command/pandoc-citeproc-65.md
new file mode 100644
index 000000000..7b07f7ecf
--- /dev/null
+++ b/test/command/pandoc-citeproc-65.md
@@ -0,0 +1,38 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- ISBN: 3406493556
+ author:
+ - family: Stotz
+ given: Peter
+ call-number: 'PA25 PA2616 .H24 Abt. 2, T. 5, Bd. 2, etc'
+ collection-number: 2.5
+ collection-title: Handbuch der Altertumswissenschaft
+ event-place: Munich
+ first-reference-note-number: 1
+ id: 'stotz:1996handbuch'
+ issued:
+ literal: 1996_2004
+ language: German
+ number-of-volumes: 5
+ publisher: Beck
+ publisher-place: Munich
+ source: Library of Congress ISBN
+ title: Handbuch zur lateinischen Sprache des Mittelalters
+ title-short: Handbuch
+ type: book
+---
+
+[@stotz:1996handbuch]
+^D
+(Stotz 1996--2004)
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-stotz:1996handbuch .csl-entry}
+Stotz, Peter. 1996--2004. *Handbuch zur lateinischen Sprache des
+Mittelalters*. 5 vols. Handbuch der Altertumswissenschaft 2.5. Munich:
+Beck.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-68.md b/test/command/pandoc-citeproc-68.md
new file mode 100644
index 000000000..d384f0e69
--- /dev/null
+++ b/test/command/pandoc-citeproc-68.md
@@ -0,0 +1,56 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: 'command/chicago-fullnote-bibliography.csl'
+references:
+- ISBN: 0888441088
+ author:
+ - family: Goering
+ given: Joseph
+ call-number: BV4009 .W55 1992
+ collection-number: 108
+ collection-title: Studies and Texts
+ event-place: Toronto
+ first-reference-note-number: 1
+ id: 'goering:1992william'
+ issued:
+ date-parts:
+ - - 1992
+ publisher: Pontifical Institute of Mediaeval Studies
+ publisher-place: Toronto
+ source: toroprod.library.utoronto.ca Library Catalog
+ title: 'William de Montibus (c. 1140--1213): The Schools and the
+ Literature of Pastoral Care'
+ title-short: William de Montibus
+ type: book
+---
+
+\... a prose commentary [the text of fol. 9r is printed in
+@goering:1992william, pp. 501--3]. \... a collection of verses with a
+formal prose commentary [excerpts from this text were previously printed
+in @goering:1992william, p. 508--14; it was also briefly described in
+@goering:1992william, pp. 141--42] \... and finally a note starting with
+a citation [@goering:1992william, pp. 141-42].
+^D
+\... a prose commentary.[^1] \... a collection of verses with a formal
+prose commentary[^2] \... and finally a note starting with a
+citation.[^3]
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-goering:1992william .csl-entry}
+Goering, Joseph. *William de Montibus (c. 1140--1213): The Schools and
+the Literature of Pastoral Care*. Studies and Texts 108. Toronto:
+Pontifical Institute of Mediaeval Studies, 1992.
+:::
+:::
+
+[^1]: The text of fol. 9r is printed in Joseph Goering, *William de
+ Montibus (c. 1140--1213): The Schools and the Literature of Pastoral
+ Care*, Studies and Texts 108 (Toronto: Pontifical Institute of
+ Mediaeval Studies, 1992), 501--3.
+
+[^2]: Excerpts from this text were previously printed in ibid., 508--14;
+ it was also briefly described in ibid., 141--42.
+
+[^3]: Goering, *William de Montibus*, 141--42.
+```
diff --git a/test/command/pandoc-citeproc-7.md b/test/command/pandoc-citeproc-7.md
new file mode 100644
index 000000000..7d68ff566
--- /dev/null
+++ b/test/command/pandoc-citeproc-7.md
@@ -0,0 +1,31 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- author:
+ family: Author
+ given:
+ - Ann
+ container-title: Journal
+ id: item1
+ issued:
+ - day: 24
+ month: 9
+ year: 2011
+ - day: 26
+ month: 9
+ year: 2011
+ title: Title
+ type: 'article-magazine'
+---
+
+@item1
+^D
+Author (2011)
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-item1 .csl-entry}
+Author, Ann. 2011. "Title." *Journal*, September 24--26, 2011.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-70.md b/test/command/pandoc-citeproc-70.md
new file mode 100644
index 000000000..fb96add82
--- /dev/null
+++ b/test/command/pandoc-citeproc-70.md
@@ -0,0 +1,73 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- ISBN: 9782503531465
+ author:
+ - family: 'Dinkova-Bruun'
+ given: Greti
+ call-number: CB351 .F564 2009
+ collection-number: 50
+ collection-title: Textes et études du moyen âge
+ container-title: 'Florilegium mediaevale: Études offertes à Jacqueline
+ Hamesse à l''occasion de son éméritat'
+ editor:
+ - family: Meirinhos
+ given: José Francisco
+ - family: Weijers
+ given: Olga
+ event-place: 'Louvain-la-Neuve'
+ first-reference-note-number: 1
+ id: 'bruun:2009samuel'
+ issued:
+ date-parts:
+ - - 2009
+ language: French
+ page: '155--174'
+ publisher: 'Fédération Internationale des Instituts d''Études
+ Médiévales'
+ publisher-place: 'Louvain-la-Neuve'
+ source: Library of Congress ISBN
+ title: 'Samuel Presbyter and the Glosses to His Versification of Psalm
+ 1: An Anti-Church Invective?'
+ title-short: Samuel Presbyter
+ type: chapter
+- ISSN: '0362-1529'
+ author:
+ - family: Thorndike
+ given: Lynn
+ container-title: Traditio
+ first-reference-note-number: 1
+ id: 'thorndike:1955unde'
+ issued:
+ date-parts:
+ - - 1955
+ language: Latin
+ note: 'ArticleType: research-article / Full publication date: 1955 /
+ Copyright © 1955 Fordham University'
+ page: '163--193'
+ source: JSTOR
+ title: Unde versus
+ type: 'article-journal'
+ volume: 11
+---
+
+[@thorndike:1955unde; @bruun:2009samuel]
+^D
+(Thorndike 1955; Dinkova-Bruun 2009)
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-bruun:2009samuel .csl-entry}
+Dinkova-Bruun, Greti. 2009. "Samuel Presbyter and the Glosses to His
+Versification of Psalm 1: An Anti-Church Invective?" In *Florilegium
+mediaevale: Études offertes à Jacqueline Hamesse à l'occasion de son
+éméritat*, edited by José Francisco Meirinhos and Olga Weijers, 155--74.
+Textes et études du moyen âge 50. Louvain-la-Neuve: Fédération
+Internationale des Instituts d'Études Médiévales.
+:::
+
+::: {#ref-thorndike:1955unde .csl-entry}
+Thorndike, Lynn. 1955. "Unde versus." *Traditio* 11: 163--93.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-75.md b/test/command/pandoc-citeproc-75.md
new file mode 100644
index 000000000..0771fa971
--- /dev/null
+++ b/test/command/pandoc-citeproc-75.md
@@ -0,0 +1,67 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: command/apa.csl
+references:
+- author:
+ - family: Doe
+ given: John
+ id: test
+ issued:
+ date-parts:
+ - - 2006
+ title: Test
+ type: 'article-journal'
+ volume: 81
+---
+
+[@test, p. 6]
+
+[@test, chap. 6]
+
+[@test, n. 6]
+
+[@test, pp. 34-36, 38-39]
+
+[@test, sec. 3]
+
+[@test, p.3]
+
+[@test, 33-35, 38-39]
+
+[@test, 14]
+
+[@test bk. VI]
+
+[@test, no. 6]
+
+[@test, nos. 6 and 7]
+^D
+(Doe, 2006, p. 6)
+
+(Doe, 2006, Chapter 6)
+
+(Doe, 2006, n. 6)
+
+(Doe, 2006, pp. 34--36, 38--39)
+
+(Doe, 2006, sec. 3)
+
+(Doe, 2006, p. 3)
+
+(Doe, 2006, pp. 33--35, 38--39)
+
+(Doe, 2006, p. 14)
+
+(Doe, 2006, bk. VI)
+
+(Doe, 2006, no. 6)
+
+(Doe, 2006, no. 6 and 7)
+
+::: {#refs .references .csl-bib-body .hanging-indent line-spacing="2"}
+::: {#ref-test .csl-entry}
+Doe, J. (2006). Test, *81*.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-76.md b/test/command/pandoc-citeproc-76.md
new file mode 100644
index 000000000..a184b3e79
--- /dev/null
+++ b/test/command/pandoc-citeproc-76.md
@@ -0,0 +1,64 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- author:
+ - family: Author
+ given: Al
+ id: item1
+ issued:
+ date-parts:
+ - - 1998
+ title: 'foo bar baz: bazbaz bar foo'
+ type: 'article-journal'
+- author:
+ - family: Author
+ given: Al
+ id: item2
+ issued:
+ date-parts:
+ - - 1998
+ title: 'foo bar baz: the bazbaz bar foo'
+ type: 'article-journal'
+- author:
+ - family: Author
+ given: Al
+ id: item3
+ issued:
+ date-parts:
+ - - 1998
+ title: 'foo bar baz: a bazbaz bar foo'
+ type: 'article-journal'
+- author:
+ - family: Author
+ given: Al
+ id: item4
+ issued:
+ date-parts:
+ - - 1998
+ title: 'foo bar baz: an abazbaz bar foo'
+ type: 'article-journal'
+---
+
+@item1, @item2, @item3, @item4
+^D
+Author (1998c), Author (1998d), Author (1998a), Author (1998b)
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-item3 .csl-entry}
+Author, Al. 1998a. "Foo Bar Baz: A Bazbaz Bar Foo."
+:::
+
+::: {#ref-item4 .csl-entry}
+---------. 1998b. "Foo Bar Baz: An Abazbaz Bar Foo."
+:::
+
+::: {#ref-item1 .csl-entry}
+---------. 1998c. "Foo Bar Baz: Bazbaz Bar Foo."
+:::
+
+::: {#ref-item2 .csl-entry}
+---------. 1998d. "Foo Bar Baz: The Bazbaz Bar Foo."
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-77.md b/test/command/pandoc-citeproc-77.md
new file mode 100644
index 000000000..d7090edb4
--- /dev/null
+++ b/test/command/pandoc-citeproc-77.md
@@ -0,0 +1,67 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: 'command/chicago-fullnote-bibliography.csl'
+references:
+- author:
+ - family: Doe
+ given: 'John, III'
+ parse-names: true
+ id: item1
+ type: book
+- author:
+ - family: van Gogh
+ given: Vincent
+ parse-names: true
+ id: item2
+ type: book
+- author:
+ - family: Humboldt
+ given: Alexander von
+ parse-names: true
+ id: item3
+ type: book
+- author:
+ - family: Bennett
+ given: 'Frank G.,! Jr.'
+ parse-names: true
+ id: item4
+ type: book
+- author:
+ - family: Dumboldt
+ given: 'Ezekiel, III'
+ parse-names: true
+ id: item5
+ type: book
+---
+
+[@item1; @item2; @item3; @item4; @item5]
+^D
+[^1]
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-item4 .csl-entry}
+Bennett, Frank G., Jr., n.d.
+:::
+
+::: {#ref-item1 .csl-entry}
+Doe, John, III, n.d.
+:::
+
+::: {#ref-item5 .csl-entry}
+Dumboldt, Ezekiel, III, n.d.
+:::
+
+::: {#ref-item3 .csl-entry}
+Humboldt, Alexander von, n.d.
+:::
+
+::: {#ref-item2 .csl-entry}
+van Gogh, Vincent, n.d.
+:::
+:::
+
+[^1]: John Doe III, n.d.; Vincent van Gogh, n.d.; Alexander von
+ Humboldt, n.d.; Frank G. Bennett, Jr., n.d.; Ezekiel Dumboldt III,
+ n.d.
+```
diff --git a/test/command/pandoc-citeproc-82.md b/test/command/pandoc-citeproc-82.md
new file mode 100644
index 000000000..3464ae063
--- /dev/null
+++ b/test/command/pandoc-citeproc-82.md
@@ -0,0 +1,40 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: 'command/chicago-annotated-bibliography.csl'
+references:
+- URL: 'https://www.worldcat.org/'
+ accessed:
+ date-parts:
+ - - 2014
+ - 9
+ - 19
+ author:
+ - literal: OCLC
+ first-reference-note-number: 1
+ id: OCLC_i1099
+ title: WorldCat
+ type: webpage
+---
+
+Title
+=====
+
+Some text.[^1]
+
+[^1]: Comment regarding text, supported by citation [@OCLC_i1099]
+^D
+Title
+=====
+
+Some text.[^1]
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-OCLC_i1099 .csl-entry}
+OCLC. "WorldCat." Accessed September 19, 2014.
+<https://www.worldcat.org/>.
+:::
+:::
+
+[^1]: Comment regarding text, supported by citation (OCLC, "WorldCat.")
+```
diff --git a/test/command/pandoc-citeproc-87.md b/test/command/pandoc-citeproc-87.md
new file mode 100644
index 000000000..1a736ca51
--- /dev/null
+++ b/test/command/pandoc-citeproc-87.md
@@ -0,0 +1,157 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- URL: 'http://www.example.com'
+ author:
+ - family: Doe
+ given: John
+ container-title: The Web Site
+ id: item1
+ issued:
+ date-parts:
+ - - 2006
+ - 10
+ - 26
+ title: Title
+ type: webpage
+- URL: 'http://www.example.com'
+ author:
+ - family: Doe
+ given: John
+ container-title: The Web Site
+ id: item2
+ issued:
+ date-parts:
+ - - 2006
+ - 10
+ - 26
+ - - 2006
+ - 11
+ - 27
+ title: Title
+ type: webpage
+- URL: 'http://www.example.com'
+ author:
+ - family: Doe
+ given: John
+ container-title: The Web Site
+ id: item2a
+ issued:
+ date-parts:
+ - - 2006
+ - 10
+ - - 2006
+ - 11
+ title: Title
+ type: webpage
+- URL: 'http://www.example.com'
+ author:
+ - family: Doe
+ given: John
+ container-title: The Web Site
+ id: item2b
+ issued:
+ date-parts:
+ - - 2006
+ - 12
+ - 31
+ - - 2007
+ - 1
+ - 1
+ title: Title
+ type: webpage
+- URL: 'http://www.example.com'
+ author:
+ - family: Doe
+ given: John
+ container-title: The Newspaper
+ id: item3
+ issued:
+ date-parts:
+ - - 2006
+ - 10
+ - 26
+ - - 2006
+ - 11
+ - 27
+ title: Title
+ type: 'article-newspaper'
+- URL: 'http://www.example.com'
+ author:
+ - family: Doe
+ given: John
+ container-title: The Newspaper
+ id: item3b
+ issued:
+ date-parts:
+ - - 2006
+ - 10
+ - - 2006
+ - 11
+ title: Title
+ type: 'article-newspaper'
+---
+
+@item1 -- webpage, date
+
+@item2 -- webpage, date range
+
+@item2a -- webpage, date range YM
+
+@item2b -- webpage, date range across years
+
+@item3 -- article-newspaper
+
+@item3b -- article-newspaper YM
+
+References
+==========
+^D
+Doe (2006c) -- webpage, date
+
+Doe (2006d) -- webpage, date range
+
+Doe (2006a) -- webpage, date range YM
+
+Doe (2006--2007) -- webpage, date range across years
+
+Doe (2006e) -- article-newspaper
+
+Doe (2006b) -- article-newspaper YM
+
+References {#references .unnumbered}
+==========
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-item2a .csl-entry}
+Doe, John. 2006a. "Title." The Web Site. October--November 2006.
+<http://www.example.com>.
+:::
+
+::: {#ref-item3b .csl-entry}
+---------. 2006b. "Title." *The Newspaper*, October--November 2006.
+<http://www.example.com>.
+:::
+
+::: {#ref-item1 .csl-entry}
+---------. 2006c. "Title." The Web Site. October 26, 2006.
+<http://www.example.com>.
+:::
+
+::: {#ref-item2 .csl-entry}
+---------. 2006d. "Title." The Web Site. October 26--November 27, 2006.
+<http://www.example.com>.
+:::
+
+::: {#ref-item3 .csl-entry}
+---------. 2006e. "Title." *The Newspaper*, October 26--November 27,
+2006. <http://www.example.com>.
+:::
+
+::: {#ref-item2b .csl-entry}
+---------. 2006--2007. "Title." The Web Site. December 31, 2006--January
+1, 2007. <http://www.example.com>.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-chicago-author-date.md b/test/command/pandoc-citeproc-chicago-author-date.md
new file mode 100644
index 000000000..2840f4435
--- /dev/null
+++ b/test/command/pandoc-citeproc-chicago-author-date.md
@@ -0,0 +1,111 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+bibliography: command/biblio.bib
+link-citations: true
+---
+
+Pandoc with citeproc-hs
+=======================
+
+[@nonexistent]
+
+@nonexistent
+
+@item1 says blah.
+
+@item1 [p. 30] says blah.
+
+@item1 [p. 30, with suffix] says blah.
+
+@item1 [-@item2 p. 30; see also @пункт3] says blah.
+
+In a note.[^1]
+
+A citation group [see @item1 chap. 3; also @пункт3 p. 34-35].
+
+Another one [see @item1 p. 34-35].
+
+And another one in a note.[^2]
+
+Citation with a suffix and locator [@item1 pp. 33, 35-37, and nowhere
+else].
+
+Citation with suffix only [@item1 and nowhere else].
+
+Now some modifiers.[^3]
+
+With some markup [*see* @item1 p. **32**].
+
+References {#references .unnumbered}
+==========
+
+[^1]: @пункт3 [p. 12] and a citation without locators [@пункт3].
+
+[^2]: Some citations [see @item1 chap. 3; @пункт3; @item2].
+
+[^3]: Like a citation without author: [-@item1], and now Doe with a
+ locator [-@item2 p. 44].
+^D
+[WARNING] Citeproc: citation nonexistent not found
+Pandoc with citeproc-hs
+=======================
+
+([**nonexistent?**](#ref-nonexistent))
+
+([**nonexistent?**](#ref-nonexistent))
+
+[Doe](#ref-item1) ([2005](#ref-item1)) says blah.
+
+[Doe](#ref-item1) ([2005, 30](#ref-item1)) says blah.
+
+[Doe](#ref-item1) ([2005, 30](#ref-item1), with suffix) says blah.
+
+[Doe](#ref-item1) ([2005](#ref-item1), [2006, 30](#ref-item2); see also
+[Doe and Roe 2007](#ref-пункт3)) says blah.
+
+In a note.[^1]
+
+A citation group (see [Doe 2005, chap. 3](#ref-item1); also [Doe and Roe
+2007, 34--35](#ref-пункт3)).
+
+Another one (see [Doe 2005, 34--35](#ref-item1)).
+
+And another one in a note.[^2]
+
+Citation with a suffix and locator ([Doe 2005, 33, 35--37](#ref-item1),
+and nowhere else).
+
+Citation with suffix only ([Doe 2005](#ref-item1) and nowhere else).
+
+Now some modifiers.[^3]
+
+With some markup (*see* [Doe 2005, 32](#ref-item1)).
+
+References {#references .unnumbered}
+==========
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-item1 .csl-entry}
+Doe, John. 2005. *First Book*. Cambridge: Cambridge University Press.
+:::
+
+::: {#ref-item2 .csl-entry}
+---------. 2006. "Article." *Journal of Generic Studies* 6: 33--34.
+:::
+
+::: {#ref-пункт3 .csl-entry}
+Doe, John, and Jenny Roe. 2007. "Why Water Is Wet." In *Third Book*,
+edited by Sam Smith. Oxford: Oxford University Press.
+:::
+:::
+
+[^1]: [Doe and Roe](#ref-пункт3) ([2007, 12](#ref-пункт3)) and a
+ citation without locators ([Doe and Roe 2007](#ref-пункт3)).
+
+[^2]: Some citations (see [Doe 2005, chap. 3](#ref-item1); [Doe and Roe
+ 2007](#ref-пункт3); [Doe 2006](#ref-item2)).
+
+[^3]: Like a citation without author: ([2005](#ref-item1)), and now Doe
+ with a locator ([2006, 44](#ref-item2)).
+```
diff --git a/test/command/pandoc-citeproc-chicago-fullnote-bibliography.md b/test/command/pandoc-citeproc-chicago-fullnote-bibliography.md
new file mode 100644
index 000000000..ef690d91d
--- /dev/null
+++ b/test/command/pandoc-citeproc-chicago-fullnote-bibliography.md
@@ -0,0 +1,134 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+bibliography: command/biblio.bib
+csl: 'command/chicago-fullnote-bibliography.csl'
+link-citations: true
+---
+
+Pandoc with citeproc-hs
+=======================
+
+[@nonexistent]
+
+@nonexistent
+
+@item1 says blah.
+
+@item1 [p. 30] says blah.
+
+@item1 [p. 30, with suffix] says blah.
+
+@item1 [-@item2 p. 30; see also @пункт3] says blah.
+
+In a note.[^1]
+
+A citation group [see @item1 chap. 3; also @пункт3 p. 34-35].
+
+Another one [see @item1 p. 34-35].
+
+And another one in a note.[^2]
+
+Citation with a suffix and locator [@item1 pp. 33, 35-37, and nowhere
+else].
+
+Citation with suffix only [@item1 and nowhere else].
+
+Now some modifiers.[^3]
+
+With some markup [*see* @item1 p. **32**].
+
+References {#references .unnumbered}
+==========
+
+[^1]: @пункт3 [p. 12] and a citation without locators [@пункт3].
+
+[^2]: Some citations [see @item1 chap. 3; @пункт3; @item2].
+
+[^3]: Like a citation without author: [-@item1], and again
+ [-@item1], and now Doe with a locator [-@item2 p. 44].
+^D
+[WARNING] Citeproc: citation nonexistent not found
+Pandoc with citeproc-hs
+=======================
+
+[^1]
+
+[^2]
+
+[Doe](#ref-item1)[^3] says blah.
+
+[Doe](#ref-item1)[^4] says blah.
+
+[Doe](#ref-item1)[^5] says blah.
+
+[Doe](#ref-item1)[^6] says blah.
+
+In a note.[^7]
+
+A citation group.[^8]
+
+Another one.[^9]
+
+And another one in a note.[^10]
+
+Citation with a suffix and locator.[^11]
+
+Citation with suffix only.[^12]
+
+Now some modifiers.[^13]
+
+With some markup.[^14]
+
+References {#references .unnumbered}
+==========
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-item2 .csl-entry}
+Doe, John. "Article." *Journal of Generic Studies* 6 (2006): 33--34.
+:::
+
+::: {#ref-item1 .csl-entry}
+---------. *First Book*. Cambridge: Cambridge University Press, 2005.
+:::
+
+::: {#ref-пункт3 .csl-entry}
+Doe, John, and Jenny Roe. "Why Water Is Wet." In *Third Book*, edited by
+Sam Smith. Oxford: Oxford University Press, 2007.
+:::
+:::
+
+[^1]: [**Nonexistent?**](#ref-nonexistent)
+
+[^2]: [**Nonexistent?**](#ref-nonexistent)
+
+[^3]: [2005](#ref-item1).
+
+[^4]: [Ibid., 30](#ref-item1).
+
+[^5]: [Ibid.](#ref-item1), with suffix.
+
+[^6]: [2005](#ref-item1); [2006, 30](#ref-item2); see also [Doe and
+ Roe](#ref-пункт3).
+
+[^7]: [Doe and Roe](#ref-пункт3) ([12](#ref-пункт3)) and a citation
+ without locators ([Doe and Roe](#ref-пункт3)).
+
+[^8]: See [Doe, 2005, chap. 3](#ref-item1); also [Doe and Roe,
+ 34--35](#ref-пункт3).
+
+[^9]: See [Doe, 2005, 34--35](#ref-item1).
+
+[^10]: Some citations (See [ibid., chap. 3](#ref-item1); [Doe and
+ Roe](#ref-пункт3); [Doe, 2006](#ref-item2)).
+
+[^11]: [Doe, 2005, 33, 35--37](#ref-item1), and nowhere else.
+
+[^12]: [Doe, 2005](#ref-item1) and nowhere else.
+
+[^13]: Like a citation without author: ([Ibid.](#ref-item1)), and again
+ ([Ibid.](#ref-item1)), and now Doe with a locator ([2006,
+ 44](#ref-item2)).
+
+[^14]: *See* [Doe, 2005, 32](#ref-item1).
+```
diff --git a/test/command/pandoc-citeproc-ieee.md b/test/command/pandoc-citeproc-ieee.md
new file mode 100644
index 000000000..653e1e0b5
--- /dev/null
+++ b/test/command/pandoc-citeproc-ieee.md
@@ -0,0 +1,115 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+bibliography: command/biblio.bib
+csl: command/ieee.csl
+link-citations: true
+---
+
+Pandoc with citeproc-hs
+=======================
+
+[@nonexistent]
+
+@nonexistent
+
+@item1 says blah.
+
+@item1 [p. 30] says blah.
+
+@item1 [p. 30, with suffix] says blah.
+
+@item1 [-@item2 p. 30; see also @пункт3] says blah.
+
+In a note.[^1]
+
+A citation group [see @item1 chap. 3; also @пункт3 p. 34-35].
+
+Another one [see @item1 p. 34-35].
+
+And another one in a note.[^2]
+
+Citation with a suffix and locator [@item1 pp. 33, 35-37, and nowhere
+else].
+
+Citation with suffix only [@item1 and nowhere else].
+
+Now some modifiers.[^3]
+
+With some markup [*see* @item1 p. **32**].
+
+References {#references .unnumbered}
+==========
+
+[^1]: @пункт3 [p. 12] and a citation without locators [@пункт3].
+
+[^2]: Some citations [see @item1 chap. 3; @пункт3; @item2].
+
+[^3]: Like a citation without author: [-@item1], and now Doe with a
+ locator [-@item2 p. 44].
+^D
+[WARNING] Citeproc: citation nonexistent not found
+Pandoc with citeproc-hs
+=======================
+
+[**nonexistent?**](#ref-nonexistent)
+
+[**nonexistent?**](#ref-nonexistent)
+
+[\[1\]](#ref-item1) says blah.
+
+[\[1, p. 30\]](#ref-item1) says blah.
+
+[\[1, p. 30\]](#ref-item1), with suffix says blah.
+
+[\[1\]](#ref-item1), [\[2, p. 30\]](#ref-item2), see also
+[\[3\]](#ref-пункт3) says blah.
+
+In a note.[^1]
+
+A citation group see [\[1, Ch. 3\]](#ref-item1), also [\[3, pp.
+34--35\]](#ref-пункт3).
+
+Another one see [\[1, pp. 34--35\]](#ref-item1).
+
+And another one in a note.[^2]
+
+Citation with a suffix and locator [\[1, pp. 33, 35--37\]](#ref-item1),
+and nowhere else.
+
+Citation with suffix only [\[1\]](#ref-item1) and nowhere else.
+
+Now some modifiers.[^3]
+
+With some markup *see* [\[1, p. 32\]](#ref-item1).
+
+References {#references .unnumbered}
+==========
+
+::: {#refs .references .csl-bib-body}
+::: {#ref-item1 .csl-entry}
+[\[1\]]{.csl-left-margin}[J. Doe, *First book*. Cambridge: Cambridge
+University Press, 2005.]{.csl-right-inline}
+:::
+
+::: {#ref-item2 .csl-entry}
+[\[2\]]{.csl-left-margin}[J. Doe, "Article," *Journal of Generic
+Studies*, vol. 6, pp. 33--34, 2006.]{.csl-right-inline}
+:::
+
+::: {#ref-пункт3 .csl-entry}
+[\[3\]]{.csl-left-margin}[J. Doe and J. Roe, "Why water is wet," in
+*Third book*, S. Smith, Ed. Oxford: Oxford University Press,
+2007.]{.csl-right-inline}
+:::
+:::
+
+[^1]: [\[3, p. 12\]](#ref-пункт3) and a citation without locators
+ [\[3\]](#ref-пункт3).
+
+[^2]: Some citations see [\[1, Ch. 3\]](#ref-item1),
+ [\[2\]](#ref-item2), [\[3\]](#ref-пункт3).
+
+[^3]: Like a citation without author: [\[1\]](#ref-item1), and now Doe
+ with a locator [\[2, p. 44\]](#ref-item2).
+```
diff --git a/test/command/pandoc-citeproc-locators-delimited.md b/test/command/pandoc-citeproc-locators-delimited.md
new file mode 100644
index 000000000..97db169b9
--- /dev/null
+++ b/test/command/pandoc-citeproc-locators-delimited.md
@@ -0,0 +1,127 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: command/locators.csl
+references:
+- id: citekey
+ title: Title
+ type: 'article-journal'
+suppress-bibliography: true
+---
+
+See <https://github.com/jgm/pandoc-citeproc/pull/362>.
+
+Standard page range[@citekey {35-89, 102}]
+
+Alphanumeric[@citekey {abcdefg1234}]
+
+Kitchen sink[@citekey, {123(4)a-8(\[a\]12.398{8})}]
+
+Empty braces inside[@citekey, {{}}]
+
+Label specified[@citekey {p. a}]
+
+Should it work outside? No. [@citekey, p. {(a)}]
+
+Empty locator [@citekey, {}]
+
+Empty locator to force suffix[@citekey {} 123-35 numbers are suffix]
+
+Suffix generally [@citekey {123-35} numbers not, but text is suffix]
+
+With preceding comma[@citekey, {p. VI}]
+
+No commas before label[@citekey, {, p. (p. is not recognised)}]
+
+Trim white space[@citekey, { p. 9 }]
+
+Without delimiters[@citekey, suffix]
+
+With rendering label[@citekey {ss IV div 4 s 128L(7)(a)(i)-(iv), 129(5),
+130(b)}]
+
+The text is apparently NOT verbatim; it is lightly processed as page
+numbers. [@citekey {no comma, no label, no nothing}]
+
+AGLC-style page \[para\] [@citekey {584 \[78\]}]
+
+Unbalanced curly { breaks the parse[@citekey {p. suffix{suffix}suffix]
+
+Unbalanced curly } ends early[@citekey {green}suffix}suffix]
+^D
+See <https://github.com/jgm/pandoc-citeproc/pull/362>.
+
+Standard page range[^1]
+
+Alphanumeric[^2]
+
+Kitchen sink[^3]
+
+Empty braces inside[^4]
+
+Label specified[^5]
+
+Should it work outside? No.[^6]
+
+Empty locator[^7]
+
+Empty locator to force suffix[^8]
+
+Suffix generally[^9]
+
+With preceding comma[^10]
+
+No commas before label[^11]
+
+Trim white space[^12]
+
+Without delimiters[^13]
+
+With rendering label[^14]
+
+The text is apparently NOT verbatim; it is lightly processed as page
+numbers.[^15]
+
+AGLC-style page \[para\][^16]
+
+Unbalanced curly { breaks the parse[^17]
+
+Unbalanced curly } ends early[^18]
+
+[^1]: Title {35--89, 102}.
+
+[^2]: Ibid-with-locator {abcdefg1234}.
+
+[^3]: Ibid-with-locator {123(4)a--8(\[a\]12.398{8})}.
+
+[^4]: Ibid-with-locator {{}}.
+
+[^5]: Ibid-with-locator {a}.
+
+[^6]: Subsequent, p. {(a)}.
+
+[^7]: Ibid-with-locator.
+
+[^8]: Ibid 123-35 numbers are suffix.
+
+[^9]: Ibid-with-locator {123--35} numbers not, but text is suffix.
+
+[^10]: Ibid-with-locator {VI}.
+
+[^11]: Ibid-with-locator {, p. (p. is not recognised)}.
+
+[^12]: Ibid-with-locator {9}.
+
+[^13]: Subsequent, suffix.
+
+[^14]: Ibid-with-locator ss {IV div 4 s 128L(7)(a)(i)--(iv), 129(5),
+ 130(b)}.
+
+[^15]: Ibid-with-locator {no comma, no label, no nothing}.
+
+[^16]: Ibid-with-locator {584 \[78\]}.
+
+[^17]: Subsequent {p. suffix{suffix}suffix.
+
+[^18]: Ibid-with-locator {green}suffix}suffix.
+```
diff --git a/test/command/pandoc-citeproc-locators-integrated.md b/test/command/pandoc-citeproc-locators-integrated.md
new file mode 100644
index 000000000..64490e376
--- /dev/null
+++ b/test/command/pandoc-citeproc-locators-integrated.md
@@ -0,0 +1,159 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: command/locators.csl
+references:
+- id: citekey
+ title: Title
+ type: 'article-journal'
+suppress-bibliography: true
+---
+
+See <https://github.com/jgm/pandoc-citeproc/pull/362>.
+
+[@citekey, 89, and suffix]
+
+[@citekey, 89, perfect Ibid with suffix]
+
+[@citekey, 123-79, and suffix]
+
+[@citekey, xi, will be entirely suffix]
+
+[@citekey, p. xi, gives you a (page) locator xi]
+
+[@citekey, pp. VII, 89, gives you a (pages) locator VII, 89]
+
+[@citekey, p. VI, VII, VIII-IX, explicit romans]
+
+[@citekey \[89\]]
+
+[@citekey, p. \[89\]]
+
+[@citekey and nothing else].
+
+[@citekey, 123(4)\[5\]6, and suffix]
+
+[@citekey, 3(a), 4.4.8, \[7.6\], 7A(2)(a)(i)-(iv)]
+
+[@citekey, 4B.2a.i(3.4), and suffix]
+
+[@citekey, IV.2A, and suffix]
+
+[@citekey, \[28\], and suffix]
+
+[@citekey, \[39-52\], and suffix]
+
+[@citekey, \[39\]-\[52\], and suffix]
+
+[@citekey, s 123(4)(a)(iv), and suffix]
+
+[@citekey, ss 123(4)-(6), and suffix]
+
+[@citekey, \[13\], and suffix]
+
+[@citekey, p.3, and suffix]
+
+[@citekey, (13 entirely suffix]
+
+[@citekey, p.a entirely suffix]
+
+[@citekey, s (a) entirely suffix]
+^D
+See <https://github.com/jgm/pandoc-citeproc/pull/362>.
+
+[^1]
+
+[^2]
+
+[^3]
+
+[^4]
+
+[^5]
+
+[^6]
+
+[^7]
+
+[^8]
+
+[^9]
+
+.[^10]
+
+[^11]
+
+[^12]
+
+[^13]
+
+[^14]
+
+[^15]
+
+[^16]
+
+[^17]
+
+[^18]
+
+[^19]
+
+[^20]
+
+[^21]
+
+[^22]
+
+[^23]
+
+[^24]
+
+[^1]: Title {89}, and suffix.
+
+[^2]: Ibid, perfect Ibid with suffix.
+
+[^3]: Ibid-with-locator {123--79}, and suffix.
+
+[^4]: Subsequent, xi, will be entirely suffix.
+
+[^5]: Ibid-with-locator {xi}, gives you a (page) locator xi.
+
+[^6]: Ibid-with-locator {VII, 89}, gives you a (pages) locator VII, 89.
+
+[^7]: Ibid-with-locator {VI, VII, VIII--IX}, explicit romans.
+
+[^8]: Ibid-with-locator {\[89\]}.
+
+[^9]: Ibid.
+
+[^10]: Subsequent and nothing else.
+
+[^11]: Ibid-with-locator {123(4)\[5\]6}, and suffix.
+
+[^12]: Ibid-with-locator {3(a), 4.4.8, \[7.6\], 7A(2)(a)(i)--(iv)}.
+
+[^13]: Ibid-with-locator {4B.2a.i(3.4)}, and suffix.
+
+[^14]: Ibid-with-locator {IV.2A}, and suffix.
+
+[^15]: Ibid-with-locator {\[28\]}, and suffix.
+
+[^16]: Ibid-with-locator {\[39--52\]}, and suffix.
+
+[^17]: Ibid-with-locator {\[39\]--\[52\]}, and suffix.
+
+[^18]: Ibid-with-locator s {123(4)(a)(iv)}, and suffix.
+
+[^19]: Ibid-with-locator ss {123(4)--(6)}, and suffix.
+
+[^20]: Ibid-with-locator {\[13\]}, and suffix.
+
+[^21]: Ibid-with-locator {3}, and suffix.
+
+[^22]: Subsequent, (13 entirely suffix.
+
+[^23]: Ibid, p.a entirely suffix.
+
+[^24]: Ibid, s (a) entirely suffix.
+```
diff --git a/test/command/pandoc-citeproc-move-period-inside-quote.md b/test/command/pandoc-citeproc-move-period-inside-quote.md
new file mode 100644
index 000000000..e08c6b00f
--- /dev/null
+++ b/test/command/pandoc-citeproc-move-period-inside-quote.md
@@ -0,0 +1,53 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: 'command/chicago-fullnote-bibliography.csl'
+references:
+- DOI: 10.1038/171737a0
+ URL: 'http://www.nature.com/nature/journal/v171/n4356/abs/171737a0.html'
+ accessed:
+ day: 17
+ month: 6
+ year: 2008
+ author:
+ - family: Watson
+ given: J. D.
+ - family: Crick
+ given: F. H. C.
+ container-title: Nature
+ custom4: custom4
+ id: WatsonCrick1953
+ issue: 4356
+ issued:
+ date-parts:
+ - - 1953
+ - 4
+ - 25
+ language: 'en-US'
+ note: this is a note
+ original-date:
+ year: 1951
+ page: '737-738'
+ title: 'Molecular structure of nucleic acids: a structure for
+ deoxyribose nucleic acid'
+ title-short: Molecular structure of nucleic acids
+ type: 'article-journal'
+ volume: 171
+suppress-bibliography: true
+---
+
+Here is a "test citation" [@WatsonCrick1953].
+
+Here is a test citation [@WatsonCrick1953].
+^D
+Here is a "test citation."[^1]
+
+Here is a test citation.[^2]
+
+[^1]: J. D. Watson and F. H. C. Crick, "Molecular Structure of Nucleic
+ Acids: A Structure for Deoxyribose Nucleic Acid," *Nature* 171, no.
+ 4356 (April 25, 1953): 737--38,
+ doi:[10.1038/171737a0](https://doi.org/10.1038/171737a0).
+
+[^2]: Ibid.
+```
diff --git a/test/command/pandoc-citeproc-no-author.md b/test/command/pandoc-citeproc-no-author.md
new file mode 100644
index 000000000..fb832d446
--- /dev/null
+++ b/test/command/pandoc-citeproc-no-author.md
@@ -0,0 +1,73 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- container-title: Magazine
+ id: item1
+ issued:
+ year: 2012
+ title: Title A
+ type: 'article-magazine'
+- container-title: Magazine
+ id: item2
+ issued:
+ year: 2012
+ title: Title B
+ type: 'article-magazine'
+- container-title: Magazine
+ id: item3
+ issued:
+ year: 2012
+ title: Title C
+ type: 'article-magazine'
+- container-title: Magazine
+ id: item4
+ issued:
+ year: 2012
+ title: Title D
+ type: 'article-magazine'
+- container-title: Newspaper
+ id: item5
+ issued:
+ year: 2012
+ title: Title E
+ type: 'article-magazine'
+- container-title: Newspaper
+ id: item6
+ issued:
+ year: 2012
+ title: Title F
+ type: 'article-magazine'
+---
+
+@item1 [p. 3], @item2, @item3, @item4, @item5, @item6
+^D
+*Magazine* (2012a, 3), *Magazine* (2012b), *Magazine* (2012c),
+*Magazine* (2012d), *Newspaper* (2012a), *Newspaper* (2012b)
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-item1 .csl-entry}
+*Magazine*. 2012a. "Title A," 2012.
+:::
+
+::: {#ref-item2 .csl-entry}
+---------. 2012b. "Title B," 2012.
+:::
+
+::: {#ref-item3 .csl-entry}
+---------. 2012c. "Title C," 2012.
+:::
+
+::: {#ref-item4 .csl-entry}
+---------. 2012d. "Title D," 2012.
+:::
+
+::: {#ref-item5 .csl-entry}
+*Newspaper*. 2012a. "Title E," 2012.
+:::
+
+::: {#ref-item6 .csl-entry}
+---------. 2012b. "Title F," 2012.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-number-of-volumes.md b/test/command/pandoc-citeproc-number-of-volumes.md
new file mode 100644
index 000000000..2ac5866e2
--- /dev/null
+++ b/test/command/pandoc-citeproc-number-of-volumes.md
@@ -0,0 +1,29 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+references:
+- author:
+ family: Author
+ given:
+ - Al
+ id: item1
+ issued:
+ year: 2013
+ language: 'en-US'
+ number-of-volumes: 2
+ publisher: Publisher
+ publisher-place: Location
+ title: Title
+ type: book
+---
+
+@item1
+^D
+Author (2013)
+
+::: {#refs .references .csl-bib-body .hanging-indent}
+::: {#ref-item1 .csl-entry}
+Author, Al. 2013. *Title*. 2 vols. Location: Publisher.
+:::
+:::
+```
diff --git a/test/command/pandoc-citeproc-page-range.md b/test/command/pandoc-citeproc-page-range.md
new file mode 100644
index 000000000..5a46c5f03
--- /dev/null
+++ b/test/command/pandoc-citeproc-page-range.md
@@ -0,0 +1,32 @@
+```
+% pandoc --citeproc -t markdown-citations
+---
+csl: 'command/chicago-fullnote-bibliography.csl'
+references:
+- URL: 'https://johnmacfarlane.net/vagueness.pdf'
+ id: test1
+- URL: 'https://pandoc.org'
+ id: test2
+- URL: 'https://johnmacfarlane.net'
+ id: test3
+suppress-bibliography: true
+---
+
+Test 1 [@test1, pp. 93--101].
+
+Test 2 [@test2, pp. 93--101].
+
+Test 3 [@test3, pp. 93-101].
+^D
+Test 1.[^1]
+
+Test 2.[^2]
+
+Test 3.[^3]
+
+[^1]: 93--101, <https://johnmacfarlane.net/vagueness.pdf>.
+
+[^2]: 93--101, <https://pandoc.org>.
+
+[^3]: 93--101, <https://johnmacfarlane.net>.
+```
diff --git a/test/command/sage-harvard.csl b/test/command/sage-harvard.csl
new file mode 100644
index 000000000..2798c086a
--- /dev/null
+++ b/test/command/sage-harvard.csl
@@ -0,0 +1,202 @@
+<?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" default-locale="en-GB">
+ <info>
+ <title>SAGE - Harvard</title>
+ <id>http://www.zotero.org/styles/sage-harvard</id>
+ <link href="http://www.zotero.org/styles/sage-harvard" rel="self"/>
+ <link href="http://www.zotero.org/styles/the-open-university-harvard" rel="template"/>
+ <link href="http://www.uk.sagepub.com/repository/binaries/pdf/SAGE_Harvard_reference_style.pdf" rel="documentation"/>
+ <author>
+ <name>Joseph Reagle</name>
+ </author>
+ <category citation-format="author-date"/>
+ <category field="generic-base"/>
+ <summary>The SAGE Harvard author-date style</summary>
+ <updated>2012-09-27T22:06:38+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-GB">
+ <terms>
+ <term name="editor" form="short">
+ <single>ed.</single>
+ <multiple>eds</multiple>
+ </term>
+ </terms>
+ </locale>
+ <macro name="editor">
+ <names variable="editor" delimiter=", ">
+ <name and="text" initialize-with="" delimiter=", " sort-separator=" " name-as-sort-order="all"/>
+ <label form="short" prefix=" (" suffix=")"/>
+ </names>
+ </macro>
+ <macro name="author">
+ <names variable="author">
+ <name initialize-with="" name-as-sort-order="all" and="text" sort-separator=" " delimiter=", " delimiter-precedes-last="never" form="long"/>
+ <label form="short" prefix=" (" suffix=")"/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <text variable="container-title" font-style="italic"/>
+ <text macro="title"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="author-count">
+ <names variable="author">
+ <name form="count"/>
+ <substitute>
+ <names variable="editor"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="author-short">
+ <names variable="author">
+ <name form="short" and="text" delimiter=", " delimiter-precedes-last="never" initialize-with=""/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <text variable="container-title" font-style="italic"/>
+ <text macro="title"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="access">
+ <choose>
+ <if variable="URL">
+ <text value="Available from: "/>
+ <text variable="URL"/>
+ <group prefix=" (" delimiter=" " suffix=")">
+ <text term="accessed"/>
+ <date variable="accessed">
+ <date-part name="day" suffix=" "/>
+ <date-part name="month" suffix=" "/>
+ <date-part name="year"/>
+ </date>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="title">
+ <choose>
+ <if type="bill book graphic legal_case motion_picture report song" 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>
+ <macro name="locator">
+ <choose>
+ <if type="article-journal">
+ <text variable="volume"/>
+ <text variable="issue" prefix="(" suffix=")"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="published-date">
+ <choose>
+ <if type="article-newspaper">
+ <date variable="issued">
+ <date-part name="day" form="ordinal" suffix=" "/>
+ <date-part name="month" form="long"/>
+ </date>
+ </if>
+ </choose>
+ </macro>
+ <macro name="pages">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <group delimiter=" " prefix=", ">
+ <label variable="page" form="short" suffix=" "/>
+ <text variable="page"/>
+ </group>
+ </if>
+ <else-if type="article-journal">
+ <text variable="page" prefix=": "/>
+ </else-if>
+ </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" suffix="."/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="container-prefix">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <text term="in" text-case="capitalize-first" suffix=": "/>
+ </if>
+ </choose>
+ </macro>
+ <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true" collapse="year">
+ <sort>
+ <key macro="author-short"/>
+ <key macro="year-date"/>
+ </sort>
+ <layout prefix="(" suffix=")" delimiter="; ">
+ <group delimiter=": ">
+ <group delimiter=", ">
+ <text macro="author-short"/>
+ <text macro="year-date"/>
+ </group>
+ <text variable="locator"/>
+ </group>
+ </layout>
+ </citation>
+ <bibliography hanging-indent="true" et-al-min="4" et-al-use-first="3">
+ <sort>
+ <key macro="author" names-min="1" names-use-first="1"/>
+ <key macro="author-count" names-min="3" names-use-first="3"/>
+ <key macro="author" names-min="3" names-use-first="1"/>
+ <key macro="year-date"/>
+ <key variable="title"/>
+ </sort>
+ <layout suffix=".">
+ <group delimiter=" ">
+ <text macro="author"/>
+ <text macro="year-date" prefix="(" suffix=")"/>
+ <text macro="title" suffix="."/>
+ <text macro="edition"/>
+ <text macro="container-prefix"/>
+ <group delimiter=", ">
+ <text macro="editor"/>
+ <text variable="container-title" font-style="italic"/>
+ <text variable="collection-title"/>
+ <text variable="genre"/>
+ <text macro="publisher"/>
+ <text macro="published-date"/>
+ </group>
+ <text macro="locator"/>
+ </group>
+ <text macro="pages"/>
+ <text macro="access" prefix=". "/>
+ </layout>
+ </bibliography>
+</style>
diff --git a/test/command/science.csl b/test/command/science.csl
new file mode 100644
index 000000000..2a9864cb2
--- /dev/null
+++ b/test/command/science.csl
@@ -0,0 +1,245 @@
+<?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-US">
+ <info>
+ <title>Science</title>
+ <id>http://www.zotero.org/styles/science</id>
+ <link href="http://www.zotero.org/styles/science" rel="self"/>
+ <link href="http://www.sciencemag.org/about/authors/prep/res/refs.dtl" rel="documentation"/>
+ <author>
+ <name>Julian Onions</name>
+ <email>julian.onions@gmail.com</email>
+ </author>
+ <contributor>
+ <name>Sebastian Karcher</name>
+ </contributor>
+ <contributor>
+ <name>Greg Barendt</name>
+ </contributor>
+ <category citation-format="numeric"/>
+ <category field="science"/>
+ <issn>0036-8075</issn>
+ <eissn>1095-9203</eissn>
+ <summary>The Science journal style.</summary>
+ <updated>2014-06-18T08:06:38+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>
+ <macro name="editor">
+ <names variable="editor" delimiter=", ">
+ <name initialize-with=". " delimiter=", " delimiter-precedes-last="always"/>
+ <label form="short" prefix=", " text-case="capitalize-first"/>
+ </names>
+ </macro>
+ <macro name="author">
+ <names variable="author">
+ <name sort-separator=", " initialize-with=". " delimiter=", " delimiter-precedes-last="always"/>
+ <label form="short" prefix=", " text-case="capitalize-first"/>
+ <et-al font-style="italic"/>
+ <substitute>
+ <names variable="editor"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="access">
+ <choose>
+ <if variable="page" match="none">
+ <text macro="access-value"/>
+ </if>
+ <else-if is-numeric="page" match="none">
+ <text macro="access-value"/>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="access-value">
+ <choose>
+ <if variable="DOI">
+ <text variable="DOI" prefix=", doi:"/>
+ </if>
+ <else>
+ <group prefix=" (" suffix=")">
+ <text value="available at "/>
+ <text variable="URL"/>
+ </group>
+ </else>
+ </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"/>
+ </if>
+ <else>
+ <text variable="title"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="article-details">
+ <group delimiter=", ">
+ <group delimiter=". ">
+ <text macro="title"/>
+ <text form="short" variable="container-title" font-style="italic"/>
+ <text variable="volume" font-weight="bold"/>
+ </group>
+ <text variable="page"/>
+ </group>
+ <text macro="issued" prefix=" (" suffix=")"/>
+ <text macro="access"/>
+ </macro>
+ <macro name="publisher">
+ <group delimiter=", ">
+ <text variable="publisher"/>
+ <text variable="publisher-place"/>
+ </group>
+ </macro>
+ <macro name="volume">
+ <text variable="volume" prefix="vol. "/>
+ </macro>
+ <macro name="pages">
+ <label variable="page" form="short" suffix=" "/>
+ <text variable="page" form="short"/>
+ </macro>
+ <macro name="issued">
+ <date variable="issued" delimiter=" ">
+ <date-part name="year"/>
+ </date>
+ </macro>
+ <macro name="edition">
+ <choose>
+ <if is-numeric="edition">
+ <group delimiter=" ">
+ <text term="edition" form="short"/>
+ <number variable="edition" form="numeric"/>
+ </group>
+ </if>
+ <else>
+ <text variable="edition" suffix="."/>
+ </else>
+ </choose>
+ </macro>
+ <citation collapse="citation-number">
+ <sort>
+ <key variable="citation-number"/>
+ </sort>
+ <layout prefix="(" suffix=")" delimiter=", ">
+ <text variable="citation-number" font-style="italic"/>
+ </layout>
+ </citation>
+ <bibliography et-al-min="6" et-al-use-first="1" second-field-align="flush">
+ <layout suffix=".">
+ <text variable="citation-number" suffix=". "/>
+ <group delimiter=", ">
+ <text macro="author"/>
+ <choose>
+ <if type="thesis">
+ <group delimiter=" ">
+ <group delimiter=", ">
+ <group>
+ <!-- Always print, even if no university given -->
+ <text value="thesis"/>
+ </group>
+ <text macro="publisher"/>
+ </group>
+ <text macro="issued" prefix="(" suffix=")"/>
+ </group>
+ </if>
+ <else-if type="bill book graphic legal_case legislation motion_picture song chapter paper-conference" match="any">
+ <group delimiter=" ">
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <text term="in"/>
+ <text variable="container-title" font-style="italic"/>
+ </group>
+ <text macro="editor"/>
+ </group>
+ </if>
+ <else>
+ <text macro="title"/>
+ </else>
+ </choose>
+ <group prefix="(" suffix=")" delimiter="; ">
+ <group delimiter=", ">
+ <text macro="publisher"/>
+ <text macro="edition"/>
+ <text macro="issued"/>
+ </group>
+ <text variable="URL"/>
+ </group>
+ </group>
+ <group delimiter=" of ">
+ <group>
+ <label variable="volume" form="short" suffix=" "/>
+ <number variable="volume"/>
+ </group>
+ <text variable="collection-title" font-style="italic"/>
+ </group>
+ <choose>
+ <if type="chapter paper-conference" match="any">
+ <text macro="pages"/>
+ </if>
+ </choose>
+ </else-if>
+ <else-if type="article-journal">
+ <choose>
+ <if variable="page">
+ <choose>
+ <if is-numeric="page" match="none">
+ <group>
+ <group delimiter=", ">
+ <text variable="container-title" form="short" font-style="italic"/>
+ <group>
+ <text term="in press"/>
+ </group>
+ </group>
+ <text macro="access"/>
+ </group>
+ </if>
+ <else>
+ <text macro="article-details"/>
+ </else>
+ </choose>
+ </if>
+ <else>
+ <text macro="article-details"/>
+ </else>
+ </choose>
+ </else-if>
+ <else-if type="report">
+ <group>
+ <group delimiter=", ">
+ <text variable="title" quotes="true"/>
+ <text variable="collection-title" font-style="italic"/>
+ </group>
+ <group prefix=" (" suffix=")" delimiter=", ">
+ <group delimiter=" ">
+ <text variable="genre" form="short"/>
+ <number variable="number"/>
+ </group>
+ <text variable="publisher"/>
+ <text variable="publisher-place"/>
+ <text macro="issued"/>
+ </group>
+ </group>
+ <text macro="pages"/>
+ <text macro="access"/>
+ </else-if>
+ <else>
+ <group>
+ <group delimiter=", ">
+ <text macro="editor"/>
+ <group delimiter=". ">
+ <text macro="title"/>
+ <text form="short" variable="container-title" font-style="italic"/>
+ <text variable="volume" font-weight="bold"/>
+ </group>
+ </group>
+ <text macro="issued" prefix=" (" suffix=")"/>
+ </group>
+ <text macro="pages"/>
+ <text macro="access"/>
+ </else>
+ </choose>
+ </group>
+ </layout>
+ </bibliography>
+</style>
diff --git a/test/command/style399.csl b/test/command/style399.csl
new file mode 100644
index 000000000..41a81f4e4
--- /dev/null
+++ b/test/command/style399.csl
@@ -0,0 +1,12 @@
+<?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" default-locale="en-US">
+ <citation>
+ <sort>
+ <key variable="citation-number"/>
+ </sort>
+ <layout prefix="[" suffix="]" delimiter=",">
+ <text variable="citation-number"/>
+ </layout>
+ </citation>
+</style>
+
diff --git a/test/command/vancouver.csl b/test/command/vancouver.csl
new file mode 100644
index 000000000..edbb69b41
--- /dev/null
+++ b/test/command/vancouver.csl
@@ -0,0 +1,351 @@
+<?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="minimal">
+ <info>
+ <title>Vancouver</title>
+ <id>http://www.zotero.org/styles/vancouver</id>
+ <link href="http://www.zotero.org/styles/vancouver" rel="self"/>
+ <link href="http://www.nlm.nih.gov/bsd/uniform_requirements.html" rel="documentation"/>
+ <author>
+ <name>Michael Berkowitz</name>
+ <email>mberkowi@gmu.edu</email>
+ </author>
+ <contributor>
+ <name>Sean Takats</name>
+ <email>stakats@gmu.edu</email>
+ </contributor>
+ <contributor>
+ <name>Sebastian Karcher</name>
+ </contributor>
+ <category citation-format="numeric"/>
+ <category field="medicine"/>
+ <summary>Vancouver style as outlined by International Committee of Medical Journal Editors Uniform Requirements for Manuscripts Submitted to Biomedical Journals: Sample References</summary>
+ <updated>2014-09-06T16:03:01+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">
+ <date form="text" delimiter=" ">
+ <date-part name="year"/>
+ <date-part name="month" form="short" strip-periods="true"/>
+ <date-part name="day"/>
+ </date>
+ <terms>
+ <term name="collection-editor" form="long">
+ <single>editor</single>
+ <multiple>editors</multiple>
+ </term>
+ <term name="presented at">presented at</term>
+ <term name="available at">available from</term>
+ <term name="section" form="short">sect.</term>
+ </terms>
+ </locale>
+ <locale xml:lang="fr">
+ <date form="text" delimiter=" ">
+ <date-part name="day"/>
+ <date-part name="month" form="short" strip-periods="true"/>
+ <date-part name="year"/>
+ </date>
+ </locale>
+ <macro name="author">
+ <names variable="author">
+ <name sort-separator=" " initialize-with="" name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
+ <label form="long" prefix=", "/>
+ <substitute>
+ <names variable="editor"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="editor">
+ <names variable="editor" suffix=".">
+ <name sort-separator=" " initialize-with="" name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
+ <label form="long" prefix=", "/>
+ </names>
+ </macro>
+ <macro name="chapter-marker">
+ <choose>
+ <if type="chapter paper-conference entry-dictionary entry-encyclopedia" match="any">
+ <text term="in" text-case="capitalize-first"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="publisher">
+ <choose>
+ <!--discard publisher info for articles-->
+ <if type="article-journal article-magazine article-newspaper" match="none">
+ <group delimiter=": " suffix=";">
+ <choose>
+ <if type="thesis">
+ <text variable="publisher-place" prefix="[" suffix="]"/>
+ </if>
+ <else-if type="speech"/>
+ <else>
+ <text variable="publisher-place"/>
+ </else>
+ </choose>
+ <text variable="publisher"/>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="access">
+ <choose>
+ <if variable="URL">
+ <group delimiter=": ">
+ <text term="available at" text-case="capitalize-first"/>
+ <text variable="URL"/>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="accessed-date">
+ <choose>
+ <if variable="URL">
+ <group prefix="[" suffix="]" delimiter=" ">
+ <text term="cited" text-case="lowercase"/>
+ <date variable="accessed" form="text"/>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="container-title">
+ <choose>
+ <if type="article-journal article-magazine chapter paper-conference article-newspaper review review-book entry-dictionary entry-encyclopedia" match="any">
+ <group suffix="." delimiter=" ">
+ <choose>
+ <if type="article-journal review review-book" match="any">
+ <text variable="container-title" form="short" strip-periods="true"/>
+ </if>
+ <else>
+ <text variable="container-title" strip-periods="true"/>
+ </else>
+ </choose>
+ <choose>
+ <if variable="URL">
+ <text term="internet" prefix="[" suffix="]" text-case="capitalize-first"/>
+ </if>
+ </choose>
+ </group>
+ <text macro="edition" prefix=" "/>
+ </if>
+ <!--add event-name and event-place once they become available-->
+ <else-if type="bill legislation" match="any">
+ <group delimiter=", ">
+ <group delimiter=". ">
+ <text variable="container-title"/>
+ <group delimiter=" ">
+ <text term="section" form="short" text-case="capitalize-first"/>
+ <text variable="section"/>
+ </group>
+ </group>
+ <text variable="number"/>
+ </group>
+ </else-if>
+ <else-if type="speech">
+ <group delimiter=": " suffix=";">
+ <group delimiter=" ">
+ <text variable="genre" text-case="capitalize-first"/>
+ <text term="presented at"/>
+ </group>
+ <text variable="event"/>
+ </group>
+ </else-if>
+ <else>
+ <group delimiter=", " suffix=".">
+ <choose>
+ <if variable="collection-title" match="none">
+ <group delimiter=" ">
+ <label variable="volume" form="short" text-case="capitalize-first"/>
+ <text variable="volume"/>
+ </group>
+ </if>
+ </choose>
+ <text variable="container-title"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="title">
+ <text variable="title"/>
+ <choose>
+ <if type="article-journal article-magazine chapter paper-conference article-newspaper review review-book entry-dictionary entry-encyclopedia" match="none">
+ <choose>
+ <if variable="URL">
+ <text term="internet" prefix=" [" suffix="]" text-case="capitalize-first"/>
+ </if>
+ </choose>
+ <text macro="edition" prefix=". "/>
+ </if>
+ </choose>
+ <choose>
+ <if type="thesis">
+ <text variable="genre" prefix=" [" suffix="]"/>
+ </if>
+ </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" suffix="."/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="date">
+ <choose>
+ <if type="article-journal article-magazine article-newspaper review review-book" match="any">
+ <group suffix=";" delimiter=" ">
+ <date variable="issued" form="text"/>
+ <text macro="accessed-date"/>
+ </group>
+ </if>
+ <else-if type="bill legislation" match="any">
+ <group delimiter=", ">
+ <date variable="issued" delimiter=" ">
+ <date-part name="month" form="short" strip-periods="true"/>
+ <date-part name="day"/>
+ </date>
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </group>
+ </else-if>
+ <else-if type="report">
+ <date variable="issued" delimiter=" ">
+ <date-part name="year"/>
+ <date-part name="month" form="short" strip-periods="true"/>
+ </date>
+ <text macro="accessed-date" prefix=" "/>
+ </else-if>
+ <else-if type="patent">
+ <group suffix=".">
+ <group delimiter=", ">
+ <text variable="number"/>
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </group>
+ <text macro="accessed-date" prefix=" "/>
+ </group>
+ </else-if>
+ <else-if type="speech">
+ <group delimiter="; ">
+ <group delimiter=" ">
+ <date variable="issued" delimiter=" ">
+ <date-part name="year"/>
+ <date-part name="month" form="short" strip-periods="true"/>
+ <date-part name="day"/>
+ </date>
+ <text macro="accessed-date"/>
+ </group>
+ <text variable="event-place"/>
+ </group>
+ </else-if>
+ <else>
+ <group suffix=".">
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ <text macro="accessed-date" prefix=" "/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="pages">
+ <choose>
+ <if type="article-journal article-magazine article-newspaper review review-book" match="any">
+ <text variable="page" prefix=":"/>
+ </if>
+ <else-if type="book" match="any">
+ <text variable="number-of-pages" prefix=" "/>
+ <choose>
+ <if is-numeric="number-of-pages">
+ <label variable="number-of-pages" form="short" prefix=" " plural="never"/>
+ </if>
+ </choose>
+ </else-if>
+ <else>
+ <group prefix=" " delimiter=" ">
+ <label variable="page" form="short" plural="never"/>
+ <text variable="page"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="journal-location">
+ <choose>
+ <if type="article-journal article-magazine review review-book" match="any">
+ <text variable="volume"/>
+ <text variable="issue" prefix="(" suffix=")"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="collection-details">
+ <choose>
+ <if type="article-journal article-magazine article-newspaper review review-book" match="none">
+ <choose>
+ <if variable="collection-title">
+ <group delimiter=" " prefix="(" suffix=")">
+ <names variable="collection-editor" suffix=".">
+ <name sort-separator=" " initialize-with="" name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
+ <label form="long" prefix=", "/>
+ </names>
+ <group delimiter="; ">
+ <text variable="collection-title"/>
+ <group delimiter=" ">
+ <label variable="volume" form="short"/>
+ <text variable="volume"/>
+ </group>
+ </group>
+ </group>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="report-details">
+ <choose>
+ <if type="report">
+ <text variable="number" prefix="Report No.: "/>
+ </if>
+ </choose>
+ </macro>
+ <citation collapse="citation-number">
+ <sort>
+ <key variable="citation-number"/>
+ </sort>
+ <layout prefix="(" suffix=")" delimiter=",">
+ <text variable="citation-number"/>
+ </layout>
+ </citation>
+ <bibliography et-al-min="7" et-al-use-first="6" second-field-align="flush">
+ <layout>
+ <text variable="citation-number" suffix=". "/>
+ <group delimiter=". " suffix=". ">
+ <text macro="author"/>
+ <text macro="title"/>
+ </group>
+ <group delimiter=" " suffix=". ">
+ <group delimiter=": ">
+ <text macro="chapter-marker"/>
+ <group delimiter=" ">
+ <text macro="editor"/>
+ <text macro="container-title"/>
+ </group>
+ </group>
+ <text macro="publisher"/>
+ <group>
+ <text macro="date"/>
+ <text macro="journal-location"/>
+ <text macro="pages"/>
+ </group>
+ </group>
+ <text macro="collection-details" suffix=". "/>
+ <text macro="report-details" suffix=". "/>
+ <text macro="access"/>
+ </layout>
+ </bibliography>
+</style>
diff --git a/test/command/zeitschrift-fur-kunstgeschichte.csl b/test/command/zeitschrift-fur-kunstgeschichte.csl
new file mode 100644
index 000000000..14f30ae53
--- /dev/null
+++ b/test/command/zeitschrift-fur-kunstgeschichte.csl
@@ -0,0 +1,346 @@
+<?xml version="1.0" encoding="utf-8"?>
+<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" demote-non-dropping-particle="sort-only">
+ <info>
+ <title>Zeitschrift für Kunstgeschichte</title>
+ <title-short>ZfK</title-short>
+ <id>http://www.zotero.org/styles/zeitschrift-fur-kunstgeschichte</id>
+ <link href="http://www.zotero.org/styles/zeitschrift-fur-kunstgeschichte" rel="self"/>
+ <link href="http://www.zotero.org/styles/kritische-ausgabe" rel="template"/>
+ <link href="http://www.uni-bielefeld.de/geschichte/abteilung/arbeitsbereiche/bildwissenschaft/zfk/documents/Sylesheet-(ger)-Zeitschrift-fur-Kunstgeschichte.pdf" rel="documentation"/>
+ <link href="https://github.com/citation-style-language/styles/pull/1861" rel="documentation"/>
+ <author>
+ <name>Philipp Zumstein</name>
+ <uri>https://github.com/zuphilip/</uri>
+ </author>
+ <contributor>
+ <name>Anna Simon</name>
+ <email>simonanna@gmx.net</email>
+ </contributor>
+ <category citation-format="note"/>
+ <category field="humanities"/>
+ <category field="history"/>
+ <issn>0044-2992</issn>
+ <summary>From the editors: "Die Herausgeber werden im Falle von Editionen, Lexika und Ausstellungskatalogen dem Titel nachgestellt [use encyclopedia articles with or without container-title for that]. Bei gewöhnlichen Sammelbänden werden die Herausgeber dem Titel vorangestellt [use book for that]." Multilingual style; the information for exhibition catalogues should be entered in the field collection-title; locators may use the word "here" or "hier" in front of the page refering to which must be entered individually (the style outputs the locator as it is entered w/o any label or additional text).</summary>
+ <updated>2016-02-03T17:41:02+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="de">
+ <terms>
+ <term name="note">wie Anm.</term>
+ <term name="et-al">et al.</term>
+ <term name="editor" form="short">Hg.</term>
+ <term name="editortranslator" form="verb-short">hg. und übers. von</term>
+ <term name="accessed">letzter Zugriff am</term>
+ </terms>
+ </locale>
+ <locale xml:lang="en">
+ <terms>
+ <term name="note">as note</term>
+ <term name="editortranslator" form="verb-short">ed. and trans. by</term>
+ </terms>
+ </locale>
+ <macro name="author-short">
+ <names variable="author">
+ <name form="short" delimiter="/" and="text" delimiter-precedes-et-al="never"/>
+ <substitute>
+ <choose>
+ <if type="entry-encyclopedia" match="none">
+ <names variable="editor"/>
+ </if>
+ </choose>
+ <text variable="title" form="short"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="author">
+ <names variable="author" delimiter=", ">
+ <name and="text" delimiter-precedes-et-al="never" delimiter-precedes-last="never"/>
+ <label form="short" prefix=" (" suffix=")"/>
+ <substitute>
+ <choose>
+ <if type="entry-encyclopedia" match="none">
+ <names variable="editor"/>
+ </if>
+ </choose>
+ <text variable="title"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="author-bibliography">
+ <names variable="author" delimiter=", ">
+ <name and="text" delimiter-precedes-et-al="never" delimiter-precedes-last="never" name-as-sort-order="first"/>
+ <label form="short" prefix=" (" suffix=")"/>
+ <substitute>
+ <choose>
+ <if type="entry-encyclopedia" match="none">
+ <names variable="editor"/>
+ </if>
+ </choose>
+ <text variable="title"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="editor">
+ <names variable="editor translator" delimiter=", ">
+ <name and="text" delimiter-precedes-et-al="never" delimiter-precedes-last="never"/>
+ <label form="short" prefix=" (" suffix=")"/>
+ </names>
+ </macro>
+ <macro name="editor-encyclopedia">
+ <names variable="editor translator" delimiter=", ">
+ <label form="verb-short" suffix=" "/>
+ <name and="text" delimiter-precedes-et-al="never" delimiter-precedes-last="never"/>
+ </names>
+ </macro>
+ <macro name="volume">
+ <choose>
+ <if type="article-journal">
+ <text variable="volume" prefix=" "/>
+ <text variable="issue" prefix="/"/>
+ </if>
+ <else>
+ <choose>
+ <if variable="volume">
+ <group delimiter=" ">
+ <number variable="volume" form="long-ordinal" text-case="capitalize-first"/>
+ <text term="volume" form="short" text-case="capitalize-first"/>
+ </group>
+ </if>
+ <else>
+ <group>
+ <number variable="number-of-volumes" form="numeric"/>
+ <text term="volume" form="short" prefix=" " plural="true"/>
+ </group>
+ </else>
+ </choose>
+ </else>
+ </choose>
+ </macro>
+ <macro name="year-date">
+ <date variable="issued" date-parts="year" form="numeric"/>
+ </macro>
+ <macro name="collection-with-number">
+ <group delimiter=", " prefix="(" suffix=")">
+ <text variable="collection-title"/>
+ <text variable="collection-number"/>
+ </group>
+ </macro>
+ <macro name="translator">
+ <names variable="editor translator" delimiter=", ">
+ <label form="verb-short"/>
+ <name prefix=" " and="text" delimiter-precedes-et-al="never" delimiter-precedes-last="never"/>
+ </names>
+ </macro>
+ <citation et-al-min="3" et-al-use-first="1" disambiguate-add-names="true">
+ <layout delimiter="; " suffix=".">
+ <choose>
+ <if position="ibid-with-locator">
+ <group delimiter=", ">
+ <text term="ibid"/>
+ <text variable="locator" prefix=" "/>
+ </group>
+ </if>
+ <else-if position="ibid">
+ <text term="ibid"/>
+ </else-if>
+ <else-if position="subsequent">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <text macro="author-short"/>
+ <text macro="year-date"/>
+ <group delimiter=" " prefix="(" suffix=")">
+ <text term="note"/>
+ <text variable="first-reference-note-number"/>
+ </group>
+ </group>
+ <text variable="locator"/>
+ </group>
+ </else-if>
+ <else>
+ <group delimiter=", ">
+ <text macro="author"/>
+ <choose>
+ <if match="any" variable="container-title">
+ <text variable="title"/>
+ <group delimiter=" ">
+ <text term="in" suffix=": "/>
+ <choose>
+ <if type="entry-encyclopedia" match="any">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <text variable="container-title" font-style="italic"/>
+ <text macro="collection-with-number"/>
+ <text macro="volume"/>
+ </group>
+ <text macro="editor-encyclopedia"/>
+ </group>
+ </if>
+ <else>
+ <text macro="editor" suffix=","/>
+ <text variable="container-title" font-style="italic"/>
+ <text macro="collection-with-number"/>
+ <text macro="volume"/>
+ </else>
+ </choose>
+ </group>
+ </if>
+ <else>
+ <choose>
+ <if type="entry-encyclopedia" match="any">
+ <group delimiter=" ">
+ <text variable="title" font-style="italic"/>
+ <text macro="collection-with-number"/>
+ </group>
+ <text macro="editor-encyclopedia"/>
+ </if>
+ <else-if match="any" variable="translator">
+ <choose>
+ <if match="none" variable="author">
+ <names variable="editor">
+ <name and="text" delimiter-precedes-et-al="never" delimiter-precedes-last="never"/>
+ <label form="short" prefix=" (" suffix=")"/>
+ </names>
+ </if>
+ </choose>
+ <group delimiter=" ">
+ <text variable="title" font-style="italic" suffix=","/>
+ <text macro="collection-with-number"/>
+ </group>
+ </else-if>
+ <else>
+ <choose>
+ <if match="none" variable="author">
+ <names variable="editor">
+ <name and="text" delimiter-precedes-et-al="never" delimiter-precedes-last="never"/>
+ <label form="short" prefix=" (" suffix=")"/>
+ </names>
+ </if>
+ </choose>
+ <group delimiter=" ">
+ <group delimiter=", ">
+ <text variable="title" font-style="italic"/>
+ <text macro="translator"/>
+ </group>
+ <text macro="collection-with-number"/>
+ </group>
+ </else>
+ </choose>
+ </else>
+ </choose>
+ <choose>
+ <if type="thesis">
+ <text variable="publisher" prefix="Diss., "/>
+ </if>
+ </choose>
+ <group delimiter=" ">
+ <text variable="publisher-place"/>
+ <group>
+ <text variable="edition" vertical-align="sup"/>
+ <text macro="year-date"/>
+ </group>
+ </group>
+ <text variable="page" prefix=" "/>
+ <text variable="locator" prefix=" "/>
+ </group>
+ </else>
+ </choose>
+ <choose>
+ <if variable="URL" match="any">
+ <group>
+ <text variable="URL" prefix=", "/>
+ <text term="accessed" prefix=" ("/>
+ <date variable="accessed" prefix=" " delimiter="." suffix=")">
+ <date-part name="day"/>
+ <date-part name="month" form="numeric"/>
+ <date-part name="year"/>
+ </date>
+ </group>
+ </if>
+ </choose>
+ </layout>
+ </citation>
+ <bibliography et-al-min="3" et-al-use-first="1" subsequent-author-substitute="&#8212;&#8212;&#8212;" entry-spacing="0" hanging-indent="true">
+ <sort>
+ <key macro="author-bibliography"/>
+ <key macro="year-date"/>
+ <key variable="title"/>
+ </sort>
+ <layout suffix=".">
+ <group delimiter=", ">
+ <text macro="author-bibliography"/>
+ <choose>
+ <if match="any" variable="container-title">
+ <text variable="title"/>
+ <group delimiter=" ">
+ <text term="in" suffix=": "/>
+ <choose>
+ <if type="entry-encyclopedia" match="any">
+ <group delimiter=", ">
+ <group delimiter=" ">
+ <text variable="container-title" font-style="italic"/>
+ <text macro="collection-with-number"/>
+ <text macro="volume"/>
+ </group>
+ <text macro="editor-encyclopedia"/>
+ </group>
+ </if>
+ <else>
+ <text macro="editor" suffix=","/>
+ <text variable="container-title" font-style="italic"/>
+ <text macro="collection-with-number"/>
+ <text macro="volume"/>
+ </else>
+ </choose>
+ </group>
+ </if>
+ <else>
+ <choose>
+ <if type="entry-encyclopedia" match="any">
+ <group delimiter=" ">
+ <text variable="title" font-style="italic"/>
+ <text macro="collection-with-number"/>
+ </group>
+ <text macro="editor-encyclopedia"/>
+ </if>
+ <else>
+ <group delimiter=" ">
+ <group delimiter=", ">
+ <text variable="title" font-style="italic"/>
+ <text macro="editor"/>
+ </group>
+ <text macro="collection-with-number"/>
+ </group>
+ </else>
+ </choose>
+ </else>
+ </choose>
+ <choose>
+ <if type="thesis">
+ <text variable="publisher" prefix="Diss., "/>
+ </if>
+ </choose>
+ <group delimiter=" ">
+ <text variable="publisher-place"/>
+ <group>
+ <text variable="edition" vertical-align="sup"/>
+ <text macro="year-date"/>
+ </group>
+ </group>
+ <text variable="page" prefix=" "/>
+ </group>
+ <choose>
+ <if variable="URL" match="any">
+ <group>
+ <text variable="URL" prefix=", "/>
+ <text term="accessed" prefix=" ("/>
+ <date variable="accessed" prefix=" " delimiter="." suffix=")">
+ <date-part name="day"/>
+ <date-part name="month" form="numeric"/>
+ <date-part name="year"/>
+ </date>
+ </group>
+ </if>
+ </choose>
+ </layout>
+ </bibliography>
+</style>
diff --git a/windows/pandoc.wxs b/windows/pandoc.wxs
index cb996e76c..d9f6b836e 100644
--- a/windows/pandoc.wxs
+++ b/windows/pandoc.wxs
@@ -51,8 +51,6 @@
Key="Software\John MacFarlane\Pandoc"
Name="Version" Type="string" Value="[ProductVersion]"
KeyPath="yes"/>
- <File Id="pandoc_citeprocEXE" Name="pandoc-citeproc.exe"
- Source="$(var.BINPATH)\pandoc-citeproc.exe" />
</Component>
<Component Id="Documentation"