.\"t .\" Automatically generated by Pandoc 2.1 .\" .TH "pandoc\-citeproc" "1" "2018-01-09" "pandoc-citeproc 0.13" "" .hy .SH NAME .PP pandoc\-citeproc \- filter to resolve citations in a pandoc document. .SH SYNOPSIS .PP pandoc\-citeproc options [file..] .SH DESCRIPTION .PP The \f[C]pandoc\-citeproc\f[] 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 Pandoc document, formats citations and adds a bibliography, and returns 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[]. If no such Div exists, one will be created and appended to the end of the document (unless the \f[C]suppress\-bibliography\f[] 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[] (5) man page under \[lq]Citations\[rq] for details on how to encode citations in pandoc's markdown.) .PP 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 \f[] .fi .PP pandoc\-citeproc will look for the following metadata fields in the input: .TP .B \f[C]bibliography\f[] A path, or YAML list of paths, of bibliography files to use. These may be in any of the formats supported by bibutils. .RS .PP .TS tab(@); l l. T{ Format T}@T{ File extension T} _ T{ BibLaTeX T}@T{ \&.bib T} T{ BibTeX T}@T{ \&.bibtex T} T{ Copac T}@T{ \&.copac T} T{ CSL JSON T}@T{ \&.json T} T{ CSL YAML T}@T{ \&.yaml T} T{ EndNote T}@T{ \&.enl T} T{ EndNote XML T}@T{ \&.xml T} T{ ISI T}@T{ \&.wos T} T{ MEDLINE T}@T{ \&.medline T} T{ MODS T}@T{ \&.mods T} T{ RIS T}@T{ \&.ris T} .TE .PP Note that \f[C]\&.bib\f[] can generally be used with both BibTeX and BibLaTeX files, but you can use \f[C]\&.bibtex\f[] to force BibTeX. .RE .TP .B \f[C]references\f[] A YAML list of references. Each reference is a YAML object. The format is essentially CSL JSON format. Here is an example: .RS .IP .nf \f[C] \-\ id:\ doe2006 \ \ author: \ \ \ \ family:\ Doe \ \ \ \ given:\ [John,\ F.] \ \ title:\ Article \ \ page:\ 33\-34 \ \ issued: \ \ \ \ year:\ 2006 \ \ type:\ article\-journal \ \ volume:\ 6 \ \ container\-title:\ Journal\ of\ Generic\ Studies \f[] .fi .PP The contents of fields will be interpreted as markdown when appropriate: so, for example, emphasis and strong emphasis can be used in title fields. Simple tex math will also be parsed and rendered appropriately. .RE .TP .B \f[C]csl\f[] or \f[C]citation\-style\f[] 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[] directory (or \f[C]C:\\Users\\USERNAME\\AppData\\Roaming\\csl\f[] in Windows 7). If this is left off, pandoc\-citeproc will look for \f[C]$HOME/.pandoc/default.csl\f[], and if this is not present, it will use \f[C]chicago\-author\-date.csl\f[], looking first in \f[C]$HOME/.csl\f[] and then in its own data files. .RS .RE .TP .B \f[C]link\-citations\f[] 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. .RS .RE .TP .B \f[C]citation\-abbreviations\f[] 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[] directory (or \f[C]C:\\Users\\USERNAME\\AppData\\Roaming\\csl\f[] in Windows 7). The format is described here (http://citationstylist.org/2011/10/19/abbreviations-for-zotero-test-release). Abbreviations are only output if, in the \f[C]\&.csl\f[] file, \f[C]form="short"\f[] is set on the element that renders the variable. .RS .PP Here is a short example: .IP .nf \f[C] {\ "default":\ { \ \ \ \ "container\-title":\ { \ \ \ \ \ \ \ \ \ \ \ \ "Lloyd\[aq]s\ Law\ Reports":\ "Lloyd\[aq]s\ Rep", \ \ \ \ \ \ \ \ \ \ \ \ "Estates\ Gazette":\ "EG", \ \ \ \ \ \ \ \ \ \ \ \ "Scots\ Law\ Times":\ "SLT" \ \ \ \ } \ \ } } \f[] .fi .RE .TP .B \f[C]lang\f[] Locale to use in formatting citations. If this is not set, the locale is taken from the \f[C]default\-locale\f[] attribute of the CSL file. \f[C]en\-US\f[] 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[] can be used instead of \f[C]lang\f[], but this \f[C]lang\f[] should be used going forward.) .RS .RE .TP .B \f[C]suppress\-bibliography\f[] 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[]. If there is no such Div, one will be created at the end of the document. .RS .RE .TP .B \f[C]reference\-section\-title\f[] If this has a value, a section header with this title will be added before the bibliography. If \f[C]reference\-section\-title\f[] is not specified and the document ends with a section header, this final header will be treated as the bibliography header. .RS .RE .TP .B \f[C]notes\-after\-punctuation\f[] If true (the default), pandoc will put footnote citations after following punctuation. For example, if the source contains \f[C]blah\ blah\ [\@jones99].\f[], the result will look like \f[C]blah\ blah.[^1]\f[], 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. .RS .RE .PP The metadata must contain either \f[C]references\f[] or \f[C]bibliography\f[] or both as a source of references. \f[C]csl\f[] and \f[C]citation\-abbreviations\f[] are optional. If \f[C]csl\f[] is not provided, a default stylesheet will be used (either \f[C]~/.pandoc/default.csl\f[] or a version of \f[C]chicago\-author\-date.csl\f[]). .SS Convert mode .PP If the option \f[C]\-\-bib2yaml\f[] or \f[C]\-\-bib2json\f[] is used, \f[C]pandoc\-citeproc\f[] 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[]), or as a CSL JSON bibliography, suitable for import to zotero (\f[C]\-\-bib2json\f[]). .PP The \f[C]\-\-format\f[] option can be used to specify the bibliography format, though when files are used, \f[C]pandoc\-citeproc\f[] can generally guess this from the extension. .PP This mode supersedes the old \f[C]biblio2yaml\f[] program. .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: .IP .nf \f[C] {{jats}}<ref>{{/jats}} \f[] .fi .PP Without the tags, the string will be interpreted as a string and escaped in the output, rather than being passed through raw. .PP 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. .SH OPTIONS .TP .B \f[C]\-y,\ \-\-bib2yaml\f[] Convert bibliography to YAML suitable for inclusion in pandoc metadata. .RS .RE .TP .B \f[C]\-j,\ \-\-bib2json\f[] Convert bibliography to CSL JSON suitable for import into Zotero. .RS .RE .TP .B \f[C]\-f\f[] \f[I]FORMAT\f[], \f[C]\-\-format=\f[]\f[I]FORMAT\f[] Specify format of bibliography to be converted. Legal values are \f[C]biblatex\f[], \f[C]bibtex\f[], \f[C]ris\f[], \f[C]endnote\f[], \f[C]endnotexml\f[], \f[C]isi\f[], \f[C]medline\f[], \f[C]copac\f[], \f[C]mods\f[], and \f[C]json\f[]. .RS .RE .TP .B \f[C]\-h,\ \-\-help\f[] Print usage information. .RS .RE .TP .B \f[C]\-\-man\f[] Print the man page in groff man format. To get a plain text version, \f[C]pandoc\-citeproc\ \-\-man\ |\ groff\ \-mman\ \-Tutf8\f[]. To \f[C]pandoc\-citeproc\ \-\-man\ |\ groff\ \-mman\ \-Thtml\f[]. .RS .RE .TP .B \f[C]\-\-license\f[] Print the license. .RS .RE .TP .B \f[C]\-V,\ \-\-version\f[] Print version. .RS .RE .SH NOTES .SS General .PP If you use a biblatex database, closely follow the specifications in the \[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 section in your markdown document, follow the \[lq]Citation Style Language 1.0.1 Language Specification\[rq] (). Particularly relevant are (which neither comments on usage nor specifies required and optional fields) and (which does contain comments). .SS Titles: Title vs.\ Sentence Case .PP If you are using a bibtex or biblatex bibliography, then observe the 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[] field in biblatex should be set to the relevant language. (The following values are treated as English: \f[C]american\f[], \f[C]british\f[], \f[C]canadian\f[], \f[C]english\f[], \f[C]australian\f[], \f[C]newzealand\f[], \f[C]USenglish\f[], or \f[C]UKenglish\f[].) .IP \[bu] 2 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: .RS 2 .IP .nf \f[C] title\ =\ {My\ Dinner\ with\ {Andre}} \f[] .fi .RE .IP \[bu] 2 In addition, words that should remain lowercase (or camelCase) should be protected: .RS 2 .IP .nf \f[C] title\ =\ {Spin\ Wave\ Dispersion\ on\ the\ {nm}\ Scale} \f[] .fi .PP 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 \[lq]nm\[rq] so that it doesn't get converted to \[lq]Nm\[rq] at this stage. .RE .PP If you are using a CSL bibliography (either JSON or YAML), then observe the following rules: .IP \[bu] 2 All titles should be in sentence case. .IP \[bu] 2 Use the \f[C]language\f[] 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[] begins with \f[C]en\f[] or is left empty.) .IP \[bu] 2 Protect words that should not be converted to title case using this syntax: .RS 2 .IP .nf \f[C] Spin\ wave\ dispersion\ on\ the\ nm\ scale \f[] .fi .RE .SS Conference Papers, Published vs.\ Unpublished .PP For a formally published conference paper, use the biblatex entry type \f[C]inproceedings\f[] (which will be mapped to CSL \f[C]paper\-conference\f[]). .PP For an unpublished manuscript, use the biblatex entry type \f[C]unpublished\f[] without an \f[C]eventtitle\f[] field (this entry type will be mapped to CSL \f[C]manuscript\f[]). .PP For a talk, an unpublished conference paper, or a poster presentation, use the biblatex entry type \f[C]unpublished\f[] with an \f[C]eventtitle\f[] field (this entry type will be mapped to CSL \f[C]speech\f[]). Use the biblatex \f[C]type\f[] field to indicate the type, e.g. \[lq]Paper\[rq], or \[lq]Poster\[rq]. \f[C]venue\f[] and \f[C]eventdate\f[] may be useful too, though \f[C]eventdate\f[] will not be rendered by most CSL styles. Note that \f[C]venue\f[] is for the event's venue, unlike \f[C]location\f[] which describes the publisher's location; do not use the latter for an unpublished conference paper. .SH AUTHORS .PP Andrea Rossato and John MacFarlane. .SH SEE ALSO .PP \f[C]pandoc\f[] (1), \f[C]pandoc_markdown\f[] (5). .PP The pandoc\-citeproc source code and all documentation may be downloaded from .