Hello community,
here is the log from the commit of package ghc-pandoc-citeproc for
openSUSE:Factory checked in at 2019-03-19 09:59:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-pandoc-citeproc (Old)
and /work/SRC/openSUSE:Factory/.ghc-pandoc-citeproc.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-pandoc-citeproc"
Tue Mar 19 09:59:44 2019 rev:6 rq:686010 version:0.16.1.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-pandoc-citeproc/ghc-pandoc-citeproc.changes
2019-03-06 15:47:22.204451087 +0100
+++
/work/SRC/openSUSE:Factory/.ghc-pandoc-citeproc.new.28833/ghc-pandoc-citeproc.changes
2019-03-19 09:59:45.980019561 +0100
@@ -1,0 +2,23 @@
+Thu Mar 14 03:01:49 UTC 2019 - [email protected]
+
+- Update pandoc-citeproc to version 0.16.1.3.
+ pandoc-citeproc (0.16.1.3)
+
+ * Correctly handle initials even when
+ presented without a space, as in "J.G. Smith" (#392).
+ * Avoid generating Str "" when possible.
+ * Allow superscript in-text styles to be treated as "notes"
+ for purposes of moving punctuation (George Pollard, #382).
+
+-------------------------------------------------------------------
+Sat Mar 9 03:02:01 UTC 2019 - [email protected]
+
+- Update pandoc-citeproc to version 0.16.1.2.
+ pandoc-citeproc (0.16.1.2)
+
+ * Fix extraction page-first when page is not fully numeric (#386).
+ * For cites in notes in a footnote style, don't add comma right after
+ open parentheses. Partially addresses #389.
+ * Ensure that URIs (e.g. in DOIs) are properly escaped (#391).
+
+-------------------------------------------------------------------
Old:
----
pandoc-citeproc-0.16.1.1.tar.gz
New:
----
pandoc-citeproc-0.16.1.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-pandoc-citeproc.spec ++++++
--- /var/tmp/diff_new_pack.TEmYR5/_old 2019-03-19 09:59:46.804015708 +0100
+++ /var/tmp/diff_new_pack.TEmYR5/_new 2019-03-19 09:59:46.820015633 +0100
@@ -19,7 +19,7 @@
%global pkg_name pandoc-citeproc
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.16.1.1
+Version: 0.16.1.3
Release: 0
Summary: Supports using pandoc with citeproc
License: BSD-3-Clause
++++++ pandoc-citeproc-0.16.1.1.tar.gz -> pandoc-citeproc-0.16.1.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pandoc-citeproc-0.16.1.1/changelog
new/pandoc-citeproc-0.16.1.3/changelog
--- old/pandoc-citeproc-0.16.1.1/changelog 2019-03-03 02:48:40.000000000
+0100
+++ new/pandoc-citeproc-0.16.1.3/changelog 2019-03-13 07:26:43.000000000
+0100
@@ -1,3 +1,18 @@
+pandoc-citeproc (0.16.1.3)
+
+ * Correctly handle initials even when
+ presented without a space, as in "J.G. Smith" (#392).
+ * Avoid generating Str "" when possible.
+ * Allow superscript in-text styles to be treated as "notes"
+ for purposes of moving punctuation (George Pollard, #382).
+
+pandoc-citeproc (0.16.1.2)
+
+ * Fix extraction page-first when page is not fully numeric (#386).
+ * For cites in notes in a footnote style, don't add comma right after
+ open parentheses. Partially addresses #389.
+ * Ensure that URIs (e.g. in DOIs) are properly escaped (#391).
+
pandoc-citeproc (0.16.1.1)
* Bump version bounds for pandoc, network.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pandoc-citeproc-0.16.1.1/man/man1/pandoc-citeproc.1
new/pandoc-citeproc-0.16.1.3/man/man1/pandoc-citeproc.1
--- old/pandoc-citeproc-0.16.1.1/man/man1/pandoc-citeproc.1 2019-03-03
02:48:40.000000000 +0100
+++ new/pandoc-citeproc-0.16.1.3/man/man1/pandoc-citeproc.1 2019-03-13
07:26:43.000000000 +0100
@@ -1,45 +1,48 @@
.\"t
-.\" Automatically generated by Pandoc 2.5
+.\" Automatically generated by Pandoc 2.7
.\"
-.TH "pandoc\-citeproc" "1" "2019-02-06" "pandoc-citeproc 0.16.0.1" ""
+.TH "pandoc-citeproc" "1" "2019-03-12" "pandoc-citeproc 0.16.1.3" ""
.hy
.SH NAME
.PP
-pandoc\-citeproc \- filter to resolve citations in a pandoc document.
+pandoc-citeproc - filter to resolve citations in a pandoc document.
.SH SYNOPSIS
.PP
-pandoc\-citeproc options [file..]
+pandoc-citeproc options [file..]
.SH DESCRIPTION
.PP
-The \f[C]pandoc\-citeproc\f[R] executable has two modes, filter mode and
+The \f[C]pandoc-citeproc\f[R] executable has two modes, filter mode and
convert mode.
.SS Filter mode
.PP
-Run without options, it acts as a filter that takes a JSON\-encoded
+Run without options, it acts as a filter that takes a JSON-encoded
Pandoc document, formats citations and adds a bibliography, and returns
-a JSON\-encoded pandoc document.
+a JSON-encoded pandoc document.
Citations will be resolved, and, assuming there are bibliography
entries, a bibliography will be inserted into a Div element with id
\f[C]refs\f[R].
If no such Div exists, one will be created and appended to the end of
-the document (unless the \f[C]suppress\-bibliography\f[R] metadata field
+the document (unless the \f[C]suppress-bibliography\f[R] metadata field
is set to a true value).
If you wish the bibliography to have a section header, put the section
header at the end of your document.
-(See the \f[C]pandoc_markdown\f[R] (5) man page under
-\[lq]Citations\[rq] for details on how to encode citations in
-pandoc\[cq]s markdown.)
+(See the \f[C]pandoc\f[R] (1) man page under \[lq]Citations\[rq] for
+details on how to encode citations in pandoc\[cq]s markdown.)
.PP
-To process citations with pandoc, call pandoc\-citeproc as a filter:
+To process citations with pandoc, call pandoc-citeproc as a filter:
.IP
.nf
\f[C]
-pandoc \-\-filter pandoc\-citeproc input.md \-s \-o output.html
+pandoc --filter pandoc-citeproc input.md -s -o output.html
\f[R]
.fi
.PP
-pandoc\-citeproc will look for the following metadata fields in the
-input:
+pandoc-citeproc will look for the following metadata fields in the
+input.
+(For details on how to set metadata fields in pandoc\[cq]s markdown, see
+the \f[C]pandoc\f[R] (1) man page under \f[C]--metadata\f[R],
+\f[C]--metadata-file\f[R], and
+\f[C]Extension: yaml_metadata_block\f[R].)
.TP
.B \f[C]bibliography\f[R]
A path, or YAML list of paths, of bibliography files to use.
@@ -130,17 +133,17 @@
.IP
.nf
\f[C]
-\- id: doe2006
+- id: doe2006
author:
family: Doe
given: [John, F.]
title: Article
- page: 33\-34
+ page: 33-34
issued:
year: 2006
- type: article\-journal
+ type: article-journal
volume: 6
- container\-title: Journal of Generic Studies
+ container-title: Journal of Generic Studies
\f[R]
.fi
.PP
@@ -150,26 +153,26 @@
Simple tex math will also be parsed and rendered appropriately.
.RE
.TP
-.B \f[C]csl\f[R] or \f[C]citation\-style\f[R]
+.B \f[C]csl\f[R] or \f[C]citation-style\f[R]
Path or URL of a CSL style file.
If the file is not found relative to the working directory,
-pandoc\-citeproc will look in the \f[C]$HOME/.csl\f[R] directory (or
+pandoc-citeproc will look in the \f[C]$HOME/.csl\f[R] directory (or
\f[C]C:\[rs]Users\[rs]USERNAME\[rs]AppData\[rs]Roaming\[rs]csl\f[R] in
Windows 7).
-If this is left off, pandoc\-citeproc will look for
+If this is left off, pandoc-citeproc will look for
\f[C]$HOME/.pandoc/default.csl\f[R], and if this is not present, it will
-use \f[C]chicago\-author\-date.csl\f[R], looking first in
+use \f[C]chicago-author-date.csl\f[R], looking first in
\f[C]$HOME/.csl\f[R] and then in its own data files.
.TP
-.B \f[C]link\-citations\f[R]
-If this has a true value, citations in author\-date and numerical styles
+.B \f[C]link-citations\f[R]
+If this has a true value, citations in author-date and numerical styles
will be hyperlinked to their corresponding bibliography entries.
The default is not to add hyperlinks.
.TP
-.B \f[C]citation\-abbreviations\f[R]
+.B \f[C]citation-abbreviations\f[R]
Path to a CSL abbreviations JSON file.
If the file is not found relative to the working directory,
-pandoc\-citeproc will look in the \f[C]$HOME/.csl\f[R] directory (or
+pandoc-citeproc will look in the \f[C]$HOME/.csl\f[R] directory (or
\f[C]C:\[rs]Users\[rs]USERNAME\[rs]AppData\[rs]Roaming\[rs]csl\f[R] in
Windows 7).
The format is described
@@ -184,7 +187,7 @@
.nf
\f[C]
{ \[dq]default\[dq]: {
- \[dq]container\-title\[dq]: {
+ \[dq]container-title\[dq]: {
\[dq]Lloyd\[aq]s Law Reports\[dq]: \[dq]Lloyd\[aq]s Rep\[dq],
\[dq]Estates Gazette\[dq]: \[dq]EG\[dq],
\[dq]Scots Law Times\[dq]: \[dq]SLT\[dq]
@@ -198,27 +201,27 @@
.B \f[C]lang\f[R]
Locale to use in formatting citations.
If this is not set, the locale is taken from the
-\f[C]default\-locale\f[R] attribute of the CSL file.
-\f[C]en\-US\f[R] is used if a locale is not specified in either the
+\f[C]default-locale\f[R] attribute of the CSL file.
+\f[C]en-US\f[R] is used if a locale is not specified in either the
metadata or the CSL file.
(For backwards compatibility, the field \f[C]locale\f[R] can be used
instead of \f[C]lang\f[R], but this \f[C]lang\f[R] should be used going
forward.)
.TP
-.B \f[C]suppress\-bibliography\f[R]
+.B \f[C]suppress-bibliography\f[R]
If this has a true value, the bibliography will be left off.
Otherwise a bibliography will be inserted into each Div element with id
\f[C]refs\f[R].
If there is no such Div, one will be created at the end of the document.
.TP
-.B \f[C]reference\-section\-title\f[R]
+.B \f[C]reference-section-title\f[R]
If this has a value, a section header with this title will be added
before the bibliography.
-If \f[C]reference\-section\-title\f[R] is not specified and the document
+If \f[C]reference-section-title\f[R] is not specified and the document
ends with a section header, this final header will be treated as the
bibliography header.
.TP
-.B \f[C]notes\-after\-punctuation\f[R]
+.B \f[C]notes-after-punctuation\f[R]
If true (the default), pandoc will put footnote citations after
following punctuation.
For example, if the source contains \f[C]blah blah [\[at]jones99].\f[R],
@@ -229,25 +232,25 @@
.PP
The metadata must contain either \f[C]references\f[R] or
\f[C]bibliography\f[R] or both as a source of references.
-\f[C]csl\f[R] and \f[C]citation\-abbreviations\f[R] are optional.
+\f[C]csl\f[R] and \f[C]citation-abbreviations\f[R] are optional.
If \f[C]csl\f[R] is not provided, a default stylesheet will be used
(either \f[C]\[ti]/.pandoc/default.csl\f[R] or a version of
-\f[C]chicago\-author\-date.csl\f[R]).
+\f[C]chicago-author-date.csl\f[R]).
.SS Convert mode
.PP
-If the option \f[C]\-\-bib2yaml\f[R] or \f[C]\-\-bib2json\f[R] is used,
-\f[C]pandoc\-citeproc\f[R] will not process citations; instead, it will
+If the option \f[C]--bib2yaml\f[R] or \f[C]--bib2json\f[R] is used,
+\f[C]pandoc-citeproc\f[R] will not process citations; instead, it will
treat its input (from stdin or files) as a bibliography and convert it
either to a pandoc YAML metadata section, suitable for inclusion in a
-pandoc document (\f[C]\-\-bib2yaml\f[R]), or as a CSL JSON bibliography,
-suitable for import to zotero (\f[C]\-\-bib2json\f[R]).
+pandoc document (\f[C]--bib2yaml\f[R]), or as a CSL JSON bibliography,
+suitable for import to zotero (\f[C]--bib2json\f[R]).
.PP
-The \f[C]\-\-format\f[R] option can be used to specify the bibliography
-format, though when files are used, \f[C]pandoc\-citeproc\f[R] can
+The \f[C]--format\f[R] option can be used to specify the bibliography
+format, though when files are used, \f[C]pandoc-citeproc\f[R] can
generally guess this from the extension.
.PP
This mode supersedes the old \f[C]biblio2yaml\f[R] program.
-.SS Raw content (pandoc\-citeproc only)
+.SS Raw content (pandoc-citeproc only)
.PP
To include raw content in a prefix, suffix, delimiter, or term, surround
it with these tags indicating the format:
@@ -267,35 +270,41 @@
CSL implementations.
.SH OPTIONS
.TP
-.B \f[C]\-y, \-\-bib2yaml\f[R]
+.B \f[C]-y, --bib2yaml\f[R]
Convert bibliography to YAML suitable for inclusion in pandoc metadata.
.TP
-.B \f[C]\-j, \-\-bib2json\f[R]
+.B \f[C]-j, --bib2json\f[R]
Convert bibliography to CSL JSON suitable for import into Zotero.
.TP
-.B \f[C]\-f\f[R] \f[I]FORMAT\f[R], \f[C]\-\-format=\f[R]\f[I]FORMAT\f[R]
+.B \f[C]-f\f[R] \f[I]FORMAT\f[R], \f[C]--format=\f[R]\f[I]FORMAT\f[R]
Specify format of bibliography to be converted.
Legal values are \f[C]biblatex\f[R], \f[C]bibtex\f[R], \f[C]ris\f[R],
\f[C]endnote\f[R], \f[C]endnotexml\f[R], \f[C]isi\f[R],
\f[C]medline\f[R], \f[C]copac\f[R], \f[C]mods\f[R], \f[C]nbib\f[R], and
\f[C]json\f[R].
.TP
-.B \f[C]\-h, \-\-help\f[R]
+.B \f[C]-c\f[R] \f[I]NUMBER\f[R], \f[C]--columns=\f[R]\f[I]NUMBER\f[R]
+Specify column to which to wrap YAML output produced using
+\f[C]--bib2yaml\f[R].
+Default is 80.
+To disable wrapping, set 0.
+.TP
+.B \f[C]-h, --help\f[R]
Print usage information.
.TP
-.B \f[C]\-\-man\f[R]
+.B \f[C]--man\f[R]
Print the man page in groff man format.
To get a plain text version,
-\f[C]pandoc\-citeproc \-\-man | groff \-mman \-Tutf8\f[R].
-To \f[C]pandoc\-citeproc \-\-man | groff \-mman \-Thtml\f[R].
+\f[C]pandoc-citeproc --man | groff -mman -Tutf8\f[R].
+To \f[C]pandoc-citeproc --man | groff -mman -Thtml\f[R].
.TP
-.B \f[C]\-\-license\f[R]
+.B \f[C]--license\f[R]
Print the license.
.TP
-.B \f[C]\-q, \-\-quiet\f[R]
+.B \f[C]-q, --quiet\f[R]
Silence all warnings.
.TP
-.B \f[C]\-V, \-\-version\f[R]
+.B \f[C]-V, --version\f[R]
Print version.
.SH NOTES
.SS General
@@ -304,7 +313,7 @@
\[lq]Database Guide\[rq] section of the biblatex manual (currently
2.8a).
.PP
-If you use a CSL\-YAML or CSL\-JSON database, or a CSL\-YAML metadata
+If you use a CSL-YAML or CSL-JSON database, or a CSL-YAML metadata
section in your markdown document, follow the \[lq]Citation Style
Language 1.0.1 Language Specification\[rq]
(<http://citationstyles.org/downloads/specification.html>).
@@ -320,7 +329,7 @@
following rules:
.IP \[bu] 2
English titles should be in title case.
-Non\-English titles should be in sentence case, and the \f[C]langid\f[R]
+Non-English titles should be in sentence case, and the \f[C]langid\f[R]
field in biblatex should be set to the relevant language.
(The following values are treated as English: \f[C]american\f[R],
\f[C]british\f[R], \f[C]canadian\f[R], \f[C]english\f[R],
@@ -362,8 +371,8 @@
.IP \[bu] 2
All titles should be in sentence case.
.IP \[bu] 2
-Use the \f[C]language\f[R] field for non\-English titles to prevent
-their conversion to title case in styles that call for this.
+Use the \f[C]language\f[R] field for non-English titles to prevent their
+conversion to title case in styles that call for this.
(Conversion happens only if \f[C]language\f[R] begins with \f[C]en\f[R]
or is left empty.)
.IP \[bu] 2
@@ -381,7 +390,7 @@
.PP
For a formally published conference paper, use the biblatex entry type
\f[C]inproceedings\f[R] (which will be mapped to CSL
-\f[C]paper\-conference\f[R]).
+\f[C]paper-conference\f[R]).
.PP
For an unpublished manuscript, use the biblatex entry type
\f[C]unpublished\f[R] without an \f[C]eventtitle\f[R] field (this entry
@@ -403,7 +412,7 @@
Andrea Rossato and John MacFarlane.
.SH SEE ALSO
.PP
-\f[C]pandoc\f[R] (1), \f[C]pandoc_markdown\f[R] (5).
+\f[C]pandoc\f[R] (1).
.PP
-The pandoc\-citeproc source code and all documentation may be downloaded
+The pandoc-citeproc source code and all documentation may be downloaded
from <http://github.com/jgm/pandoc-citeproc/>.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pandoc-citeproc-0.16.1.1/pandoc-citeproc.cabal
new/pandoc-citeproc-0.16.1.3/pandoc-citeproc.cabal
--- old/pandoc-citeproc-0.16.1.1/pandoc-citeproc.cabal 2019-03-03
02:48:40.000000000 +0100
+++ new/pandoc-citeproc-0.16.1.3/pandoc-citeproc.cabal 2019-03-13
07:26:43.000000000 +0100
@@ -1,5 +1,5 @@
name: pandoc-citeproc
-version: 0.16.1.1
+version: 0.16.1.3
cabal-version: 1.12
synopsis: Supports using pandoc with citeproc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pandoc-citeproc-0.16.1.1/src/Text/CSL/Eval.hs
new/pandoc-citeproc-0.16.1.3/src/Text/CSL/Eval.hs
--- old/pandoc-citeproc-0.16.1.1/src/Text/CSL/Eval.hs 2019-03-03
02:48:40.000000000 +0100
+++ new/pandoc-citeproc-0.16.1.3/src/Text/CSL/Eval.hs 2019-03-13
07:26:43.000000000 +0100
@@ -34,7 +34,7 @@
import Data.String (fromString)
import qualified Data.Text as T
import Text.Pandoc.Definition (Inline (Link, Span, Str), nullAttr)
-import Text.Pandoc.Shared (stringify)
+import Text.Pandoc.Shared (stringify, escapeURI)
import Text.Pandoc.Walk (walk)
import Text.CSL.Eval.Common
@@ -239,7 +239,7 @@
"page" -> getStringVar "page" >>= formatRange fm
"locator" -> getLocVar >>= formatRange fm . snd
"url" -> getStringVar "url" >>= \k ->
- if null k then return [] else return [Output
[OPan [Link nullAttr [Str k] (k,"")]] fm]
+ if null k then return [] else return [Output
[OPan [Link nullAttr [Str k] (escapeURI k,"")]] fm]
"doi" -> do d <- getStringVar "doi"
let (prefixPart, linkPart) = T.breakOn
(T.pack "http") (T.pack (prefix fm))
let u = if T.null linkPart
@@ -247,20 +247,20 @@
else T.unpack linkPart ++ d
if null d
then return []
- else return [Output [OPan [Link nullAttr
[Str (T.unpack linkPart ++ d)] (u, "")]]
+ else return [Output [OPan [Link nullAttr
[Str (T.unpack linkPart ++ d)] (escapeURI u, "")]]
fm{ prefix = T.unpack prefixPart,
suffix = suffix fm }]
"isbn" -> getStringVar "isbn" >>= \d ->
if null d
then return []
- else return [Output [OPan [Link nullAttr
[Str d] ("https://worldcat.org/isbn/" ++ d, "")]] fm]
+ else return [Output [OPan [Link nullAttr
[Str d] ("https://worldcat.org/isbn/" ++ escapeURI d, "")]] fm]
"pmid" -> getStringVar "pmid" >>= \d ->
if null d
then return []
- else return [Output [OPan [Link nullAttr
[Str d] ("https://www.ncbi.nlm.nih.gov/pubmed/" ++ d, "")]] fm]
+ else return [Output [OPan [Link nullAttr
[Str d] ("https://www.ncbi.nlm.nih.gov/pubmed/" ++ escapeURI d, "")]] fm]
"pmcid" -> getStringVar "pmcid" >>= \d ->
if null d
then return []
- else return [Output [OPan [Link nullAttr
[Str d] ("https://www.ncbi.nlm.nih.gov/pmc/articles/" ++ d, "")]] fm]
+ else return [Output [OPan [Link nullAttr
[Str d] ("https://www.ncbi.nlm.nih.gov/pmc/articles/" ++ escapeURI d, "")]] fm]
_ -> do (opts, as) <- gets (env >>> options &&& abbrevs)
r <- getVar []
(getFormattedValue opts as f fm s) s
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pandoc-citeproc-0.16.1.1/src/Text/CSL/Input/Bibtex.hs
new/pandoc-citeproc-0.16.1.3/src/Text/CSL/Input/Bibtex.hs
--- old/pandoc-citeproc-0.16.1.1/src/Text/CSL/Input/Bibtex.hs 2019-03-03
02:48:40.000000000 +0100
+++ new/pandoc-citeproc-0.16.1.3/src/Text/CSL/Input/Bibtex.hs 2019-03-13
07:26:43.000000000 +0100
@@ -41,7 +41,8 @@
import Text.CSL.Style (Agent (..), emptyAgent, CslTerm (..),
Formatted (..), Locale (..))
import Text.CSL.Util (onBlocks, protectCase, safeRead,
- splitStrWhen, trim, unTitlecase)
+ splitStrWhen, trim, unTitlecase,
+ addSpaceAfterPeriod)
import Text.Pandoc.Definition
import qualified Text.Pandoc.UTF8 as UTF8
import qualified Text.Pandoc.Walk as Walk
@@ -1009,7 +1010,8 @@
toAuthorList :: Options -> [Block] -> Bib [Agent]
toAuthorList opts [Para xs] =
- filter (/= emptyAgent) <$> mapM (toAuthor opts) (splitByAnd xs)
+ filter (/= emptyAgent) <$> mapM (toAuthor opts . addSpaceAfterPeriod)
+ (splitByAnd xs)
toAuthorList opts [Plain xs] = toAuthorList opts [Para xs]
toAuthorList _ _ = mzero
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pandoc-citeproc-0.16.1.1/src/Text/CSL/Pandoc.hs
new/pandoc-citeproc-0.16.1.3/src/Text/CSL/Pandoc.hs
--- old/pandoc-citeproc-0.16.1.1/src/Text/CSL/Pandoc.hs 2019-03-03
02:48:40.000000000 +0100
+++ new/pandoc-citeproc-0.16.1.3/src/Text/CSL/Pandoc.hs 2019-03-13
07:26:43.000000000 +0100
@@ -297,6 +297,10 @@
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
mvPunctInsideQuote :: Inline -> Inline -> [Inline]
@@ -318,16 +322,22 @@
, startWithPunct ys
= if moveNotes
then mvPunct moveNotes sty $
- q : Str (headInline ys) : x : tailInline ys
+ case headInline ys of
+ "" -> q : x : tailInline ys
+ w -> q : Str w : x : tailInline ys
else q : x : mvPunct moveNotes sty ys
mvPunct moveNotes sty (Cite cs ils : ys)
| length ils > 1
, isNote (last ils)
, startWithPunct ys
, moveNotes
- = Cite cs (init ils
- ++ [Str (headInline ys) | not (endWithPunct False (init ils))]
- ++ [last ils]) : mvPunct moveNotes sty (tailInline ys)
+ = Cite cs
+ (init ils ++
+ (case headInline ys of
+ "" -> []
+ s' | not (endWithPunct False (init ils)) -> [Str s']
+ | otherwise -> [])
+ ++ [last ils]) : mvPunct moveNotes sty (tailInline ys)
mvPunct moveNotes sty (q@(Quoted _ _) : w@(Str _) : x : ys)
| isNote x
, isPunctuationInQuote sty
@@ -369,8 +379,12 @@
specialSpan cs =
Span ("",["reference-id-list"],
[("refids", unwords (map citationId cs))]) []
+ go' (Str "(" : Cite cs [Note [Para xs]] : Str ")" : ys) =
+ Str "(" : Cite cs xs : Str ")" : ys
go' (x : Cite cs [Note [Para xs]] : ys) | not (isSpacy x) =
x : Str "," : Space : comb (\zs -> [Cite cs zs]) xs ys
+ go' (Str "(" : Note [Para xs] : Str ")" : ys) =
+ Str "(" : xs ++ (Str ")" : ys)
go' (x : Note [Para xs] : ys) | not (isSpacy x) =
x : Str "," : Space : comb id xs ys
go' (Cite cs [Note [Para xs]] : ys) = comb (\zs -> [Cite cs zs]) xs ys
@@ -559,7 +573,7 @@
pLocatorWordIntegrated isFirst = try $ do
punct <- if isFirst
then return ""
- else stringify <$> option (Str "") pLocatorSep
+ else (stringify <$> pLocatorSep) <|> return ""
sp <- option "" (pSpace >> return " ")
(dig, s) <- pBalancedBraces [('(',')'), ('[',']'), ('{','}')] pPageSeq
return (dig, punct ++ sp ++ s)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pandoc-citeproc-0.16.1.1/src/Text/CSL/Reference.hs
new/pandoc-citeproc-0.16.1.3/src/Text/CSL/Reference.hs
--- old/pandoc-citeproc-0.16.1.1/src/Text/CSL/Reference.hs 2019-03-03
02:48:40.000000000 +0100
+++ new/pandoc-citeproc-0.16.1.3/src/Text/CSL/Reference.hs 2019-03-13
07:26:43.000000000 +0100
@@ -62,11 +62,11 @@
import Data.Aeson hiding (Value)
import qualified Data.Aeson as Aeson
import Data.Aeson.Types (Parser)
-import Data.Char (isDigit, toLower)
+import Data.Char (isDigit, toLower, isPunctuation)
import Data.Either (lefts, rights)
import Data.Generics hiding (Generic)
import qualified Data.HashMap.Strict as H
-import Data.List (findIndex, elemIndex)
+import Data.List (find, elemIndex)
import Data.List.Split (splitWhen)
import Data.Maybe (fromMaybe, isNothing)
import Data.String
@@ -80,7 +80,7 @@
import Text.CSL.Util (camelize, capitalize, inlinesToString,
mapping', parseBool, parseInt,
parseMaybeInt,
parseString, readNum, safeRead, trim,
- uncamelize, AddYaml(..))
+ uncamelize, AddYaml(..), splitStrWhen)
import Text.Pandoc (Inline (Str))
import qualified Text.Parsec as P
import qualified Text.Parsec.String as P
@@ -492,7 +492,7 @@
instance FromJSON Reference where
parseJSON (Object v') = do
v <- parseSuppFields v' <|> return v'
- addPageFirst <$> (Reference <$>
+ (Reference <$>
v .:? "id" .!= "" <*>
v .:? "other-ids" .!= [] <*>
v .:? "type" .!= NoType <*>
@@ -569,15 +569,6 @@
v .:? "citation-number" .!= CNum 0 <*>
((v .: "first-reference-note-number" >>= parseInt) <|> return 0) <*>
v .:? "citation-label" .!= mempty)
- where takeFirstNum (Formatted (Str xs : _)) =
- case takeWhile isDigit xs of
- [] -> mempty
- ds -> Formatted [Str ds]
- takeFirstNum x = x
- addPageFirst ref = if pageFirst ref == mempty && page ref /= mempty
- then ref{ pageFirst =
- takeFirstNum (page ref) }
- else ref
parseJSON _ = fail "Could not parse Reference"
-- Syntax for adding supplementary fields in note variable
@@ -877,8 +868,8 @@
getReference :: [Reference] -> Cite -> Maybe Reference
getReference rs c
- = case (hasId (citeId c)) `findIndex` rs of
- Just i -> Just $ setPageFirst $ rs !! i
+ = case (hasId (citeId c)) `find` rs of
+ Just r -> Just $ setPageFirst r
Nothing -> Nothing
where hasId :: String -> Reference -> Bool
hasId ident r = ident `elem` (map unLiteral (refId r : refOtherIds r))
@@ -955,7 +946,8 @@
setPageFirst :: Reference -> Reference
setPageFirst ref =
let Formatted ils = page ref
- ils' = takeWhile (\i -> i /= Str "–" && i /= Str "-") ils
+ ils' = takeWhile (\i -> i /= Str "–" && i /= Str "-") $
+ splitStrWhen isPunctuation ils
in if ils == ils'
then ref
else ref{ pageFirst = Formatted ils' }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pandoc-citeproc-0.16.1.1/src/Text/CSL/Style.hs
new/pandoc-citeproc-0.16.1.3/src/Text/CSL/Style.hs
--- old/pandoc-citeproc-0.16.1.1/src/Text/CSL/Style.hs 2019-03-03
02:48:40.000000000 +0100
+++ new/pandoc-citeproc-0.16.1.3/src/Text/CSL/Style.hs 2019-03-13
07:26:43.000000000 +0100
@@ -118,7 +118,7 @@
lastInline, mapping', mb, parseBool,
parseString, query, splitStrWhen,
tailInline, trimr, (.#:), (.#?),
- AddYaml(..))
+ AddYaml(..), addSpaceAfterPeriod)
import qualified Text.Pandoc.Builder as B
import Text.Pandoc.Definition hiding (Citation, Cite)
import qualified Text.Pandoc.Walk as Walk
@@ -819,7 +819,9 @@
instance FromJSON Agent where
parseJSON (Object v) = nameTransform <$> (Agent <$>
- (v .: "given" <|> ((map Formatted . wordsBy isSpace .
unFormatted) <$> v .: "given") <|> pure []) <*>
+ (v .: "given" <|> ((map Formatted . wordsBy isSpace .
+ addSpaceAfterPeriod . unFormatted) <$>
+ v .: "given") <|> pure []) <*>
v .:? "dropping-particle" .!= mempty <*>
v .:? "non-dropping-particle" .!= mempty <*>
(removeQuoted <$> (v .:? "family" .!= mempty)) <*>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pandoc-citeproc-0.16.1.1/src/Text/CSL/Util.hs
new/pandoc-citeproc-0.16.1.3/src/Text/CSL/Util.hs
--- old/pandoc-citeproc-0.16.1.1/src/Text/CSL/Util.hs 2019-03-03
02:48:40.000000000 +0100
+++ new/pandoc-citeproc-0.16.1.3/src/Text/CSL/Util.hs 2019-03-13
07:26:43.000000000 +0100
@@ -50,13 +50,14 @@
, mapping'
, parseRomanNumeral
, isRange
+ , addSpaceAfterPeriod
) where
import Prelude
import Control.Monad.State
import Data.Aeson
import Data.Aeson.Types (Parser)
-import Data.Char (isAscii, isLower, isPunctuation, isUpper,
- toLower, toUpper)
+import Data.Char (isAscii, isLower, isPunctuation,
+ isUpper, isLetter, toLower, toUpper)
import Data.Generics (Data, Typeable, everything, everywhere,
everywhere', everywhereM, mkM, mkQ, mkT)
import Data.List.Split (wordsBy)
@@ -407,7 +408,8 @@
initInline :: [Inline] -> [Inline]
initInline [] = []
initInline [i]
- | Str s <- i = return $ Str (init' s)
+ | Str s <- i
+ , not (null s) = return $ Str (init s)
| Emph is <- i = return $ Emph (initInline is)
| Strong is <- i = return $ Strong (initInline is)
| Superscript is <- i = return $ Superscript (initInline is)
@@ -421,10 +423,9 @@
initInline (i:xs) = i : initInline xs
tailInline :: [Inline] -> [Inline]
-tailInline (Space:xs) = xs
+tailInline (Space:xs) = xs
tailInline (SoftBreak:xs) = xs
-tailInline xs = removeEmpty $ tailFirstInlineStr xs
- where removeEmpty = dropWhile (== Str "")
+tailInline xs = tailFirstInlineStr xs
tailFirstInlineStr :: [Inline] -> [Inline]
tailFirstInlineStr = mapHeadInline (drop 1)
@@ -437,7 +438,9 @@
mapHeadInline _ [] = []
mapHeadInline f (i:xs)
| Str [] <- i = mapHeadInline f xs
- | Str s <- i = Str (f s) : xs
+ | Str s <- i = case f s of
+ "" -> xs
+ _ -> Str (f s) : xs
| Emph is <- i = Emph (mapHeadInline f is) : xs
| Strong is <- i = Strong (mapHeadInline f is) : xs
| Superscript is <- i = Superscript (mapHeadInline f is) : xs
@@ -530,3 +533,16 @@
isRange :: String -> Bool
isRange s = ',' `elem` s || '-' `elem` s || '\x2013' `elem` s
+
+-- 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 [c]:Str ".":Str [d]:xs)
+ | isLetter d
+ , isLetter c
+ , isUpper c
+ , isUpper d = Str [c]:Str ".":Space:Str [d]:go xs
+ go (x:xs) = x:go xs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pandoc-citeproc-0.16.1.1/tests/advanced-optical-materials.csl
new/pandoc-citeproc-0.16.1.3/tests/advanced-optical-materials.csl
--- old/pandoc-citeproc-0.16.1.1/tests/advanced-optical-materials.csl
1970-01-01 01:00:00.000000000 +0100
+++ new/pandoc-citeproc-0.16.1.3/tests/advanced-optical-materials.csl
2019-03-13 07:26:43.000000000 +0100
@@ -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>[email protected]</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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pandoc-citeproc-0.16.1.1/tests/issue386.expected.native
new/pandoc-citeproc-0.16.1.3/tests/issue386.expected.native
--- old/pandoc-citeproc-0.16.1.1/tests/issue386.expected.native 1970-01-01
01:00:00.000000000 +0100
+++ new/pandoc-citeproc-0.16.1.3/tests/issue386.expected.native 2019-03-13
07:26:43.000000000 +0100
@@ -0,0 +1,5 @@
+Pandoc (Meta {unMeta = fromList [("csl",MetaInlines [Str
"tests/advanced-optical-materials.csl"]),("references",MetaList [MetaMap
(fromList [("DOI",MetaInlines [Str "10.1038/lsa.2012.20"]),("ISSN",MetaInlines
[Str "2047-7538"]),("author",MetaList [MetaMap (fromList [("family",MetaInlines
[Str "Ding"]),("given",MetaInlines [Str "K."])]),MetaMap (fromList
[("family",MetaInlines [Str "Ning"]),("given",MetaInlines [Str "C.",Space,Str
"Z."])])]),("container-title",MetaInlines [Str "Light",Space,Str
"Sci.",Space,Str "Appl."]),("id",MetaInlines [Str
"ding_metallic_2012"]),("issue",MetaInlines [Str "7"]),("issued",MetaList
[MetaMap (fromList [("month",MetaInlines [Str "7"]),("year",MetaInlines [Str
"2012"])])]),("page",MetaInlines [Str "e20-e20"]),("title",MetaInlines [Str
"Metallic",Space,Str "subwavelength-cavity",Space,Str "semiconductor",Space,Str
"nanolasers"]),("type",MetaInlines [Str
"article-journal"]),("volume",MetaInlines [Str "1"])])])]})
+[Para [Cite [Citation {citationId = "ding_metallic_2012", citationPrefix = [],
citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 0,
citationHash = 1}] [Str "[1]"]]
+,Div ("refs",["references"],[])
+ [Div ("ref-ding_metallic_2012",[],[])
+ [Para [Str "[1]",Space,Str "K.",Space,Str "Ding,",Space,Str "C.",Space,Str
"Z.",Space,Str "Ning,",Space,Emph [Str "Light",Space,Str "Sci.",Space,Str
"Appl."],Space,Strong [Str "2012"],Str ",",Space,Emph [Str "1"],Str
",",Space,Str "e20."]]]]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pandoc-citeproc-0.16.1.1/tests/issue386.in.native
new/pandoc-citeproc-0.16.1.3/tests/issue386.in.native
--- old/pandoc-citeproc-0.16.1.1/tests/issue386.in.native 1970-01-01
01:00:00.000000000 +0100
+++ new/pandoc-citeproc-0.16.1.3/tests/issue386.in.native 2019-03-13
07:26:43.000000000 +0100
@@ -0,0 +1,2 @@
+Pandoc (Meta {unMeta = fromList [("csl",MetaInlines [Str
"tests/advanced-optical-materials.csl"]),("references",MetaList [MetaMap
(fromList [("DOI",MetaInlines [Str "10.1038/lsa.2012.20"]),("ISSN",MetaInlines
[Str "2047-7538"]),("author",MetaList [MetaMap (fromList [("family",MetaInlines
[Str "Ding"]),("given",MetaInlines [Str "K."])]),MetaMap (fromList
[("family",MetaInlines [Str "Ning"]),("given",MetaInlines [Str "C.",Space,Str
"Z."])])]),("container-title",MetaInlines [Str "Light",Space,Str
"Sci.",Space,Str "Appl."]),("id",MetaInlines [Str
"ding_metallic_2012"]),("issue",MetaInlines [Str "7"]),("issued",MetaList
[MetaMap (fromList [("month",MetaInlines [Str "7"]),("year",MetaInlines [Str
"2012"])])]),("page",MetaInlines [Str "e20-e20"]),("title",MetaInlines [Str
"Metallic",Space,Str "subwavelength-cavity",Space,Str "semiconductor",Space,Str
"nanolasers"]),("type",MetaInlines [Str
"article-journal"]),("volume",MetaInlines [Str "1"])])])]})
+[Para [Cite [Citation {citationId = "ding_metallic_2012", citationPrefix = [],
citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 0,
citationHash = 0}] [Str "@ding_metallic_2012"]]]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pandoc-citeproc-0.16.1.1/tests/issue392.expected.native
new/pandoc-citeproc-0.16.1.3/tests/issue392.expected.native
--- old/pandoc-citeproc-0.16.1.1/tests/issue392.expected.native 1970-01-01
01:00:00.000000000 +0100
+++ new/pandoc-citeproc-0.16.1.3/tests/issue392.expected.native 2019-03-13
07:26:43.000000000 +0100
@@ -0,0 +1,7 @@
+Pandoc (Meta {unMeta = fromList [("csl",MetaInlines [Str
"tests/vancouver.csl"]),("references",MetaList [MetaMap (fromList
[("author",MetaList [MetaMap (fromList [("family",MetaInlines [Str
"James"]),("given",MetaInlines [Str "M.R."])])]),("id",MetaInlines [Str
"james"])]),MetaMap (fromList [("author",MetaList [MetaMap (fromList
[("family",MetaInlines [Str "MacFarlane"]),("given",MetaInlines [Str
"J.",Space,Str "G."])])]),("id",MetaInlines [Str "macfarlane"])])])]})
+[Para [Cite [Citation {citationId = "james", citationPrefix = [],
citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 0,
citationHash = 1}] [Str "(1)"],Str ";",Space,Cite [Citation {citationId =
"macfarlane", citationPrefix = [], citationSuffix = [], citationMode =
AuthorInText, citationNoteNum = 0, citationHash = 2}] [Str "(2)"]]
+,Div ("refs",["references"],[])
+ [Div ("ref-james",[],[])
+ [Para [Str "1.",Space,Str "James",Space,Str "MR.",Space]]
+ ,Div ("ref-macfarlane",[],[])
+ [Para [Str "2.",Space,Str "MacFarlane",Space,Str "JG.",Space]]]]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pandoc-citeproc-0.16.1.1/tests/issue392.in.native
new/pandoc-citeproc-0.16.1.3/tests/issue392.in.native
--- old/pandoc-citeproc-0.16.1.1/tests/issue392.in.native 1970-01-01
01:00:00.000000000 +0100
+++ new/pandoc-citeproc-0.16.1.3/tests/issue392.in.native 2019-03-13
07:26:43.000000000 +0100
@@ -0,0 +1,2 @@
+Pandoc (Meta {unMeta = fromList [("csl",MetaInlines [Str
"tests/vancouver.csl"]),("references",MetaList [MetaMap (fromList
[("author",MetaList [MetaMap (fromList [("family",MetaInlines [Str
"James"]),("given",MetaInlines [Str "M.R."])])]),("id",MetaInlines [Str
"james"])]),MetaMap (fromList [("author",MetaList [MetaMap (fromList
[("family",MetaInlines [Str "MacFarlane"]),("given",MetaInlines [Str
"J.",Space,Str "G."])])]),("id",MetaInlines [Str "macfarlane"])])])]})
+[Para [Cite [Citation {citationId = "james", citationPrefix = [],
citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 0,
citationHash = 0}] [Str "@james"],Str ";",Space,Cite [Citation {citationId =
"macfarlane", citationPrefix = [], citationSuffix = [], citationMode =
AuthorInText, citationNoteNum = 0, citationHash = 0}] [Str "@macfarlane"]]]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pandoc-citeproc-0.16.1.1/tests/issue61.expected.native
new/pandoc-citeproc-0.16.1.3/tests/issue61.expected.native
--- old/pandoc-citeproc-0.16.1.1/tests/issue61.expected.native 2019-03-03
02:48:40.000000000 +0100
+++ new/pandoc-citeproc-0.16.1.3/tests/issue61.expected.native 2019-03-13
07:26:43.000000000 +0100
@@ -1,10 +1,10 @@
Pandoc (Meta {unMeta = fromList [("csl",MetaInlines [Str
"tests/modern-humanities-research-association.csl"]),("references",MetaList
[MetaMap (fromList [("author",MetaList [MetaMap (fromList
[("family",MetaInlines [Str "Doe"]),("given",MetaInlines [Str
"John"])])]),("id",MetaInlines [Str "doe"]),("issued",MetaMap (fromList
[("date-parts",MetaList [MetaList [MetaString
"1985"]])])),("publisher",MetaInlines [Str "Publisher"]),("title",MetaInlines
[Str "Title"]),("type",MetaInlines [Str "book"])]),MetaMap (fromList
[("author",MetaList [MetaMap (fromList [("family",MetaInlines [Str
"Roe"]),("given",MetaInlines [Str "Rob"])])]),("id",MetaInlines [Str
"roe"]),("issued",MetaMap (fromList [("date-parts",MetaList [MetaList
[MetaString "1985"]])])),("publisher",MetaInlines [Str
"Publisher"]),("title",MetaInlines [Str "Title"]),("type",MetaInlines [Str
"book"])])])]})
[Header 1 ("text",[],[]) [Str "Text"]
-,Para [Str "Foo",Str "",Cite [Citation {citationId = "doe", citationPrefix =
[], citationSuffix = [Str ",",Space,Str "VIII,",Space,Str "89"], citationMode =
NormalCitation, citationNoteNum = 0, citationHash = 1}] [Note [Para [Str
"John",Space,Str "Doe,",Space,Emph [Str "Title"],Space,Str
"(Publisher,",Space,Str "1985),",Space,Str "VIII,",Space,Str "89."]]]]
-,Para [Str "Foo",Str "",Cite [Citation {citationId = "roe", citationPrefix =
[], citationSuffix = [Str ",",Space,Str "III,",Space,Str "89"], citationMode =
NormalCitation, citationNoteNum = 0, citationHash = 2}] [Note [Para [Str
"Rob",Space,Str "Roe,",Space,Emph [Str "Title"],Space,Str
"(Publisher,",Space,Str "1985),",Space,Str "III,",Space,Str "89."]]]]
-,Para [Str "Foo",Str "",Cite [Citation {citationId = "doe", citationPrefix =
[], citationSuffix = [Str ",",Space,Str "LVIII,",Space,Str "89"], citationMode
= NormalCitation, citationNoteNum = 0, citationHash = 3}] [Note [Para [Str
"Doe,",Space,Str "LVIII,",Space,Str "89."]]]]
-,Para [Str "Foo",Str "",Cite [Citation {citationId = "roe", citationPrefix =
[], citationSuffix = [Str ",",Space,Str "MVIII,",Space,Str "89"], citationMode
= NormalCitation, citationNoteNum = 0, citationHash = 4}] [Note [Para [Str
"Roe,",Space,Str "MVIII,",Space,Str "89."]]]]
-,Para [Str "Foo",Str "",Cite [Citation {citationId = "doe", citationPrefix =
[], citationSuffix = [Str ",",Space,Str "CL,",Space,Str "89"], citationMode =
NormalCitation, citationNoteNum = 0, citationHash = 5}] [Note [Para [Str
"Doe,",Space,Str "CL,",Space,Str "89."]]]]
+,Para [Str "Foo",Cite [Citation {citationId = "doe", citationPrefix = [],
citationSuffix = [Str ",",Space,Str "VIII,",Space,Str "89"], citationMode =
NormalCitation, citationNoteNum = 0, citationHash = 1}] [Note [Para [Str
"John",Space,Str "Doe,",Space,Emph [Str "Title"],Space,Str
"(Publisher,",Space,Str "1985),",Space,Str "VIII,",Space,Str "89."]]]]
+,Para [Str "Foo",Cite [Citation {citationId = "roe", citationPrefix = [],
citationSuffix = [Str ",",Space,Str "III,",Space,Str "89"], citationMode =
NormalCitation, citationNoteNum = 0, citationHash = 2}] [Note [Para [Str
"Rob",Space,Str "Roe,",Space,Emph [Str "Title"],Space,Str
"(Publisher,",Space,Str "1985),",Space,Str "III,",Space,Str "89."]]]]
+,Para [Str "Foo",Cite [Citation {citationId = "doe", citationPrefix = [],
citationSuffix = [Str ",",Space,Str "LVIII,",Space,Str "89"], citationMode =
NormalCitation, citationNoteNum = 0, citationHash = 3}] [Note [Para [Str
"Doe,",Space,Str "LVIII,",Space,Str "89."]]]]
+,Para [Str "Foo",Cite [Citation {citationId = "roe", citationPrefix = [],
citationSuffix = [Str ",",Space,Str "MVIII,",Space,Str "89"], citationMode =
NormalCitation, citationNoteNum = 0, citationHash = 4}] [Note [Para [Str
"Roe,",Space,Str "MVIII,",Space,Str "89."]]]]
+,Para [Str "Foo",Cite [Citation {citationId = "doe", citationPrefix = [],
citationSuffix = [Str ",",Space,Str "CL,",Space,Str "89"], citationMode =
NormalCitation, citationNoteNum = 0, citationHash = 5}] [Note [Para [Str
"Doe,",Space,Str "CL,",Space,Str "89."]]]]
,Header 1 ("references",["unnumbered"],[]) [Str "References"]
,Div ("refs",["references"],[])
[Div ("ref-doe",[],[])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pandoc-citeproc-0.16.1.1/tests/locators-delimited.expected.native
new/pandoc-citeproc-0.16.1.3/tests/locators-delimited.expected.native
--- old/pandoc-citeproc-0.16.1.1/tests/locators-delimited.expected.native
2019-03-03 02:48:40.000000000 +0100
+++ new/pandoc-citeproc-0.16.1.3/tests/locators-delimited.expected.native
2019-03-13 07:26:43.000000000 +0100
@@ -5,16 +5,16 @@
,Para [Str "Kitchen",Space,Str "sink",Cite [Citation {citationId = "citekey",
citationPrefix = [], citationSuffix = [Str ",",Space,Str
"{123(4)a-8([a]12.398{8})}"], citationMode = NormalCitation, citationNoteNum =
0, citationHash = 3}] [Note [Para [Str "Ibid-with-locator",Space,Str
"{123(4)a\8211\&8([a]12.398{8})}."]]]]
,Para [Str "Empty",Space,Str "braces",Space,Str "inside",Cite [Citation
{citationId = "citekey", citationPrefix = [], citationSuffix = [Str
",",Space,Str "{{}}"], citationMode = NormalCitation, citationNoteNum = 0,
citationHash = 4}] [Note [Para [Str "Ibid-with-locator",Space,Str "{{}}."]]]]
,Para [Str "Label",Space,Str "specified",Cite [Citation {citationId =
"citekey", citationPrefix = [], citationSuffix = [Str "{p.\160a}"],
citationMode = NormalCitation, citationNoteNum = 0, citationHash = 5}] [Note
[Para [Str "Ibid-with-locator",Space,Str "{a}."]]]]
-,Para [Str "Should",Space,Str "it",Space,Str "work",Space,Str
"outside?",Space,Str "No.",Str "",Cite [Citation {citationId = "citekey",
citationPrefix = [], citationSuffix = [Str ",",Space,Str "p.",Space,Str
"{(a)}"], citationMode = NormalCitation, citationNoteNum = 0, citationHash =
6}] [Note [Para [Str "Subsequent,",Space,Str "p.",Space,Str "{(a)}."]]]]
-,Para [Str "Empty",Space,Str "locator",Str "",Cite [Citation {citationId =
"citekey", citationPrefix = [], citationSuffix = [Str ",",Space,Str "{}"],
citationMode = NormalCitation, citationNoteNum = 0, citationHash = 7}] [Note
[Para [Str "Ibid."]]]]
+,Para [Str "Should",Space,Str "it",Space,Str "work",Space,Str
"outside?",Space,Str "No.",Cite [Citation {citationId = "citekey",
citationPrefix = [], citationSuffix = [Str ",",Space,Str "p.",Space,Str
"{(a)}"], citationMode = NormalCitation, citationNoteNum = 0, citationHash =
6}] [Note [Para [Str "Subsequent,",Space,Str "p.",Space,Str "{(a)}."]]]]
+,Para [Str "Empty",Space,Str "locator",Cite [Citation {citationId = "citekey",
citationPrefix = [], citationSuffix = [Str ",",Space,Str "{}"], citationMode =
NormalCitation, citationNoteNum = 0, citationHash = 7}] [Note [Para [Str
"Ibid."]]]]
,Para [Str "Empty",Space,Str "locator",Space,Str "to",Space,Str
"force",Space,Str "suffix",Cite [Citation {citationId = "citekey",
citationPrefix = [], citationSuffix = [Str "{}",Space,Str "123-35",Space,Str
"numbers",Space,Str "are",Space,Str "suffix"], citationMode = NormalCitation,
citationNoteNum = 0, citationHash = 8}] [Note [Para [Str "Ibid",Space,Str
"123-35",Space,Str "numbers",Space,Str "are",Space,Str "suffix."]]]]
-,Para [Str "Suffix",Space,Str "generally",Str "",Cite [Citation {citationId =
"citekey", citationPrefix = [], citationSuffix = [Str "{123-35}",Space,Str
"numbers",Space,Str "not,",Space,Str "but",Space,Str "text",Space,Str
"is",Space,Str "suffix"], citationMode = NormalCitation, citationNoteNum = 0,
citationHash = 9}] [Note [Para [Str "Ibid-with-locator",Space,Str
"{123\8211\&35}",Space,Str "numbers",Space,Str "not,",Space,Str "but",Space,Str
"text",Space,Str "is",Space,Str "suffix."]]]]
+,Para [Str "Suffix",Space,Str "generally",Cite [Citation {citationId =
"citekey", citationPrefix = [], citationSuffix = [Str "{123-35}",Space,Str
"numbers",Space,Str "not,",Space,Str "but",Space,Str "text",Space,Str
"is",Space,Str "suffix"], citationMode = NormalCitation, citationNoteNum = 0,
citationHash = 9}] [Note [Para [Str "Ibid-with-locator",Space,Str
"{123\8211\&35}",Space,Str "numbers",Space,Str "not,",Space,Str "but",Space,Str
"text",Space,Str "is",Space,Str "suffix."]]]]
,Para [Str "With",Space,Str "preceding",Space,Str "comma",Cite [Citation
{citationId = "citekey", citationPrefix = [], citationSuffix = [Str
",",Space,Str "{p.\160VI}"], citationMode = NormalCitation, citationNoteNum =
0, citationHash = 10}] [Note [Para [Str "Ibid-with-locator",Space,Str
"{VI}."]]]]
,Para [Str "No",Space,Str "commas",Space,Str "before",Space,Str "label",Cite
[Citation {citationId = "citekey", citationPrefix = [], citationSuffix = [Str
",",Space,Str "{,",Space,Str "p.",Space,Str "(p.\160is",Space,Str
"not",Space,Str "recognised)}"], citationMode = NormalCitation, citationNoteNum
= 0, citationHash = 11}] [Note [Para [Str "Ibid-with-locator",Space,Str
"{,",Space,Str "p.",Space,Str "(p.",Space,Str "is",Space,Str "not",Space,Str
"recognised)}."]]]]
,Para [Str "Trim",Space,Str "white",Space,Str "space",Cite [Citation
{citationId = "citekey", citationPrefix = [], citationSuffix = [Str
",",Space,Str "{",Space,Str "p.\160\&9",Space,Str "}"], citationMode =
NormalCitation, citationNoteNum = 0, citationHash = 12}] [Note [Para [Str
"Ibid-with-locator",Space,Str "{9}."]]]]
,Para [Str "Without",Space,Str "delimiters",Cite [Citation {citationId =
"citekey", citationPrefix = [], citationSuffix = [Str ",",Space,Str "suffix"],
citationMode = NormalCitation, citationNoteNum = 0, citationHash = 13}] [Note
[Para [Str "Subsequent,",Space,Str "suffix."]]]]
,Para [Str "With",Space,Str "rendering",Space,Str "label",Cite [Citation
{citationId = "citekey", citationPrefix = [], citationSuffix = [Str
"{ss",Space,Str "IV",Space,Str "div",Space,Str "4",Space,Str "s",Space,Str
"128L(7)(a)(i)-(iv),",Space,Str "129(5),",SoftBreak,Str "130(b)}"],
citationMode = NormalCitation, citationNoteNum = 0, citationHash = 14}] [Note
[Para [Str "Ibid-with-locator",Space,Str "ss",Space,Str "{IV",Space,Str
"div",Space,Str "4",Space,Str "s",Space,Str "128L(7)(a)(i)\8211(iv),",Space,Str
"129(5),",Space,Str "130(b)}."]]]]
-,Para [Str "The",Space,Str "text",Space,Str "is",Space,Str
"apparently",Space,Str "NOT",Space,Str "verbatim;",Space,Str "it",Space,Str
"is",Space,Str "lightly",Space,Str "processed",Space,Str "as",Space,Str
"page",Space,Str "numbers.",Str "",Cite [Citation {citationId = "citekey",
citationPrefix = [], citationSuffix = [Str "{no",Space,Str "comma,",Space,Str
"no",Space,Str "label,",Space,Str "no",Space,Str "nothing}"], citationMode =
NormalCitation, citationNoteNum = 0, citationHash = 15}] [Note [Para [Str
"Ibid-with-locator",Space,Str "{no",Space,Str "comma,",Space,Str
"nolabel,",Space,Str "nonothing}."]]]]
-,Para [Str "AGLC-style",Space,Str "page",Space,Str "[para]",Str "",Cite
[Citation {citationId = "citekey", citationPrefix = [], citationSuffix = [Str
"{584",Space,Str "[78]}"], citationMode = NormalCitation, citationNoteNum = 0,
citationHash = 16}] [Note [Para [Str "Ibid-with-locator",Space,Str
"{584",Space,Str "[78]}."]]]]
+,Para [Str "The",Space,Str "text",Space,Str "is",Space,Str
"apparently",Space,Str "NOT",Space,Str "verbatim;",Space,Str "it",Space,Str
"is",Space,Str "lightly",Space,Str "processed",Space,Str "as",Space,Str
"page",Space,Str "numbers.",Cite [Citation {citationId = "citekey",
citationPrefix = [], citationSuffix = [Str "{no",Space,Str "comma,",Space,Str
"no",Space,Str "label,",Space,Str "no",Space,Str "nothing}"], citationMode =
NormalCitation, citationNoteNum = 0, citationHash = 15}] [Note [Para [Str
"Ibid-with-locator",Space,Str "{no",Space,Str "comma,",Space,Str
"nolabel,",Space,Str "nonothing}."]]]]
+,Para [Str "AGLC-style",Space,Str "page",Space,Str "[para]",Cite [Citation
{citationId = "citekey", citationPrefix = [], citationSuffix = [Str
"{584",Space,Str "[78]}"], citationMode = NormalCitation, citationNoteNum = 0,
citationHash = 16}] [Note [Para [Str "Ibid-with-locator",Space,Str
"{584",Space,Str "[78]}."]]]]
,Para [Str "Unbalanced",Space,Str "curly",Space,Str "{",Space,Str
"breaks",Space,Str "the",Space,Str "parse",Cite [Citation {citationId =
"citekey", citationPrefix = [], citationSuffix = [Str
"{p.\160suffix{suffix}suffix"], citationMode = NormalCitation, citationNoteNum
= 0, citationHash = 17}] [Note [Para [Str "Subsequent",Space,Str
"{p.\160suffix{suffix}suffix."]]]]
,Para [Str "Unbalanced",Space,Str "curly",Space,Str "}",Space,Str
"ends",Space,Str "early",Cite [Citation {citationId = "citekey", citationPrefix
= [], citationSuffix = [Str "{green}suffix}suffix"], citationMode =
NormalCitation, citationNoteNum = 0, citationHash = 18}] [Note [Para [Str
"Ibid-with-locator",Space,Str "{green}",Space,Str "suffix}suffix."]]]]]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pandoc-citeproc-0.16.1.1/tests/vancouver.csl
new/pandoc-citeproc-0.16.1.3/tests/vancouver.csl
--- old/pandoc-citeproc-0.16.1.1/tests/vancouver.csl 1970-01-01
01:00:00.000000000 +0100
+++ new/pandoc-citeproc-0.16.1.3/tests/vancouver.csl 2019-03-13
07:26:43.000000000 +0100
@@ -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>[email protected]</email>
+ </author>
+ <contributor>
+ <name>Sean Takats</name>
+ <email>[email protected]</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>