1pandoc-citeproc(1)                                          pandoc-citeproc(1)
2
3
4

NAME

6       pandoc-citeproc - filter to resolve citations in a pandoc document.
7

SYNOPSIS

9       pandoc-citeproc options [file..]
10

DESCRIPTION

12       The  pandoc-citeproc  executable has two modes, filter mode and convert
13       mode.
14
15   Filter mode
16       Run without options, it acts as a filter that takes a JSON-encoded Pan‐
17       doc  document, formats citations and adds a bibliography, and returns a
18       JSON-encoded pandoc document.  Citations will be resolved, and,  assum‐
19       ing there are bibliography entries, a bibliography will be inserted in‐
20       to a Div element with id refs.  If no such Div exists, one will be cre‐
21       ated  and appended to the end of the document (unless the suppress-bib‐
22       liography metadata field is set to a true value).  If you wish the bib‐
23       liography  to  have a section header, put the section header at the end
24       of your document.  (See the pandoc_markdown (5) man page  under  “Cita‐
25       tions” for details on how to encode citations in pandoc's markdown.)
26
27       To process citations with pandoc, call pandoc-citeproc as a filter:
28
29              pandoc --filter pandoc-citeproc input.md -s -o output.html
30
31       pandoc-citeproc  will look for the following metadata fields in the in‐
32       put:
33
34       bibliography
35              A path, or YAML list of paths, of  bibliography  files  to  use.
36              These may be in any of the formats supported by bibutils.
37
38              Format        File extension
39              ─────────────────────────────
40              BibLaTeX      .bib
41              BibTeX        .bibtex
42              Copac         .copac
43              CSL JSON      .json
44              CSL YAML      .yaml
45              EndNote       .enl
46              EndNote XML   .xml
47              ISI           .wos
48              MEDLINE       .medline
49              MODS          .mods
50              RIS           .ris
51
52              Note that .bib can generally be used with both BibTeX and BibLa‐
53              TeX files, but you can use .bibtex to force BibTeX.
54
55       references
56              A YAML list of references.  Each reference  is  a  YAML  object.
57              The format is essentially CSL JSON format.  Here is an example:
58
59                     - id: doe2006
60                       author:
61                         family: Doe
62                         given: [John, F.]
63                       title: Article
64                       page: 33-34
65                       issued:
66                         year: 2006
67                       type: article-journal
68                       volume: 6
69                       container-title: Journal of Generic Studies
70
71              The  contents of fields will be interpreted as markdown when ap‐
72              propriate: so, for example, emphasis and strong emphasis can  be
73              used  in  title fields.  Simple tex math will also be parsed and
74              rendered appropriately.
75
76       csl or citation-style
77              Path or URL of a CSL style file.  If the file is not found rela‐
78              tive  to the working directory, pandoc-citeproc will look in the
79              $HOME/.csl directory  (or  C:\Users\USERNAME\AppData\Roaming\csl
80              in  Windows  7).  If this is left off, pandoc-citeproc will look
81              for $HOME/.pandoc/default.csl, and if this is  not  present,  it
82              will  use  chicago-author-date.csl,  looking first in $HOME/.csl
83              and then in its own data files.
84
85       link-citations
86              If this has a true value, citations in author-date and numerical
87              styles  will  be hyperlinked to their corresponding bibliography
88              entries.  The default is not to add hyperlinks.
89
90       citation-abbreviations
91              Path to a CSL abbreviations JSON file.  If the file is not found
92              relative  to the working directory, pandoc-citeproc will look in
93              the  $HOME/.csl  directory  (or  C:\Users\USERNAME\AppData\Roam‐
94              ing\csl in Windows 7).  The format is described here (http://ci
95              tationstylist.org/2011/10/19/abbreviations-for-zotero-test-re‐
96              lease).   Abbreviations  are  only  output if, in the .csl file,
97              form="short" is set on the element that renders the variable.
98
99              Here is a short example:
100
101                     { "default": {
102                         "container-title": {
103                                 "Lloyd's Law Reports": "Lloyd's Rep",
104                                 "Estates Gazette": "EG",
105                                 "Scots Law Times": "SLT"
106                         }
107                       }
108                     }
109
110       lang   Locale to use in formatting citations.  If this is not set,  the
111              locale  is  taken  from  the default-locale attribute of the CSL
112              file.  en-US is used if a locale is not specified in either  the
113              metadata  or  the  CSL  file.  (For backwards compatibility, the
114              field locale can be used instead of lang, but this  lang  should
115              be used going forward.)
116
117       suppress-bibliography
118              If  this  has  a  true value, the bibliography will be left off.
119              Otherwise a bibliography will be inserted into each Div  element
120              with  id  refs.  If there is no such Div, one will be created at
121              the end of the document.
122
123       reference-section-title
124              If this has a value, a section header with this  title  will  be
125              added  before  the  bibliography.  If reference-section-title is
126              not specified and the document ends with a section header,  this
127              final header will be treated as the bibliography header.
128
129       notes-after-punctuation
130              If  true (the default), pandoc will put footnote citations after
131              following punctuation.  For  example,  if  the  source  contains
132              blah blah [@jones99]., the result will look like blah blah.[^1],
133              with the note moved after the period and  the  space  collapsed.
134              If  false,  the  space will still be collapsed, but the footnote
135              will not be moved after the punctuation.
136
137       The metadata must contain either references or bibliography or both  as
138       a  source  of references.  csl and citation-abbreviations are optional.
139       If csl is not provided, a  default  stylesheet  will  be  used  (either
140       ~/.pandoc/default.csl or a version of chicago-author-date.csl).
141
142   Convert mode
143       If  the  option  --bib2yaml or --bib2json is used, pandoc-citeproc will
144       not process citations; instead, it will treat its input (from stdin  or
145       files) as a bibliography and convert it either to a pandoc YAML metada‐
146       ta section, suitable for inclusion in a pandoc  document  (--bib2yaml),
147       or   as  a  CSL  JSON  bibliography,  suitable  for  import  to  zotero
148       (--bib2json).
149
150       The --format option can be used to  specify  the  bibliography  format,
151       though  when  files  are used, pandoc-citeproc can generally guess this
152       from the extension.
153
154       This mode supersedes the old biblio2yaml program.
155
156   Raw content (pandoc-citeproc only)
157       To include raw content in a prefix, suffix, delimiter,  or  term,  sur‐
158       round it with these tags indicating the format:
159
160              {{jats}}<ref>{{/jats}}
161
162       Without  the  tags,  the string will be interpreted as a string and es‐
163       caped in the output, rather than being passed through raw.
164
165       This feature allows stylesheets to be customized to give different out‐
166       put  for  different output formats.  However, stylesheets customized in
167       this way will not be useable by other CSL implementations.
168

OPTIONS

170       -y, --bib2yaml
171              Convert bibliography to YAML suitable for  inclusion  in  pandoc
172              metadata.
173
174       -j, --bib2json
175              Convert  bibliography  to  CSL  JSON  suitable  for  import into
176              Zotero.
177
178       -f FORMAT, --format=FORMAT
179              Specify format of bibliography to be  converted.   Legal  values
180              are  biblatex,  bibtex,  ris, endnote, endnotexml, isi, medline,
181              copac, mods, and json.
182
183       -h, --help
184              Print usage information.
185
186       --man  Print the man page in groff man format.  To  get  a  plain  text
187              version,  pandoc-citeproc --man | groff -mman -Tutf8.   To  pan‐
188              doc-citeproc --man | groff -mman -Thtml.
189
190       --license
191              Print the license.
192
193       -V, --version
194              Print version.
195

NOTES

197   General
198       If you use a biblatex database, closely follow  the  specifications  in
199       the “Database Guide” section of the biblatex manual (currently 2.8a).
200
201       If you use a CSL-YAML or CSL-JSON database, or a CSL-YAML metadata sec‐
202       tion in your markdown document, follow  the  “Citation  Style  Language
203       1.0.1    Language    Specification”   (<http://citationstyles.org/down
204       loads/specification.html>).  Particularly  relevant  are  <http://cita
205       tionstyles.org/downloads/specification.html#appendix-iii-types>  (which
206       neither comments on usage nor specifies required and  optional  fields)
207       and   <http://citationstyles.org/downloads/specification.html#appendix-
208       iv-variables> (which does contain comments).
209
210   Titles: Title vs. Sentence Case
211       If you are using a bibtex or biblatex bibliography,  then  observe  the
212       following rules:
213
214       · English titles should be in title case.  Non-English titles should be
215         in sentence case, and the langid field in biblatex should be  set  to
216         the relevant language.  (The following values are treated as English:
217         american, british, canadian, english, australian,  newzealand,  USen‐
218         glish, or UKenglish.)
219
220       · As is standard with bibtex/biblatex, proper names should be protected
221         with curly braces so that they won't be  lowercased  in  styles  that
222         call for sentence case.  For example:
223
224                title = {My Dinner with {Andre}}
225
226       · In addition, words that should remain lowercase (or camelCase) should
227         be protected:
228
229                title = {Spin Wave Dispersion on the {nm} Scale}
230
231         Though this is not necessary in bibtex/biblatex, it is necessary with
232         citeproc,  which  stores titles internally in sentence case, and con‐
233         verts to title case in styles that require it.  Here we protect  “nm”
234         so that it doesn't get converted to “Nm” at this stage.
235
236       If you are using a CSL bibliography (either JSON or YAML), then observe
237       the following rules:
238
239       · All titles should be in sentence case.
240
241       · Use the language field for non-English titles to prevent  their  con‐
242         version to title case in styles that call for this.  (Conversion hap‐
243         pens only if language begins with en or is left empty.)
244
245       · Protect words that should not be converted to title case  using  this
246         syntax:
247
248                Spin wave dispersion on the <span class="nocase">nm</span> scale
249
250   Conference Papers, Published vs. Unpublished
251       For  a formally published conference paper, use the biblatex entry type
252       inproceedings (which will be mapped to CSL paper-conference).
253
254       For an unpublished manuscript, use the biblatex entry type  unpublished
255       without an eventtitle field (this entry type will be mapped to CSL man‐
256       uscript).
257
258       For a talk, an unpublished conference paper, or a poster  presentation,
259       use  the biblatex entry type unpublished with an eventtitle field (this
260       entry type will be mapped to CSL speech).  Use the biblatex type  field
261       to  indicate the type, e.g.  “Paper”, or “Poster”.  venue and eventdate
262       may be useful too, though eventdate will not be rendered  by  most  CSL
263       styles.   Note  that  venue  is  for the event's venue, unlike location
264       which describes the publisher's location; do not use the latter for  an
265       unpublished conference paper.
266

AUTHORS

268       Andrea Rossato and John MacFarlane.
269

SEE ALSO

271       pandoc (1), pandoc_markdown (5).
272
273       The pandoc-citeproc source code and all documentation may be downloaded
274       from <http://github.com/jgm/pandoc-citeproc/>.
275
276
277
278pandoc-citeproc 0.13              2018-01-09                pandoc-citeproc(1)
Impressum