2015-07-03 07:09:04 +02:00
|
|
|
.\"t
|
2020-10-14 07:47:57 +02:00
|
|
|
.\" Automatically generated by Pandoc 2.11.0.1
|
2020-01-05 20:15:52 +01:00
|
|
|
.\"
|
2020-10-14 07:47:57 +02:00
|
|
|
.TH "Pandoc User\[cq]s Guide" "" "July 23, 2020" "pandoc 2.11.0.1" ""
|
2020-01-05 20:15:52 +01:00
|
|
|
.hy
|
2015-07-03 07:09:04 +02:00
|
|
|
.SH NAME
|
|
|
|
pandoc - general markup converter
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[C]pandoc\f[R] [\f[I]options\f[R]] [\f[I]input-file\f[R]]\&...
|
2015-07-03 07:09:04 +02:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.PP
|
|
|
|
Pandoc is a Haskell library for converting from one markup format to
|
2019-01-31 07:00:54 +01:00
|
|
|
another, and a command-line tool that uses this library.
|
2018-01-08 06:27:30 +01:00
|
|
|
.PP
|
2018-04-23 07:13:49 +02:00
|
|
|
Pandoc can convert between numerous markup and word processing formats,
|
|
|
|
including, but not limited to, various flavors of Markdown, HTML, LaTeX
|
|
|
|
and Word docx.
|
2019-01-31 07:00:54 +01:00
|
|
|
For the full lists of input and output formats, see the \f[C]--from\f[R]
|
|
|
|
and \f[C]--to\f[R] options below.
|
2018-04-23 07:13:49 +02:00
|
|
|
Pandoc can also produce PDF output: see creating a PDF, below.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
Pandoc\[cq]s enhanced version of Markdown includes syntax for tables,
|
2018-04-23 07:13:49 +02:00
|
|
|
definition lists, metadata blocks, footnotes, citations, math, and much
|
|
|
|
more.
|
2020-10-11 01:45:02 +02:00
|
|
|
See below under Pandoc\[cq]s Markdown.
|
2018-01-08 06:27:30 +01:00
|
|
|
.PP
|
|
|
|
Pandoc has a modular design: it consists of a set of readers, which
|
|
|
|
parse text in a given format and produce a native representation of the
|
2018-10-20 07:56:40 +02:00
|
|
|
document (an \f[I]abstract syntax tree\f[R] or AST), and a set of
|
2018-01-08 06:27:30 +01:00
|
|
|
writers, which convert this native representation into a target format.
|
2015-07-03 07:09:04 +02:00
|
|
|
Thus, adding an input or output format requires only adding a reader or
|
|
|
|
writer.
|
2018-01-08 06:27:30 +01:00
|
|
|
Users can also run custom pandoc filters to modify the intermediate AST.
|
2015-08-14 00:33:19 +02:00
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
Because pandoc\[cq]s intermediate representation of a document is less
|
2015-08-14 00:33:19 +02:00
|
|
|
expressive than many of the formats it converts between, one should not
|
|
|
|
expect perfect conversions between every format and every other.
|
|
|
|
Pandoc attempts to preserve the structural elements of a document, but
|
|
|
|
not formatting details such as margin size.
|
|
|
|
And some document elements, such as complex tables, may not fit into
|
2020-10-11 01:45:02 +02:00
|
|
|
pandoc\[cq]s simple document model.
|
|
|
|
While conversions from pandoc\[cq]s Markdown to all formats aspire to be
|
|
|
|
perfect, conversions from formats more expressive than pandoc\[cq]s
|
2017-11-12 00:26:24 +01:00
|
|
|
Markdown can be expected to be lossy.
|
2018-11-25 05:40:07 +01:00
|
|
|
.SS Using pandoc
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
If no \f[I]input-files\f[R] are specified, input is read from
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[I]stdin\f[R].
|
|
|
|
Output goes to \f[I]stdout\f[R] by default.
|
2019-01-31 07:00:54 +01:00
|
|
|
For output to a file, use the \f[C]-o\f[R] option:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc -o output.html input.txt
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-01-08 06:27:30 +01:00
|
|
|
By default, pandoc produces a document fragment.
|
2020-10-11 01:45:02 +02:00
|
|
|
To produce a standalone document (e.g.\ a valid HTML file including
|
|
|
|
\f[C]<head>\f[R] and \f[C]<body>\f[R]), use the \f[C]-s\f[R] or
|
|
|
|
\f[C]--standalone\f[R] flag:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc -s -o output.html input.txt
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
For more information on how standalone documents are produced, see
|
2018-01-08 06:27:30 +01:00
|
|
|
Templates below.
|
2017-06-04 20:40:09 +02:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
If multiple input files are given, \f[C]pandoc\f[R] will concatenate
|
|
|
|
them all (with blank lines between them) before parsing.
|
2019-01-31 07:00:54 +01:00
|
|
|
(Use \f[C]--file-scope\f[R] to parse files individually.)
|
2018-01-08 06:27:30 +01:00
|
|
|
.SS Specifying formats
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
The format of the input and output can be specified explicitly using
|
2019-01-31 07:00:54 +01:00
|
|
|
command-line options.
|
|
|
|
The input format can be specified using the \f[C]-f/--from\f[R] option,
|
|
|
|
the output format using the \f[C]-t/--to\f[R] option.
|
2018-10-20 07:56:40 +02:00
|
|
|
Thus, to convert \f[C]hello.txt\f[R] from Markdown to LaTeX, you could
|
2015-07-03 07:09:04 +02:00
|
|
|
type:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc -f markdown -t latex hello.txt
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
To convert \f[C]hello.html\f[R] from HTML to Markdown:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc -f html -t markdown hello.html
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-01-08 06:27:30 +01:00
|
|
|
Supported input and output formats are listed below under Options (see
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]-f\f[R] for input formats and \f[C]-t\f[R] for output formats).
|
|
|
|
You can also use \f[C]pandoc --list-input-formats\f[R] and
|
|
|
|
\f[C]pandoc --list-output-formats\f[R] to print lists of supported
|
2018-01-08 06:27:30 +01:00
|
|
|
formats.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
If the input or output format is not specified explicitly,
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]pandoc\f[R] will attempt to guess it from the extensions of the
|
2018-01-08 06:27:30 +01:00
|
|
|
filenames.
|
2015-07-03 07:09:04 +02:00
|
|
|
Thus, for example,
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc -o hello.tex hello.txt
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
will convert \f[C]hello.txt\f[R] from Markdown to LaTeX.
|
|
|
|
If no output file is specified (so that output goes to
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[I]stdout\f[R]), or if the output file\[cq]s extension is unknown, the
|
2018-10-20 07:56:40 +02:00
|
|
|
output format will default to HTML.
|
|
|
|
If no input file is specified (so that input comes from
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[I]stdin\f[R]), or if the input files\[cq] extensions are unknown, the
|
2018-10-20 07:56:40 +02:00
|
|
|
input format will be assumed to be Markdown.
|
2018-01-08 06:27:30 +01:00
|
|
|
.SS Character encoding
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
Pandoc uses the UTF-8 character encoding for both input and output.
|
|
|
|
If your local character encoding is not UTF-8, you should pipe input and
|
|
|
|
output through \f[C]iconv\f[R]:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
iconv -t utf-8 input.txt | pandoc | iconv -f utf-8
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Note that in some output formats (such as HTML, LaTeX, ConTeXt, RTF,
|
|
|
|
OPML, DocBook, and Texinfo), information about the character encoding is
|
|
|
|
included in the document header, which will only be included if you use
|
2019-01-31 07:00:54 +01:00
|
|
|
the \f[C]-s/--standalone\f[R] option.
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Creating a PDF
|
|
|
|
.PP
|
2018-11-02 05:56:41 +01:00
|
|
|
To produce a PDF, specify an output file with a \f[C].pdf\f[R]
|
2018-01-08 06:27:30 +01:00
|
|
|
extension:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc test.txt -o test.pdf
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-01-08 06:27:30 +01:00
|
|
|
By default, pandoc will use LaTeX to create the PDF, which requires that
|
2019-01-31 07:00:54 +01:00
|
|
|
a LaTeX engine be installed (see \f[C]--pdf-engine\f[R] below).
|
2019-12-05 21:38:42 +01:00
|
|
|
Alternatively, pandoc can use ConTeXt, roff ms, or HTML as an
|
|
|
|
intermediate format.
|
2018-11-02 05:56:41 +01:00
|
|
|
To do this, specify an output file with a \f[C].pdf\f[R] extension, as
|
2019-01-31 07:00:54 +01:00
|
|
|
before, but add the \f[C]--pdf-engine\f[R] option or
|
|
|
|
\f[C]-t context\f[R], \f[C]-t html\f[R], or \f[C]-t ms\f[R] to the
|
2019-12-05 21:38:42 +01:00
|
|
|
command line.
|
|
|
|
The tool used to generate the PDF from the intermediate format may be
|
|
|
|
specified using \f[C]--pdf-engine\f[R].
|
2019-01-31 07:00:54 +01:00
|
|
|
.PP
|
2019-12-05 21:38:42 +01:00
|
|
|
You can control the PDF style using variables, depending on the
|
|
|
|
intermediate format used: see variables for LaTeX, variables for
|
|
|
|
ConTeXt, variables for \f[C]wkhtmltopdf\f[R], variables for ms.
|
|
|
|
When HTML is used as an intermediate format, the output can be styled
|
|
|
|
using \f[C]--css\f[R].
|
2018-01-08 06:27:30 +01:00
|
|
|
.PP
|
|
|
|
To debug the PDF creation, it can be useful to look at the intermediate
|
2019-01-31 07:00:54 +01:00
|
|
|
representation: instead of \f[C]-o test.pdf\f[R], use for example
|
|
|
|
\f[C]-s -o test.tex\f[R] to output the generated LaTeX.
|
2018-11-02 05:56:41 +01:00
|
|
|
You can then test it with \f[C]pdflatex test.tex\f[R].
|
2018-01-08 06:27:30 +01:00
|
|
|
.PP
|
|
|
|
When using LaTeX, the following packages need to be available (they are
|
2018-10-20 07:56:40 +02:00
|
|
|
included with all recent versions of TeX Live): \f[C]amsfonts\f[R],
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]amsmath\f[R], \f[C]lm\f[R], \f[C]unicode-math\f[R],
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]ifxetex\f[R], \f[C]ifluatex\f[R], \f[C]listings\f[R] (if the
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]--listings\f[R] option is used), \f[C]fancyvrb\f[R],
|
2019-11-27 06:18:31 +01:00
|
|
|
\f[C]longtable\f[R], \f[C]booktabs\f[R], \f[C]graphicx\f[R] (if the
|
|
|
|
document contains images), \f[C]hyperref\f[R], \f[C]xcolor\f[R],
|
|
|
|
\f[C]ulem\f[R], \f[C]geometry\f[R] (with the \f[C]geometry\f[R] variable
|
|
|
|
set), \f[C]setspace\f[R] (with \f[C]linestretch\f[R]), and
|
|
|
|
\f[C]babel\f[R] (with \f[C]lang\f[R]).
|
2019-01-31 07:00:54 +01:00
|
|
|
The use of \f[C]xelatex\f[R] or \f[C]lualatex\f[R] as the PDF engine
|
2018-10-20 07:56:40 +02:00
|
|
|
requires \f[C]fontspec\f[R].
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[C]lualatex\f[R] uses \f[C]selnolig\f[R].
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]xelatex\f[R] uses \f[C]polyglossia\f[R] (with \f[C]lang\f[R]),
|
|
|
|
\f[C]xecjk\f[R], and \f[C]bidi\f[R] (with the \f[C]dir\f[R] variable
|
|
|
|
set).
|
|
|
|
If the \f[C]mathspec\f[R] variable is set, \f[C]xelatex\f[R] will use
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]mathspec\f[R] instead of \f[C]unicode-math\f[R].
|
2018-10-20 07:56:40 +02:00
|
|
|
The \f[C]upquote\f[R] and \f[C]microtype\f[R] packages are used if
|
2019-11-16 21:54:19 +01:00
|
|
|
available, and \f[C]csquotes\f[R] will be used for typography if the
|
|
|
|
\f[C]csquotes\f[R] variable or metadata field is set to a true value.
|
2018-10-20 07:56:40 +02:00
|
|
|
The \f[C]natbib\f[R], \f[C]biblatex\f[R], \f[C]bibtex\f[R], and
|
|
|
|
\f[C]biber\f[R] packages can optionally be used for citation rendering.
|
2019-01-31 07:00:54 +01:00
|
|
|
The following packages will be used to improve output quality if
|
|
|
|
present, but pandoc does not require them to be present:
|
|
|
|
\f[C]upquote\f[R] (for straight quotes in verbatim environments),
|
|
|
|
\f[C]microtype\f[R] (for better spacing adjustments), \f[C]parskip\f[R]
|
|
|
|
(for better inter-paragraph spaces), \f[C]xurl\f[R] (for better line
|
|
|
|
breaks in URLs), \f[C]bookmark\f[R] (for better PDF bookmarks), and
|
|
|
|
\f[C]footnotehyper\f[R] or \f[C]footnote\f[R] (to allow footnotes in
|
|
|
|
tables).
|
2018-01-08 06:27:30 +01:00
|
|
|
.SS Reading from the Web
|
2015-10-11 00:45:50 +02:00
|
|
|
.PP
|
2018-01-08 06:27:30 +01:00
|
|
|
Instead of an input file, an absolute URI may be given.
|
|
|
|
In this case pandoc will fetch the content using HTTP:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2020-02-16 06:26:29 +01:00
|
|
|
pandoc -f html -t markdown https://www.fsf.org
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-01-08 06:27:30 +01:00
|
|
|
.fi
|
2016-01-03 00:52:49 +01:00
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
It is possible to supply a custom User-Agent string or other header when
|
|
|
|
requesting a document from a URL:
|
2018-01-08 06:27:30 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc -f html -t markdown --request-header User-Agent:\[dq]Mozilla/5.0\[dq] \[rs]
|
2020-02-16 06:26:29 +01:00
|
|
|
https://www.fsf.org
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-01-08 06:27:30 +01:00
|
|
|
.fi
|
2015-07-03 07:09:04 +02:00
|
|
|
.SH OPTIONS
|
|
|
|
.SS General options
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]-f\f[B]\f[R] \f[I]FORMAT\f[R], \f[B]\f[CB]-r\f[B]\f[R] \f[I]FORMAT\f[R], \f[B]\f[CB]--from=\f[B]\f[R]\f[I]FORMAT\f[R], \f[B]\f[CB]--read=\f[B]\f[R]\f[I]FORMAT\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
Specify input format.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[I]FORMAT\f[R] can be:
|
2018-04-23 07:13:49 +02:00
|
|
|
.RS
|
|
|
|
.IP \[bu] 2
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[C]bibtex\f[R] (BibTeX bibliography)
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]biblatex\f[R] (BibLaTeX bibliography)
|
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]commonmark\f[R] (CommonMark Markdown)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2020-07-24 02:56:12 +02:00
|
|
|
\f[C]commonmark_x\f[R] (CommonMark Markdown with extensions)
|
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]creole\f[R] (Creole 1.0)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[C]csljson\f[R] (CSL JSON bibliography)
|
|
|
|
.IP \[bu] 2
|
2020-02-16 06:26:29 +01:00
|
|
|
\f[C]csv\f[R] (CSV table)
|
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]docbook\f[R] (DocBook)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]docx\f[R] (Word docx)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]dokuwiki\f[R] (DokuWiki markup)
|
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]epub\f[R] (EPUB)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]fb2\f[R] (FictionBook2 e-book)
|
2018-04-27 08:35:31 +02:00
|
|
|
.IP \[bu] 2
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]gfm\f[R] (GitHub-Flavored Markdown), or the deprecated and less
|
2018-10-20 07:56:40 +02:00
|
|
|
accurate \f[C]markdown_github\f[R]; use \f[C]markdown_github\f[R] only
|
|
|
|
if you need extensions not supported in \f[C]gfm\f[R].
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]haddock\f[R] (Haddock markup)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]html\f[R] (HTML)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]ipynb\f[R] (Jupyter notebook)
|
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]jats\f[R] (JATS XML)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2020-06-29 22:33:57 +02:00
|
|
|
\f[C]jira\f[R] (Jira/Confluence wiki markup)
|
2019-12-21 19:30:28 +01:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]json\f[R] (JSON version of native AST)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]latex\f[R] (LaTeX)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[C]markdown\f[R] (Pandoc\[cq]s Markdown)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]markdown_mmd\f[R] (MultiMarkdown)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]markdown_phpextra\f[R] (PHP Markdown Extra)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]markdown_strict\f[R] (original unextended Markdown)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]mediawiki\f[R] (MediaWiki markup)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-11-25 05:40:07 +01:00
|
|
|
\f[C]man\f[R] (roff man)
|
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]muse\f[R] (Muse)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]native\f[R] (native Haskell)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]odt\f[R] (ODT)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]opml\f[R] (OPML)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]org\f[R] (Emacs Org mode)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]rst\f[R] (reStructuredText)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]t2t\f[R] (txt2tags)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]textile\f[R] (Textile)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]tikiwiki\f[R] (TikiWiki markup)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]twiki\f[R] (TWiki markup)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]vimwiki\f[R] (Vimwiki)
|
2018-04-23 07:13:49 +02:00
|
|
|
.PP
|
|
|
|
Extensions can be individually enabled or disabled by appending
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]+EXTENSION\f[R] or \f[C]-EXTENSION\f[R] to the format name.
|
2017-12-27 18:53:50 +01:00
|
|
|
See Extensions below, for a list of extensions and their names.
|
2019-01-31 07:00:54 +01:00
|
|
|
See \f[C]--list-input-formats\f[R] and \f[C]--list-extensions\f[R],
|
|
|
|
below.
|
2015-07-03 07:09:04 +02:00
|
|
|
.RE
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]-t\f[B]\f[R] \f[I]FORMAT\f[R], \f[B]\f[CB]-w\f[B]\f[R] \f[I]FORMAT\f[R], \f[B]\f[CB]--to=\f[B]\f[R]\f[I]FORMAT\f[R], \f[B]\f[CB]--write=\f[B]\f[R]\f[I]FORMAT\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
Specify output format.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[I]FORMAT\f[R] can be:
|
2018-04-23 07:13:49 +02:00
|
|
|
.RS
|
|
|
|
.IP \[bu] 2
|
2019-03-03 18:46:21 +01:00
|
|
|
\f[C]asciidoc\f[R] (AsciiDoc) or \f[C]asciidoctor\f[R] (AsciiDoctor)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]beamer\f[R] (LaTeX beamer slide show)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]commonmark\f[R] (CommonMark Markdown)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2020-07-24 02:56:12 +02:00
|
|
|
\f[C]commonmark_x\f[R] (CommonMark Markdown with extensions)
|
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]context\f[R] (ConTeXt)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[C]csljson\f[R] (CSL JSON bibliography)
|
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]docbook\f[R] or \f[C]docbook4\f[R] (DocBook 4)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]docbook5\f[R] (DocBook 5)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]docx\f[R] (Word docx)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]dokuwiki\f[R] (DokuWiki markup)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]epub\f[R] or \f[C]epub3\f[R] (EPUB v3 book)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]epub2\f[R] (EPUB v2)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]fb2\f[R] (FictionBook2 e-book)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]gfm\f[R] (GitHub-Flavored Markdown), or the deprecated and less
|
2018-10-20 07:56:40 +02:00
|
|
|
accurate \f[C]markdown_github\f[R]; use \f[C]markdown_github\f[R] only
|
|
|
|
if you need extensions not supported in \f[C]gfm\f[R].
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]haddock\f[R] (Haddock markup)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[C]html\f[R] or \f[C]html5\f[R] (HTML, i.e.\ HTML5/XHTML polyglot
|
|
|
|
markup)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]html4\f[R] (XHTML 1.0 Transitional)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]icml\f[R] (InDesign ICML)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]ipynb\f[R] (Jupyter notebook)
|
|
|
|
.IP \[bu] 2
|
2020-02-16 06:26:29 +01:00
|
|
|
\f[C]jats_archiving\f[R] (JATS XML, Archiving and Interchange Tag Set)
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]jats_articleauthoring\f[R] (JATS XML, Article Authoring Tag Set)
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]jats_publishing\f[R] (JATS XML, Journal Publishing Tag Set)
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]jats\f[R] (alias for \f[C]jats_archiving\f[R])
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2020-06-29 22:33:57 +02:00
|
|
|
\f[C]jira\f[R] (Jira/Confluence wiki markup)
|
2019-06-12 06:50:10 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]json\f[R] (JSON version of native AST)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]latex\f[R] (LaTeX)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-11-02 05:56:41 +01:00
|
|
|
\f[C]man\f[R] (roff man)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[C]markdown\f[R] (Pandoc\[cq]s Markdown)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]markdown_mmd\f[R] (MultiMarkdown)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]markdown_phpextra\f[R] (PHP Markdown Extra)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]markdown_strict\f[R] (original unextended Markdown)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]mediawiki\f[R] (MediaWiki markup)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-11-02 05:56:41 +01:00
|
|
|
\f[C]ms\f[R] (roff ms)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]muse\f[R] (Muse),
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]native\f[R] (native Haskell),
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]odt\f[R] (OpenOffice text document)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]opml\f[R] (OPML)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]opendocument\f[R] (OpenDocument)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]org\f[R] (Emacs Org mode)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2019-11-16 21:54:19 +01:00
|
|
|
\f[C]pdf\f[R] (PDF)
|
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]plain\f[R] (plain text),
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]pptx\f[R] (PowerPoint slide show)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]rst\f[R] (reStructuredText)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]rtf\f[R] (Rich Text Format)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]texinfo\f[R] (GNU Texinfo)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]textile\f[R] (Textile)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]slideous\f[R] (Slideous HTML and JavaScript slide show)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]slidy\f[R] (Slidy HTML and JavaScript slide show)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]dzslides\f[R] (DZSlides HTML5 + JavaScript slide show),
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]revealjs\f[R] (reveal.js HTML5 + JavaScript slide show)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]s5\f[R] (S5 HTML and JavaScript slide show)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]tei\f[R] (TEI Simple)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2019-04-06 00:11:08 +02:00
|
|
|
\f[C]xwiki\f[R] (XWiki markup)
|
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]zimwiki\f[R] (ZimWiki markup)
|
2018-04-23 07:13:49 +02:00
|
|
|
.IP \[bu] 2
|
2020-02-16 06:26:29 +01:00
|
|
|
the path of a custom Lua writer, see Custom writers below
|
2018-04-23 07:13:49 +02:00
|
|
|
.PP
|
2019-11-16 21:54:19 +01:00
|
|
|
Note that \f[C]odt\f[R], \f[C]docx\f[R], \f[C]epub\f[R], and
|
|
|
|
\f[C]pdf\f[R] output will not be directed to \f[I]stdout\f[R] unless
|
|
|
|
forced with \f[C]-o -\f[R].
|
2018-04-23 07:13:49 +02:00
|
|
|
.PP
|
2017-12-27 18:53:50 +01:00
|
|
|
Extensions can be individually enabled or disabled by appending
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]+EXTENSION\f[R] or \f[C]-EXTENSION\f[R] to the format name.
|
2017-12-27 18:53:50 +01:00
|
|
|
See Extensions below, for a list of extensions and their names.
|
2019-01-31 07:00:54 +01:00
|
|
|
See \f[C]--list-output-formats\f[R] and \f[C]--list-extensions\f[R],
|
|
|
|
below.
|
2015-07-03 07:09:04 +02:00
|
|
|
.RE
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]-o\f[B]\f[R] \f[I]FILE\f[R], \f[B]\f[CB]--output=\f[B]\f[R]\f[I]FILE\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Write output to \f[I]FILE\f[R] instead of \f[I]stdout\f[R].
|
2019-01-31 07:00:54 +01:00
|
|
|
If \f[I]FILE\f[R] is \f[C]-\f[R], output will go to \f[I]stdout\f[R],
|
|
|
|
even if a non-textual format (\f[C]docx\f[R], \f[C]odt\f[R],
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]epub2\f[R], \f[C]epub3\f[R]) is specified.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--data-dir=\f[B]\f[R]\f[I]DIRECTORY\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
Specify the user data directory to search for pandoc data files.
|
|
|
|
If this option is not specified, the default user data directory will be
|
|
|
|
used.
|
2019-03-03 18:46:21 +01:00
|
|
|
On *nix and macOS systems this will be the \f[C]pandoc\f[R] subdirectory
|
|
|
|
of the XDG data directory (by default, \f[C]$HOME/.local/share\f[R],
|
|
|
|
overridable by setting the \f[C]XDG_DATA_HOME\f[R] environment
|
|
|
|
variable).
|
|
|
|
If that directory does not exist, \f[C]$HOME/.pandoc\f[R] will be used
|
|
|
|
(for backwards compatibility).
|
|
|
|
In Windows the default user data directory is
|
|
|
|
\f[C]C:\[rs]Users\[rs]USERNAME\[rs]AppData\[rs]Roaming\[rs]pandoc\f[R].
|
2015-10-11 00:45:50 +02:00
|
|
|
You can find the default user data directory on your system by looking
|
2019-01-31 07:00:54 +01:00
|
|
|
at the output of \f[C]pandoc --version\f[R].
|
2018-10-20 07:56:40 +02:00
|
|
|
A \f[C]reference.odt\f[R], \f[C]reference.docx\f[R], \f[C]epub.css\f[R],
|
|
|
|
\f[C]templates\f[R], \f[C]slidy\f[R], \f[C]slideous\f[R], or
|
|
|
|
\f[C]s5\f[R] directory placed in this directory will override
|
2020-10-11 01:45:02 +02:00
|
|
|
pandoc\[cq]s normal defaults.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-11-16 21:54:19 +01:00
|
|
|
\f[B]\f[CB]-d\f[B]\f[R] \f[I]FILE\f[R], \f[B]\f[CB]--defaults=\f[B]\f[R]\f[I]FILE\f[R]
|
|
|
|
Specify a set of default option settings.
|
|
|
|
\f[I]FILE\f[R] is a YAML file whose fields correspond to command-line
|
|
|
|
option settings.
|
|
|
|
All options for document conversion, including input and output files,
|
|
|
|
can be set using a defaults file.
|
|
|
|
The file will be searched for first in the working directory, and then
|
|
|
|
in the \f[C]defaults\f[R] subdirectory of the user data directory (see
|
|
|
|
\f[C]--data-dir\f[R]).
|
|
|
|
The \f[C].yaml\f[R] extension may be omitted.
|
|
|
|
See the section Default files for more information on the file format.
|
|
|
|
Settings from the defaults file may be overridden or extended by
|
|
|
|
subsequent options on the command line.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--bash-completion\f[B]\f[R]
|
2015-08-14 00:33:19 +02:00
|
|
|
Generate a bash completion script.
|
2015-10-11 00:45:50 +02:00
|
|
|
To enable bash completion with pandoc, add this to your
|
2018-11-02 05:56:41 +01:00
|
|
|
\f[C].bashrc\f[R]:
|
2015-08-14 00:33:19 +02:00
|
|
|
.RS
|
2018-01-18 17:16:08 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
eval \[dq]$(pandoc --bash-completion)\[dq]
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-01-18 17:16:08 +01:00
|
|
|
.fi
|
2015-08-14 00:33:19 +02:00
|
|
|
.RE
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--verbose\f[B]\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
Give verbose debugging output.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--quiet\f[B]\f[R]
|
2017-06-04 20:40:09 +02:00
|
|
|
Suppress warning messages.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--fail-if-warnings\f[B]\f[R]
|
2017-06-04 20:40:09 +02:00
|
|
|
Exit with error status if there are any warnings.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--log=\f[B]\f[R]\f[I]FILE\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
Write log messages in machine-readable JSON format to \f[I]FILE\f[R].
|
2017-06-04 20:40:09 +02:00
|
|
|
All messages above DEBUG level will be written, regardless of verbosity
|
2019-01-31 07:00:54 +01:00
|
|
|
settings (\f[C]--verbose\f[R], \f[C]--quiet\f[R]).
|
2017-06-04 20:40:09 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--list-input-formats\f[B]\f[R]
|
2016-10-26 22:10:02 +02:00
|
|
|
List supported input formats, one per line.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--list-output-formats\f[B]\f[R]
|
2016-10-26 22:10:02 +02:00
|
|
|
List supported output formats, one per line.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--list-extensions\f[B]\f[R][\f[B]\f[CB]=\f[B]\f[R]\f[I]FORMAT\f[R]]
|
2019-11-16 21:54:19 +01:00
|
|
|
List supported extensions for \f[I]FORMAT\f[R], one per line, preceded
|
|
|
|
by a \f[C]+\f[R] or \f[C]-\f[R] indicating whether it is enabled by
|
|
|
|
default in \f[I]FORMAT\f[R].
|
2020-10-11 01:45:02 +02:00
|
|
|
If \f[I]FORMAT\f[R] is not specified, defaults for pandoc\[cq]s Markdown
|
2017-12-29 00:57:59 +01:00
|
|
|
are given.
|
2016-10-26 22:10:02 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--list-highlight-languages\f[B]\f[R]
|
2016-10-26 22:10:02 +02:00
|
|
|
List supported languages for syntax highlighting, one per line.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--list-highlight-styles\f[B]\f[R]
|
2016-10-26 22:10:02 +02:00
|
|
|
List supported styles for syntax highlighting, one per line.
|
2019-01-31 07:00:54 +01:00
|
|
|
See \f[C]--highlight-style\f[R].
|
2016-10-26 22:10:02 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]-v\f[B]\f[R], \f[B]\f[CB]--version\f[B]\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
Print version.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]-h\f[B]\f[R], \f[B]\f[CB]--help\f[B]\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
Show usage message.
|
|
|
|
.SS Reader options
|
2019-11-17 17:06:53 +01:00
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]--shift-heading-level-by=\f[B]\f[R]\f[I]NUMBER\f[R]
|
2019-11-16 21:54:19 +01:00
|
|
|
Shift heading levels by a positive or negative integer.
|
2019-11-17 17:06:53 +01:00
|
|
|
For example, with \f[C]--shift-heading-level-by=-1\f[R], level 2
|
|
|
|
headings become level 1 headings, and level 3 headings become level 2
|
|
|
|
headings.
|
|
|
|
Headings cannot have a level less than 1, so a heading that would be
|
|
|
|
shifted below level 1 becomes a regular paragraph.
|
2019-12-05 21:38:42 +01:00
|
|
|
Exception: with a shift of -N, a level-N heading at the beginning of the
|
2019-11-17 17:06:53 +01:00
|
|
|
document replaces the metadata title.
|
|
|
|
\f[C]--shift-heading-level-by=-1\f[R] is a good choice when converting
|
|
|
|
HTML or Markdown documents that use an initial level-1 heading for the
|
|
|
|
document title and level-2+ headings for sections.
|
2019-12-05 21:38:42 +01:00
|
|
|
\f[C]--shift-heading-level-by=1\f[R] may be a good choice for converting
|
|
|
|
Markdown documents that use level-1 headings for sections to HTML, since
|
|
|
|
pandoc uses a level-1 heading to render the document title.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--base-header-level=\f[B]\f[R]\f[I]NUMBER\f[R]
|
2019-12-21 19:30:28 +01:00
|
|
|
\f[I]Deprecated. Use \f[CI]--shift-heading-level-by\f[I]=X instead,
|
|
|
|
where X = NUMBER - 1.\f[R] Specify the base level for headings (defaults
|
|
|
|
to 1).
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--strip-empty-paragraphs\f[B]\f[R]
|
2017-12-12 06:46:58 +01:00
|
|
|
\f[I]Deprecated. Use the \f[CI]+empty_paragraphs\f[I] extension
|
2018-10-20 07:56:40 +02:00
|
|
|
instead.\f[R] Ignore paragraphs with no content.
|
2017-12-03 03:56:45 +01:00
|
|
|
This option is useful for converting word processing documents where
|
2019-01-31 07:00:54 +01:00
|
|
|
users have used empty paragraphs to create inter-paragraph space.
|
2017-12-03 03:56:45 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--indented-code-classes=\f[B]\f[R]\f[I]CLASSES\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
Specify classes to use for indented code blocks\[en]for example,
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]perl,numberLines\f[R] or \f[C]haskell\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
Multiple classes may be separated by spaces or commas.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--default-image-extension=\f[B]\f[R]\f[I]EXTENSION\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
Specify a default extension to use when image paths/URLs have no
|
|
|
|
extension.
|
|
|
|
This allows you to use the same source for formats that require
|
|
|
|
different kinds of images.
|
2015-11-13 04:52:02 +01:00
|
|
|
Currently this option only affects the Markdown and LaTeX readers.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--file-scope\f[B]\f[R]
|
2016-03-19 06:54:03 +01:00
|
|
|
Parse each file individually before combining for multifile documents.
|
|
|
|
This will allow footnotes in different files with the same identifiers
|
|
|
|
to work as expected.
|
|
|
|
If this option is set, footnotes and links will not work across files.
|
2019-01-31 07:00:54 +01:00
|
|
|
Reading binary files (docx, odt, epub) implies \f[C]--file-scope\f[R].
|
2016-03-19 06:54:03 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]-F\f[B]\f[R] \f[I]PROGRAM\f[R], \f[B]\f[CB]--filter=\f[B]\f[R]\f[I]PROGRAM\f[R]
|
2015-11-13 04:52:02 +01:00
|
|
|
Specify an executable to be used as a filter transforming the pandoc AST
|
2015-07-03 07:09:04 +02:00
|
|
|
after the input is parsed and before the output is written.
|
|
|
|
The executable should read JSON from stdin and write JSON to stdout.
|
2020-10-11 01:45:02 +02:00
|
|
|
The JSON must be formatted like pandoc\[cq]s own JSON input and output.
|
2015-07-03 07:09:04 +02:00
|
|
|
The name of the output format will be passed to the filter as the first
|
|
|
|
argument.
|
|
|
|
Hence,
|
|
|
|
.RS
|
2018-01-18 17:16:08 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc --filter ./caps.py -t latex
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-01-18 17:16:08 +01:00
|
|
|
.fi
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
is equivalent to
|
2018-01-18 17:16:08 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc -t json | ./caps.py latex | pandoc -f json -t latex
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-01-18 17:16:08 +01:00
|
|
|
.fi
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
The latter form may be useful for debugging filters.
|
|
|
|
.PP
|
|
|
|
Filters may be written in any language.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]Text.Pandoc.JSON\f[R] exports \f[C]toJSONFilter\f[R] to facilitate
|
2015-07-03 07:09:04 +02:00
|
|
|
writing filters in Haskell.
|
|
|
|
Those who would prefer to write filters in python can use the module
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]pandocfilters\f[R], installable from PyPI.
|
2015-07-03 07:09:04 +02:00
|
|
|
There are also pandoc filter libraries in PHP, perl, and
|
2017-10-27 07:43:19 +02:00
|
|
|
JavaScript/node.js.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2016-10-26 22:10:02 +02:00
|
|
|
In order of preference, pandoc will look for filters in
|
|
|
|
.IP "1." 3
|
2019-01-31 07:00:54 +01:00
|
|
|
a specified full or relative path (executable or non-executable)
|
2016-10-26 22:10:02 +02:00
|
|
|
.IP "2." 3
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]$DATADIR/filters\f[R] (executable or non-executable) where
|
|
|
|
\f[C]$DATADIR\f[R] is the user data directory (see \f[C]--data-dir\f[R],
|
|
|
|
above).
|
2016-10-26 22:10:02 +02:00
|
|
|
.IP "3." 3
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]$PATH\f[R] (executable only)
|
2017-12-29 07:50:33 +01:00
|
|
|
.PP
|
2020-02-16 06:26:29 +01:00
|
|
|
Filters and Lua-filters are applied in the order specified on the
|
2017-12-29 07:50:33 +01:00
|
|
|
command line.
|
2015-07-03 07:09:04 +02:00
|
|
|
.RE
|
|
|
|
.TP
|
2019-11-16 21:54:19 +01:00
|
|
|
\f[B]\f[CB]-L\f[B]\f[R] \f[I]SCRIPT\f[R], \f[B]\f[CB]--lua-filter=\f[B]\f[R]\f[I]SCRIPT\f[R]
|
2017-06-04 20:40:09 +02:00
|
|
|
Transform the document in a similar fashion as JSON filters (see
|
2020-10-14 07:47:57 +02:00
|
|
|
\f[C]--filter\f[R]), but use pandoc\[cq]s built-in Lua filtering system.
|
2020-02-16 06:26:29 +01:00
|
|
|
The given Lua script is expected to return a list of Lua filters which
|
2017-06-04 20:40:09 +02:00
|
|
|
will be applied in order.
|
2020-02-16 06:26:29 +01:00
|
|
|
Each Lua filter must contain element-transforming functions indexed by
|
2017-06-04 20:40:09 +02:00
|
|
|
the name of the AST element on which the filter function should be
|
|
|
|
applied.
|
|
|
|
.RS
|
|
|
|
.PP
|
2020-02-16 06:26:29 +01:00
|
|
|
The \f[C]pandoc\f[R] Lua module provides helper functions for element
|
2017-06-04 20:40:09 +02:00
|
|
|
creation.
|
2020-10-11 01:45:02 +02:00
|
|
|
It is always loaded into the script\[cq]s Lua environment.
|
2017-06-04 20:40:09 +02:00
|
|
|
.PP
|
2020-02-16 06:26:29 +01:00
|
|
|
The following is an example Lua script for macro-expansion:
|
2018-01-18 17:16:08 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
function expand_hello_world(inline)
|
|
|
|
if inline.c == \[aq]{{helloworld}}\[aq] then
|
|
|
|
return pandoc.Emph{ pandoc.Str \[dq]Hello, World\[dq] }
|
|
|
|
else
|
|
|
|
return inline
|
|
|
|
end
|
2018-01-18 17:16:08 +01:00
|
|
|
end
|
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
return {{Str = expand_hello_world}}
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-01-18 17:16:08 +01:00
|
|
|
.fi
|
2018-04-27 08:35:31 +02:00
|
|
|
.PP
|
2020-02-16 06:26:29 +01:00
|
|
|
In order of preference, pandoc will look for Lua filters in
|
2018-04-27 08:35:31 +02:00
|
|
|
.IP "1." 3
|
2019-01-31 07:00:54 +01:00
|
|
|
a specified full or relative path (executable or non-executable)
|
2018-04-27 08:35:31 +02:00
|
|
|
.IP "2." 3
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]$DATADIR/filters\f[R] (executable or non-executable) where
|
|
|
|
\f[C]$DATADIR\f[R] is the user data directory (see \f[C]--data-dir\f[R],
|
|
|
|
above).
|
2017-06-04 20:40:09 +02:00
|
|
|
.RE
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]-M\f[B]\f[R] \f[I]KEY\f[R][\f[B]\f[CB]=\f[B]\f[R]\f[I]VAL\f[R]], \f[B]\f[CB]--metadata=\f[B]\f[R]\f[I]KEY\f[R][\f[B]\f[CB]:\f[B]\f[R]\f[I]VAL\f[R]]
|
2018-10-20 07:56:40 +02:00
|
|
|
Set the metadata field \f[I]KEY\f[R] to the value \f[I]VAL\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
A value specified on the command line overrides a value specified in the
|
2018-05-09 20:29:20 +02:00
|
|
|
document using YAML metadata blocks.
|
2015-07-03 07:09:04 +02:00
|
|
|
Values will be parsed as YAML boolean or string values.
|
|
|
|
If no value is specified, the value will be treated as Boolean true.
|
2019-01-31 07:00:54 +01:00
|
|
|
Like \f[C]--variable\f[R], \f[C]--metadata\f[R] causes template
|
2015-07-03 07:09:04 +02:00
|
|
|
variables to be set.
|
2019-01-31 07:00:54 +01:00
|
|
|
But unlike \f[C]--variable\f[R], \f[C]--metadata\f[R] affects the
|
2015-07-03 07:09:04 +02:00
|
|
|
metadata of the underlying document (which is accessible from filters
|
2018-04-21 06:50:42 +02:00
|
|
|
and may be printed in some output formats) and metadata values will be
|
|
|
|
escaped when inserted into the template.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--metadata-file=\f[B]\f[R]\f[I]FILE\f[R]
|
2018-09-16 20:18:41 +02:00
|
|
|
Read metadata from the supplied YAML (or JSON) file.
|
|
|
|
This option can be used with every input format, but string scalars in
|
|
|
|
the YAML file will always be parsed as Markdown.
|
|
|
|
Generally, the input will be handled the same as in YAML metadata
|
|
|
|
blocks.
|
2019-11-16 21:54:19 +01:00
|
|
|
This option can be used repeatedly to include multiple metadata files;
|
|
|
|
values in files specified later on the command line will be preferred
|
|
|
|
over those specified in earlier files.
|
2019-01-31 07:00:54 +01:00
|
|
|
Metadata values specified inside the document, or by using \f[C]-M\f[R],
|
|
|
|
overwrite values specified with this option.
|
2018-09-16 20:18:41 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]-p\f[B]\f[R], \f[B]\f[CB]--preserve-tabs\f[B]\f[R]
|
2019-11-16 21:54:19 +01:00
|
|
|
Preserve tabs instead of converting them to spaces.
|
|
|
|
(By default, pandoc converts tabs to spaces before parsing its input.)
|
2015-07-03 07:09:04 +02:00
|
|
|
Note that this will only affect tabs in literal code spans and code
|
2019-11-16 21:54:19 +01:00
|
|
|
blocks.
|
|
|
|
Tabs in regular text are always treated as spaces.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--tab-stop=\f[B]\f[R]\f[I]NUMBER\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
Specify the number of spaces per tab (default is 4).
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--track-changes=accept\f[B]\f[R]|\f[B]\f[CB]reject\f[B]\f[R]|\f[B]\f[CB]all\f[B]\f[R]
|
2016-07-15 07:57:09 +02:00
|
|
|
Specifies what to do with insertions, deletions, and comments produced
|
2020-10-11 01:45:02 +02:00
|
|
|
by the MS Word \[lq]Track Changes\[rq] feature.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]accept\f[R] (the default), inserts all insertions, and ignores all
|
2015-07-03 07:09:04 +02:00
|
|
|
deletions.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]reject\f[R] inserts all deletions and ignores insertions.
|
|
|
|
Both \f[C]accept\f[R] and \f[C]reject\f[R] ignore comments.
|
|
|
|
\f[C]all\f[R] puts in insertions, deletions, and comments, wrapped in
|
|
|
|
spans with \f[C]insertion\f[R], \f[C]deletion\f[R],
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]comment-start\f[R], and \f[C]comment-end\f[R] classes,
|
2016-07-15 07:57:09 +02:00
|
|
|
respectively.
|
2015-07-03 07:09:04 +02:00
|
|
|
The author and time of change is included.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]all\f[R] is useful for scripting: only accepting changes from a
|
2015-07-03 07:09:04 +02:00
|
|
|
certain reviewer, say, or before a certain date.
|
2019-01-31 07:00:54 +01:00
|
|
|
If a paragraph is inserted or deleted, \f[C]track-changes=all\f[R]
|
2018-01-08 06:27:30 +01:00
|
|
|
produces a span with the class
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]paragraph-insertion\f[R]/\f[C]paragraph-deletion\f[R] before the
|
2018-01-08 06:27:30 +01:00
|
|
|
affected paragraph break.
|
2015-07-03 07:09:04 +02:00
|
|
|
This option only affects the docx reader.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--extract-media=\f[B]\f[R]\f[I]DIR\f[R]
|
2017-06-04 20:40:09 +02:00
|
|
|
Extract images and other media contained in or linked from the source
|
2018-10-20 07:56:40 +02:00
|
|
|
document to the path \f[I]DIR\f[R], creating it if necessary, and adjust
|
2017-06-04 20:40:09 +02:00
|
|
|
the images references in the document so they point to the extracted
|
|
|
|
files.
|
|
|
|
If the source format is a binary container (docx, epub, or odt), the
|
|
|
|
media is extracted from the container and the original filenames are
|
|
|
|
used.
|
|
|
|
Otherwise the media is read from the file system or downloaded, and new
|
|
|
|
filenames are constructed based on SHA1 hashes of the contents.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--abbreviations=\f[B]\f[R]\f[I]FILE\f[R]
|
2017-06-04 20:40:09 +02:00
|
|
|
Specifies a custom abbreviations file, with abbreviations one to a line.
|
|
|
|
If this option is not specified, pandoc will read the data file
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]abbreviations\f[R] from the user data directory or fall back on a
|
2017-06-04 20:40:09 +02:00
|
|
|
system default.
|
|
|
|
To see the system default, use
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]pandoc --print-default-data-file=abbreviations\f[R].
|
2017-06-04 20:40:09 +02:00
|
|
|
The only use pandoc makes of this list is in the Markdown reader.
|
|
|
|
Strings ending in a period that are found in this list will be followed
|
|
|
|
by a nonbreaking space, so that the period will not produce
|
2019-01-31 07:00:54 +01:00
|
|
|
sentence-ending space in formats like LaTeX.
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS General writer options
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]-s\f[B]\f[R], \f[B]\f[CB]--standalone\f[B]\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
Produce output with an appropriate header and footer (e.g.\ a standalone
|
|
|
|
HTML, LaTeX, TEI, or RTF file, not a fragment).
|
2018-10-20 07:56:40 +02:00
|
|
|
This option is set automatically for \f[C]pdf\f[R], \f[C]epub\f[R],
|
|
|
|
\f[C]epub3\f[R], \f[C]fb2\f[R], \f[C]docx\f[R], and \f[C]odt\f[R]
|
|
|
|
output.
|
|
|
|
For \f[C]native\f[R] output, this option causes metadata to be included;
|
2018-05-09 20:29:20 +02:00
|
|
|
otherwise, metadata is suppressed.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--template=\f[B]\f[R]\f[I]FILE\f[R]|\f[I]URL\f[R]
|
2018-07-15 23:42:58 +02:00
|
|
|
Use the specified file as a custom template for the generated document.
|
2019-01-31 07:00:54 +01:00
|
|
|
Implies \f[C]--standalone\f[R].
|
2015-10-11 00:45:50 +02:00
|
|
|
See Templates, below, for a description of template syntax.
|
2015-07-03 07:09:04 +02:00
|
|
|
If no extension is specified, an extension corresponding to the writer
|
2019-01-31 07:00:54 +01:00
|
|
|
will be added, so that \f[C]--template=special\f[R] looks for
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]special.html\f[R] for HTML output.
|
2015-07-10 20:55:05 +02:00
|
|
|
If the template is not found, pandoc will search for it in the
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]templates\f[R] subdirectory of the user data directory (see
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]--data-dir\f[R]).
|
2015-07-03 07:09:04 +02:00
|
|
|
If this option is not used, a default template appropriate for the
|
2019-01-31 07:00:54 +01:00
|
|
|
output format will be used (see \f[C]-D/--print-default-template\f[R]).
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]-V\f[B]\f[R] \f[I]KEY\f[R][\f[B]\f[CB]=\f[B]\f[R]\f[I]VAL\f[R]], \f[B]\f[CB]--variable=\f[B]\f[R]\f[I]KEY\f[R][\f[B]\f[CB]:\f[B]\f[R]\f[I]VAL\f[R]]
|
2018-10-20 07:56:40 +02:00
|
|
|
Set the template variable \f[I]KEY\f[R] to the value \f[I]VAL\f[R] when
|
2015-07-03 07:09:04 +02:00
|
|
|
rendering the document in standalone mode.
|
2018-10-20 07:56:40 +02:00
|
|
|
If no \f[I]VAL\f[R] is specified, the key will be given the value
|
|
|
|
\f[C]true\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]-D\f[B]\f[R] \f[I]FORMAT\f[R], \f[B]\f[CB]--print-default-template=\f[B]\f[R]\f[I]FORMAT\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Print the system default template for an output \f[I]FORMAT\f[R].
|
2019-01-31 07:00:54 +01:00
|
|
|
(See \f[C]-t\f[R] for a list of possible \f[I]FORMAT\f[R]s.) Templates
|
2018-10-20 07:56:40 +02:00
|
|
|
in the user data directory are ignored.
|
2019-03-14 04:59:25 +01:00
|
|
|
This option may be used with \f[C]-o\f[R]/\f[C]--output\f[R] to redirect
|
|
|
|
output to a file, but \f[C]-o\f[R]/\f[C]--output\f[R] must come before
|
|
|
|
\f[C]--print-default-template\f[R] on the command line.
|
2019-11-16 21:54:19 +01:00
|
|
|
.RS
|
|
|
|
.PP
|
|
|
|
Note that some of the default templates use partials, for example
|
|
|
|
\f[C]styles.html\f[R].
|
|
|
|
To print the partials, use \f[C]--print-default-data-file\f[R]: for
|
|
|
|
example, \f[C]--print-default-data-file=templates/styles.html\f[R].
|
|
|
|
.RE
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--print-default-data-file=\f[B]\f[R]\f[I]FILE\f[R]
|
2015-07-15 18:18:52 +02:00
|
|
|
Print a system default data file.
|
|
|
|
Files in the user data directory are ignored.
|
2019-03-14 04:59:25 +01:00
|
|
|
This option may be used with \f[C]-o\f[R]/\f[C]--output\f[R] to redirect
|
|
|
|
output to a file, but \f[C]-o\f[R]/\f[C]--output\f[R] must come before
|
|
|
|
\f[C]--print-default-data-file\f[R] on the command line.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--eol=crlf\f[B]\f[R]|\f[B]\f[CB]lf\f[B]\f[R]|\f[B]\f[CB]native\f[B]\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Manually specify line endings: \f[C]crlf\f[R] (Windows), \f[C]lf\f[R]
|
|
|
|
(macOS/Linux/UNIX), or \f[C]native\f[R] (line endings appropriate to the
|
2017-06-04 20:40:09 +02:00
|
|
|
OS on which pandoc is being run).
|
2018-10-20 07:56:40 +02:00
|
|
|
The default is \f[C]native\f[R].
|
2017-06-04 20:40:09 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--dpi\f[B]\f[R]=\f[I]NUMBER\f[R]
|
2019-11-16 21:54:19 +01:00
|
|
|
Specify the default dpi (dots per inch) value for conversion from pixels
|
|
|
|
to inch/centimeters and vice versa.
|
|
|
|
(Technically, the correct term would be ppi: pixels per inch.) The
|
|
|
|
default is 96dpi.
|
|
|
|
When images contain information about dpi internally, the encoded value
|
|
|
|
is used instead of the default specified by this option.
|
2016-01-03 00:52:49 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--wrap=auto\f[B]\f[R]|\f[B]\f[CB]none\f[B]\f[R]|\f[B]\f[CB]preserve\f[B]\f[R]
|
2016-01-03 00:52:49 +01:00
|
|
|
Determine how text is wrapped in the output (the source code, not the
|
|
|
|
rendered version).
|
2018-10-20 07:56:40 +02:00
|
|
|
With \f[C]auto\f[R] (the default), pandoc will attempt to wrap lines to
|
2019-01-31 07:00:54 +01:00
|
|
|
the column width specified by \f[C]--columns\f[R] (default 72).
|
2018-10-20 07:56:40 +02:00
|
|
|
With \f[C]none\f[R], pandoc will not wrap lines at all.
|
|
|
|
With \f[C]preserve\f[R], pandoc will attempt to preserve the wrapping
|
2016-01-03 00:52:49 +01:00
|
|
|
from the source document (that is, where there are nonsemantic newlines
|
|
|
|
in the source, there will be nonsemantic newlines in the output as
|
|
|
|
well).
|
2017-01-29 21:19:16 +01:00
|
|
|
Automatic wrapping does not currently work in HTML output.
|
2019-01-31 07:00:54 +01:00
|
|
|
In \f[C]ipynb\f[R] output, this option affects wrapping of the contents
|
|
|
|
of markdown cells.
|
2016-01-03 00:52:49 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--columns=\f[B]\f[R]\f[I]NUMBER\f[R]
|
2016-06-04 16:55:08 +02:00
|
|
|
Specify length of lines in characters.
|
|
|
|
This affects text wrapping in the generated source code (see
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]--wrap\f[R]).
|
2016-06-04 16:55:08 +02:00
|
|
|
It also affects calculation of column widths for plain text tables (see
|
|
|
|
Tables below).
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--toc\f[B]\f[R], \f[B]\f[CB]--table-of-contents\f[B]\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
Include an automatically generated table of contents (or, in the case of
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]latex\f[R], \f[C]context\f[R], \f[C]docx\f[R], \f[C]odt\f[R],
|
|
|
|
\f[C]opendocument\f[R], \f[C]rst\f[R], or \f[C]ms\f[R], an instruction
|
|
|
|
to create one) in the output document.
|
2019-01-31 07:00:54 +01:00
|
|
|
This option has no effect unless \f[C]-s/--standalone\f[R] is used, and
|
|
|
|
it has no effect on \f[C]man\f[R], \f[C]docbook4\f[R],
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]docbook5\f[R], or \f[C]jats\f[R] output.
|
2019-06-12 06:50:10 +02:00
|
|
|
.RS
|
|
|
|
.PP
|
|
|
|
Note that if you are producing a PDF via \f[C]ms\f[R], the table of
|
|
|
|
contents will appear at the beginning of the document, before the title.
|
|
|
|
If you would prefer it to be at the end of the document, use the option
|
|
|
|
\f[C]--pdf-engine-opt=--no-toc-relocation\f[R].
|
|
|
|
.RE
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--toc-depth=\f[B]\f[R]\f[I]NUMBER\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
Specify the number of section levels to include in the table of
|
|
|
|
contents.
|
2019-04-06 00:11:08 +02:00
|
|
|
The default is 3 (which means that level-1, 2, and 3 headings will be
|
2015-07-03 07:09:04 +02:00
|
|
|
listed in the contents).
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--strip-comments\f[B]\f[R]
|
2017-10-18 05:30:20 +02:00
|
|
|
Strip out HTML comments in the Markdown or Textile source, rather than
|
|
|
|
passing them on to Markdown, Textile or HTML output as raw HTML.
|
|
|
|
This does not apply to HTML comments inside raw HTML blocks when the
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]markdown_in_html_blocks\f[R] extension is not set.
|
2017-10-18 05:30:20 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--no-highlight\f[B]\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
Disables syntax highlighting for code blocks and inlines, even when a
|
|
|
|
language attribute is given.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--highlight-style=\f[B]\f[R]\f[I]STYLE\f[R]|\f[I]FILE\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
Specifies the coloring style to be used in highlighted source code.
|
2018-10-20 07:56:40 +02:00
|
|
|
Options are \f[C]pygments\f[R] (the default), \f[C]kate\f[R],
|
|
|
|
\f[C]monochrome\f[R], \f[C]breezeDark\f[R], \f[C]espresso\f[R],
|
|
|
|
\f[C]zenburn\f[R], \f[C]haddock\f[R], and \f[C]tango\f[R].
|
2015-07-21 19:24:59 +02:00
|
|
|
For more information on syntax highlighting in pandoc, see Syntax
|
|
|
|
highlighting, below.
|
2019-01-31 07:00:54 +01:00
|
|
|
See also \f[C]--list-highlight-styles\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
.RS
|
2017-06-04 20:40:09 +02:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Instead of a \f[I]STYLE\f[R] name, a JSON file with extension
|
2018-11-02 05:56:41 +01:00
|
|
|
\f[C].theme\f[R] may be supplied.
|
2017-06-04 20:40:09 +02:00
|
|
|
This will be parsed as a KDE syntax highlighting theme and (if valid)
|
|
|
|
used as the highlighting style.
|
2017-12-03 03:56:45 +01:00
|
|
|
.PP
|
|
|
|
To generate the JSON version of an existing style, use
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]--print-highlight-style\f[R].
|
2017-12-03 03:56:45 +01:00
|
|
|
.RE
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--print-highlight-style=\f[B]\f[R]\f[I]STYLE\f[R]|\f[I]FILE\f[R]
|
2017-12-03 03:56:45 +01:00
|
|
|
Prints a JSON version of a highlighting style, which can be modified,
|
2018-11-02 05:56:41 +01:00
|
|
|
saved with a \f[C].theme\f[R] extension, and used with
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]--highlight-style\f[R].
|
2019-03-14 04:59:25 +01:00
|
|
|
This option may be used with \f[C]-o\f[R]/\f[C]--output\f[R] to redirect
|
|
|
|
output to a file, but \f[C]-o\f[R]/\f[C]--output\f[R] must come before
|
|
|
|
\f[C]--print-highlight-style\f[R] on the command line.
|
2017-06-04 20:40:09 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--syntax-definition=\f[B]\f[R]\f[I]FILE\f[R]
|
2017-06-04 20:40:09 +02:00
|
|
|
Instructs pandoc to load a KDE XML syntax definition file, which will be
|
|
|
|
used for syntax highlighting of appropriately marked code blocks.
|
|
|
|
This can be used to add support for new languages or to use altered
|
|
|
|
syntax definitions for existing languages.
|
2019-11-16 21:54:19 +01:00
|
|
|
This option may be repeated to add multiple syntax definitions.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]-H\f[B]\f[R] \f[I]FILE\f[R], \f[B]\f[CB]--include-in-header=\f[B]\f[R]\f[I]FILE\f[R]|\f[I]URL\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Include contents of \f[I]FILE\f[R], verbatim, at the end of the header.
|
2016-12-10 11:29:58 +01:00
|
|
|
This can be used, for example, to include special CSS or JavaScript in
|
2015-07-03 07:09:04 +02:00
|
|
|
HTML documents.
|
|
|
|
This option can be used repeatedly to include multiple files in the
|
|
|
|
header.
|
|
|
|
They will be included in the order specified.
|
2019-01-31 07:00:54 +01:00
|
|
|
Implies \f[C]--standalone\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]-B\f[B]\f[R] \f[I]FILE\f[R], \f[B]\f[CB]--include-before-body=\f[B]\f[R]\f[I]FILE\f[R]|\f[I]URL\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Include contents of \f[I]FILE\f[R], verbatim, at the beginning of the
|
2020-10-11 01:45:02 +02:00
|
|
|
document body (e.g.\ after the \f[C]<body>\f[R] tag in HTML, or the
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]\[rs]begin{document}\f[R] command in LaTeX).
|
2015-07-03 07:09:04 +02:00
|
|
|
This can be used to include navigation bars or banners in HTML
|
|
|
|
documents.
|
|
|
|
This option can be used repeatedly to include multiple files.
|
|
|
|
They will be included in the order specified.
|
2019-01-31 07:00:54 +01:00
|
|
|
Implies \f[C]--standalone\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]-A\f[B]\f[R] \f[I]FILE\f[R], \f[B]\f[CB]--include-after-body=\f[B]\f[R]\f[I]FILE\f[R]|\f[I]URL\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Include contents of \f[I]FILE\f[R], verbatim, at the end of the document
|
|
|
|
body (before the \f[C]</body>\f[R] tag in HTML, or the
|
|
|
|
\f[C]\[rs]end{document}\f[R] command in LaTeX).
|
2016-03-19 06:54:03 +01:00
|
|
|
This option can be used repeatedly to include multiple files.
|
2015-07-03 07:09:04 +02:00
|
|
|
They will be included in the order specified.
|
2019-01-31 07:00:54 +01:00
|
|
|
Implies \f[C]--standalone\f[R].
|
2017-06-04 20:40:09 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--resource-path=\f[B]\f[R]\f[I]SEARCHPATH\f[R]
|
2017-06-04 20:40:09 +02:00
|
|
|
List of paths to search for images and other resources.
|
2018-10-20 07:56:40 +02:00
|
|
|
The paths should be separated by \f[C]:\f[R] on Linux, UNIX, and macOS
|
|
|
|
systems, and by \f[C];\f[R] on Windows.
|
2019-01-31 07:00:54 +01:00
|
|
|
If \f[C]--resource-path\f[R] is not specified, the default resource path
|
|
|
|
is the working directory.
|
|
|
|
Note that, if \f[C]--resource-path\f[R] is specified, the working
|
2017-06-04 20:40:09 +02:00
|
|
|
directory must be explicitly listed or it will not be searched.
|
2019-01-31 07:00:54 +01:00
|
|
|
For example: \f[C]--resource-path=.:test\f[R] will search the working
|
2018-10-20 07:56:40 +02:00
|
|
|
directory and the \f[C]test\f[R] subdirectory, in that order.
|
2017-06-04 20:40:09 +02:00
|
|
|
.RS
|
2018-09-16 20:18:41 +02:00
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]--resource-path\f[R] only has an effect if (a) the output format
|
2018-10-20 07:56:40 +02:00
|
|
|
embeds images (for example, \f[C]docx\f[R], \f[C]pdf\f[R], or
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]html\f[R] with \f[C]--self-contained\f[R]) or (b) it is used
|
|
|
|
together with \f[C]--extract-media\f[R].
|
2017-06-04 20:40:09 +02:00
|
|
|
.RE
|
2017-10-18 05:30:20 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--request-header=\f[B]\f[R]\f[I]NAME\f[R]\f[B]\f[CB]:\f[B]\f[R]\f[I]VAL\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Set the request header \f[I]NAME\f[R] to the value \f[I]VAL\f[R] when
|
2017-10-18 05:30:20 +02:00
|
|
|
making HTTP requests (for example, when a URL is given on the command
|
|
|
|
line, or when resources used in a document must be downloaded).
|
2020-10-11 01:45:02 +02:00
|
|
|
If you\[cq]re behind a proxy, you also need to set the environment
|
2018-10-20 07:56:40 +02:00
|
|
|
variable \f[C]http_proxy\f[R] to \f[C]http://...\f[R].
|
2020-06-29 22:33:57 +02:00
|
|
|
.TP
|
2020-07-24 02:56:12 +02:00
|
|
|
\f[B]\f[CB]--no-check-certificate\f[B]\f[R]
|
2020-06-29 22:33:57 +02:00
|
|
|
Disable the certificate verification to allow access to unsecure HTTP
|
|
|
|
resources (for example when the certificate is no longer valid or self
|
|
|
|
signed).
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Options affecting specific writers
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--self-contained\f[B]\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
Produce a standalone HTML file with no external dependencies, using
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]data:\f[R] URIs to incorporate the contents of linked scripts,
|
2015-07-03 07:09:04 +02:00
|
|
|
stylesheets, images, and videos.
|
2019-01-31 07:00:54 +01:00
|
|
|
Implies \f[C]--standalone\f[R].
|
2020-10-11 01:45:02 +02:00
|
|
|
The resulting file should be \[lq]self-contained,\[rq] in the sense that
|
2019-01-31 07:00:54 +01:00
|
|
|
it needs no external files and no net access to be displayed properly by
|
|
|
|
a browser.
|
2015-07-03 07:09:04 +02:00
|
|
|
This option works only with HTML output formats, including
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]html4\f[R], \f[C]html5\f[R], \f[C]html+lhs\f[R],
|
|
|
|
\f[C]html5+lhs\f[R], \f[C]s5\f[R], \f[C]slidy\f[R], \f[C]slideous\f[R],
|
|
|
|
\f[C]dzslides\f[R], and \f[C]revealjs\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
Scripts, images, and stylesheets at absolute URLs will be downloaded;
|
|
|
|
those at relative URLs will be sought relative to the working directory
|
|
|
|
(if the first source file is local) or relative to the base URL (if the
|
|
|
|
first source file is remote).
|
2019-01-31 07:00:54 +01:00
|
|
|
Elements with the attribute \f[C]data-external=\[dq]1\[dq]\f[R] will be
|
2018-10-20 07:56:40 +02:00
|
|
|
left alone; the documents they link to will not be incorporated in the
|
2017-06-04 20:40:09 +02:00
|
|
|
document.
|
2016-01-03 00:52:49 +01:00
|
|
|
Limitation: resources that are loaded dynamically through JavaScript
|
2019-01-31 07:00:54 +01:00
|
|
|
cannot be incorporated; as a result, \f[C]--self-contained\f[R] does not
|
2020-10-11 01:45:02 +02:00
|
|
|
work with \f[C]--mathjax\f[R], and some advanced features (e.g.\ zoom or
|
|
|
|
speaker notes) may not work in an offline \[lq]self-contained\[rq]
|
|
|
|
\f[C]reveal.js\f[R] slide show.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--html-q-tags\f[B]\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Use \f[C]<q>\f[R] tags for quotes in HTML.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--ascii\f[B]\f[R]
|
2016-12-10 11:29:58 +01:00
|
|
|
Use only ASCII characters in output.
|
2018-11-02 05:56:41 +01:00
|
|
|
Currently supported for XML and HTML formats (which use entities instead
|
2019-01-31 07:00:54 +01:00
|
|
|
of UTF-8 when this option is selected), CommonMark, gfm, and Markdown
|
2018-11-25 05:40:07 +01:00
|
|
|
(which use entities), roff ms (which use hexadecimal escapes), and to a
|
|
|
|
limited degree LaTeX (which uses standard commands for accented
|
|
|
|
characters when possible).
|
2018-11-02 05:56:41 +01:00
|
|
|
roff man output uses ASCII by default.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--reference-links\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
Use reference-style links, rather than inline links, in writing Markdown
|
|
|
|
or reStructuredText.
|
2015-07-03 07:09:04 +02:00
|
|
|
By default inline links are used.
|
2016-10-26 22:10:02 +02:00
|
|
|
The placement of link references is affected by the
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]--reference-location\f[R] option.
|
2016-10-26 22:10:02 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--reference-location = block\f[B]\f[R]|\f[B]\f[CB]section\f[B]\f[R]|\f[B]\f[CB]document\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
Specify whether footnotes (and references, if \f[C]reference-links\f[R]
|
|
|
|
is set) are placed at the end of the current (top-level) block, the
|
2016-10-26 22:10:02 +02:00
|
|
|
current section, or the document.
|
2018-10-20 07:56:40 +02:00
|
|
|
The default is \f[C]document\f[R].
|
2016-10-26 22:10:02 +02:00
|
|
|
Currently only affects the markdown writer.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--atx-headers\f[B]\f[R]
|
2019-04-06 00:11:08 +02:00
|
|
|
Use ATX-style headings in Markdown output.
|
|
|
|
The default is to use setext-style headings for levels 1 to 2, and then
|
|
|
|
ATX headings.
|
|
|
|
(Note: for \f[C]gfm\f[R] output, ATX headings are always used.) This
|
2019-01-31 07:00:54 +01:00
|
|
|
option also affects markdown cells in \f[C]ipynb\f[R] output.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--top-level-division=[default|section|chapter|part]\f[B]\f[R]
|
2019-04-06 00:11:08 +02:00
|
|
|
Treat top-level headings as the given division type in LaTeX, ConTeXt,
|
2016-10-26 22:10:02 +02:00
|
|
|
DocBook, and TEI output.
|
2019-04-06 00:11:08 +02:00
|
|
|
The hierarchy order is part, chapter, then section; all headings are
|
|
|
|
shifted such that the top-level heading becomes the specified type.
|
2016-11-30 21:03:17 +01:00
|
|
|
The default behavior is to determine the best division type via
|
2018-10-20 07:56:40 +02:00
|
|
|
heuristics: unless other conditions apply, \f[C]section\f[R] is chosen.
|
2019-11-16 21:54:19 +01:00
|
|
|
When the \f[C]documentclass\f[R] variable is set to \f[C]report\f[R],
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]book\f[R], or \f[C]memoir\f[R] (unless the \f[C]article\f[R] option
|
|
|
|
is specified), \f[C]chapter\f[R] is implied as the setting for this
|
|
|
|
option.
|
|
|
|
If \f[C]beamer\f[R] is the output format, specifying either
|
2019-04-06 00:11:08 +02:00
|
|
|
\f[C]chapter\f[R] or \f[C]part\f[R] will cause top-level headings to
|
|
|
|
become \f[C]\[rs]part{..}\f[R], while second-level headings remain as
|
2018-10-20 07:56:40 +02:00
|
|
|
their default type.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]-N\f[B]\f[R], \f[B]\f[CB]--number-sections\f[B]\f[R]
|
2020-07-24 02:56:12 +02:00
|
|
|
Number section headings in LaTeX, ConTeXt, HTML, Docx, or EPUB output.
|
2015-07-03 07:09:04 +02:00
|
|
|
By default, sections are not numbered.
|
2018-10-20 07:56:40 +02:00
|
|
|
Sections with class \f[C]unnumbered\f[R] will never be numbered, even if
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]--number-sections\f[R] is specified.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[B]\f[CB]--number-offset=\f[B]\f[R]\f[I]NUMBER\f[R][\f[B]\f[CB],\f[B]\f[R]\f[I]NUMBER\f[R]\f[B]\f[CB],\f[B]\f[R]\f[I]\&...\f[R]]
|
2015-07-03 07:09:04 +02:00
|
|
|
Offset for section headings in HTML output (ignored in other output
|
|
|
|
formats).
|
2019-04-06 00:11:08 +02:00
|
|
|
The first number is added to the section number for top-level headings,
|
|
|
|
the second for second-level headings, and so on.
|
|
|
|
So, for example, if you want the first top-level heading in your
|
2020-10-11 01:45:02 +02:00
|
|
|
document to be numbered \[lq]6\[rq], specify
|
2019-04-06 00:11:08 +02:00
|
|
|
\f[C]--number-offset=5\f[R].
|
|
|
|
If your document starts with a level-2 heading which you want to be
|
2020-10-11 01:45:02 +02:00
|
|
|
numbered \[lq]1.5\[rq], specify \f[C]--number-offset=1,4\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
Offsets are 0 by default.
|
2019-01-31 07:00:54 +01:00
|
|
|
Implies \f[C]--number-sections\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--listings\f[B]\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Use the \f[C]listings\f[R] package for LaTeX code blocks.
|
2019-01-31 07:00:54 +01:00
|
|
|
The package does not support multi-byte encoding for source code.
|
|
|
|
To handle UTF-8 you would need to use a custom template.
|
2018-09-16 20:18:41 +02:00
|
|
|
This issue is fully documented here: Encoding issue with the listings
|
|
|
|
package.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]-i\f[B]\f[R], \f[B]\f[CB]--incremental\f[B]\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
Make list items in slide shows display incrementally (one by one).
|
|
|
|
The default is for lists to be displayed all at once.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--slide-level=\f[B]\f[R]\f[I]NUMBER\f[R]
|
2019-04-06 00:11:08 +02:00
|
|
|
Specifies that headings with the specified level create slides (for
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]beamer\f[R], \f[C]s5\f[R], \f[C]slidy\f[R], \f[C]slideous\f[R],
|
|
|
|
\f[C]dzslides\f[R]).
|
2019-04-06 00:11:08 +02:00
|
|
|
Headings above this level in the hierarchy are used to divide the slide
|
|
|
|
show into sections; headings below this level create subheads within a
|
2015-07-03 07:09:04 +02:00
|
|
|
slide.
|
2019-04-06 00:11:08 +02:00
|
|
|
Note that content that is not contained under slide-level headings will
|
2017-06-04 20:40:09 +02:00
|
|
|
not appear in the slide show.
|
2015-07-03 07:09:04 +02:00
|
|
|
The default is to set the slide level based on the contents of the
|
2015-10-11 00:45:50 +02:00
|
|
|
document; see Structuring the slide show.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--section-divs\f[B]\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Wrap sections in \f[C]<section>\f[R] tags (or \f[C]<div>\f[R] tags for
|
|
|
|
\f[C]html4\f[R]), and attach identifiers to the enclosing
|
2019-04-06 00:11:08 +02:00
|
|
|
\f[C]<section>\f[R] (or \f[C]<div>\f[R]) rather than the heading itself.
|
|
|
|
See Heading identifiers, below.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--email-obfuscation=none\f[B]\f[R]|\f[B]\f[CB]javascript\f[B]\f[R]|\f[B]\f[CB]references\f[B]\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Specify a method for obfuscating \f[C]mailto:\f[R] links in HTML
|
2015-07-03 07:09:04 +02:00
|
|
|
documents.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]none\f[R] leaves \f[C]mailto:\f[R] links as they are.
|
|
|
|
\f[C]javascript\f[R] obfuscates them using JavaScript.
|
|
|
|
\f[C]references\f[R] obfuscates them by printing their letters as
|
|
|
|
decimal or hexadecimal character references.
|
|
|
|
The default is \f[C]none\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--id-prefix=\f[B]\f[R]\f[I]STRING\f[R]
|
2017-06-04 20:40:09 +02:00
|
|
|
Specify a prefix to be added to all identifiers and internal links in
|
|
|
|
HTML and DocBook output, and to footnote numbers in Markdown and Haddock
|
|
|
|
output.
|
2015-07-03 07:09:04 +02:00
|
|
|
This is useful for preventing duplicate identifiers when generating
|
|
|
|
fragments to be included in other pages.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]-T\f[B]\f[R] \f[I]STRING\f[R], \f[B]\f[CB]--title-prefix=\f[B]\f[R]\f[I]STRING\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Specify \f[I]STRING\f[R] as a prefix at the beginning of the title that
|
2015-07-03 07:09:04 +02:00
|
|
|
appears in the HTML header (but not in the title as it appears at the
|
|
|
|
beginning of the HTML body).
|
2019-01-31 07:00:54 +01:00
|
|
|
Implies \f[C]--standalone\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]-c\f[B]\f[R] \f[I]URL\f[R], \f[B]\f[CB]--css=\f[B]\f[R]\f[I]URL\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
Link to a CSS style sheet.
|
2016-03-19 06:54:03 +01:00
|
|
|
This option can be used repeatedly to include multiple files.
|
2015-07-03 07:09:04 +02:00
|
|
|
They will be included in the order specified.
|
|
|
|
.RS
|
2017-06-04 20:40:09 +02:00
|
|
|
.PP
|
|
|
|
A stylesheet is required for generating EPUB.
|
2018-11-02 05:56:41 +01:00
|
|
|
If none is provided using this option (or the \f[C]css\f[R] or
|
|
|
|
\f[C]stylesheet\f[R] metadata fields), pandoc will look for a file
|
|
|
|
\f[C]epub.css\f[R] in the user data directory (see
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]--data-dir\f[R]).
|
2017-06-04 20:40:09 +02:00
|
|
|
If it is not found there, sensible defaults will be used.
|
2015-07-03 07:09:04 +02:00
|
|
|
.RE
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--reference-doc=\f[B]\f[R]\f[I]FILE\f[R]
|
2017-06-04 20:40:09 +02:00
|
|
|
Use the specified file as a style reference in producing a docx or ODT
|
|
|
|
file.
|
2015-07-03 07:09:04 +02:00
|
|
|
.RS
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
Docx
|
2015-07-03 07:09:04 +02:00
|
|
|
For best results, the reference docx should be a modified version of a
|
|
|
|
docx file produced using pandoc.
|
|
|
|
The contents of the reference docx are ignored, but its stylesheets and
|
|
|
|
document properties (including margins, page size, header, and footer)
|
|
|
|
are used in the new docx.
|
|
|
|
If no reference docx is specified on the command line, pandoc will look
|
2018-10-20 07:56:40 +02:00
|
|
|
for a file \f[C]reference.docx\f[R] in the user data directory (see
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]--data-dir\f[R]).
|
2015-07-03 07:09:04 +02:00
|
|
|
If this is not found either, sensible defaults will be used.
|
2016-12-10 11:29:58 +01:00
|
|
|
.RS
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
To produce a custom \f[C]reference.docx\f[R], first get a copy of the
|
|
|
|
default \f[C]reference.docx\f[R]:
|
2019-03-14 04:59:25 +01:00
|
|
|
\f[C]pandoc -o custom-reference.docx --print-default-data-file reference.docx\f[R].
|
2019-01-31 07:00:54 +01:00
|
|
|
Then open \f[C]custom-reference.docx\f[R] in Word, modify the styles as
|
2016-12-10 11:29:58 +01:00
|
|
|
you wish, and save the file.
|
|
|
|
For best results, do not make changes to this file other than modifying
|
2019-01-31 07:00:54 +01:00
|
|
|
the styles used by pandoc:
|
|
|
|
.PP
|
|
|
|
Paragraph styles:
|
|
|
|
.IP \[bu] 2
|
|
|
|
Normal
|
|
|
|
.IP \[bu] 2
|
|
|
|
Body Text
|
|
|
|
.IP \[bu] 2
|
|
|
|
First Paragraph
|
|
|
|
.IP \[bu] 2
|
|
|
|
Compact
|
|
|
|
.IP \[bu] 2
|
|
|
|
Title
|
|
|
|
.IP \[bu] 2
|
|
|
|
Subtitle
|
|
|
|
.IP \[bu] 2
|
|
|
|
Author
|
|
|
|
.IP \[bu] 2
|
|
|
|
Date
|
|
|
|
.IP \[bu] 2
|
|
|
|
Abstract
|
|
|
|
.IP \[bu] 2
|
|
|
|
Bibliography
|
|
|
|
.IP \[bu] 2
|
|
|
|
Heading 1
|
|
|
|
.IP \[bu] 2
|
|
|
|
Heading 2
|
|
|
|
.IP \[bu] 2
|
|
|
|
Heading 3
|
|
|
|
.IP \[bu] 2
|
|
|
|
Heading 4
|
|
|
|
.IP \[bu] 2
|
|
|
|
Heading 5
|
|
|
|
.IP \[bu] 2
|
|
|
|
Heading 6
|
|
|
|
.IP \[bu] 2
|
|
|
|
Heading 7
|
|
|
|
.IP \[bu] 2
|
|
|
|
Heading 8
|
|
|
|
.IP \[bu] 2
|
|
|
|
Heading 9
|
|
|
|
.IP \[bu] 2
|
|
|
|
Block Text
|
|
|
|
.IP \[bu] 2
|
|
|
|
Footnote Text
|
|
|
|
.IP \[bu] 2
|
|
|
|
Definition Term
|
|
|
|
.IP \[bu] 2
|
|
|
|
Definition
|
|
|
|
.IP \[bu] 2
|
|
|
|
Caption
|
|
|
|
.IP \[bu] 2
|
|
|
|
Table Caption
|
|
|
|
.IP \[bu] 2
|
|
|
|
Image Caption
|
|
|
|
.IP \[bu] 2
|
|
|
|
Figure
|
|
|
|
.IP \[bu] 2
|
|
|
|
Captioned Figure
|
|
|
|
.IP \[bu] 2
|
|
|
|
TOC Heading
|
|
|
|
.PP
|
|
|
|
Character styles:
|
|
|
|
.IP \[bu] 2
|
|
|
|
Default Paragraph Font
|
|
|
|
.IP \[bu] 2
|
|
|
|
Body Text Char
|
|
|
|
.IP \[bu] 2
|
|
|
|
Verbatim Char
|
|
|
|
.IP \[bu] 2
|
|
|
|
Footnote Reference
|
|
|
|
.IP \[bu] 2
|
|
|
|
Hyperlink
|
2020-07-24 02:56:12 +02:00
|
|
|
.IP \[bu] 2
|
|
|
|
Section Number
|
2019-01-31 07:00:54 +01:00
|
|
|
.PP
|
|
|
|
Table style:
|
|
|
|
.IP \[bu] 2
|
|
|
|
Table
|
2018-01-18 17:16:08 +01:00
|
|
|
.RE
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
ODT
|
2017-06-04 20:40:09 +02:00
|
|
|
For best results, the reference ODT should be a modified version of an
|
|
|
|
ODT produced using pandoc.
|
|
|
|
The contents of the reference ODT are ignored, but its stylesheets are
|
|
|
|
used in the new ODT.
|
|
|
|
If no reference ODT is specified on the command line, pandoc will look
|
2018-10-20 07:56:40 +02:00
|
|
|
for a file \f[C]reference.odt\f[R] in the user data directory (see
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]--data-dir\f[R]).
|
2017-06-04 20:40:09 +02:00
|
|
|
If this is not found either, sensible defaults will be used.
|
2015-07-03 07:09:04 +02:00
|
|
|
.RS
|
2017-06-04 20:40:09 +02:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
To produce a custom \f[C]reference.odt\f[R], first get a copy of the
|
|
|
|
default \f[C]reference.odt\f[R]:
|
2019-03-14 04:59:25 +01:00
|
|
|
\f[C]pandoc -o custom-reference.odt --print-default-data-file reference.odt\f[R].
|
2019-01-31 07:00:54 +01:00
|
|
|
Then open \f[C]custom-reference.odt\f[R] in LibreOffice, modify the
|
2017-06-04 20:40:09 +02:00
|
|
|
styles as you wish, and save the file.
|
|
|
|
.RE
|
2018-03-03 05:23:53 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
PowerPoint
|
2019-04-06 00:11:08 +02:00
|
|
|
Templates included with Microsoft PowerPoint 2013 (either with
|
|
|
|
\f[C].pptx\f[R] or \f[C].potx\f[R] extension) are known to work, as are
|
|
|
|
most templates derived from these.
|
2018-03-03 05:23:53 +01:00
|
|
|
.RS
|
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
The specific requirement is that the template should begin with the
|
|
|
|
following first four layouts:
|
2018-03-03 05:23:53 +01:00
|
|
|
.IP "1." 3
|
|
|
|
Title Slide
|
|
|
|
.IP "2." 3
|
|
|
|
Title and Content
|
|
|
|
.IP "3." 3
|
|
|
|
Section Header
|
|
|
|
.IP "4." 3
|
|
|
|
Two Content
|
|
|
|
.PP
|
|
|
|
All templates included with a recent version of MS PowerPoint will fit
|
|
|
|
these criteria.
|
2018-10-20 07:56:40 +02:00
|
|
|
(You can click on \f[C]Layout\f[R] under the \f[C]Home\f[R] menu to
|
2018-03-03 05:23:53 +01:00
|
|
|
check.)
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
You can also modify the default \f[C]reference.pptx\f[R]: first run
|
2019-03-14 04:59:25 +01:00
|
|
|
\f[C]pandoc -o custom-reference.pptx --print-default-data-file reference.pptx\f[R],
|
2019-01-31 07:00:54 +01:00
|
|
|
and then modify \f[C]custom-reference.pptx\f[R] in MS PowerPoint (pandoc
|
|
|
|
will use the first four layout slides, as mentioned above).
|
2018-03-03 05:23:53 +01:00
|
|
|
.RE
|
2018-01-18 17:16:08 +01:00
|
|
|
.RE
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--epub-cover-image=\f[B]\f[R]\f[I]FILE\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
Use the specified image as the EPUB cover.
|
|
|
|
It is recommended that the image be less than 1000px in width and
|
|
|
|
height.
|
2015-11-13 04:52:02 +01:00
|
|
|
Note that in a Markdown source document you can also specify
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]cover-image\f[R] in a YAML metadata block (see EPUB Metadata,
|
2015-07-03 07:09:04 +02:00
|
|
|
below).
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--epub-metadata=\f[B]\f[R]\f[I]FILE\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
Look in the specified XML file for metadata for the EPUB.
|
2015-10-11 00:45:50 +02:00
|
|
|
The file should contain a series of Dublin Core elements.
|
2015-07-03 07:09:04 +02:00
|
|
|
For example:
|
|
|
|
.RS
|
2018-01-18 17:16:08 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
<dc:rights>Creative Commons</dc:rights>
|
2019-01-31 07:00:54 +01:00
|
|
|
<dc:language>es-AR</dc:language>
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-01-18 17:16:08 +01:00
|
|
|
.fi
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
By default, pandoc will include the following metadata elements:
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]<dc:title>\f[R] (from the document title), \f[C]<dc:creator>\f[R]
|
|
|
|
(from the document authors), \f[C]<dc:date>\f[R] (from the document
|
|
|
|
date, which should be in ISO 8601 format), \f[C]<dc:language>\f[R] (from
|
|
|
|
the \f[C]lang\f[R] variable, or, if is not set, the locale), and
|
2018-11-02 05:56:41 +01:00
|
|
|
\f[C]<dc:identifier id=\[dq]BookId\[dq]>\f[R] (a randomly generated
|
2018-10-20 07:56:40 +02:00
|
|
|
UUID).
|
2015-07-03 07:09:04 +02:00
|
|
|
Any of these may be overridden by elements in the metadata file.
|
|
|
|
.PP
|
2015-11-13 04:52:02 +01:00
|
|
|
Note: if the source document is Markdown, a YAML metadata block in the
|
2015-07-03 07:09:04 +02:00
|
|
|
document can be used instead.
|
2015-07-21 19:24:59 +02:00
|
|
|
See below under EPUB Metadata.
|
2015-07-03 07:09:04 +02:00
|
|
|
.RE
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--epub-embed-font=\f[B]\f[R]\f[I]FILE\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
Embed the specified font in the EPUB.
|
|
|
|
This option can be repeated to embed multiple fonts.
|
2019-01-31 07:00:54 +01:00
|
|
|
Wildcards can also be used: for example, \f[C]DejaVuSans-*.ttf\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
However, if you use wildcards on the command line, be sure to escape
|
|
|
|
them or put the whole filename in single quotes, to prevent them from
|
|
|
|
being interpreted by the shell.
|
|
|
|
To use the embedded fonts, you will need to add declarations like the
|
2019-01-31 07:00:54 +01:00
|
|
|
following to your CSS (see \f[C]--css\f[R]):
|
2015-07-03 07:09:04 +02:00
|
|
|
.RS
|
2018-01-18 17:16:08 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
\[at]font-face {
|
|
|
|
font-family: DejaVuSans;
|
|
|
|
font-style: normal;
|
|
|
|
font-weight: normal;
|
|
|
|
src:url(\[dq]DejaVuSans-Regular.ttf\[dq]);
|
2018-01-18 17:16:08 +01:00
|
|
|
}
|
2019-01-31 07:00:54 +01:00
|
|
|
\[at]font-face {
|
|
|
|
font-family: DejaVuSans;
|
|
|
|
font-style: normal;
|
|
|
|
font-weight: bold;
|
|
|
|
src:url(\[dq]DejaVuSans-Bold.ttf\[dq]);
|
2018-01-18 17:16:08 +01:00
|
|
|
}
|
2019-01-31 07:00:54 +01:00
|
|
|
\[at]font-face {
|
|
|
|
font-family: DejaVuSans;
|
|
|
|
font-style: italic;
|
|
|
|
font-weight: normal;
|
|
|
|
src:url(\[dq]DejaVuSans-Oblique.ttf\[dq]);
|
2018-01-18 17:16:08 +01:00
|
|
|
}
|
2019-01-31 07:00:54 +01:00
|
|
|
\[at]font-face {
|
|
|
|
font-family: DejaVuSans;
|
|
|
|
font-style: italic;
|
|
|
|
font-weight: bold;
|
|
|
|
src:url(\[dq]DejaVuSans-BoldOblique.ttf\[dq]);
|
2018-01-18 17:16:08 +01:00
|
|
|
}
|
2019-01-31 07:00:54 +01:00
|
|
|
body { font-family: \[dq]DejaVuSans\[dq]; }
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-01-18 17:16:08 +01:00
|
|
|
.fi
|
2015-07-03 07:09:04 +02:00
|
|
|
.RE
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--epub-chapter-level=\f[B]\f[R]\f[I]NUMBER\f[R]
|
2019-04-06 00:11:08 +02:00
|
|
|
Specify the heading level at which to split the EPUB into separate
|
2020-10-11 01:45:02 +02:00
|
|
|
\[lq]chapter\[rq] files.
|
2019-04-06 00:11:08 +02:00
|
|
|
The default is to split into chapters at level-1 headings.
|
2015-07-03 07:09:04 +02:00
|
|
|
This option only affects the internal composition of the EPUB, not the
|
|
|
|
way chapters and sections are displayed to users.
|
|
|
|
Some readers may be slow if the chapter files are too large, so for
|
2019-04-06 00:11:08 +02:00
|
|
|
large documents with few level-1 headings, one might want to use a
|
2015-07-03 07:09:04 +02:00
|
|
|
chapter level of 2 or 3.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--epub-subdirectory=\f[B]\f[R]\f[I]DIRNAME\f[R]
|
2017-10-18 05:30:20 +02:00
|
|
|
Specify the subdirectory in the OCF container that is to hold the
|
2019-01-31 07:00:54 +01:00
|
|
|
EPUB-specific contents.
|
2018-10-20 07:56:40 +02:00
|
|
|
The default is \f[C]EPUB\f[R].
|
2017-10-18 05:30:20 +02:00
|
|
|
To put the EPUB contents in the top level, use an empty string.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--ipynb-output=all|none|best\f[B]\f[R]
|
2019-03-03 18:46:21 +01:00
|
|
|
Determines how ipynb output cells are treated.
|
|
|
|
\f[C]all\f[R] means that all of the data formats included in the
|
|
|
|
original are preserved.
|
|
|
|
\f[C]none\f[R] means that the contents of data cells are omitted.
|
|
|
|
\f[C]best\f[R] causes pandoc to try to pick the richest data block in
|
|
|
|
each output cell that is compatible with the output format.
|
|
|
|
The default is \f[C]best\f[R].
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--pdf-engine=\f[B]\f[R]\f[I]PROGRAM\f[R]
|
2017-10-18 05:30:20 +02:00
|
|
|
Use the specified engine when producing PDF output.
|
2019-03-03 18:46:21 +01:00
|
|
|
Valid values are \f[C]pdflatex\f[R], \f[C]lualatex\f[R],
|
2019-03-14 04:59:25 +01:00
|
|
|
\f[C]xelatex\f[R], \f[C]latexmk\f[R], \f[C]tectonic\f[R],
|
|
|
|
\f[C]wkhtmltopdf\f[R], \f[C]weasyprint\f[R], \f[C]prince\f[R],
|
|
|
|
\f[C]context\f[R], and \f[C]pdfroff\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
If the engine is not in your PATH, the full path of the engine may be
|
|
|
|
specified here.
|
2019-12-05 21:38:42 +01:00
|
|
|
If this option is not specified, pandoc uses the following defaults
|
|
|
|
depending on the output format specified using \f[C]-t/--to\f[R]:
|
|
|
|
.RS
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]-t latex\f[R] or none: \f[C]pdflatex\f[R] (other options:
|
|
|
|
\f[C]xelatex\f[R], \f[C]lualatex\f[R], \f[C]tectonic\f[R],
|
|
|
|
\f[C]latexmk\f[R])
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]-t context\f[R]: \f[C]context\f[R]
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]-t html\f[R]: \f[C]wkhtmltopdf\f[R] (other options:
|
2020-06-29 22:33:57 +02:00
|
|
|
\f[C]prince\f[R], \f[C]weasyprint\f[R]; see print-css.rocks for a good
|
|
|
|
introduction to PDF generation from HTML/CSS.)
|
2019-12-05 21:38:42 +01:00
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]-t ms\f[R]: \f[C]pdfroff\f[R]
|
|
|
|
.RE
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--pdf-engine-opt=\f[B]\f[R]\f[I]STRING\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
Use the given string as a command-line argument to the
|
|
|
|
\f[C]pdf-engine\f[R].
|
2019-03-03 18:46:21 +01:00
|
|
|
For example, to use a persistent directory \f[C]foo\f[R] for
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[C]latexmk\f[R]\[cq]s auxiliary files, use
|
2019-03-03 18:46:21 +01:00
|
|
|
\f[C]--pdf-engine-opt=-outdir=foo\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
Note that no check for duplicate options is done.
|
|
|
|
.SS Citation rendering
|
|
|
|
.TP
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[B]\f[CB]-C\f[B]\f[R], \f[B]\f[CB]--citeproc\f[B]\f[R]
|
|
|
|
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
|
|
|
|
\f[C]--bibliography\f[R] option or the \f[C]bibliography\f[R] field in
|
|
|
|
metadata, or via a \f[C]references\f[R] 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
|
|
|
|
\f[C]--csl\f[R] option or the \f[C]csl\f[R] field in metadata.
|
|
|
|
(If no stylesheet is specified, the \f[C]chicago-author-date\f[R] style
|
|
|
|
will be used by default.) The citation processing transformation may be
|
|
|
|
applied before or after filters or Lua filters (see \f[C]--filter\f[R],
|
|
|
|
\f[C]--lua-filter\f[R]): these transformations are applied in the order
|
|
|
|
they appear on the command line.
|
|
|
|
For more information, see the section on Citations.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--bibliography=\f[B]\f[R]\f[I]FILE\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
Set the \f[C]bibliography\f[R] field in the document\[cq]s metadata to
|
|
|
|
\f[I]FILE\f[R], overriding any value set in the metadata.
|
2018-10-20 07:56:40 +02:00
|
|
|
If you supply this argument multiple times, each \f[I]FILE\f[R] will be
|
2015-07-03 07:09:04 +02:00
|
|
|
added to bibliography.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--csl=\f[B]\f[R]\f[I]FILE\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
Set the \f[C]csl\f[R] field in the document\[cq]s metadata to
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[I]FILE\f[R], overriding any value set in the metadata.
|
2020-10-11 01:45:02 +02:00
|
|
|
(This is equivalent to \f[C]--metadata csl=FILE\f[R].) If \f[I]FILE\f[R]
|
|
|
|
is a URL, it will be fetched via HTTP.
|
|
|
|
If \f[I]FILE\f[R] is not found relative to the working directory, it
|
|
|
|
will be sought in the resource path and finally in the \f[C]csl\f[R]
|
|
|
|
subdirectory of the pandoc user data directory.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--citation-abbreviations=\f[B]\f[R]\f[I]FILE\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
Set the \f[C]citation-abbreviations\f[R] field in the document\[cq]s
|
2018-10-20 07:56:40 +02:00
|
|
|
metadata to \f[I]FILE\f[R], overriding any value set in the metadata.
|
2015-07-03 07:09:04 +02:00
|
|
|
(This is equivalent to
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[C]--metadata citation-abbreviations=FILE\f[R].) If \f[I]FILE\f[R] is
|
|
|
|
a URL, it will be fetched via HTTP.
|
|
|
|
If \f[I]FILE\f[R] is not found relative to the working directory, it
|
|
|
|
will be sought in the resource path and finally in the \f[C]csl\f[R]
|
|
|
|
subdirectory of the pandoc user data directory.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--natbib\f[B]\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Use \f[C]natbib\f[R] for citations in LaTeX output.
|
2020-10-11 01:45:02 +02:00
|
|
|
This option is not for use with the \f[C]--citeproc\f[R] option or with
|
|
|
|
PDF output.
|
2015-07-03 07:09:04 +02:00
|
|
|
It is intended for use in producing a LaTeX file that can be processed
|
2018-10-20 07:56:40 +02:00
|
|
|
with \f[C]bibtex\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--biblatex\f[B]\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Use \f[C]biblatex\f[R] for citations in LaTeX output.
|
2020-10-11 01:45:02 +02:00
|
|
|
This option is not for use with the \f[C]--citeproc\f[R] option or with
|
|
|
|
PDF output.
|
2015-07-03 07:09:04 +02:00
|
|
|
It is intended for use in producing a LaTeX file that can be processed
|
2018-10-20 07:56:40 +02:00
|
|
|
with \f[C]bibtex\f[R] or \f[C]biber\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Math rendering in HTML
|
2017-11-12 00:26:24 +01:00
|
|
|
.PP
|
|
|
|
The default is to render TeX math as far as possible using Unicode
|
|
|
|
characters.
|
2018-10-20 07:56:40 +02:00
|
|
|
Formulas are put inside a \f[C]span\f[R] with
|
|
|
|
\f[C]class=\[dq]math\[dq]\f[R], so that they may be styled differently
|
|
|
|
from the surrounding text if needed.
|
2017-11-12 00:26:24 +01:00
|
|
|
However, this gives acceptable results only for basic math, usually you
|
2019-01-31 07:00:54 +01:00
|
|
|
will want to use \f[C]--mathjax\f[R] or another of the following
|
2017-11-12 00:26:24 +01:00
|
|
|
options.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--mathjax\f[B]\f[R][\f[B]\f[CB]=\f[B]\f[R]\f[I]URL\f[R]]
|
2015-07-03 07:09:04 +02:00
|
|
|
Use MathJax to display embedded TeX math in HTML output.
|
2018-10-20 07:56:40 +02:00
|
|
|
TeX math will be put between \f[C]\[rs](...\[rs])\f[R] (for inline math)
|
|
|
|
or \f[C]\[rs][...\[rs]]\f[R] (for display math) and wrapped in
|
|
|
|
\f[C]<span>\f[R] tags with class \f[C]math\f[R].
|
2017-11-12 00:26:24 +01:00
|
|
|
Then the MathJax JavaScript will render it.
|
2018-10-20 07:56:40 +02:00
|
|
|
The \f[I]URL\f[R] should point to the \f[C]MathJax.js\f[R] load script.
|
|
|
|
If a \f[I]URL\f[R] is not provided, a link to the Cloudflare CDN will be
|
2015-07-03 07:09:04 +02:00
|
|
|
inserted.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--mathml\f[B]\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Convert TeX math to MathML (in \f[C]epub3\f[R], \f[C]docbook4\f[R],
|
|
|
|
\f[C]docbook5\f[R], \f[C]jats\f[R], \f[C]html4\f[R] and
|
|
|
|
\f[C]html5\f[R]).
|
|
|
|
This is the default in \f[C]odt\f[R] output.
|
2019-01-31 07:00:54 +01:00
|
|
|
Note that currently only Firefox and Safari (and select e-book readers)
|
2017-11-12 00:26:24 +01:00
|
|
|
natively support MathML.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--webtex\f[B]\f[R][\f[B]\f[CB]=\f[B]\f[R]\f[I]URL\f[R]]
|
2018-10-20 07:56:40 +02:00
|
|
|
Convert TeX formulas to \f[C]<img>\f[R] tags that link to an external
|
2017-11-12 00:26:24 +01:00
|
|
|
script that converts formulas to images.
|
2019-01-31 07:00:54 +01:00
|
|
|
The formula will be URL-encoded and concatenated with the URL provided.
|
2017-11-12 00:26:24 +01:00
|
|
|
For SVG images you can for example use
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]--webtex https://latex.codecogs.com/svg.latex?\f[R].
|
2017-11-12 00:26:24 +01:00
|
|
|
If no URL is specified, the CodeCogs URL generating PNGs will be used
|
2018-10-20 07:56:40 +02:00
|
|
|
(\f[C]https://latex.codecogs.com/png.latex?\f[R]).
|
2019-01-31 07:00:54 +01:00
|
|
|
Note: the \f[C]--webtex\f[R] option will affect Markdown output as well
|
2020-10-11 01:45:02 +02:00
|
|
|
as HTML, which is useful if you\[cq]re targeting a version of Markdown
|
2019-01-31 07:00:54 +01:00
|
|
|
without native math support.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--katex\f[B]\f[R][\f[B]\f[CB]=\f[B]\f[R]\f[I]URL\f[R]]
|
2015-07-03 07:09:04 +02:00
|
|
|
Use KaTeX to display embedded TeX math in HTML output.
|
2018-10-20 07:56:40 +02:00
|
|
|
The \f[I]URL\f[R] is the base URL for the KaTeX library.
|
|
|
|
That directory should contain a \f[C]katex.min.js\f[R] and a
|
|
|
|
\f[C]katex.min.css\f[R] file.
|
|
|
|
If a \f[I]URL\f[R] is not provided, a link to the KaTeX CDN will be
|
2015-07-03 07:09:04 +02:00
|
|
|
inserted.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--gladtex\f[B]\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Enclose TeX math in \f[C]<eq>\f[R] tags in HTML output.
|
2018-05-09 20:29:20 +02:00
|
|
|
The resulting HTML can then be processed by GladTeX to produce images of
|
|
|
|
the typeset formulas and an HTML file with links to these images.
|
|
|
|
So, the procedure is:
|
|
|
|
.RS
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc -s --gladtex input.md -o myfile.htex
|
|
|
|
gladtex -d myfile-images myfile.htex
|
|
|
|
# produces myfile.html and images in myfile-images
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-05-09 20:29:20 +02:00
|
|
|
.fi
|
|
|
|
.RE
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Options for wrapper scripts
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--dump-args\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
Print information about command-line arguments to \f[I]stdout\f[R], then
|
|
|
|
exit.
|
2015-07-03 07:09:04 +02:00
|
|
|
This option is intended primarily for use in wrapper scripts.
|
|
|
|
The first line of output contains the name of the output file specified
|
2019-01-31 07:00:54 +01:00
|
|
|
with the \f[C]-o\f[R] option, or \f[C]-\f[R] (for \f[I]stdout\f[R]) if
|
2018-10-20 07:56:40 +02:00
|
|
|
no output file was specified.
|
2019-01-31 07:00:54 +01:00
|
|
|
The remaining lines contain the command-line arguments, one per line, in
|
|
|
|
the order they appear.
|
2015-11-13 04:52:02 +01:00
|
|
|
These do not include regular pandoc options and their arguments, but do
|
2019-01-31 07:00:54 +01:00
|
|
|
include any options appearing after a \f[C]--\f[R] separator at the end
|
|
|
|
of the line.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]--ignore-args\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
Ignore command-line arguments (for use in wrapper scripts).
|
2015-11-13 04:52:02 +01:00
|
|
|
Regular pandoc options are not ignored.
|
2015-07-03 07:09:04 +02:00
|
|
|
Thus, for example,
|
|
|
|
.RS
|
2018-01-18 17:16:08 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc --ignore-args -o foo.html -s foo.txt -- -e latin1
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-01-18 17:16:08 +01:00
|
|
|
.fi
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
is equivalent to
|
2018-01-18 17:16:08 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc -o foo.html -s
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-01-18 17:16:08 +01:00
|
|
|
.fi
|
2015-07-03 07:09:04 +02:00
|
|
|
.RE
|
2019-11-16 21:54:19 +01:00
|
|
|
.SH EXIT CODES
|
|
|
|
.PP
|
|
|
|
If pandoc completes successfully, it will return exit code 0.
|
|
|
|
Nonzero exit codes have the following meanings:
|
|
|
|
.PP
|
|
|
|
.TS
|
|
|
|
tab(@);
|
|
|
|
r l.
|
|
|
|
T{
|
|
|
|
Code
|
|
|
|
T}@T{
|
|
|
|
Error
|
|
|
|
T}
|
|
|
|
_
|
|
|
|
T{
|
|
|
|
3
|
|
|
|
T}@T{
|
|
|
|
PandocFailOnWarningError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
4
|
|
|
|
T}@T{
|
|
|
|
PandocAppError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
5
|
|
|
|
T}@T{
|
|
|
|
PandocTemplateError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
6
|
|
|
|
T}@T{
|
|
|
|
PandocOptionError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
21
|
|
|
|
T}@T{
|
|
|
|
PandocUnknownReaderError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
22
|
|
|
|
T}@T{
|
|
|
|
PandocUnknownWriterError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
23
|
|
|
|
T}@T{
|
|
|
|
PandocUnsupportedExtensionError
|
|
|
|
T}
|
|
|
|
T{
|
2020-10-11 01:45:02 +02:00
|
|
|
24
|
|
|
|
T}@T{
|
|
|
|
PandocCiteprocError
|
|
|
|
T}
|
|
|
|
T{
|
2019-11-16 21:54:19 +01:00
|
|
|
31
|
|
|
|
T}@T{
|
|
|
|
PandocEpubSubdirectoryError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
43
|
|
|
|
T}@T{
|
|
|
|
PandocPDFError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
47
|
|
|
|
T}@T{
|
|
|
|
PandocPDFProgramNotFoundError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
61
|
|
|
|
T}@T{
|
|
|
|
PandocHttpError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
62
|
|
|
|
T}@T{
|
|
|
|
PandocShouldNeverHappenError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
63
|
|
|
|
T}@T{
|
|
|
|
PandocSomeError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
64
|
|
|
|
T}@T{
|
|
|
|
PandocParseError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
65
|
|
|
|
T}@T{
|
|
|
|
PandocParsecError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
66
|
|
|
|
T}@T{
|
|
|
|
PandocMakePDFError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
67
|
|
|
|
T}@T{
|
|
|
|
PandocSyntaxMapError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
83
|
|
|
|
T}@T{
|
|
|
|
PandocFilterError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
91
|
|
|
|
T}@T{
|
|
|
|
PandocMacroLoop
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
92
|
|
|
|
T}@T{
|
|
|
|
PandocUTF8DecodingError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
93
|
|
|
|
T}@T{
|
|
|
|
PandocIpynbDecodingError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
97
|
|
|
|
T}@T{
|
|
|
|
PandocCouldNotFindDataFileError
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
99
|
|
|
|
T}@T{
|
|
|
|
PandocResourceNotFound
|
|
|
|
T}
|
|
|
|
.TE
|
|
|
|
.SH DEFAULT FILES
|
|
|
|
.PP
|
|
|
|
The \f[C]--defaults\f[R] option may be used to specify a package of
|
|
|
|
options.
|
|
|
|
Here is a sample defaults file demonstrating all of the fields that may
|
|
|
|
be used:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
from: markdown+emoji
|
|
|
|
# reader: may be used instead of from:
|
|
|
|
to: html5
|
|
|
|
# writer: may be used instead of to:
|
|
|
|
|
|
|
|
# leave blank for output to stdout:
|
|
|
|
output-file:
|
|
|
|
# leave blank for input from stdin, use [] for no input:
|
|
|
|
input-files:
|
|
|
|
- preface.md
|
|
|
|
- content.md
|
|
|
|
# or you may use input-file: with a single value
|
|
|
|
|
|
|
|
template: letter
|
|
|
|
standalone: true
|
|
|
|
self-contained: false
|
|
|
|
|
|
|
|
# note that structured variables may be specified:
|
|
|
|
variables:
|
|
|
|
documentclass: book
|
|
|
|
classoption:
|
|
|
|
- twosides
|
|
|
|
- draft
|
|
|
|
|
|
|
|
# metadata values specified here are parsed as literal
|
|
|
|
# string text, not markdown:
|
|
|
|
metadata:
|
|
|
|
author:
|
|
|
|
- Sam Smith
|
|
|
|
- Julie Liu
|
|
|
|
metadata-files:
|
|
|
|
- boilerplate.yaml
|
|
|
|
# or you may use metadata-file: with a single value
|
|
|
|
|
|
|
|
# Note that these take files, not their contents:
|
|
|
|
include-before-body: []
|
|
|
|
include-after-body: []
|
|
|
|
include-in-header: []
|
|
|
|
resource-path: [\[dq].\[dq]]
|
|
|
|
|
2020-10-11 01:45:02 +02:00
|
|
|
# turn on built-in citation processing. Note that if you need
|
|
|
|
# control over when the citeproc processing is done relative
|
|
|
|
# to other filters, you should instead use \[ga]citeproc\[ga] in the
|
|
|
|
# list of \[ga]filters\[ga] (see below).
|
|
|
|
citeproc: true
|
|
|
|
csl: ieee
|
|
|
|
bibliography:
|
|
|
|
- foobar.bib
|
|
|
|
- barbaz.json
|
|
|
|
|
|
|
|
# Filters will be assumed to be Lua filters if they have
|
2019-11-16 21:54:19 +01:00
|
|
|
# the .lua extension, and json filters otherwise. But
|
2020-10-11 01:45:02 +02:00
|
|
|
# the filter type can also be specified explicitly, as shown.
|
|
|
|
# Filters are run in the order specified.
|
|
|
|
# To include the built-in citeproc filter, use either \[ga]citeproc\[ga]
|
|
|
|
# or \[ga]{type: citeproc}\[ga].
|
2019-11-16 21:54:19 +01:00
|
|
|
filters:
|
|
|
|
- wordcount.lua
|
|
|
|
- type: json
|
|
|
|
path: foo.lua
|
|
|
|
|
|
|
|
file-scope: false
|
|
|
|
|
|
|
|
data-dir:
|
|
|
|
|
|
|
|
# ERROR, WARNING, or INFO
|
|
|
|
verbosity: INFO
|
|
|
|
log-file: log.json
|
|
|
|
|
|
|
|
# citeproc, natbib, or biblatex
|
|
|
|
cite-method: citeproc
|
|
|
|
# part, chapter, section, or default:
|
|
|
|
top-level-division: chapter
|
|
|
|
abbreviations:
|
|
|
|
|
|
|
|
pdf-engine: pdflatex
|
|
|
|
pdf-engine-opts:
|
|
|
|
- \[dq]-shell-escape\[dq]
|
|
|
|
# you may also use pdf-engine-opt: with a single option
|
|
|
|
# pdf-engine-opt: \[dq]-shell-escape\[dq]
|
|
|
|
|
|
|
|
# auto, preserve, or none
|
|
|
|
wrap: auto
|
|
|
|
columns: 78
|
|
|
|
dpi: 72
|
|
|
|
|
|
|
|
extract-media: mediadir
|
|
|
|
|
|
|
|
table-of-contents: true
|
|
|
|
toc-depth: 2
|
|
|
|
number-sections: false
|
|
|
|
# a list of offsets at each heading level
|
|
|
|
number-offset: [0,0,0,0,0,0]
|
|
|
|
# toc: may also be used instead of table-of-contents:
|
|
|
|
shift-heading-level-by: 1
|
|
|
|
section-divs: true
|
|
|
|
identifier-prefix: foo
|
|
|
|
title-prefix: \[dq]\[dq]
|
|
|
|
strip-empty-paragraphs: true
|
|
|
|
# lf, crlf, or native
|
|
|
|
eol: lf
|
|
|
|
strip-comments: false
|
|
|
|
indented-code-classes: []
|
|
|
|
ascii: true
|
|
|
|
default-image-extension: \[dq].jpg\[dq]
|
|
|
|
|
|
|
|
# either a style name of a style definition file:
|
|
|
|
highlight-style: pygments
|
|
|
|
syntax-definitions:
|
|
|
|
- c.xml
|
|
|
|
# or you may use syntax-definition: with a single value
|
|
|
|
listings: false
|
|
|
|
|
|
|
|
reference-doc: myref.docx
|
|
|
|
|
|
|
|
# method is plain, webtex, gladtex, mathml, mathjax, katex
|
|
|
|
# you may specify a url with webtex, mathjax, katex
|
|
|
|
html-math-method:
|
|
|
|
method: mathjax
|
|
|
|
url: \[dq]https://cdn.jsdelivr.net/npm/mathjax\[at]3/es5/tex-mml-chtml.js\[dq]
|
|
|
|
# none, references, or javascript
|
|
|
|
email-obfuscation: javascript
|
|
|
|
|
|
|
|
tab-stop: 8
|
|
|
|
preserve-tabs: true
|
|
|
|
|
|
|
|
incremental: false
|
|
|
|
slide-level: 2
|
|
|
|
|
|
|
|
epub-subdirectory: EPUB
|
|
|
|
epub-metadata: meta.xml
|
|
|
|
epub-fonts:
|
|
|
|
- foobar.otf
|
|
|
|
epub-chapter-level: 1
|
|
|
|
epub-cover-image: cover.jpg
|
|
|
|
|
|
|
|
reference-links: true
|
|
|
|
# block, section, or document
|
|
|
|
reference-location: block
|
|
|
|
atx-headers: false
|
|
|
|
|
|
|
|
# accept, reject, or all
|
|
|
|
track-changes: accept
|
|
|
|
|
|
|
|
html-q-tags: false
|
|
|
|
css:
|
|
|
|
- site.css
|
|
|
|
|
|
|
|
# none, all, or best
|
|
|
|
ipynb-output: best
|
|
|
|
|
|
|
|
# A list of two-element lists
|
|
|
|
request-headers:
|
|
|
|
- [\[dq]User-Agent\[dq], \[dq]Mozilla/5.0\[dq]]
|
|
|
|
|
|
|
|
fail-if-warnings: false
|
|
|
|
dump-args: false
|
|
|
|
ignore-args: false
|
|
|
|
trace: false
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Fields that are omitted will just have their regular default values.
|
|
|
|
So a defaults file can be as simple as one line:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
verbosity: INFO
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Default files can be placed in the \f[C]defaults\f[R] subdirectory of
|
|
|
|
the user data directory and used from any directory.
|
|
|
|
For example, one could create a file specifying defaults for writing
|
|
|
|
letters, save it as \f[C]letter.yaml\f[R] in the \f[C]defaults\f[R]
|
|
|
|
subdirectory of the user data directory, and then invoke these defaults
|
|
|
|
from any directory using \f[C]pandoc --defaults letter\f[R] or
|
|
|
|
\f[C]pandoc -dletter\f[R].
|
|
|
|
.PP
|
|
|
|
When multiple defaults are used, their contents will be combined.
|
|
|
|
.PP
|
|
|
|
Note that, where command-line arguments may be repeated
|
|
|
|
(\f[C]--metadata-file\f[R], \f[C]--css\f[R],
|
|
|
|
\f[C]--include-in-header\f[R], \f[C]--include-before-body\f[R],
|
|
|
|
\f[C]--include-after-body\f[R], \f[C]--variable\f[R],
|
|
|
|
\f[C]--metadata\f[R], \f[C]--syntax-definition\f[R]), the values
|
|
|
|
specified on the command line will combine with values specified in the
|
|
|
|
defaults file, rather than replacing them.
|
2015-07-03 07:09:04 +02:00
|
|
|
.SH TEMPLATES
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
When the \f[C]-s/--standalone\f[R] option is used, pandoc uses a
|
2015-07-03 07:09:04 +02:00
|
|
|
template to add header and footer material that is needed for a
|
2019-01-31 07:00:54 +01:00
|
|
|
self-standing document.
|
2015-07-03 07:09:04 +02:00
|
|
|
To see the default template that is used, just type
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc -D *FORMAT*
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
where \f[I]FORMAT\f[R] is the name of the output format.
|
2019-01-31 07:00:54 +01:00
|
|
|
A custom template can be specified using the \f[C]--template\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
option.
|
|
|
|
You can also override the system default templates for a given output
|
2018-10-20 07:56:40 +02:00
|
|
|
format \f[I]FORMAT\f[R] by putting a file
|
|
|
|
\f[C]templates/default.*FORMAT*\f[R] in the user data directory (see
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]--data-dir\f[R], above).
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[I]Exceptions:\f[R]
|
2016-03-21 23:39:57 +01:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
For \f[C]odt\f[R] output, customize the \f[C]default.opendocument\f[R]
|
2016-03-21 23:39:57 +01:00
|
|
|
template.
|
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
For \f[C]pdf\f[R] output, customize the \f[C]default.latex\f[R] template
|
|
|
|
(or the \f[C]default.context\f[R] template, if you use
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]-t context\f[R], or the \f[C]default.ms\f[R] template, if you use
|
|
|
|
\f[C]-t ms\f[R], or the \f[C]default.html\f[R] template, if you use
|
|
|
|
\f[C]-t html\f[R]).
|
2016-03-21 23:39:57 +01:00
|
|
|
.IP \[bu] 2
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]docx\f[R] and \f[C]pptx\f[R] have no template (however, you can use
|
|
|
|
\f[C]--reference-doc\f[R] to customize the output).
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Templates contain \f[I]variables\f[R], which allow for the inclusion of
|
2015-10-11 00:45:50 +02:00
|
|
|
arbitrary information at any point in the file.
|
2019-01-31 07:00:54 +01:00
|
|
|
They may be set at the command line using the \f[C]-V/--variable\f[R]
|
2018-04-21 06:50:42 +02:00
|
|
|
option.
|
|
|
|
If a variable is not set, pandoc will look for the key in the
|
2020-10-11 01:45:02 +02:00
|
|
|
document\[cq]s metadata, which can be set using either YAML metadata
|
2019-11-16 21:54:19 +01:00
|
|
|
blocks or with the \f[C]-M/--metadata\f[R] option.
|
|
|
|
In addition, some variables are given default values by pandoc.
|
2020-10-11 01:45:02 +02:00
|
|
|
See Variables below for a list of variables used in pandoc\[cq]s default
|
2019-11-16 21:54:19 +01:00
|
|
|
templates.
|
|
|
|
.PP
|
|
|
|
If you use custom templates, you may need to revise them as pandoc
|
|
|
|
changes.
|
|
|
|
We recommend tracking the changes in the default templates, and
|
|
|
|
modifying your custom templates accordingly.
|
|
|
|
An easy way to do this is to fork the pandoc-templates repository and
|
|
|
|
merge in changes after each pandoc release.
|
|
|
|
.SS Template syntax
|
|
|
|
.SS Comments
|
|
|
|
.PP
|
|
|
|
Anything between the sequence \f[C]$--\f[R] and the end of the line will
|
|
|
|
be treated as a comment and omitted from the output.
|
|
|
|
.SS Delimiters
|
|
|
|
.PP
|
|
|
|
To mark variables and control structures in the template, either
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[C]$\f[R]\&...\f[C]$\f[R] or \f[C]${\f[R]\&...\f[C]}\f[R] may be used
|
|
|
|
as delimiters.
|
2019-11-16 21:54:19 +01:00
|
|
|
The styles may also be mixed in the same template, but the opening and
|
|
|
|
closing delimiter must match in each case.
|
|
|
|
The opening delimiter may be followed by one or more spaces or tabs,
|
|
|
|
which will be ignored.
|
|
|
|
The closing delimiter may be followed by one or more spaces or tabs,
|
|
|
|
which will be ignored.
|
|
|
|
.PP
|
|
|
|
To include a literal \f[C]$\f[R] in the document, use \f[C]$$\f[R].
|
|
|
|
.SS Interpolated variables
|
|
|
|
.PP
|
|
|
|
A slot for an interpolated variable is a variable name surrounded by
|
|
|
|
matched delimiters.
|
|
|
|
Variable names must begin with a letter and can contain letters,
|
|
|
|
numbers, \f[C]_\f[R], \f[C]-\f[R], and \f[C].\f[R].
|
|
|
|
The keywords \f[C]it\f[R], \f[C]if\f[R], \f[C]else\f[R],
|
|
|
|
\f[C]endif\f[R], \f[C]for\f[R], \f[C]sep\f[R], and \f[C]endfor\f[R] may
|
|
|
|
not be used as variable names.
|
|
|
|
Examples:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
$foo$
|
|
|
|
$foo.bar.baz$
|
|
|
|
$foo_bar.baz-bim$
|
|
|
|
$ foo $
|
|
|
|
${foo}
|
|
|
|
${foo.bar.baz}
|
|
|
|
${foo_bar.baz-bim}
|
|
|
|
${ foo }
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Variable names with periods are used to get at structured variable
|
|
|
|
values.
|
|
|
|
So, for example, \f[C]employee.salary\f[R] will return the value of the
|
|
|
|
\f[C]salary\f[R] field of the object that is the value of the
|
|
|
|
\f[C]employee\f[R] field.
|
|
|
|
.IP \[bu] 2
|
|
|
|
If the value of the variable is simple value, it will be rendered
|
|
|
|
verbatim.
|
|
|
|
(Note that no escaping is done; the assumption is that the calling
|
|
|
|
program will escape the strings appropriately for the output format.)
|
|
|
|
.IP \[bu] 2
|
|
|
|
If the value is a list, the values will be concatenated.
|
|
|
|
.IP \[bu] 2
|
|
|
|
If the value is a map, the string \f[C]true\f[R] will be rendered.
|
|
|
|
.IP \[bu] 2
|
|
|
|
Every other value will be rendered as the empty string.
|
|
|
|
.SS Conditionals
|
|
|
|
.PP
|
|
|
|
A conditional begins with \f[C]if(variable)\f[R] (enclosed in matched
|
|
|
|
delimiters) and ends with \f[C]endif\f[R] (enclosed in matched
|
|
|
|
delimiters).
|
|
|
|
It may optionally contain an \f[C]else\f[R] (enclosed in matched
|
|
|
|
delimiters).
|
|
|
|
The \f[C]if\f[R] section is used if \f[C]variable\f[R] has a non-empty
|
|
|
|
value, otherwise the \f[C]else\f[R] section is used (if present).
|
|
|
|
Examples:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
$if(foo)$bar$endif$
|
|
|
|
|
|
|
|
$if(foo)$
|
|
|
|
$foo$
|
|
|
|
$endif$
|
|
|
|
|
|
|
|
$if(foo)$
|
|
|
|
part one
|
|
|
|
$else$
|
|
|
|
part two
|
|
|
|
$endif$
|
|
|
|
|
|
|
|
${if(foo)}bar${endif}
|
|
|
|
|
|
|
|
${if(foo)}
|
|
|
|
${foo}
|
|
|
|
${endif}
|
|
|
|
|
|
|
|
${if(foo)}
|
|
|
|
${ foo.bar }
|
|
|
|
${else}
|
|
|
|
no foo!
|
|
|
|
${endif}
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
The keyword \f[C]elseif\f[R] may be used to simplify complex nested
|
|
|
|
conditionals:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
$if(foo)$
|
|
|
|
XXX
|
|
|
|
$elseif(bar)$
|
|
|
|
YYY
|
|
|
|
$else$
|
|
|
|
ZZZ
|
|
|
|
$endif$
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.SS For loops
|
|
|
|
.PP
|
|
|
|
A for loop begins with \f[C]for(variable)\f[R] (enclosed in matched
|
|
|
|
delimiters) and ends with \f[C]endfor\f[R] (enclosed in matched
|
|
|
|
delimiters.
|
|
|
|
.IP \[bu] 2
|
|
|
|
If \f[C]variable\f[R] is an array, the material inside the loop will be
|
|
|
|
evaluated repeatedly, with \f[C]variable\f[R] being set to each value of
|
|
|
|
the array in turn, and concatenated.
|
|
|
|
.IP \[bu] 2
|
2019-11-27 06:18:31 +01:00
|
|
|
If \f[C]variable\f[R] is a map, the material inside will be set to the
|
|
|
|
map.
|
|
|
|
.IP \[bu] 2
|
2019-11-16 21:54:19 +01:00
|
|
|
If the value of the associated variable is not an array or a map, a
|
|
|
|
single iteration will be performed on its value.
|
|
|
|
.PP
|
|
|
|
Examples:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
$for(foo)$$foo$$sep$, $endfor$
|
|
|
|
|
|
|
|
$for(foo)$
|
|
|
|
- $foo.last$, $foo.first$
|
|
|
|
$endfor$
|
|
|
|
|
|
|
|
${ for(foo.bar) }
|
|
|
|
- ${ foo.bar.last }, ${ foo.bar.first }
|
|
|
|
${ endfor }
|
2019-11-27 06:18:31 +01:00
|
|
|
|
|
|
|
$for(mymap)$
|
|
|
|
$it.name$: $it.office$
|
|
|
|
$endfor$
|
2019-11-16 21:54:19 +01:00
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
You may optionally specify a separator between consecutive values using
|
|
|
|
\f[C]sep\f[R] (enclosed in matched delimiters).
|
|
|
|
The material between \f[C]sep\f[R] and the \f[C]endfor\f[R] is the
|
|
|
|
separator.
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
${ for(foo) }${ foo }${ sep }, ${ endfor }
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Instead of using \f[C]variable\f[R] inside the loop, the special
|
|
|
|
anaphoric keyword \f[C]it\f[R] may be used.
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
${ for(foo.bar) }
|
|
|
|
- ${ it.last }, ${ it.first }
|
|
|
|
${ endfor }
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.SS Partials
|
|
|
|
.PP
|
2020-06-29 22:33:57 +02:00
|
|
|
Partials (subtemplates stored in different files) may be included by
|
|
|
|
using the name of the partial, followed by \f[C]()\f[R], for example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
${ styles() }
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Partials will be sought in the directory containing the main template.
|
|
|
|
The file name will be assumed to have the same extension as the main
|
|
|
|
template if it lacks an extension.
|
|
|
|
When calling the partial, the full name including file extension can
|
|
|
|
also be used:
|
2019-11-16 21:54:19 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2020-06-29 22:33:57 +02:00
|
|
|
${ styles.html() }
|
2019-11-16 21:54:19 +01:00
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
2020-06-29 22:33:57 +02:00
|
|
|
(If a partial is not found in the directory of the template, it will
|
|
|
|
also be sought in the \f[C]templates\f[R] subdirectory of the user data
|
|
|
|
directory.)
|
2019-11-16 21:54:19 +01:00
|
|
|
.PP
|
|
|
|
Partials may optionally be applied to variables using a colon:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
${ date:fancy() }
|
|
|
|
|
|
|
|
${ articles:bibentry() }
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
If \f[C]articles\f[R] is an array, this will iterate over its values,
|
|
|
|
applying the partial \f[C]bibentry()\f[R] to each one.
|
|
|
|
So the second example above is equivalent to
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
${ for(articles) }
|
|
|
|
${ it:bibentry() }
|
|
|
|
${ endfor }
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Note that the anaphoric keyword \f[C]it\f[R] must be used when iterating
|
|
|
|
over partials.
|
|
|
|
In the above examples, the \f[C]bibentry\f[R] partial should contain
|
|
|
|
\f[C]it.title\f[R] (and so on) instead of \f[C]articles.title\f[R].
|
|
|
|
.PP
|
|
|
|
Final newlines are omitted from included partials.
|
|
|
|
.PP
|
|
|
|
Partials may include other partials.
|
|
|
|
.PP
|
|
|
|
A separator between values of an array may be specified in square
|
|
|
|
brackets, immediately after the variable name or partial:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
${months[, ]}$
|
|
|
|
|
|
|
|
${articles:bibentry()[; ]$
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
The separator in this case is literal and (unlike with \f[C]sep\f[R] in
|
|
|
|
an explicit \f[C]for\f[R] loop) cannot contain interpolated variables or
|
|
|
|
other template directives.
|
|
|
|
.SS Nesting
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
To ensure that content is \[lq]nested,\[rq] that is, subsequent lines
|
2019-11-16 21:54:19 +01:00
|
|
|
indented, use the \f[C]\[ha]\f[R] directive:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
$item.number$ $\[ha]$$item.description$ ($item.price$)
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
In this example, if \f[C]item.description\f[R] has multiple lines, they
|
|
|
|
will all be indented to line up with the first line:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
00123 A fine bottle of 18-year old
|
|
|
|
Oban whiskey. ($148)
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
To nest multiple lines to the same level, align them with the
|
|
|
|
\f[C]\[ha]\f[R] directive in the template.
|
|
|
|
For example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
$item.number$ $\[ha]$$item.description$ ($item.price$)
|
|
|
|
(Available til $item.sellby$.)
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
will produce
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
00123 A fine bottle of 18-year old
|
|
|
|
Oban whiskey. ($148)
|
|
|
|
(Available til March 30, 2020.)
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
If a variable occurs by itself on a line, preceded by whitespace and not
|
|
|
|
followed by further text or directives on the same line, and the
|
2020-10-11 01:45:02 +02:00
|
|
|
variable\[cq]s value contains multiple lines, it will be nested
|
2019-11-16 21:54:19 +01:00
|
|
|
automatically.
|
|
|
|
.SS Breakable spaces
|
|
|
|
.PP
|
|
|
|
Normally, spaces in the template itself (as opposed to values of the
|
|
|
|
interpolated variables) are not breakable, but they can be made
|
|
|
|
breakable in part of the template by using the \f[C]\[ti]\f[R] keyword
|
|
|
|
(ended with another \f[C]\[ti]\f[R]).
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
$\[ti]$This long line may break if the document is rendered
|
|
|
|
with a short line length.$\[ti]$
|
|
|
|
\f[R]
|
|
|
|
.fi
|
2019-12-12 06:03:29 +01:00
|
|
|
.SS Pipes
|
2019-11-16 21:54:19 +01:00
|
|
|
.PP
|
2019-12-12 06:03:29 +01:00
|
|
|
A pipe transforms the value of a variable or partial.
|
|
|
|
Pipes are specified using a slash (\f[C]/\f[R]) between the variable
|
|
|
|
name (or partial) and the pipe name.
|
2019-11-16 21:54:19 +01:00
|
|
|
Example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
$for(name)$
|
|
|
|
$name/uppercase$
|
|
|
|
$endfor$
|
|
|
|
|
|
|
|
$for(metadata/pairs)$
|
|
|
|
- $it.key$: $it.value$
|
|
|
|
$endfor$
|
2019-11-19 05:13:21 +01:00
|
|
|
|
|
|
|
$employee:name()/uppercase$
|
2019-11-16 21:54:19 +01:00
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
2019-12-12 06:03:29 +01:00
|
|
|
Pipes may be chained:
|
2019-11-16 21:54:19 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
$for(employees/pairs)$
|
|
|
|
$it.key/alpha/uppercase$. $it.name$
|
|
|
|
$endfor$
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
2019-12-12 06:03:29 +01:00
|
|
|
Some pipes take parameters:
|
2019-11-16 21:54:19 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
|----------------------|------------|
|
|
|
|
$for(employee)$
|
|
|
|
$it.name.first/uppercase/left 20 \[dq]| \[dq]$$it.name.salary/right 10 \[dq] | \[dq] \[dq] |\[dq]$
|
|
|
|
$endfor$
|
|
|
|
|----------------------|------------|
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
2019-12-12 06:03:29 +01:00
|
|
|
Currently the following pipes are predefined:
|
2019-11-16 21:54:19 +01:00
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]pairs\f[R]: Converts a map or array to an array of maps, each with
|
|
|
|
\f[C]key\f[R] and \f[C]value\f[R] fields.
|
|
|
|
If the original value was an array, the \f[C]key\f[R] will be the array
|
|
|
|
index, starting with 1.
|
|
|
|
.IP \[bu] 2
|
2019-11-27 06:18:31 +01:00
|
|
|
\f[C]uppercase\f[R]: Converts text to uppercase.
|
2019-11-16 21:54:19 +01:00
|
|
|
.IP \[bu] 2
|
2019-11-27 06:18:31 +01:00
|
|
|
\f[C]lowercase\f[R]: Converts text to lowercase.
|
2019-11-16 21:54:19 +01:00
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]length\f[R]: Returns the length of the value: number of characters
|
|
|
|
for a textual value, number of elements for a map or array.
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]reverse\f[R]: Reverses a textual value or array, and has no effect
|
|
|
|
on other values.
|
|
|
|
.IP \[bu] 2
|
2020-06-29 22:33:57 +02:00
|
|
|
\f[C]first\f[R]: Returns the first value of an array, if applied to a
|
|
|
|
non-empty array; otherwise returns the original value.
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]last\f[R]: Returns the last value of an array, if applied to a
|
|
|
|
non-empty array; otherwise returns the original value.
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]rest\f[R]: Returns all but the first value of an array, if applied
|
|
|
|
to a non-empty array; otherwise returns the original value.
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]allbutlast\f[R]: Returns all but the last value of an array, if
|
|
|
|
applied to a non-empty array; otherwise returns the original value.
|
|
|
|
.IP \[bu] 2
|
2019-11-27 06:18:31 +01:00
|
|
|
\f[C]chomp\f[R]: Removes trailing newlines (and breakable space).
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]nowrap\f[R]: Disables line wrapping on breakable spaces.
|
2019-11-19 05:13:21 +01:00
|
|
|
.IP \[bu] 2
|
2019-11-27 06:18:31 +01:00
|
|
|
\f[C]alpha\f[R]: Converts textual values that can be read as an integer
|
|
|
|
into lowercase alphabetic characters \f[C]a..z\f[R] (mod 26).
|
2019-11-16 21:54:19 +01:00
|
|
|
This can be used to get lettered enumeration from array indices.
|
|
|
|
To get uppercase letters, chain with \f[C]uppercase\f[R].
|
|
|
|
.IP \[bu] 2
|
2019-11-27 06:18:31 +01:00
|
|
|
\f[C]roman\f[R]: Converts textual values that can be read as an integer
|
|
|
|
into lowercase roman numerials.
|
2019-11-16 21:54:19 +01:00
|
|
|
This can be used to get lettered enumeration from array indices.
|
|
|
|
To get uppercase roman, chain with \f[C]uppercase\f[R].
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]left n \[dq]leftborder\[dq] \[dq]rightborder\[dq]\f[R]: Renders a
|
|
|
|
textual value in a block of width \f[C]n\f[R], aligned to the left, with
|
|
|
|
an optional left and right border.
|
|
|
|
Has no effect on other values.
|
|
|
|
This can be used to align material in tables.
|
|
|
|
Widths are positive integers indicating the number of characters.
|
|
|
|
Borders are strings inside double quotes; literal \f[C]\[dq]\f[R] and
|
|
|
|
\f[C]\[rs]\f[R] characters must be backslash-escaped.
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]right n \[dq]leftborder\[dq] \[dq]rightborder\[dq]\f[R]: Renders a
|
|
|
|
textual value in a block of width \f[C]n\f[R], aligned to the right, and
|
|
|
|
has no effect on other values.
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]center n \[dq]leftborder\[dq] \[dq]rightborder\[dq]\f[R]: Renders a
|
|
|
|
textual value in a block of width \f[C]n\f[R], aligned to the center,
|
|
|
|
and has no effect on other values.
|
|
|
|
.SS Variables
|
2019-01-31 07:00:54 +01:00
|
|
|
.SS Metadata variables
|
2017-06-04 20:40:09 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]title\f[B]\f[R], \f[B]\f[CB]author\f[B]\f[R], \f[B]\f[CB]date\f[B]\f[R]
|
2015-10-11 00:45:50 +02:00
|
|
|
allow identification of basic aspects of the document.
|
2015-11-13 04:52:02 +01:00
|
|
|
Included in PDF metadata through LaTeX and ConTeXt.
|
2015-10-11 00:45:50 +02:00
|
|
|
These can be set through a pandoc title block, which allows for multiple
|
|
|
|
authors, or through a YAML metadata block:
|
|
|
|
.RS
|
2018-01-18 17:16:08 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
---
|
2018-01-18 17:16:08 +01:00
|
|
|
author:
|
2019-01-31 07:00:54 +01:00
|
|
|
- Aristotle
|
|
|
|
- Peter Abelard
|
2018-01-18 17:16:08 +01:00
|
|
|
\&...
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-01-18 17:16:08 +01:00
|
|
|
.fi
|
2019-06-12 06:50:10 +02:00
|
|
|
.PP
|
|
|
|
Note that if you just want to set PDF or HTML metadata, without
|
|
|
|
including a title block in the document itself, you can set the
|
|
|
|
\f[C]title-meta\f[R], \f[C]author-meta\f[R], and \f[C]date-meta\f[R]
|
|
|
|
variables.
|
|
|
|
(By default these are set automatically, based on \f[C]title\f[R],
|
|
|
|
\f[C]author\f[R], and \f[C]date\f[R].)
|
2015-10-11 00:45:50 +02:00
|
|
|
.RE
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]subtitle\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
document subtitle, included in HTML, EPUB, LaTeX, ConTeXt, and docx
|
|
|
|
documents
|
2016-03-19 22:14:53 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]abstract\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
document summary, included in LaTeX, ConTeXt, AsciiDoc, and docx
|
|
|
|
documents
|
2015-11-13 04:52:02 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]keywords\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
list of keywords to be included in HTML, PDF, ODT, pptx, docx and
|
|
|
|
AsciiDoc metadata; repeat as for \f[C]author\f[R], above
|
2015-11-13 04:52:02 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]subject\f[B]\f[R]
|
2019-03-03 18:46:21 +01:00
|
|
|
document subject, included in ODT, PDF, docx and pptx metadata
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]description\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
document description, included in ODT, docx and pptx metadata.
|
|
|
|
Some applications show this as \f[C]Comments\f[R] metadata.
|
2016-01-03 00:52:49 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]category\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
document category, included in docx and pptx metadata
|
|
|
|
.PP
|
|
|
|
Additionally, any root-level string metadata, not included in ODT, docx
|
|
|
|
or pptx metadata is added as a \f[I]custom property\f[R].
|
|
|
|
The following YAML metadata block for instance:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
---
|
|
|
|
title: \[aq]This is the title\[aq]
|
|
|
|
subtitle: \[dq]This is the subtitle\[dq]
|
|
|
|
author:
|
|
|
|
- Author One
|
|
|
|
- Author Two
|
|
|
|
description: |
|
|
|
|
This is a long
|
|
|
|
description.
|
|
|
|
|
|
|
|
It consists of two paragraphs
|
|
|
|
\&...
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
will include \f[C]title\f[R], \f[C]author\f[R] and \f[C]description\f[R]
|
|
|
|
as standard document properties and \f[C]subtitle\f[R] as a custom
|
|
|
|
property when converting to docx, ODT or pptx.
|
2015-10-11 00:45:50 +02:00
|
|
|
.SS Language variables
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]lang\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
identifies the main language of the document using IETF language tags
|
|
|
|
(following the BCP 47 standard), such as \f[C]en\f[R] or
|
|
|
|
\f[C]en-GB\f[R].
|
|
|
|
The Language subtag lookup tool can look up or verify these tags.
|
|
|
|
This affects most formats, and controls hyphenation in PDF output when
|
|
|
|
using LaTeX (through \f[C]babel\f[R] and \f[C]polyglossia\f[R]) or
|
|
|
|
ConTeXt.
|
2015-07-03 07:09:04 +02:00
|
|
|
.RS
|
2015-11-13 04:52:02 +01:00
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
Use native pandoc Divs and Spans with the \f[C]lang\f[R] attribute to
|
|
|
|
switch the language:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
---
|
|
|
|
lang: en-GB
|
|
|
|
\&...
|
|
|
|
|
|
|
|
Text in the main document language (British English).
|
|
|
|
|
|
|
|
::: {lang=fr-CA}
|
|
|
|
> Cette citation est \['e]crite en fran\[,c]ais canadien.
|
|
|
|
:::
|
|
|
|
|
|
|
|
More text in English. [\[aq]Zitat auf Deutsch.\[aq]]{lang=de}
|
|
|
|
\f[R]
|
|
|
|
.fi
|
2015-10-11 00:45:50 +02:00
|
|
|
.RE
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]dir\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
the base script direction, either \f[C]rtl\f[R] (right-to-left) or
|
|
|
|
\f[C]ltr\f[R] (left-to-right).
|
2015-10-11 00:45:50 +02:00
|
|
|
.RS
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
For bidirectional documents, native pandoc \f[C]span\f[R]s and
|
|
|
|
\f[C]div\f[R]s with the \f[C]dir\f[R] attribute (value \f[C]rtl\f[R] or
|
|
|
|
\f[C]ltr\f[R]) can be used to override the base direction in some output
|
2015-10-11 00:45:50 +02:00
|
|
|
formats.
|
2020-10-11 01:45:02 +02:00
|
|
|
This may not always be necessary if the final renderer (e.g.\ the
|
|
|
|
browser, when generating HTML) supports the Unicode Bidirectional
|
2015-10-11 00:45:50 +02:00
|
|
|
Algorithm.
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
When using LaTeX for bidirectional documents, only the \f[C]xelatex\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
engine is fully supported (use \f[C]--pdf-engine=xelatex\f[R]).
|
2015-10-11 00:45:50 +02:00
|
|
|
.RE
|
2020-10-11 01:45:02 +02:00
|
|
|
.SS Variables for HTML
|
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]document-css\f[B]\f[R]
|
|
|
|
Enables inclusion of most of the CSS in the \f[C]styles.html\f[R]
|
|
|
|
partial (have a look with
|
|
|
|
\f[C]pandoc --print-default-data-file=templates/styles.html\f[R]).
|
|
|
|
Unless you use \f[C]--css\f[R], this variable is set to \f[C]true\f[R]
|
|
|
|
by default.
|
|
|
|
You can disable it with e.g.\ \f[C]pandoc -M document-css=false\f[R].
|
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]mainfont\f[B]\f[R]
|
|
|
|
sets the CSS \f[C]font-family\f[R] property on the \f[C]html\f[R]
|
|
|
|
element.
|
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]fontsize\f[B]\f[R]
|
|
|
|
sets the base CSS \f[C]font-size\f[R], which you\[cq]d usually set to
|
|
|
|
e.g.\ \f[C]20px\f[R], but it also accepts \f[C]pt\f[R] (12pt = 16px in
|
|
|
|
most browsers).
|
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]fontcolor\f[B]\f[R]
|
|
|
|
sets the CSS \f[C]color\f[R] property on the \f[C]html\f[R] element.
|
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]linkcolor\f[B]\f[R]
|
|
|
|
sets the CSS \f[C]color\f[R] property on all links.
|
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]monofont\f[B]\f[R]
|
|
|
|
sets the CSS \f[C]font-family\f[R] property on \f[C]code\f[R] elements.
|
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]linestretch\f[B]\f[R]
|
|
|
|
sets the CSS \f[C]line-height\f[R] property on the \f[C]html\f[R]
|
|
|
|
element, which is preferred to be unitless.
|
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]backgroundcolor\f[B]\f[R]
|
|
|
|
sets the CSS \f[C]background-color\f[R] property on the \f[C]html\f[R]
|
|
|
|
element.
|
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]margin-left\f[B]\f[R], \f[B]\f[CB]margin-right\f[B]\f[R], \f[B]\f[CB]margin-top\f[B]\f[R], \f[B]\f[CB]margin-bottom\f[B]\f[R]
|
|
|
|
sets the corresponding CSS \f[C]padding\f[R] properties on the
|
|
|
|
\f[C]body\f[R] element.
|
2019-11-16 21:54:19 +01:00
|
|
|
.SS Variables for HTML math
|
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]classoption\f[B]\f[R]
|
|
|
|
when using KaTeX, you can render display math equations flush left using
|
|
|
|
YAML metadata or with \f[C]-M classoption=fleqn\f[R].
|
2019-01-31 07:00:54 +01:00
|
|
|
.SS Variables for HTML slides
|
2015-10-15 05:49:15 +02:00
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
These affect HTML output when [producing slide shows with pandoc].
|
2019-11-16 21:54:19 +01:00
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
All reveal.js configuration options are available as variables.
|
2019-11-16 21:54:19 +01:00
|
|
|
To turn off boolean flags that default to true in reveal.js, use
|
|
|
|
\f[C]0\f[R].
|
2015-10-11 00:45:50 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]revealjs-url\f[B]\f[R]
|
2020-06-29 22:33:57 +02:00
|
|
|
base URL for reveal.js documents (defaults to
|
|
|
|
\f[C]https://unpkg.com/reveal.js\[at]\[ha]4/\f[R])
|
2017-06-04 20:40:09 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]s5-url\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
base URL for S5 documents (defaults to \f[C]s5/default\f[R])
|
2017-06-04 20:40:09 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]slidy-url\f[B]\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
base URL for Slidy documents (defaults to
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]https://www.w3.org/Talks/Tools/Slidy2\f[R])
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]slideous-url\f[B]\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
base URL for Slideous documents (defaults to \f[C]slideous\f[R])
|
2019-12-12 06:03:29 +01:00
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]title-slide-attributes\f[B]\f[R]
|
|
|
|
additional attributes for the title slide of reveal.js slide shows.
|
|
|
|
See background in reveal.js and beamer for an example.
|
2019-01-31 07:00:54 +01:00
|
|
|
.SS Variables for Beamer slides
|
|
|
|
.PP
|
|
|
|
These variables change the appearance of PDF slides using
|
|
|
|
\f[C]beamer\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]aspectratio\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
slide aspect ratio (\f[C]43\f[R] for 4:3 [default], \f[C]169\f[R] for
|
|
|
|
16:9, \f[C]1610\f[R] for 16:10, \f[C]149\f[R] for 14:9, \f[C]141\f[R]
|
|
|
|
for 1.41:1, \f[C]54\f[R] for 5:4, \f[C]32\f[R] for 3:2)
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]beamerarticle\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
produce an article from Beamer slides
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]beameroption\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
add extra beamer option with \f[C]\[rs]setbeameroption{}\f[R]
|
2016-01-03 00:52:49 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]institute\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
author affiliations: can be a list when there are multiple authors
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]logo\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
logo image for slides
|
2016-09-26 14:25:09 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]navigation\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
controls navigation symbols (default is \f[C]empty\f[R] for no
|
|
|
|
navigation symbols; other valid values are \f[C]frame\f[R],
|
|
|
|
\f[C]vertical\f[R], and \f[C]horizontal\f[R])
|
2016-01-03 00:52:49 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]section-titles\f[B]\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
enables \[lq]title pages\[rq] for new sections (default is true)
|
2016-09-26 14:25:09 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]theme\f[B]\f[R], \f[B]\f[CB]colortheme\f[B]\f[R], \f[B]\f[CB]fonttheme\f[B]\f[R], \f[B]\f[CB]innertheme\f[B]\f[R], \f[B]\f[CB]outertheme\f[B]\f[R]
|
2019-11-16 21:54:19 +01:00
|
|
|
beamer themes
|
2016-10-26 22:10:02 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]themeoptions\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
options for LaTeX beamer themes (a list).
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]titlegraphic\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
image for title slide
|
2019-11-16 21:54:19 +01:00
|
|
|
.SS Variables for PowerPoint
|
2019-07-12 18:51:51 +02:00
|
|
|
.PP
|
|
|
|
These variables control the visual aspects of a slide show that are not
|
2019-11-20 18:44:23 +01:00
|
|
|
easily controlled via templates.
|
2019-07-12 18:51:51 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]monofont\f[B]\f[R]
|
2019-07-12 18:51:51 +02:00
|
|
|
font to use for code.
|
2015-10-11 00:45:50 +02:00
|
|
|
.SS Variables for LaTeX
|
2015-10-15 05:49:15 +02:00
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
Pandoc uses these variables when creating a PDF with a LaTeX engine.
|
|
|
|
.SS Layout
|
2015-10-11 00:45:50 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]block-headings\f[B]\f[R]
|
2019-04-06 00:11:08 +02:00
|
|
|
make \f[C]\[rs]paragraph\f[R] and \f[C]\[rs]subparagraph\f[R] (fourth-
|
|
|
|
and fifth-level headings, or fifth- and sixth-level with book classes)
|
|
|
|
free-standing rather than run-in; requires further formatting to
|
|
|
|
distinguish from \f[C]\[rs]subsubsection\f[R] (third- or fourth-level
|
|
|
|
headings).
|
|
|
|
Instead of using this option, KOMA-Script can adjust headings more
|
|
|
|
extensively:
|
|
|
|
.RS
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
---
|
|
|
|
documentclass: scrartcl
|
|
|
|
header-includes: |
|
|
|
|
\[rs]RedeclareSectionCommand[
|
|
|
|
beforeskip=-10pt plus -2pt minus -1pt,
|
|
|
|
afterskip=1sp plus -1sp minus 1sp,
|
|
|
|
font=\[rs]normalfont\[rs]itshape]{paragraph}
|
|
|
|
\[rs]RedeclareSectionCommand[
|
|
|
|
beforeskip=-10pt plus -2pt minus -1pt,
|
|
|
|
afterskip=1sp plus -1sp minus 1sp,
|
|
|
|
font=\[rs]normalfont\[rs]scshape,
|
|
|
|
indent=0pt]{subparagraph}
|
|
|
|
\&...
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.RE
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]classoption\f[B]\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
option for document class, e.g.\ \f[C]oneside\f[R]; repeat for multiple
|
|
|
|
options:
|
2019-04-06 00:11:08 +02:00
|
|
|
.RS
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
---
|
|
|
|
classoption:
|
|
|
|
- twocolumn
|
|
|
|
- landscape
|
|
|
|
\&...
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.RE
|
2015-10-11 00:45:50 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]documentclass\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
document class: usually one of the standard classes, \f[C]article\f[R],
|
2019-04-06 00:11:08 +02:00
|
|
|
\f[C]book\f[R], and \f[C]report\f[R]; the KOMA-Script equivalents,
|
|
|
|
\f[C]scrartcl\f[R], \f[C]scrbook\f[R], and \f[C]scrreprt\f[R], which
|
2019-01-31 07:00:54 +01:00
|
|
|
default to smaller margins; or \f[C]memoir\f[R]
|
2018-04-21 06:50:42 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]geometry\f[B]\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
option for \f[C]geometry\f[R] package, e.g.\ \f[C]margin=1in\f[R];
|
|
|
|
repeat for multiple options:
|
2019-04-06 00:11:08 +02:00
|
|
|
.RS
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
---
|
|
|
|
geometry:
|
|
|
|
- top=30mm
|
|
|
|
- left=20mm
|
|
|
|
- heightrounded
|
|
|
|
\&...
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.RE
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-11-16 21:54:19 +01:00
|
|
|
\f[B]\f[CB]hyperrefoptions\f[B]\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
option for \f[C]hyperref\f[R] package, e.g.\ \f[C]linktoc=all\f[R];
|
|
|
|
repeat for multiple options:
|
2019-11-16 21:54:19 +01:00
|
|
|
.RS
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
---
|
|
|
|
hyperrefoptions:
|
|
|
|
- linktoc=all
|
|
|
|
- pdfwindowui
|
|
|
|
- pdfpagemode=FullScreen
|
|
|
|
\&...
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.RE
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]indent\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
uses document class settings for indentation (the default LaTeX template
|
|
|
|
otherwise removes indentation and adds space between paragraphs)
|
2016-01-03 00:52:49 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]linestretch\f[B]\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
adjusts line spacing using the \f[C]setspace\f[R] package,
|
|
|
|
e.g.\ \f[C]1.25\f[R], \f[C]1.5\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]margin-left\f[B]\f[R], \f[B]\f[CB]margin-right\f[B]\f[R], \f[B]\f[CB]margin-top\f[B]\f[R], \f[B]\f[CB]margin-bottom\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
sets margins if \f[C]geometry\f[R] is not used (otherwise
|
|
|
|
\f[C]geometry\f[R] overrides these)
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]pagestyle\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
control \f[C]\[rs]pagestyle{}\f[R]: the default article class supports
|
|
|
|
\f[C]plain\f[R] (default), \f[C]empty\f[R] (no running heads or page
|
|
|
|
numbers), and \f[C]headings\f[R] (section titles in running heads)
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]papersize\f[B]\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
paper size, e.g.\ \f[C]letter\f[R], \f[C]a4\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]secnumdepth\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
numbering depth for sections (with \f[C]--number-sections\f[R] option or
|
|
|
|
\f[C]numbersections\f[R] variable)
|
|
|
|
.SS Fonts
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]fontenc\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
allows font encoding to be specified through \f[C]fontenc\f[R] package
|
|
|
|
(with \f[C]pdflatex\f[R]); default is \f[C]T1\f[R] (see LaTeX font
|
|
|
|
encodings guide)
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]fontfamily\f[B]\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
font package for use with \f[C]pdflatex\f[R]: TeX Live includes many
|
2015-11-13 04:52:02 +01:00
|
|
|
options, documented in the LaTeX Font Catalogue.
|
2015-10-11 00:45:50 +02:00
|
|
|
The default is Latin Modern.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]fontfamilyoptions\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
options for package used as \f[C]fontfamily\f[R]; repeat for multiple
|
|
|
|
options.
|
|
|
|
For example, to use the Libertine font with proportional lowercase
|
|
|
|
(old-style) figures through the \f[C]libertinus\f[R] package:
|
|
|
|
.RS
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
---
|
|
|
|
fontfamily: libertinus
|
|
|
|
fontfamilyoptions:
|
|
|
|
- osf
|
|
|
|
- p
|
|
|
|
\&...
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.RE
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]fontsize\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
font size for body text.
|
|
|
|
The standard classes allow 10pt, 11pt, and 12pt.
|
|
|
|
To use another size, set \f[C]documentclass\f[R] to one of the
|
|
|
|
KOMA-Script classes, such as \f[C]scrartcl\f[R] or \f[C]scrbook\f[R].
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]mainfont\f[B]\f[R], \f[B]\f[CB]sansfont\f[B]\f[R], \f[B]\f[CB]monofont\f[B]\f[R], \f[B]\f[CB]mathfont\f[B]\f[R], \f[B]\f[CB]CJKmainfont\f[B]\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
font families for use with \f[C]xelatex\f[R] or \f[C]lualatex\f[R]: take
|
|
|
|
the name of any system font, using the \f[C]fontspec\f[R] package.
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]CJKmainfont\f[R] uses the \f[C]xecjk\f[R] package.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]mainfontoptions\f[B]\f[R], \f[B]\f[CB]sansfontoptions\f[B]\f[R], \f[B]\f[CB]monofontoptions\f[B]\f[R], \f[B]\f[CB]mathfontoptions\f[B]\f[R], \f[B]\f[CB]CJKoptions\f[B]\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
options to use with \f[C]mainfont\f[R], \f[C]sansfont\f[R],
|
|
|
|
\f[C]monofont\f[R], \f[C]mathfont\f[R], \f[C]CJKmainfont\f[R] in
|
|
|
|
\f[C]xelatex\f[R] and \f[C]lualatex\f[R].
|
2019-01-31 07:00:54 +01:00
|
|
|
Allow for any choices available through \f[C]fontspec\f[R]; repeat for
|
|
|
|
multiple options.
|
|
|
|
For example, to use the TeX Gyre version of Palatino with lowercase
|
|
|
|
figures:
|
|
|
|
.RS
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
---
|
|
|
|
mainfont: TeX Gyre Pagella
|
|
|
|
mainfontoptions:
|
|
|
|
- Numbers=Lowercase
|
|
|
|
- Numbers=Proportional
|
|
|
|
\&...
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.RE
|
2015-10-15 05:49:15 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]microtypeoptions\f[B]\f[R]
|
2017-01-29 21:19:16 +01:00
|
|
|
options to pass to the microtype package
|
2019-01-31 07:00:54 +01:00
|
|
|
.SS Links
|
2017-01-29 21:19:16 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]colorlinks\f[B]\f[R]
|
2016-01-03 00:52:49 +01:00
|
|
|
add color to link text; automatically enabled if any of
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]linkcolor\f[R], \f[C]filecolor\f[R], \f[C]citecolor\f[R],
|
|
|
|
\f[C]urlcolor\f[R], or \f[C]toccolor\f[R] are set
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]linkcolor\f[B]\f[R], \f[B]\f[CB]filecolor\f[B]\f[R], \f[B]\f[CB]citecolor\f[B]\f[R], \f[B]\f[CB]urlcolor\f[B]\f[R], \f[B]\f[CB]toccolor\f[B]\f[R]
|
2018-09-16 20:18:41 +02:00
|
|
|
color for internal links, external links, citation links, linked URLs,
|
|
|
|
and links in table of contents, respectively: uses options allowed by
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]xcolor\f[R], including the \f[C]dvipsnames\f[R],
|
|
|
|
\f[C]svgnames\f[R], and \f[C]x11names\f[R] lists
|
2015-10-15 05:49:15 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]links-as-notes\f[B]\f[R]
|
2015-11-13 04:52:02 +01:00
|
|
|
causes links to be printed as footnotes
|
2019-01-31 07:00:54 +01:00
|
|
|
.SS Front matter
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]lof\f[B]\f[R], \f[B]\f[CB]lot\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
include list of figures, list of tables
|
2015-10-15 05:49:15 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]thanks\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
contents of acknowledgments footnote after document title
|
2016-01-03 00:52:49 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]toc\f[B]\f[R]
|
2015-11-13 04:52:02 +01:00
|
|
|
include table of contents (can also be set using
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]--toc/--table-of-contents\f[R])
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]toc-depth\f[B]\f[R]
|
2015-11-13 04:52:02 +01:00
|
|
|
level of section to include in table of contents
|
2019-01-31 07:00:54 +01:00
|
|
|
.SS BibLaTeX Bibliographies
|
|
|
|
.PP
|
|
|
|
These variables function when using BibLaTeX for citation rendering.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]biblatexoptions\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
list of options for biblatex
|
2016-07-15 07:57:09 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]biblio-style\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
bibliography style, when used with \f[C]--natbib\f[R] and
|
|
|
|
\f[C]--biblatex\f[R].
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]biblio-title\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
bibliography title, when used with \f[C]--natbib\f[R] and
|
|
|
|
\f[C]--biblatex\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]bibliography\f[B]\f[R]
|
2015-11-13 04:52:02 +01:00
|
|
|
bibliography to use for resolving references
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]natbiboptions\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
list of options for natbib
|
2015-11-13 04:52:02 +01:00
|
|
|
.SS Variables for ConTeXt
|
2019-01-31 07:00:54 +01:00
|
|
|
.PP
|
|
|
|
Pandoc uses these variables when creating a PDF with ConTeXt.
|
2016-01-03 00:52:49 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]fontsize\f[B]\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
font size for body text (e.g.\ \f[C]10pt\f[R], \f[C]12pt\f[R])
|
2015-11-13 04:52:02 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]headertext\f[B]\f[R], \f[B]\f[CB]footertext\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
text to be placed in running header or footer (see ConTeXt Headers and
|
|
|
|
Footers); repeat up to four times for different placement
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]indenting\f[B]\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
controls indentation of paragraphs, e.g.\ \f[C]yes,small,next\f[R] (see
|
|
|
|
ConTeXt Indentation); repeat for multiple options
|
2019-01-31 07:00:54 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]interlinespace\f[B]\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
adjusts line spacing, e.g.\ \f[C]4ex\f[R] (using
|
|
|
|
\f[C]setupinterlinespace\f[R]); repeat for multiple options
|
2019-01-31 07:00:54 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]layout\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
options for page margins and text arrangement (see ConTeXt Layout);
|
|
|
|
repeat for multiple options
|
2015-11-13 04:52:02 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]linkcolor\f[B]\f[R], \f[B]\f[CB]contrastcolor\f[B]\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
color for links outside and inside a page, e.g.\ \f[C]red\f[R],
|
|
|
|
\f[C]blue\f[R] (see ConTeXt Color)
|
2015-11-13 04:52:02 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]linkstyle\f[B]\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
typeface style for links, e.g.\ \f[C]normal\f[R], \f[C]bold\f[R],
|
|
|
|
\f[C]slanted\f[R], \f[C]boldslanted\f[R], \f[C]type\f[R], \f[C]cap\f[R],
|
|
|
|
\f[C]small\f[R]
|
2016-01-03 00:52:49 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]lof\f[B]\f[R], \f[B]\f[CB]lot\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
include list of figures, list of tables
|
2015-11-13 04:52:02 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]mainfont\f[B]\f[R], \f[B]\f[CB]sansfont\f[B]\f[R], \f[B]\f[CB]monofont\f[B]\f[R], \f[B]\f[CB]mathfont\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
font families: take the name of any system font (see ConTeXt Font
|
|
|
|
Switching)
|
2015-11-13 04:52:02 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]margin-left\f[B]\f[R], \f[B]\f[CB]margin-right\f[B]\f[R], \f[B]\f[CB]margin-top\f[B]\f[R], \f[B]\f[CB]margin-bottom\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
sets margins, if \f[C]layout\f[R] is not used (otherwise
|
|
|
|
\f[C]layout\f[R] overrides these)
|
2015-11-13 04:52:02 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]pagenumbering\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
page number style and location (using \f[C]setuppagenumbering\f[R]);
|
|
|
|
repeat for multiple options
|
2015-11-13 04:52:02 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]papersize\f[B]\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
paper size, e.g.\ \f[C]letter\f[R], \f[C]A4\f[R], \f[C]landscape\f[R]
|
|
|
|
(see ConTeXt Paper Setup); repeat for multiple options
|
2018-03-18 17:20:14 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]pdfa\f[B]\f[R]
|
2019-11-16 21:54:19 +01:00
|
|
|
adds to the preamble the setup necessary to generate PDF/A of the type
|
2020-10-11 01:45:02 +02:00
|
|
|
specified, e.g.\ \f[C]1a:2005\f[R], \f[C]2a\f[R].
|
|
|
|
If no type is specified (i.e.\ the value is set to True, by
|
|
|
|
e.g.\ \f[C]--metadata=pdfa\f[R] or \f[C]pdfa: true\f[R] in a YAML
|
|
|
|
metadata block), \f[C]1b:2005\f[R] will be used as default, for reasons
|
|
|
|
of backwards compatibility.
|
2019-11-16 21:54:19 +01:00
|
|
|
Using \f[C]--variable=pdfa\f[R] without specified value is not
|
|
|
|
supported.
|
2018-03-18 17:20:14 +01:00
|
|
|
To successfully generate PDF/A the required ICC color profiles have to
|
|
|
|
be available and the content and all included files (such as images)
|
|
|
|
have to be standard conforming.
|
2019-11-16 21:54:19 +01:00
|
|
|
The ICC profiles and output intent may be specified using the variables
|
|
|
|
\f[C]pdfaiccprofile\f[R] and \f[C]pdfaintent\f[R].
|
2018-03-18 17:20:14 +01:00
|
|
|
See also ConTeXt PDFA for more details.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-11-16 21:54:19 +01:00
|
|
|
\f[B]\f[CB]pdfaiccprofile\f[B]\f[R]
|
|
|
|
when used in conjunction with \f[C]pdfa\f[R], specifies the ICC profile
|
2020-10-11 01:45:02 +02:00
|
|
|
to use in the PDF, e.g.\ \f[C]default.cmyk\f[R].
|
2019-11-16 21:54:19 +01:00
|
|
|
If left unspecified, \f[C]sRGB.icc\f[R] is used as default.
|
|
|
|
May be repeated to include multiple profiles.
|
|
|
|
Note that the profiles have to be available on the system.
|
|
|
|
They can be obtained from ConTeXt ICC Profiles.
|
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]pdfaintent\f[B]\f[R]
|
|
|
|
when used in conjunction with \f[C]pdfa\f[R], specifies the output
|
2020-10-11 01:45:02 +02:00
|
|
|
intent for the colors,
|
|
|
|
e.g.\ \f[C]ISO coated v2 300\[rs]letterpercent\[rs]space (ECI)\f[R] If
|
|
|
|
left unspecified, \f[C]sRGB IEC61966-2.1\f[R] is used as default.
|
2019-11-16 21:54:19 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]toc\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
include table of contents (can also be set using
|
|
|
|
\f[C]--toc/--table-of-contents\f[R])
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]whitespace\f[B]\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
spacing between paragraphs, e.g.\ \f[C]none\f[R], \f[C]small\f[R] (using
|
|
|
|
\f[C]setupwhitespace\f[R])
|
2019-11-16 21:54:19 +01:00
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]includesource\f[B]\f[R]
|
|
|
|
include all source documents as file attachments in the PDF file
|
2019-01-31 07:00:54 +01:00
|
|
|
.SS Variables for \f[C]wkhtmltopdf\f[R]
|
|
|
|
.PP
|
|
|
|
Pandoc uses these variables when creating a PDF with
|
|
|
|
\f[C]wkhtmltopdf\f[R].
|
|
|
|
The \f[C]--css\f[R] option also affects the output.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]footer-html\f[B]\f[R], \f[B]\f[CB]header-html\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
add information to the header and footer
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]margin-left\f[B]\f[R], \f[B]\f[CB]margin-right\f[B]\f[R], \f[B]\f[CB]margin-top\f[B]\f[R], \f[B]\f[CB]margin-bottom\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
set the page margins
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]papersize\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
sets the PDF paper size
|
|
|
|
.SS Variables for man pages
|
2015-10-11 00:45:50 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]adjusting\f[B]\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
adjusts text to left (\f[C]l\f[R]), right (\f[C]r\f[R]), center
|
|
|
|
(\f[C]c\f[R]), or both (\f[C]b\f[R]) margins
|
2015-10-11 00:45:50 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]footer\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
footer in man pages
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]header\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
header in man pages
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]hyphenate\f[B]\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
if \f[C]true\f[R] (the default), hyphenation will be used
|
2017-06-04 20:40:09 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]section\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
section number in man pages
|
|
|
|
.SS Variables for ms
|
2017-06-04 20:40:09 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]fontfamily\f[B]\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
font family (e.g.\ \f[C]T\f[R] or \f[C]P\f[R])
|
2017-06-04 20:40:09 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]indent\f[B]\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
paragraph indent (e.g.\ \f[C]2m\f[R])
|
2019-01-31 07:00:54 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]lineheight\f[B]\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
line height (e.g.\ \f[C]12p\f[R])
|
2019-01-31 07:00:54 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]pointsize\f[B]\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
point size (e.g.\ \f[C]10p\f[R])
|
2019-11-16 21:54:19 +01:00
|
|
|
.SS Variables set automatically
|
2019-01-31 07:00:54 +01:00
|
|
|
.PP
|
|
|
|
Pandoc sets these variables automatically in response to options or
|
|
|
|
document contents; users can also modify them.
|
|
|
|
These vary depending on the output format, and include the following:
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]body\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
body of document
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]date-meta\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
the \f[C]date\f[R] variable converted to ISO 8601 YYYY-MM-DD, included
|
|
|
|
in all HTML based formats (dzslides, epub, html, html4, html5, revealjs,
|
|
|
|
s5, slideous, slidy).
|
|
|
|
The recognized formats for \f[C]date\f[R] are: \f[C]mm/dd/yyyy\f[R],
|
|
|
|
\f[C]mm/dd/yy\f[R], \f[C]yyyy-mm-dd\f[R] (ISO 8601),
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[C]dd MM yyyy\f[R] (e.g.\ either \f[C]02 Apr 2018\f[R] or
|
|
|
|
\f[C]02 April 2018\f[R]), \f[C]MM dd, yyyy\f[R]
|
|
|
|
(e.g.\ \f[C]Apr. 02, 2018\f[R] or
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]April 02, 2018),\f[R]yyyy[mm[dd]]]\f[C](e.g.\f[R]20180402,
|
|
|
|
\f[C]201804\f[R] or \f[C]2018\f[R]).
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]header-includes\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
contents specified by \f[C]-H/--include-in-header\f[R] (may have
|
|
|
|
multiple values)
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]include-before\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
contents specified by \f[C]-B/--include-before-body\f[R] (may have
|
|
|
|
multiple values)
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]include-after\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
contents specified by \f[C]-A/--include-after-body\f[R] (may have
|
|
|
|
multiple values)
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]meta-json\f[B]\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
JSON representation of all of the document\[cq]s metadata.
|
2019-01-31 07:00:54 +01:00
|
|
|
Field values are transformed to the selected output format.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]numbersections\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
non-null value if \f[C]-N/--number-sections\f[R] was specified
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]sourcefile\f[B]\f[R], \f[B]\f[CB]outputfile\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
source and destination filenames, as given on the command line.
|
|
|
|
\f[C]sourcefile\f[R] can also be a list if input comes from multiple
|
|
|
|
files, or empty if input is from stdin.
|
|
|
|
You can use the following snippet in your template to distinguish them:
|
|
|
|
.RS
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
$if(sourcefile)$
|
|
|
|
$for(sourcefile)$
|
|
|
|
$sourcefile$
|
|
|
|
$endfor$
|
|
|
|
$else$
|
|
|
|
(stdin)
|
|
|
|
$endif$
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Similarly, \f[C]outputfile\f[R] can be \f[C]-\f[R] if output goes to the
|
|
|
|
terminal.
|
2019-05-07 18:24:13 +02:00
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
If you need absolute paths, use e.g.\ \f[C]$curdir$/$sourcefile$\f[R].
|
2019-01-31 07:00:54 +01:00
|
|
|
.RE
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]curdir\f[B]\f[R]
|
2019-05-07 18:24:13 +02:00
|
|
|
working directory from which pandoc is run.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]toc\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
non-null value if \f[C]--toc/--table-of-contents\f[R] was specified
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]toc-title\f[B]\f[R]
|
2019-11-27 06:18:31 +01:00
|
|
|
title of table of contents (works only with EPUB, HTML, opendocument,
|
|
|
|
odt, docx, pptx, beamer, LaTeX)
|
2017-12-27 18:53:50 +01:00
|
|
|
.SH EXTENSIONS
|
|
|
|
.PP
|
|
|
|
The behavior of some of the readers and writers can be adjusted by
|
|
|
|
enabling or disabling various extensions.
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
An extension can be enabled by adding \f[C]+EXTENSION\f[R] to the format
|
2019-01-31 07:00:54 +01:00
|
|
|
name and disabled by adding \f[C]-EXTENSION\f[R].
|
|
|
|
For example, \f[C]--from markdown_strict+footnotes\f[R] is strict
|
2017-12-27 18:53:50 +01:00
|
|
|
Markdown with footnotes enabled, while
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[C]--from markdown-footnotes-pipe_tables\f[R] is pandoc\[cq]s Markdown
|
2019-01-31 07:00:54 +01:00
|
|
|
without footnotes or pipe tables.
|
2017-12-27 18:53:50 +01:00
|
|
|
.PP
|
|
|
|
The markdown reader and writer make by far the most use of extensions.
|
|
|
|
Extensions only used by them are therefore covered in the section
|
2020-10-11 01:45:02 +02:00
|
|
|
Pandoc\[cq]s Markdown below (See Markdown variants for
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]commonmark\f[R] and \f[C]gfm\f[R].) In the following, extensions
|
|
|
|
that also work for other formats are covered.
|
2019-01-31 07:00:54 +01:00
|
|
|
.PP
|
|
|
|
Note that markdown extensions added to the \f[C]ipynb\f[R] format affect
|
|
|
|
Markdown cells in Jupyter notebooks (as do command-line options like
|
|
|
|
\f[C]--atx-headers\f[R]).
|
2017-12-27 18:53:50 +01:00
|
|
|
.SS Typography
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]smart\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
Interpret straight quotes as curly quotes, \f[C]---\f[R] as em-dashes,
|
|
|
|
\f[C]--\f[R] as en-dashes, and \f[C]...\f[R] as ellipses.
|
2017-12-27 18:53:50 +01:00
|
|
|
Nonbreaking spaces are inserted after certain abbreviations, such as
|
2020-10-11 01:45:02 +02:00
|
|
|
\[lq]Mr.\[rq]
|
2017-12-27 18:53:50 +01:00
|
|
|
.PP
|
|
|
|
This extension can be enabled/disabled for the following formats:
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
input formats
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]markdown\f[R], \f[C]commonmark\f[R], \f[C]latex\f[R],
|
|
|
|
\f[C]mediawiki\f[R], \f[C]org\f[R], \f[C]rst\f[R], \f[C]twiki\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
output formats
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]markdown\f[R], \f[C]latex\f[R], \f[C]context\f[R], \f[C]rst\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
enabled by default in
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]markdown\f[R], \f[C]latex\f[R], \f[C]context\f[R] (both input and
|
2017-12-27 18:53:50 +01:00
|
|
|
output)
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Note: If you are \f[I]writing\f[R] Markdown, then the \f[C]smart\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
extension has the reverse effect: what would have been curly quotes
|
|
|
|
comes out straight.
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
In LaTeX, \f[C]smart\f[R] means to use the standard TeX ligatures for
|
|
|
|
quotation marks (\f[C]\[ga]\[ga]\f[R] and \f[C]\[aq]\[aq]\f[R] for
|
|
|
|
double quotes, \f[C]\[ga]\f[R] and \f[C]\[aq]\f[R] for single quotes)
|
2019-01-31 07:00:54 +01:00
|
|
|
and dashes (\f[C]--\f[R] for en-dash and \f[C]---\f[R] for em-dash).
|
2018-10-20 07:56:40 +02:00
|
|
|
If \f[C]smart\f[R] is disabled, then in reading LaTeX pandoc will parse
|
2017-12-27 18:53:50 +01:00
|
|
|
these characters literally.
|
2018-10-20 07:56:40 +02:00
|
|
|
In writing LaTeX, enabling \f[C]smart\f[R] tells pandoc to use the
|
|
|
|
ligatures when possible; if \f[C]smart\f[R] is disabled pandoc will use
|
2017-12-27 18:53:50 +01:00
|
|
|
unicode quotation mark and dash characters.
|
2019-04-06 00:11:08 +02:00
|
|
|
.SS Headings and sections
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]auto_identifiers\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
A heading without an explicitly specified identifier will be
|
|
|
|
automatically assigned a unique identifier based on the heading text.
|
2017-12-27 18:53:50 +01:00
|
|
|
.PP
|
|
|
|
This extension can be enabled/disabled for the following formats:
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
input formats
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]markdown\f[R], \f[C]latex\f[R], \f[C]rst\f[R], \f[C]mediawiki\f[R],
|
|
|
|
\f[C]textile\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
output formats
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]markdown\f[R], \f[C]muse\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
enabled by default in
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]markdown\f[R], \f[C]muse\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
The default algorithm used to derive the identifier from the heading
|
|
|
|
text is:
|
2017-12-27 18:53:50 +01:00
|
|
|
.IP \[bu] 2
|
|
|
|
Remove all formatting, links, etc.
|
|
|
|
.IP \[bu] 2
|
|
|
|
Remove all footnotes.
|
|
|
|
.IP \[bu] 2
|
2019-01-31 07:00:54 +01:00
|
|
|
Remove all non-alphanumeric characters, except underscores, hyphens, and
|
|
|
|
periods.
|
2017-12-27 18:53:50 +01:00
|
|
|
.IP \[bu] 2
|
|
|
|
Replace all spaces and newlines with hyphens.
|
|
|
|
.IP \[bu] 2
|
|
|
|
Convert all alphabetic characters to lowercase.
|
|
|
|
.IP \[bu] 2
|
|
|
|
Remove everything up to the first letter (identifiers may not begin with
|
|
|
|
a number or punctuation mark).
|
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
If nothing is left after this, use the identifier \f[C]section\f[R].
|
2017-12-27 18:53:50 +01:00
|
|
|
.PP
|
|
|
|
Thus, for example,
|
|
|
|
.PP
|
|
|
|
.TS
|
|
|
|
tab(@);
|
|
|
|
l l.
|
|
|
|
T{
|
2019-04-06 00:11:08 +02:00
|
|
|
Heading
|
2017-12-27 18:53:50 +01:00
|
|
|
T}@T{
|
|
|
|
Identifier
|
|
|
|
T}
|
|
|
|
_
|
|
|
|
T{
|
2019-04-06 00:11:08 +02:00
|
|
|
\f[C]Heading identifiers in HTML\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
T}@T{
|
2019-04-06 00:11:08 +02:00
|
|
|
\f[C]heading-identifiers-in-html\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
T}
|
|
|
|
T{
|
|
|
|
\f[C]Ma\[^i]tre d\[aq]h\[^o]tel\f[R]
|
|
|
|
T}@T{
|
|
|
|
\f[C]ma\[^i]tre-dh\[^o]tel\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
T}
|
|
|
|
T{
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]*Dogs*?--in *my* house?\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
T}@T{
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]dogs--in-my-house\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
T}
|
|
|
|
T{
|
2018-11-02 05:56:41 +01:00
|
|
|
\f[C][HTML], [S5], or [RTF]?\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
T}@T{
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]html-s5-or-rtf\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
T}
|
|
|
|
T{
|
2018-11-02 05:56:41 +01:00
|
|
|
\f[C]3. Applications\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
T}@T{
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]applications\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
T}
|
|
|
|
T{
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]33\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
T}@T{
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]section\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
T}
|
|
|
|
.TE
|
|
|
|
.PP
|
|
|
|
These rules should, in most cases, allow one to determine the identifier
|
2019-04-06 00:11:08 +02:00
|
|
|
from the heading text.
|
|
|
|
The exception is when several headings have the same text; in this case,
|
2017-12-27 18:53:50 +01:00
|
|
|
the first will get an identifier as described above; the second will get
|
2019-01-31 07:00:54 +01:00
|
|
|
the same identifier with \f[C]-1\f[R] appended; the third with
|
|
|
|
\f[C]-2\f[R]; and so on.
|
2017-12-27 18:53:50 +01:00
|
|
|
.PP
|
2018-11-25 05:40:07 +01:00
|
|
|
(However, a different algorithm is used if
|
|
|
|
\f[C]gfm_auto_identifiers\f[R] is enabled; see below.)
|
|
|
|
.PP
|
2017-12-27 18:53:50 +01:00
|
|
|
These identifiers are used to provide link targets in the table of
|
2019-01-31 07:00:54 +01:00
|
|
|
contents generated by the \f[C]--toc|--table-of-contents\f[R] option.
|
2017-12-27 18:53:50 +01:00
|
|
|
They also make it easy to provide links from one section of a document
|
|
|
|
to another.
|
|
|
|
A link to this section, for example, might look like this:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
See the section on
|
2019-04-06 00:11:08 +02:00
|
|
|
[heading identifiers](#heading-identifiers-in-html-latex-and-context).
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Note, however, that this method of providing links to sections works
|
|
|
|
only in HTML, LaTeX, and ConTeXt formats.
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
If the \f[C]--section-divs\f[R] option is specified, then each section
|
|
|
|
will be wrapped in a \f[C]section\f[R] (or a \f[C]div\f[R], if
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]html4\f[R] was specified), and the identifier will be attached to
|
|
|
|
the enclosing \f[C]<section>\f[R] (or \f[C]<div>\f[R]) tag rather than
|
2019-04-06 00:11:08 +02:00
|
|
|
the heading itself.
|
2017-12-27 18:53:50 +01:00
|
|
|
This allows entire sections to be manipulated using JavaScript or
|
|
|
|
treated differently in CSS.
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]ascii_identifiers\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Causes the identifiers produced by \f[C]auto_identifiers\f[R] to be pure
|
2017-12-27 18:53:50 +01:00
|
|
|
ASCII.
|
2019-01-31 07:00:54 +01:00
|
|
|
Accents are stripped off of accented Latin letters, and non-Latin
|
2017-12-27 18:53:50 +01:00
|
|
|
letters are omitted.
|
2018-11-25 05:40:07 +01:00
|
|
|
.SS Extension: \f[C]gfm_auto_identifiers\f[R]
|
|
|
|
.PP
|
|
|
|
Changes the algorithm used by \f[C]auto_identifiers\f[R] to conform to
|
2020-10-11 01:45:02 +02:00
|
|
|
GitHub\[cq]s method.
|
2019-01-31 07:00:54 +01:00
|
|
|
Spaces are converted to dashes (\f[C]-\f[R]), uppercase characters to
|
|
|
|
lowercase characters, and punctuation characters other than \f[C]-\f[R]
|
2018-11-25 05:40:07 +01:00
|
|
|
and \f[C]_\f[R] are removed.
|
2019-11-16 21:54:19 +01:00
|
|
|
Emojis are replaced by their names.
|
2017-12-27 18:53:50 +01:00
|
|
|
.SS Math Input
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
The extensions \f[C]tex_math_dollars\f[R],
|
|
|
|
\f[C]tex_math_single_backslash\f[R], and
|
|
|
|
\f[C]tex_math_double_backslash\f[R] are described in the section about
|
2020-10-11 01:45:02 +02:00
|
|
|
Pandoc\[cq]s Markdown.
|
2017-12-27 18:53:50 +01:00
|
|
|
.PP
|
|
|
|
However, they can also be used with HTML input.
|
|
|
|
This is handy for reading web pages formatted using MathJax, for
|
|
|
|
example.
|
|
|
|
.SS Raw HTML/TeX
|
|
|
|
.PP
|
2020-07-24 02:56:12 +02:00
|
|
|
The following extensions are described in more detail in their
|
2020-10-11 01:45:02 +02:00
|
|
|
respective sections of Pandoc\[cq]s Markdown:
|
2020-07-24 02:56:12 +02:00
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]raw_html\f[R] allows HTML elements which are not representable in
|
2020-10-11 01:45:02 +02:00
|
|
|
pandoc\[cq]s AST to be parsed as raw HTML.
|
2017-12-27 18:53:50 +01:00
|
|
|
By default, this is disabled for HTML input.
|
2020-07-24 02:56:12 +02:00
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]raw_tex\f[R] allows raw LaTeX, TeX, and ConTeXt to be included in a
|
|
|
|
document.
|
2017-12-27 18:53:50 +01:00
|
|
|
This extension can be enabled/disabled for the following formats (in
|
2018-10-20 07:56:40 +02:00
|
|
|
addition to \f[C]markdown\f[R]):
|
2020-07-24 02:56:12 +02:00
|
|
|
.RS 2
|
2017-12-27 18:53:50 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
input formats
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]latex\f[R], \f[C]org\f[R], \f[C]textile\f[R], \f[C]html\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
(environments, \f[C]\[rs]ref\f[R], and \f[C]\[rs]eqref\f[R] only),
|
|
|
|
\f[C]ipynb\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
output formats
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]textile\f[R], \f[C]commonmark\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
.PP
|
|
|
|
Note: as applied to \f[C]ipynb\f[R], \f[C]raw_html\f[R] and
|
|
|
|
\f[C]raw_tex\f[R] affect not only raw TeX in markdown cells, but data
|
|
|
|
with mime type \f[C]text/html\f[R] in output cells.
|
|
|
|
Since the \f[C]ipynb\f[R] reader attempts to preserve the richest
|
|
|
|
possible outputs when several options are given, you will get best
|
|
|
|
results if you disable \f[C]raw_html\f[R] and \f[C]raw_tex\f[R] when
|
2020-10-11 01:45:02 +02:00
|
|
|
converting to formats like \f[C]docx\f[R] which don\[cq]t allow raw
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]html\f[R] or \f[C]tex\f[R].
|
2020-07-24 02:56:12 +02:00
|
|
|
.RE
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]native_divs\f[R] causes HTML \f[C]div\f[R] elements to be parsed as
|
|
|
|
native pandoc Div blocks.
|
|
|
|
If you want them to be parsed as raw HTML, use
|
|
|
|
\f[C]-f html-native_divs+raw_html\f[R].
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]native_spans\f[R] causes HTML \f[C]span\f[R] elements to be parsed
|
|
|
|
as native pandoc Span inlines.
|
|
|
|
If you want them to be parsed as raw HTML, use
|
|
|
|
\f[C]-f html-native_spans+raw_html\f[R].
|
|
|
|
If you want to drop all \f[C]div\f[R]s and \f[C]span\f[R]s when
|
|
|
|
converting HTML to Markdown, you can use
|
|
|
|
\f[C]pandoc -f html-native_divs-native_spans -t markdown\f[R].
|
2017-12-27 18:53:50 +01:00
|
|
|
.SS Literate Haskell support
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]literate_haskell\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
.PP
|
|
|
|
Treat the document as literate Haskell source.
|
|
|
|
.PP
|
|
|
|
This extension can be enabled/disabled for the following formats:
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
input formats
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]markdown\f[R], \f[C]rst\f[R], \f[C]latex\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
output formats
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]markdown\f[R], \f[C]rst\f[R], \f[C]latex\f[R], \f[C]html\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
If you append \f[C]+lhs\f[R] (or \f[C]+literate_haskell\f[R]) to one of
|
2017-12-27 18:53:50 +01:00
|
|
|
the formats above, pandoc will treat the document as literate Haskell
|
|
|
|
source.
|
|
|
|
This means that
|
|
|
|
.IP \[bu] 2
|
2020-10-11 01:45:02 +02:00
|
|
|
In Markdown input, \[lq]bird track\[rq] sections will be parsed as
|
2018-10-20 07:56:40 +02:00
|
|
|
Haskell code rather than block quotations.
|
|
|
|
Text between \f[C]\[rs]begin{code}\f[R] and \f[C]\[rs]end{code}\f[R]
|
|
|
|
will also be treated as Haskell code.
|
2020-10-11 01:45:02 +02:00
|
|
|
For ATX-style headings the character `=' will be used instead of `#'.
|
2017-12-27 18:53:50 +01:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
In Markdown output, code blocks with classes \f[C]haskell\f[R] and
|
|
|
|
\f[C]literate\f[R] will be rendered using bird tracks, and block
|
2017-12-27 18:53:50 +01:00
|
|
|
quotations will be indented one space, so they will not be treated as
|
|
|
|
Haskell code.
|
2019-04-06 00:11:08 +02:00
|
|
|
In addition, headings will be rendered setext-style (with underlines)
|
2020-10-11 01:45:02 +02:00
|
|
|
rather than ATX-style (with `#' characters).
|
|
|
|
(This is because ghc treats `#' characters in column 1 as introducing
|
|
|
|
line numbers.)
|
2017-12-27 18:53:50 +01:00
|
|
|
.IP \[bu] 2
|
2020-10-11 01:45:02 +02:00
|
|
|
In restructured text input, \[lq]bird track\[rq] sections will be parsed
|
2018-10-20 07:56:40 +02:00
|
|
|
as Haskell code.
|
2017-12-27 18:53:50 +01:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
In restructured text output, code blocks with class \f[C]haskell\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
will be rendered using bird tracks.
|
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
In LaTeX input, text in \f[C]code\f[R] environments will be parsed as
|
2017-12-27 18:53:50 +01:00
|
|
|
Haskell code.
|
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
In LaTeX output, code blocks with class \f[C]haskell\f[R] will be
|
|
|
|
rendered inside \f[C]code\f[R] environments.
|
2017-12-27 18:53:50 +01:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
In HTML output, code blocks with class \f[C]haskell\f[R] will be
|
|
|
|
rendered with class \f[C]literatehaskell\f[R] and bird tracks.
|
2017-12-27 18:53:50 +01:00
|
|
|
.PP
|
|
|
|
Examples:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc -f markdown+lhs -t html
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
reads literate Haskell source formatted with Markdown conventions and
|
|
|
|
writes ordinary HTML (without bird tracks).
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc -f markdown+lhs -t html+lhs
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
writes HTML with the Haskell code in bird tracks, so it can be copied
|
|
|
|
and pasted as literate Haskell source.
|
|
|
|
.PP
|
2018-04-21 06:50:42 +02:00
|
|
|
Note that GHC expects the bird tracks in the first column, so indented
|
2020-10-11 01:45:02 +02:00
|
|
|
literate code blocks (e.g.\ inside an itemized environment) will not be
|
|
|
|
picked up by the Haskell compiler.
|
2017-12-27 18:53:50 +01:00
|
|
|
.SS Other extensions
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]empty_paragraphs\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
.PP
|
|
|
|
Allows empty paragraphs.
|
|
|
|
By default empty paragraphs are omitted.
|
|
|
|
.PP
|
|
|
|
This extension can be enabled/disabled for the following formats:
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
input formats
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]docx\f[R], \f[C]html\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
output formats
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]docx\f[R], \f[C]odt\f[R], \f[C]opendocument\f[R], \f[C]html\f[R]
|
2019-11-16 21:54:19 +01:00
|
|
|
.SS Extension: \f[C]native_numbering\f[R]
|
|
|
|
.PP
|
|
|
|
Enables native numbering of figures and tables.
|
|
|
|
Enumeration starts at 1.
|
|
|
|
.PP
|
|
|
|
This extension can be enabled/disabled for the following formats:
|
|
|
|
.TP
|
|
|
|
output formats
|
|
|
|
\f[C]odt\f[R], \f[C]opendocument\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
.SS Extension: \f[C]styles\f[R]
|
2018-03-03 05:23:53 +01:00
|
|
|
.PP
|
2019-03-03 18:46:21 +01:00
|
|
|
When converting from docx, read all docx styles as divs (for paragraph
|
|
|
|
styles) and spans (for character styles) regardless of whether pandoc
|
|
|
|
understands the meaning of these styles.
|
2018-03-03 05:23:53 +01:00
|
|
|
This can be used with docx custom styles.
|
|
|
|
Disabled by default.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
input formats
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]docx\f[R]
|
|
|
|
.SS Extension: \f[C]amuse\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
In the \f[C]muse\f[R] input format, this enables Text::Amuse extensions
|
2017-12-27 18:53:50 +01:00
|
|
|
to Emacs Muse markup.
|
2020-07-24 02:56:12 +02:00
|
|
|
.SS Extension: \f[C]raw_markdown\f[R]
|
|
|
|
.PP
|
|
|
|
In the \f[C]ipynb\f[R] input format, this causes Markdown cells to be
|
|
|
|
included as raw Markdown blocks (allowing lossless round-tripping)
|
|
|
|
rather than being parsed.
|
2020-10-14 07:47:57 +02:00
|
|
|
Use this only when you are targeting \f[C]ipynb\f[R] or a markdown-based
|
|
|
|
output format.
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]citations\f[R]
|
2017-12-27 18:53:50 +01:00
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
Some aspects of Pandoc\[cq]s Markdown citation syntax are also accepted
|
2018-10-20 07:56:40 +02:00
|
|
|
in \f[C]org\f[R] input.
|
|
|
|
.SS Extension: \f[C]ntb\f[R]
|
2018-01-17 20:06:43 +01:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
In the \f[C]context\f[R] output format this enables the use of Natural
|
2018-01-17 20:06:43 +01:00
|
|
|
Tables (TABLE) instead of the default Extreme Tables (xtables).
|
2019-01-31 07:00:54 +01:00
|
|
|
Natural tables allow more fine-grained global customization but come at
|
2018-01-17 20:06:43 +01:00
|
|
|
a performance penalty compared to extreme tables.
|
2020-10-11 01:45:02 +02:00
|
|
|
.SH PANDOC\[cq]S MARKDOWN
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Pandoc understands an extended and slightly revised version of John
|
2020-10-11 01:45:02 +02:00
|
|
|
Gruber\[cq]s Markdown syntax.
|
2015-07-03 07:09:04 +02:00
|
|
|
This document explains the syntax, noting differences from standard
|
2015-11-13 04:52:02 +01:00
|
|
|
Markdown.
|
2015-07-03 07:09:04 +02:00
|
|
|
Except where noted, these differences can be suppressed by using the
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]markdown_strict\f[R] format instead of \f[C]markdown\f[R].
|
2017-12-27 18:53:50 +01:00
|
|
|
Extensions can be enabled or disabled to specify the behavior more
|
|
|
|
granularly.
|
|
|
|
They are described in the following.
|
|
|
|
See also Extensions above, for extensions that work also on other
|
|
|
|
formats.
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Philosophy
|
|
|
|
.PP
|
|
|
|
Markdown is designed to be easy to write, and, even more importantly,
|
|
|
|
easy to read:
|
|
|
|
.RS
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
A Markdown-formatted document should be publishable as-is, as plain
|
2020-10-11 01:45:02 +02:00
|
|
|
text, without looking like it\[cq]s been marked up with tags or
|
2017-11-12 00:26:24 +01:00
|
|
|
formatting instructions.
|
2020-10-11 01:45:02 +02:00
|
|
|
\[en] John Gruber
|
2015-07-03 07:09:04 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
This principle has guided pandoc\[cq]s decisions in finding syntax for
|
2015-07-03 07:09:04 +02:00
|
|
|
tables, footnotes, and other extensions.
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
There is, however, one respect in which pandoc\[cq]s aims are different
|
2017-11-12 00:26:24 +01:00
|
|
|
from the original aims of Markdown.
|
2015-11-13 04:52:02 +01:00
|
|
|
Whereas Markdown was originally designed with HTML generation in mind,
|
2015-07-03 07:09:04 +02:00
|
|
|
pandoc is designed for multiple output formats.
|
|
|
|
Thus, while pandoc allows the embedding of raw HTML, it discourages it,
|
2019-01-31 07:00:54 +01:00
|
|
|
and provides other, non-HTMLish ways of representing important document
|
2015-07-03 07:09:04 +02:00
|
|
|
elements like definition lists, tables, mathematics, and footnotes.
|
|
|
|
.SS Paragraphs
|
|
|
|
.PP
|
|
|
|
A paragraph is one or more lines of text followed by one or more blank
|
|
|
|
lines.
|
|
|
|
Newlines are treated as spaces, so you can reflow your paragraphs as you
|
|
|
|
like.
|
|
|
|
If you need a hard line break, put two or more spaces at the end of a
|
|
|
|
line.
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]escaped_line_breaks\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
A backslash followed by a newline is also a hard line break.
|
|
|
|
Note: in multiline and grid table cells, this is the only way to create
|
|
|
|
a hard line break, since trailing spaces in the cells are ignored.
|
2019-04-06 00:11:08 +02:00
|
|
|
.SS Headings
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
There are two kinds of headings: Setext and ATX.
|
|
|
|
.SS Setext-style headings
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
A setext-style heading is a line of text \[lq]underlined\[rq] with a row
|
2019-04-06 00:11:08 +02:00
|
|
|
of \f[C]=\f[R] signs (for a level-one heading) or \f[C]-\f[R] signs (for
|
|
|
|
a level-two heading):
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-04-06 00:11:08 +02:00
|
|
|
A level-one heading
|
|
|
|
===================
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2019-04-06 00:11:08 +02:00
|
|
|
A level-two heading
|
|
|
|
-------------------
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
The heading text can contain inline formatting, such as emphasis (see
|
2015-07-21 19:24:59 +02:00
|
|
|
Inline formatting, below).
|
2019-04-06 00:11:08 +02:00
|
|
|
.SS ATX-style headings
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
An ATX-style heading consists of one to six \f[C]#\f[R] signs and a line
|
2018-10-20 07:56:40 +02:00
|
|
|
of text, optionally followed by any number of \f[C]#\f[R] signs.
|
|
|
|
The number of \f[C]#\f[R] signs at the beginning of the line is the
|
2019-04-06 00:11:08 +02:00
|
|
|
heading level:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-04-06 00:11:08 +02:00
|
|
|
## A level-two heading
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2019-04-06 00:11:08 +02:00
|
|
|
### A level-three heading ###
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
As with setext-style headings, the heading text can contain formatting:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-04-06 00:11:08 +02:00
|
|
|
# A level-one heading with a [link](/url) and *emphasis*
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]blank_before_header\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
Standard Markdown syntax does not require a blank line before a heading.
|
2015-07-03 07:09:04 +02:00
|
|
|
Pandoc does require this (except, of course, at the beginning of the
|
|
|
|
document).
|
|
|
|
The reason for the requirement is that it is all too easy for a
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]#\f[R] to end up at the beginning of a line by accident (perhaps
|
2015-07-03 07:09:04 +02:00
|
|
|
through line wrapping).
|
|
|
|
Consider, for example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
I like several of their flavors of ice cream:
|
|
|
|
#22, for example, and #5.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]space_in_atx_header\f[R]
|
2017-06-04 20:40:09 +02:00
|
|
|
.PP
|
|
|
|
Many Markdown implementations do not require a space between the opening
|
2019-04-06 00:11:08 +02:00
|
|
|
\f[C]#\f[R]s of an ATX heading and the heading text, so that
|
|
|
|
\f[C]#5 bolt\f[R] and \f[C]#hashtag\f[R] count as headings.
|
2017-06-04 20:40:09 +02:00
|
|
|
With this extension, pandoc does require the space.
|
2019-04-06 00:11:08 +02:00
|
|
|
.SS Heading identifiers
|
2017-12-27 18:53:50 +01:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
See also the \f[C]auto_identifiers\f[R] extension above.
|
|
|
|
.SS Extension: \f[C]header_attributes\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
Headings can be assigned attributes using this syntax at the end of the
|
|
|
|
line containing the heading text:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
{#identifier .class .class key=value key=value}
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
Thus, for example, the following headings will all be assigned the
|
2018-10-20 07:56:40 +02:00
|
|
|
identifier \f[C]foo\f[R]:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-04-06 00:11:08 +02:00
|
|
|
# My heading {#foo}
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2019-04-06 00:11:08 +02:00
|
|
|
## My heading ## {#foo}
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2019-04-06 00:11:08 +02:00
|
|
|
My other heading {#foo}
|
2019-01-31 07:00:54 +01:00
|
|
|
---------------
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
(This syntax is compatible with PHP Markdown Extra.)
|
|
|
|
.PP
|
|
|
|
Note that although this syntax allows assignment of classes and
|
2020-10-11 01:45:02 +02:00
|
|
|
key/value attributes, writers generally don\[cq]t use all of this
|
2015-07-03 07:09:04 +02:00
|
|
|
information.
|
|
|
|
Identifiers, classes, and key/value attributes are used in HTML and
|
2019-01-31 07:00:54 +01:00
|
|
|
HTML-based formats such as EPUB and slidy.
|
2015-07-03 07:09:04 +02:00
|
|
|
Identifiers are used for labels and link anchors in the LaTeX, ConTeXt,
|
2019-06-12 06:50:10 +02:00
|
|
|
Textile, Jira markup, and AsciiDoc writers.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
Headings with the class \f[C]unnumbered\f[R] will not be numbered, even
|
2019-01-31 07:00:54 +01:00
|
|
|
if \f[C]--number-sections\f[R] is specified.
|
|
|
|
A single hyphen (\f[C]-\f[R]) in an attribute context is equivalent to
|
|
|
|
\f[C].unnumbered\f[R], and preferable in non-English documents.
|
2015-07-03 07:09:04 +02:00
|
|
|
So,
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-04-06 00:11:08 +02:00
|
|
|
# My heading {-}
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
is just the same as
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-04-06 00:11:08 +02:00
|
|
|
# My heading {.unnumbered}
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
2019-11-16 21:54:19 +01:00
|
|
|
.PP
|
|
|
|
If the \f[C]unlisted\f[R] class is present in addition to
|
|
|
|
\f[C]unnumbered\f[R], the heading will not be included in a table of
|
|
|
|
contents.
|
|
|
|
(Currently this feature is only implemented for certain formats: those
|
|
|
|
based on LaTeX and HTML, PowerPoint, and RTF.)
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]implicit_header_references\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
Pandoc behaves as if reference links have been defined for each heading.
|
|
|
|
So, to link to a heading
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-04-06 00:11:08 +02:00
|
|
|
# Heading identifiers in HTML
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
you can simply write
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-04-06 00:11:08 +02:00
|
|
|
[Heading identifiers in HTML]
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
or
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-04-06 00:11:08 +02:00
|
|
|
[Heading identifiers in HTML][]
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
or
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-04-06 00:11:08 +02:00
|
|
|
[the section on heading identifiers][heading identifiers in
|
2016-06-04 16:55:08 +02:00
|
|
|
HTML]
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2016-06-04 16:55:08 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
instead of giving the identifier explicitly:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-04-06 00:11:08 +02:00
|
|
|
[Heading identifiers in HTML](#heading-identifiers-in-html)
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
If there are multiple headings with identical text, the corresponding
|
2015-07-03 07:09:04 +02:00
|
|
|
reference will link to the first one only, and you will need to use
|
|
|
|
explicit links to link to the others, as described above.
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
Like regular reference links, these references are case-insensitive.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Explicit link reference definitions always take priority over implicit
|
2019-04-06 00:11:08 +02:00
|
|
|
heading references.
|
2018-10-20 07:56:40 +02:00
|
|
|
So, in the following example, the link will point to \f[C]bar\f[R], not
|
|
|
|
to \f[C]#foo\f[R]:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
# Foo
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
[foo]: bar
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
See [foo]
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.SS Block quotations
|
|
|
|
.PP
|
|
|
|
Markdown uses email conventions for quoting blocks of text.
|
|
|
|
A block quotation is one or more paragraphs or other block elements
|
2019-04-06 00:11:08 +02:00
|
|
|
(such as lists or headings), with each line preceded by a \f[C]>\f[R]
|
2015-08-14 00:33:19 +02:00
|
|
|
character and an optional space.
|
2018-10-20 07:56:40 +02:00
|
|
|
(The \f[C]>\f[R] need not start at the left margin, but it should not be
|
2015-07-03 07:09:04 +02:00
|
|
|
indented more than three spaces.)
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
> This is a block quote. This
|
|
|
|
> paragraph has two lines.
|
2015-07-03 07:09:04 +02:00
|
|
|
>
|
2018-11-02 05:56:41 +01:00
|
|
|
> 1. This is a list inside a block quote.
|
|
|
|
> 2. Second item.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
A \[lq]lazy\[rq] form, which requires the \f[C]>\f[R] character only on
|
2018-10-20 07:56:40 +02:00
|
|
|
the first line of each block, is also allowed:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
> This is a block quote. This
|
|
|
|
paragraph has two lines.
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
> 1. This is a list inside a block quote.
|
|
|
|
2. Second item.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Among the block elements that can be contained in a block quote are
|
|
|
|
other block quotes.
|
|
|
|
That is, block quotes can be nested:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
> This is a block quote.
|
2015-07-03 07:09:04 +02:00
|
|
|
>
|
2018-11-02 05:56:41 +01:00
|
|
|
> > A block quote within a block quote.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
2015-08-14 00:33:19 +02:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
If the \f[C]>\f[R] character is followed by an optional space, that
|
|
|
|
space will be considered part of the block quote marker and not part of
|
|
|
|
the indentation of the contents.
|
2015-08-14 00:33:19 +02:00
|
|
|
Thus, to put an indented code block in a block quote, you need five
|
2018-10-20 07:56:40 +02:00
|
|
|
spaces after the \f[C]>\f[R]:
|
2015-08-14 00:33:19 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
> code
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-08-14 00:33:19 +02:00
|
|
|
.fi
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]blank_before_blockquote\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2015-11-13 04:52:02 +01:00
|
|
|
Standard Markdown syntax does not require a blank line before a block
|
2015-07-03 07:09:04 +02:00
|
|
|
quote.
|
|
|
|
Pandoc does require this (except, of course, at the beginning of the
|
|
|
|
document).
|
|
|
|
The reason for the requirement is that it is all too easy for a
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]>\f[R] to end up at the beginning of a line by accident (perhaps
|
2015-07-03 07:09:04 +02:00
|
|
|
through line wrapping).
|
2018-10-20 07:56:40 +02:00
|
|
|
So, unless the \f[C]markdown_strict\f[R] format is used, the following
|
2015-07-03 07:09:04 +02:00
|
|
|
does not produce a nested block quote in pandoc:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
> This is a block quote.
|
|
|
|
>> Nested.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.SS Verbatim (code) blocks
|
|
|
|
.SS Indented code blocks
|
|
|
|
.PP
|
|
|
|
A block of text indented four spaces (or one tab) is treated as verbatim
|
|
|
|
text: that is, special characters do not trigger special formatting, and
|
|
|
|
all spaces and line breaks are preserved.
|
|
|
|
For example,
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
if (a > 3) {
|
|
|
|
moveShip(5 * gravity, DOWN);
|
|
|
|
}
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
The initial (four space or one tab) indentation is not considered part
|
|
|
|
of the verbatim text, and is removed in the output.
|
|
|
|
.PP
|
|
|
|
Note: blank lines in the verbatim text need not begin with four spaces.
|
|
|
|
.SS Fenced code blocks
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]fenced_code_blocks\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2015-11-13 04:52:02 +01:00
|
|
|
In addition to standard indented code blocks, pandoc supports
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[I]fenced\f[R] code blocks.
|
|
|
|
These begin with a row of three or more tildes (\f[C]\[ti]\f[R]) and end
|
|
|
|
with a row of tildes that must be at least as long as the starting row.
|
2015-07-03 07:09:04 +02:00
|
|
|
Everything between these lines is treated as code.
|
|
|
|
No indentation is necessary:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-10-20 07:56:40 +02:00
|
|
|
\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]
|
2018-11-02 05:56:41 +01:00
|
|
|
if (a > 3) {
|
|
|
|
moveShip(5 * gravity, DOWN);
|
2015-07-03 07:09:04 +02:00
|
|
|
}
|
2018-10-20 07:56:40 +02:00
|
|
|
\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]
|
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Like regular code blocks, fenced code blocks must be separated from
|
|
|
|
surrounding text by blank lines.
|
|
|
|
.PP
|
|
|
|
If the code itself contains a row of tildes or backticks, just use a
|
|
|
|
longer row of tildes or backticks at the start and end:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-10-20 07:56:40 +02:00
|
|
|
\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]
|
|
|
|
\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]
|
2018-11-02 05:56:41 +01:00
|
|
|
code including tildes
|
2018-10-20 07:56:40 +02:00
|
|
|
\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]
|
|
|
|
\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]
|
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]backtick_code_blocks\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Same as \f[C]fenced_code_blocks\f[R], but uses backticks
|
|
|
|
(\f[C]\[ga]\f[R]) instead of tildes (\f[C]\[ti]\f[R]).
|
|
|
|
.SS Extension: \f[C]fenced_code_attributes\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Optionally, you may attach attributes to fenced or backtick code block
|
|
|
|
using this syntax:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
\[ti]\[ti]\[ti]\[ti] {#mycode .haskell .numberLines startFrom=\[dq]100\[dq]}
|
|
|
|
qsort [] = []
|
|
|
|
qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
|
|
|
|
qsort (filter (>= x) xs)
|
2018-10-20 07:56:40 +02:00
|
|
|
\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]\[ti]
|
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Here \f[C]mycode\f[R] is an identifier, \f[C]haskell\f[R] and
|
|
|
|
\f[C]numberLines\f[R] are classes, and \f[C]startFrom\f[R] is an
|
|
|
|
attribute with value \f[C]100\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
Some output formats can use this information to do syntax highlighting.
|
2017-06-04 20:40:09 +02:00
|
|
|
Currently, the only output formats that uses this information are HTML,
|
2018-03-03 05:23:53 +01:00
|
|
|
LaTeX, Docx, Ms, and PowerPoint.
|
2017-11-12 00:26:24 +01:00
|
|
|
If highlighting is supported for your output format and language, then
|
|
|
|
the code block above will appear highlighted, with numbered lines.
|
2016-11-30 21:03:17 +01:00
|
|
|
(To see which languages are supported, type
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]pandoc --list-highlight-languages\f[R].) Otherwise, the code block
|
|
|
|
above will appear as follows:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
<pre id=\[dq]mycode\[dq] class=\[dq]haskell numberLines\[dq] startFrom=\[dq]100\[dq]>
|
|
|
|
<code>
|
|
|
|
...
|
|
|
|
</code>
|
2015-07-03 07:09:04 +02:00
|
|
|
</pre>
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
The \f[C]numberLines\f[R] (or \f[C]number-lines\f[R]) class will cause
|
2018-10-20 07:56:40 +02:00
|
|
|
the lines of the code block to be numbered, starting with \f[C]1\f[R] or
|
|
|
|
the value of the \f[C]startFrom\f[R] attribute.
|
2019-01-31 07:00:54 +01:00
|
|
|
The \f[C]lineAnchors\f[R] (or \f[C]line-anchors\f[R]) class will cause
|
2017-11-04 23:52:05 +01:00
|
|
|
the lines to be clickable anchors in HTML output.
|
|
|
|
.PP
|
2015-07-03 07:09:04 +02:00
|
|
|
A shortcut form can also be used for specifying the language of the code
|
|
|
|
block:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-10-20 07:56:40 +02:00
|
|
|
\[ga]\[ga]\[ga]haskell
|
2018-11-02 05:56:41 +01:00
|
|
|
qsort [] = []
|
2018-10-20 07:56:40 +02:00
|
|
|
\[ga]\[ga]\[ga]
|
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
This is equivalent to:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
\[ga]\[ga]\[ga] {.haskell}
|
|
|
|
qsort [] = []
|
2018-10-20 07:56:40 +02:00
|
|
|
\[ga]\[ga]\[ga]
|
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
If the \f[C]fenced_code_attributes\f[R] extension is disabled, but input
|
2016-12-10 11:29:58 +01:00
|
|
|
contains class attribute(s) for the code block, the first class
|
|
|
|
attribute will be printed after the opening fence as a bare word.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
To prevent all highlighting, use the \f[C]--no-highlight\f[R] flag.
|
|
|
|
To set the highlighting style, use \f[C]--highlight-style\f[R].
|
2015-07-21 19:24:59 +02:00
|
|
|
For more information on highlighting, see Syntax highlighting, below.
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Line blocks
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]line_blocks\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
A line block is a sequence of lines beginning with a vertical bar
|
2018-10-20 07:56:40 +02:00
|
|
|
(\f[C]|\f[R]) followed by a space.
|
2015-07-03 07:09:04 +02:00
|
|
|
The division into lines will be preserved in the output, as will any
|
2015-11-13 04:52:02 +01:00
|
|
|
leading spaces; otherwise, the lines will be formatted as Markdown.
|
2015-07-03 07:09:04 +02:00
|
|
|
This is useful for verse and addresses:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
| The limerick packs laughs anatomical
|
|
|
|
| In space that is quite economical.
|
|
|
|
| But the good ones I\[aq]ve seen
|
|
|
|
| So seldom are clean
|
|
|
|
| And the clean ones so seldom are comical
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
| 200 Main St.
|
|
|
|
| Berkeley, CA 94718
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
The lines can be hard-wrapped if needed, but the continuation line must
|
2015-07-03 07:09:04 +02:00
|
|
|
begin with a space.
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
| The Right Honorable Most Venerable and Righteous Samuel L.
|
|
|
|
Constable, Jr.
|
|
|
|
| 200 Main St.
|
|
|
|
| Berkeley, CA 94718
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
This syntax is borrowed from reStructuredText.
|
|
|
|
.SS Lists
|
|
|
|
.SS Bullet lists
|
|
|
|
.PP
|
|
|
|
A bullet list is a list of bulleted list items.
|
2018-10-20 07:56:40 +02:00
|
|
|
A bulleted list item begins with a bullet (\f[C]*\f[R], \f[C]+\f[R], or
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]-\f[R]).
|
2015-07-03 07:09:04 +02:00
|
|
|
Here is a simple example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
* one
|
|
|
|
* two
|
|
|
|
* three
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
This will produce a \[lq]compact\[rq] list.
|
|
|
|
If you want a \[lq]loose\[rq] list, in which each item is formatted as a
|
2015-07-03 07:09:04 +02:00
|
|
|
paragraph, put spaces between the items:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
* one
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
* two
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
* three
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
The bullets need not be flush with the left margin; they may be indented
|
|
|
|
one, two, or three spaces.
|
|
|
|
The bullet must be followed by whitespace.
|
|
|
|
.PP
|
|
|
|
List items look best if subsequent lines are flush with the first line
|
|
|
|
(after the bullet):
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
* here is my first
|
|
|
|
list item.
|
|
|
|
* and my second.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
But Markdown also allows a \[lq]lazy\[rq] format:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
* here is my first
|
|
|
|
list item.
|
|
|
|
* and my second.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
2017-10-18 05:30:20 +02:00
|
|
|
.SS Block content in list items
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
A list item may contain multiple paragraphs and other block-level
|
2015-07-03 07:09:04 +02:00
|
|
|
content.
|
|
|
|
However, subsequent paragraphs must be preceded by a blank line and
|
2019-01-31 07:00:54 +01:00
|
|
|
indented to line up with the first non-space content after the list
|
2017-10-18 05:30:20 +02:00
|
|
|
marker.
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
* First paragraph.
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
Continued.
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
* Second paragraph. With a code block, which must be indented
|
|
|
|
eight spaces:
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
{ code }
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2017-10-18 05:30:20 +02:00
|
|
|
Exception: if the list marker is followed by an indented code block,
|
|
|
|
which must begin 5 spaces after the list marker, then subsequent
|
|
|
|
paragraphs must begin two columns after the last character of the list
|
|
|
|
marker:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
* code
|
2017-10-18 05:30:20 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
continuation paragraph
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2017-10-18 05:30:20 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2015-07-03 07:09:04 +02:00
|
|
|
List items may include other lists.
|
|
|
|
In this case the preceding blank line is optional.
|
2019-01-31 07:00:54 +01:00
|
|
|
The nested list must be indented to line up with the first non-space
|
2017-10-18 05:30:20 +02:00
|
|
|
character after the list marker of the containing list item.
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
* fruits
|
|
|
|
+ apples
|
2019-01-31 07:00:54 +01:00
|
|
|
- macintosh
|
|
|
|
- red delicious
|
2018-11-02 05:56:41 +01:00
|
|
|
+ pears
|
|
|
|
+ peaches
|
|
|
|
* vegetables
|
|
|
|
+ broccoli
|
|
|
|
+ chard
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
As noted above, Markdown allows you to write list items
|
2020-10-11 01:45:02 +02:00
|
|
|
\[lq]lazily,\[rq] instead of indenting continuation lines.
|
2015-07-03 07:09:04 +02:00
|
|
|
However, if there are multiple paragraphs or other blocks in a list
|
|
|
|
item, the first line of each must be indented.
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
+ A lazy, lazy, list
|
2015-07-03 07:09:04 +02:00
|
|
|
item.
|
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
+ Another one; this looks
|
|
|
|
bad but is legal.
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
Second paragraph of second
|
|
|
|
list item.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.SS Ordered lists
|
|
|
|
.PP
|
|
|
|
Ordered lists work just like bulleted lists, except that the items begin
|
|
|
|
with enumerators rather than bullets.
|
|
|
|
.PP
|
2015-11-13 04:52:02 +01:00
|
|
|
In standard Markdown, enumerators are decimal numbers followed by a
|
2015-07-03 07:09:04 +02:00
|
|
|
period and a space.
|
|
|
|
The numbers themselves are ignored, so there is no difference between
|
|
|
|
this list:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
1. one
|
|
|
|
2. two
|
|
|
|
3. three
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
and this one:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
5. one
|
|
|
|
7. two
|
|
|
|
1. three
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]fancy_lists\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2015-11-13 04:52:02 +01:00
|
|
|
Unlike standard Markdown, pandoc allows ordered list items to be marked
|
2015-07-03 07:09:04 +02:00
|
|
|
with uppercase and lowercase letters and roman numerals, in addition to
|
2016-12-10 11:29:58 +01:00
|
|
|
Arabic numerals.
|
2015-07-03 07:09:04 +02:00
|
|
|
List markers may be enclosed in parentheses or followed by a single
|
2019-01-31 07:00:54 +01:00
|
|
|
right-parentheses or period.
|
2015-07-03 07:09:04 +02:00
|
|
|
They must be separated from the text that follows by at least one space,
|
|
|
|
and, if the list marker is a capital letter with a period, by at least
|
|
|
|
two spaces.
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
The \f[C]fancy_lists\f[R] extension also allows `\f[C]#\f[R]' to be used
|
|
|
|
as an ordered list marker in place of a numeral:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
#. one
|
|
|
|
#. two
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]startnum\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Pandoc also pays attention to the type of list marker used, and to the
|
|
|
|
starting number, and both of these are preserved where possible in the
|
|
|
|
output format.
|
|
|
|
Thus, the following yields a list with numbers followed by a single
|
|
|
|
parenthesis, starting with 9, and a sublist with lowercase roman
|
|
|
|
numerals:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
9) Ninth
|
|
|
|
10) Tenth
|
|
|
|
11) Eleventh
|
|
|
|
i. subone
|
|
|
|
ii. subtwo
|
|
|
|
iii. subthree
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Pandoc will start a new list each time a different type of list marker
|
|
|
|
is used.
|
|
|
|
So, the following will create three lists:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
(2) Two
|
|
|
|
(5) Three
|
|
|
|
1. Four
|
|
|
|
* Five
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
If default list markers are desired, use \f[C]#.\f[R]:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
#. one
|
|
|
|
#. two
|
|
|
|
#. three
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
2019-01-31 07:00:54 +01:00
|
|
|
.SS Extension: \f[C]task_lists\f[R]
|
|
|
|
.PP
|
|
|
|
Pandoc supports task lists, using the syntax of GitHub-Flavored
|
|
|
|
Markdown.
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
- [ ] an unchecked task list item
|
|
|
|
- [x] checked item
|
|
|
|
\f[R]
|
|
|
|
.fi
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Definition lists
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]definition_lists\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Pandoc supports definition lists, using the syntax of PHP Markdown Extra
|
|
|
|
with some extensions.
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
Term 1
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
: Definition 1
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
Term 2 with *inline markup*
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
: Definition 2
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
{ some code, part of Definition 2 }
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
Third paragraph of definition 2.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Each term must fit on one line, which may optionally be followed by a
|
|
|
|
blank line, and must be followed by one or more definitions.
|
|
|
|
A definition begins with a colon or tilde, which may be indented one or
|
|
|
|
two spaces.
|
|
|
|
.PP
|
|
|
|
A term may have multiple definitions, and each definition may consist of
|
|
|
|
one or more block elements (paragraph, code block, list, etc.), each
|
|
|
|
indented four spaces or one tab stop.
|
|
|
|
The body of the definition (including the first line, aside from the
|
|
|
|
colon or tilde) should be indented four spaces.
|
2020-10-11 01:45:02 +02:00
|
|
|
However, as with other Markdown lists, you can \[lq]lazily\[rq] omit
|
2018-10-20 07:56:40 +02:00
|
|
|
indentation except at the beginning of a paragraph or other block
|
|
|
|
element:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
Term 1
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
: Definition
|
|
|
|
with lazy continuation.
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
Second paragraph of the definition.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
If you leave space before the definition (as in the example above), the
|
|
|
|
text of the definition will be treated as a paragraph.
|
|
|
|
In some output formats, this will mean greater spacing between
|
|
|
|
term/definition pairs.
|
|
|
|
For a more compact definition list, omit the space before the
|
|
|
|
definition:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
Term 1
|
|
|
|
\[ti] Definition 1
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
Term 2
|
|
|
|
\[ti] Definition 2a
|
|
|
|
\[ti] Definition 2b
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Note that space between items in a definition list is required.
|
2020-10-11 01:45:02 +02:00
|
|
|
(A variant that loosens this requirement, but disallows \[lq]lazy\[rq]
|
2018-10-20 07:56:40 +02:00
|
|
|
hard wrapping, can be activated with \f[C]compact_definition_lists\f[R]:
|
2019-01-31 07:00:54 +01:00
|
|
|
see Non-pandoc extensions, below.)
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Numbered example lists
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]example_lists\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
The special list marker \f[C]\[at]\f[R] can be used for sequentially
|
2015-07-03 07:09:04 +02:00
|
|
|
numbered examples.
|
2020-10-11 01:45:02 +02:00
|
|
|
The first list item with a \f[C]\[at]\f[R] marker will be numbered `1',
|
|
|
|
the next `2', and so on, throughout the document.
|
2015-07-03 07:09:04 +02:00
|
|
|
The numbered examples need not occur in a single list; each new list
|
2018-10-20 07:56:40 +02:00
|
|
|
using \f[C]\[at]\f[R] will take up where the last stopped.
|
2015-07-03 07:09:04 +02:00
|
|
|
So, for example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
(\[at]) My first example will be numbered (1).
|
|
|
|
(\[at]) My second example will be numbered (2).
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
Explanation of examples.
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
(\[at]) My third example will be numbered (3).
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Numbered examples can be labeled and referred to elsewhere in the
|
|
|
|
document:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
(\[at]good) This is a good example.
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
As (\[at]good) illustrates, ...
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
The label can be any string of alphanumeric characters, underscores, or
|
|
|
|
hyphens.
|
2017-12-27 18:42:06 +01:00
|
|
|
.PP
|
|
|
|
Note: continuation paragraphs in example lists must always be indented
|
|
|
|
four spaces, regardless of the length of the list marker.
|
2018-10-20 07:56:40 +02:00
|
|
|
That is, example lists always behave as if the \f[C]four_space_rule\f[R]
|
2017-12-27 18:42:06 +01:00
|
|
|
extension is set.
|
|
|
|
This is because example labels tend to be long, and indenting content to
|
2019-01-31 07:00:54 +01:00
|
|
|
the first non-space character after the label would be awkward.
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Ending a list
|
|
|
|
.PP
|
|
|
|
What if you want to put an indented code block after a list?
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
- item one
|
|
|
|
- item two
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
{ my code block }
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2015-11-13 04:52:02 +01:00
|
|
|
Trouble! Here pandoc (like other Markdown implementations) will treat
|
2018-11-02 05:56:41 +01:00
|
|
|
\f[C]{ my code block }\f[R] as the second paragraph of item two, and not
|
|
|
|
as a code block.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
To \[lq]cut off\[rq] the list after item two, you can insert some
|
|
|
|
non-indented content, like an HTML comment, which won\[cq]t produce
|
2018-10-20 07:56:40 +02:00
|
|
|
visible output in any format:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
- item one
|
|
|
|
- item two
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2019-01-31 07:00:54 +01:00
|
|
|
<!-- end of list -->
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
{ my code block }
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
You can use the same trick if you want two consecutive lists instead of
|
|
|
|
one big list:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
1. one
|
|
|
|
2. two
|
|
|
|
3. three
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2019-01-31 07:00:54 +01:00
|
|
|
<!-- -->
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
1. uno
|
|
|
|
2. dos
|
|
|
|
3. tres
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.SS Horizontal rules
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
A line containing a row of three or more \f[C]*\f[R], \f[C]-\f[R], or
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]_\f[R] characters (optionally separated by spaces) produces a
|
2015-07-03 07:09:04 +02:00
|
|
|
horizontal rule:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
* * * *
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2019-01-31 07:00:54 +01:00
|
|
|
---------------
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.SS Tables
|
|
|
|
.PP
|
|
|
|
Four kinds of tables may be used.
|
2019-01-31 07:00:54 +01:00
|
|
|
The first three kinds presuppose the use of a fixed-width font, such as
|
2015-07-03 07:09:04 +02:00
|
|
|
Courier.
|
|
|
|
The fourth kind can be used with proportionally spaced fonts, as it does
|
|
|
|
not require lining up columns.
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]table_captions\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
A caption may optionally be provided with all 4 kinds of tables (as
|
|
|
|
illustrated in the examples below).
|
2018-10-20 07:56:40 +02:00
|
|
|
A caption is a paragraph beginning with the string \f[C]Table:\f[R] (or
|
|
|
|
just \f[C]:\f[R]), which will be stripped off.
|
2015-07-03 07:09:04 +02:00
|
|
|
It may appear either before or after the table.
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]simple_tables\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Simple tables look like this:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
Right Left Center Default
|
2019-01-31 07:00:54 +01:00
|
|
|
------- ------ ---------- -------
|
2018-11-02 05:56:41 +01:00
|
|
|
12 12 12 12
|
|
|
|
123 123 123 123
|
|
|
|
1 1 1 1
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
Table: Demonstration of simple table syntax.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
The header and table rows must each fit on one line.
|
2015-07-03 07:09:04 +02:00
|
|
|
Column alignments are determined by the position of the header text
|
|
|
|
relative to the dashed line below it:
|
|
|
|
.IP \[bu] 2
|
|
|
|
If the dashed line is flush with the header text on the right side but
|
2019-01-31 07:00:54 +01:00
|
|
|
extends beyond it on the left, the column is right-aligned.
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP \[bu] 2
|
|
|
|
If the dashed line is flush with the header text on the left side but
|
2019-01-31 07:00:54 +01:00
|
|
|
extends beyond it on the right, the column is left-aligned.
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP \[bu] 2
|
|
|
|
If the dashed line extends beyond the header text on both sides, the
|
|
|
|
column is centered.
|
|
|
|
.IP \[bu] 2
|
|
|
|
If the dashed line is flush with the header text on both sides, the
|
|
|
|
default alignment is used (in most cases, this will be left).
|
|
|
|
.PP
|
|
|
|
The table must end with a blank line, or a line of dashes followed by a
|
|
|
|
blank line.
|
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
The column header row may be omitted, provided a dashed line is used to
|
|
|
|
end the table.
|
2015-07-03 07:09:04 +02:00
|
|
|
For example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
------- ------ ---------- -------
|
2018-11-02 05:56:41 +01:00
|
|
|
12 12 12 12
|
|
|
|
123 123 123 123
|
|
|
|
1 1 1 1
|
2019-01-31 07:00:54 +01:00
|
|
|
------- ------ ---------- -------
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
When the header row is omitted, column alignments are determined on the
|
|
|
|
basis of the first line of the table body.
|
2015-07-03 07:09:04 +02:00
|
|
|
So, in the tables above, the columns would be right, left, center, and
|
|
|
|
right aligned, respectively.
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]multiline_tables\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
Multiline tables allow header and table rows to span multiple lines of
|
2015-07-03 07:09:04 +02:00
|
|
|
text (but cells that span multiple columns or rows of the table are not
|
|
|
|
supported).
|
|
|
|
Here is an example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
-------------------------------------------------------------
|
2018-11-02 05:56:41 +01:00
|
|
|
Centered Default Right Left
|
|
|
|
Header Aligned Aligned Aligned
|
2019-01-31 07:00:54 +01:00
|
|
|
----------- ------- --------------- -------------------------
|
2018-11-02 05:56:41 +01:00
|
|
|
First row 12.0 Example of a row that
|
|
|
|
spans multiple lines.
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
Second row 5.0 Here\[aq]s another one. Note
|
|
|
|
the blank line between
|
|
|
|
rows.
|
2019-01-31 07:00:54 +01:00
|
|
|
-------------------------------------------------------------
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
Table: Here\[aq]s the caption. It, too, may span
|
|
|
|
multiple lines.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
These work like simple tables, but with the following differences:
|
|
|
|
.IP \[bu] 2
|
|
|
|
They must begin with a row of dashes, before the header text (unless the
|
2019-04-06 00:11:08 +02:00
|
|
|
header row is omitted).
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP \[bu] 2
|
|
|
|
They must end with a row of dashes, then a blank line.
|
|
|
|
.IP \[bu] 2
|
|
|
|
The rows must be separated by blank lines.
|
|
|
|
.PP
|
|
|
|
In multiline tables, the table parser pays attention to the widths of
|
|
|
|
the columns, and the writers try to reproduce these relative widths in
|
|
|
|
the output.
|
|
|
|
So, if you find that one of the columns is too narrow in the output, try
|
2015-11-13 04:52:02 +01:00
|
|
|
widening it in the Markdown source.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
The header may be omitted in multiline tables as well as simple tables:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
----------- ------- --------------- -------------------------
|
2018-11-02 05:56:41 +01:00
|
|
|
First row 12.0 Example of a row that
|
|
|
|
spans multiple lines.
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
Second row 5.0 Here\[aq]s another one. Note
|
|
|
|
the blank line between
|
|
|
|
rows.
|
2019-01-31 07:00:54 +01:00
|
|
|
----------- ------- --------------- -------------------------
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2019-04-06 00:11:08 +02:00
|
|
|
: Here\[aq]s a multiline table without a header.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
It is possible for a multiline table to have just one row, but the row
|
|
|
|
should be followed by a blank line (and then the row of dashes that ends
|
|
|
|
the table), or the table may be interpreted as a simple table.
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]grid_tables\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Grid tables look like this:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
: Sample grid table.
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2019-01-31 07:00:54 +01:00
|
|
|
+---------------+---------------+--------------------+
|
2018-11-02 05:56:41 +01:00
|
|
|
| Fruit | Price | Advantages |
|
2015-07-03 07:09:04 +02:00
|
|
|
+===============+===============+====================+
|
2019-01-31 07:00:54 +01:00
|
|
|
| Bananas | $1.34 | - built-in wrapper |
|
|
|
|
| | | - bright color |
|
|
|
|
+---------------+---------------+--------------------+
|
|
|
|
| Oranges | $2.10 | - cures scurvy |
|
|
|
|
| | | - tasty |
|
|
|
|
+---------------+---------------+--------------------+
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
The row of \f[C]=\f[R]s separates the header from the table body, and
|
|
|
|
can be omitted for a headerless table.
|
2015-07-03 07:09:04 +02:00
|
|
|
The cells of grid tables may contain arbitrary block elements (multiple
|
|
|
|
paragraphs, code blocks, lists, etc.).
|
2016-11-30 21:03:17 +01:00
|
|
|
Cells that span multiple columns or rows are not supported.
|
2020-10-11 01:45:02 +02:00
|
|
|
Grid tables can be created easily using Emacs\[cq] table-mode
|
2019-11-16 21:54:19 +01:00
|
|
|
(\f[C]M-x table-insert\f[R]).
|
2016-11-30 21:03:17 +01:00
|
|
|
.PP
|
|
|
|
Alignments can be specified as with pipe tables, by putting colons at
|
|
|
|
the boundaries of the separator line after the header:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
+---------------+---------------+--------------------+
|
2018-11-02 05:56:41 +01:00
|
|
|
| Right | Left | Centered |
|
2016-11-30 21:03:17 +01:00
|
|
|
+==============:+:==============+:==================:+
|
2019-01-31 07:00:54 +01:00
|
|
|
| Bananas | $1.34 | built-in wrapper |
|
|
|
|
+---------------+---------------+--------------------+
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2016-11-30 21:03:17 +01:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
For headerless tables, the colons go on the top line instead:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
+--------------:+:--------------+:------------------:+
|
2018-11-02 05:56:41 +01:00
|
|
|
| Right | Left | Centered |
|
2019-01-31 07:00:54 +01:00
|
|
|
+---------------+---------------+--------------------+
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2016-11-30 21:03:17 +01:00
|
|
|
.fi
|
2017-10-18 05:30:20 +02:00
|
|
|
.SS Grid Table Limitations
|
|
|
|
.PP
|
|
|
|
Pandoc does not support grid tables with row spans or column spans.
|
|
|
|
This means that neither variable numbers of columns across rows nor
|
|
|
|
variable numbers of rows across columns are supported by Pandoc.
|
|
|
|
All grid tables must have the same number of columns in each row, and
|
|
|
|
the same number of rows in each column.
|
|
|
|
For example, the Docutils sample grid tables will not render as expected
|
|
|
|
with Pandoc.
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]pipe_tables\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Pipe tables look like this:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
| Right | Left | Default | Center |
|
2019-01-31 07:00:54 +01:00
|
|
|
|------:|:-----|---------|:------:|
|
2018-11-02 05:56:41 +01:00
|
|
|
| 12 | 12 | 12 | 12 |
|
|
|
|
| 123 | 123 | 123 | 123 |
|
|
|
|
| 1 | 1 | 1 | 1 |
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
: Demonstration of pipe table syntax.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2015-10-11 00:45:50 +02:00
|
|
|
The syntax is identical to PHP Markdown Extra tables.
|
2015-07-03 07:09:04 +02:00
|
|
|
The beginning and ending pipe characters are optional, but pipes are
|
|
|
|
required between all columns.
|
|
|
|
The colons indicate column alignment as shown.
|
|
|
|
The header cannot be omitted.
|
|
|
|
To simulate a headerless table, include a header with blank cells.
|
|
|
|
.PP
|
|
|
|
Since the pipes indicate column boundaries, columns need not be
|
|
|
|
vertically aligned, as they are in the above example.
|
|
|
|
So, this is a perfectly legal (though ugly) pipe table:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
fruit| price
|
2019-01-31 07:00:54 +01:00
|
|
|
-----|-----:
|
2015-07-03 07:09:04 +02:00
|
|
|
apple|2.05
|
|
|
|
pear|1.37
|
|
|
|
orange|3.09
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
The cells of pipe tables cannot contain block elements like paragraphs
|
|
|
|
and lists, and cannot span multiple lines.
|
2020-06-29 22:33:57 +02:00
|
|
|
If a pipe table contains a row whose Markdown content is wider than the
|
2019-01-31 07:00:54 +01:00
|
|
|
column width (see \f[C]--columns\f[R]), then the table will take up the
|
|
|
|
full text width and the cell contents will wrap, with the relative cell
|
|
|
|
widths determined by the number of dashes in the line separating the
|
|
|
|
table header from the table body.
|
|
|
|
(For example \f[C]---|-\f[R] would make the first column 3/4 and the
|
2018-05-11 06:44:32 +02:00
|
|
|
second column 1/4 of the full text width.) On the other hand, if no
|
|
|
|
lines are wider than column width, then cell contents will not be
|
|
|
|
wrapped, and the cells will be sized to their contents.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2015-11-13 04:52:02 +01:00
|
|
|
Note: pandoc also recognizes pipe tables of the following form, as can
|
2020-10-11 01:45:02 +02:00
|
|
|
be produced by Emacs\[cq] orgtbl-mode:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
| One | Two |
|
2019-01-31 07:00:54 +01:00
|
|
|
|-----+-------|
|
2018-11-02 05:56:41 +01:00
|
|
|
| my | table |
|
|
|
|
| is | nice |
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
The difference is that \f[C]+\f[R] is used instead of \f[C]|\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
Other orgtbl features are not supported.
|
2020-10-11 01:45:02 +02:00
|
|
|
In particular, to get non-default column alignment, you\[cq]ll need to
|
2017-11-12 00:26:24 +01:00
|
|
|
add colons as above.
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Metadata blocks
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]pandoc_title_block\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
If the file begins with a title block
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
% title
|
|
|
|
% author(s) (separated by semicolons)
|
|
|
|
% date
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
it will be parsed as bibliographic information, not regular text.
|
|
|
|
(It will be used, for example, in the title of standalone LaTeX or HTML
|
|
|
|
output.) The block may contain just a title, a title and an author, or
|
|
|
|
all three elements.
|
|
|
|
If you want to include an author but no title, or a title and a date but
|
|
|
|
no author, you need a blank line:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
%
|
2018-11-02 05:56:41 +01:00
|
|
|
% Author
|
2020-06-29 22:33:57 +02:00
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
% My title
|
2015-07-03 07:09:04 +02:00
|
|
|
%
|
2018-11-02 05:56:41 +01:00
|
|
|
% June 15, 2006
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
The title may occupy multiple lines, but continuation lines must begin
|
|
|
|
with leading space, thus:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
% My title
|
|
|
|
on multiple lines
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
If a document has multiple authors, the authors may be put on separate
|
|
|
|
lines with leading space, or separated by semicolons, or both.
|
|
|
|
So, all of the following are equivalent:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
% Author One
|
|
|
|
Author Two
|
2020-06-29 22:33:57 +02:00
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
% Author One; Author Two
|
2020-06-29 22:33:57 +02:00
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
% Author One;
|
|
|
|
Author Two
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
The date must fit on one line.
|
|
|
|
.PP
|
|
|
|
All three metadata fields may contain standard inline formatting
|
|
|
|
(italics, links, footnotes, etc.).
|
|
|
|
.PP
|
|
|
|
Title blocks will always be parsed, but they will affect the output only
|
2019-01-31 07:00:54 +01:00
|
|
|
when the \f[C]--standalone\f[R] (\f[C]-s\f[R]) option is chosen.
|
2020-10-11 01:45:02 +02:00
|
|
|
In HTML output, titles will appear twice: once in the document head
|
|
|
|
\[en] this is the title that will appear at the top of the window in a
|
|
|
|
browser \[en] and once at the beginning of the document body.
|
2015-07-03 07:09:04 +02:00
|
|
|
The title in the document head can have an optional prefix attached
|
2019-01-31 07:00:54 +01:00
|
|
|
(\f[C]--title-prefix\f[R] or \f[C]-T\f[R] option).
|
2018-10-20 07:56:40 +02:00
|
|
|
The title in the body appears as an H1 element with class
|
2020-10-11 01:45:02 +02:00
|
|
|
\[lq]title\[rq], so it can be suppressed or reformatted with CSS.
|
2019-01-31 07:00:54 +01:00
|
|
|
If a title prefix is specified with \f[C]-T\f[R] and no title block
|
2015-07-03 07:09:04 +02:00
|
|
|
appears in the document, the title prefix will be used by itself as the
|
|
|
|
HTML title.
|
|
|
|
.PP
|
|
|
|
The man page writer extracts a title, man page section number, and other
|
|
|
|
header and footer information from the title line.
|
|
|
|
The title is assumed to be the first word on the title line, which may
|
2019-01-31 07:00:54 +01:00
|
|
|
optionally end with a (single-digit) section number in parentheses.
|
2015-07-03 07:09:04 +02:00
|
|
|
(There should be no space between the title and the parentheses.)
|
|
|
|
Anything after this is assumed to be additional footer and header text.
|
2018-10-20 07:56:40 +02:00
|
|
|
A single pipe character (\f[C]|\f[R]) should be used to separate the
|
2015-07-03 07:09:04 +02:00
|
|
|
footer text from the header text.
|
|
|
|
Thus,
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
% PANDOC(1)
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
will yield a man page with the title \f[C]PANDOC\f[R] and section 1.
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
% PANDOC(1) Pandoc User Manuals
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
will also have \[lq]Pandoc User Manuals\[rq] in the footer.
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
% PANDOC(1) Pandoc User Manuals | Version 4.0
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
will also have \[lq]Version 4.0\[rq] in the header.
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]yaml_metadata_block\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
A YAML metadata block is a valid YAML object, delimited by a line of
|
2019-01-31 07:00:54 +01:00
|
|
|
three hyphens (\f[C]---\f[R]) at the top and a line of three hyphens
|
|
|
|
(\f[C]---\f[R]) or three dots (\f[C]...\f[R]) at the bottom.
|
2015-07-03 07:09:04 +02:00
|
|
|
A YAML metadata block may occur anywhere in the document, but if it is
|
|
|
|
not at the beginning, it must be preceded by a blank line.
|
|
|
|
(Note that, because of the way pandoc concatenates input files when
|
|
|
|
several are provided, you may also keep the metadata in a separate YAML
|
2015-11-13 04:52:02 +01:00
|
|
|
file and pass it to pandoc as an argument, along with your Markdown
|
2015-07-03 07:09:04 +02:00
|
|
|
files:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc chap1.md chap2.md chap3.md metadata.yaml -s -o book.html
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
Just be sure that the YAML file begins with \f[C]---\f[R] and ends with
|
|
|
|
\f[C]---\f[R] or \f[C]...\f[R].) Alternatively, you can use the
|
|
|
|
\f[C]--metadata-file\f[R] option.
|
2018-09-16 20:18:41 +02:00
|
|
|
Using that approach however, you cannot reference content (like
|
|
|
|
footnotes) from the main markdown input document.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Metadata will be taken from the fields of the YAML object and added to
|
|
|
|
any existing document metadata.
|
|
|
|
Metadata can contain lists and objects (nested arbitrarily), but all
|
2015-11-13 04:52:02 +01:00
|
|
|
string scalars will be interpreted as Markdown.
|
2015-07-03 07:09:04 +02:00
|
|
|
Fields with names ending in an underscore will be ignored by pandoc.
|
2018-07-15 23:42:58 +02:00
|
|
|
(They may be given a role by external processors.) Field names must not
|
|
|
|
be interpretable as YAML numbers or boolean values (so, for example,
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]yes\f[R], \f[C]True\f[R], and \f[C]15\f[R] cannot be used as field
|
2018-07-15 23:42:58 +02:00
|
|
|
names).
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
A document may contain multiple metadata blocks.
|
2019-11-16 21:54:19 +01:00
|
|
|
If two metadata blocks attempt to set the same field, the value from the
|
|
|
|
second block will be taken.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
When pandoc is used with \f[C]-t markdown\f[R] to create a Markdown
|
2015-07-03 07:09:04 +02:00
|
|
|
document, a YAML metadata block will be produced only if the
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]-s/--standalone\f[R] option is used.
|
2015-07-03 07:09:04 +02:00
|
|
|
All of the metadata will appear in a single block at the beginning of
|
|
|
|
the document.
|
|
|
|
.PP
|
|
|
|
Note that YAML escaping rules must be followed.
|
|
|
|
Thus, for example, if a title contains a colon, it must be quoted.
|
2018-10-20 07:56:40 +02:00
|
|
|
The pipe character (\f[C]|\f[R]) can be used to begin an indented block
|
2015-07-03 07:09:04 +02:00
|
|
|
that will be interpreted literally, without need for escaping.
|
2017-06-04 20:40:09 +02:00
|
|
|
This form is necessary when the field contains blank lines or
|
2019-01-31 07:00:54 +01:00
|
|
|
block-level formatting:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
---
|
2018-11-02 05:56:41 +01:00
|
|
|
title: \[aq]This is the title: it contains a colon\[aq]
|
2015-07-03 07:09:04 +02:00
|
|
|
author:
|
2019-01-31 07:00:54 +01:00
|
|
|
- Author One
|
|
|
|
- Author Two
|
2018-11-02 05:56:41 +01:00
|
|
|
keywords: [nothing, nothingness]
|
|
|
|
abstract: |
|
|
|
|
This is the abstract.
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
It consists of two paragraphs.
|
2015-07-03 07:09:04 +02:00
|
|
|
\&...
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Template variables will be set automatically from the metadata.
|
2018-10-20 07:56:40 +02:00
|
|
|
Thus, for example, in writing HTML, the variable \f[C]abstract\f[R] will
|
|
|
|
be set to the HTML equivalent of the Markdown in the \f[C]abstract\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
field:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
<p>This is the abstract.</p>
|
|
|
|
<p>It consists of two paragraphs.</p>
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2016-09-26 14:25:09 +02:00
|
|
|
Variables can contain arbitrary YAML structures, but the template must
|
|
|
|
match this structure.
|
2018-10-20 07:56:40 +02:00
|
|
|
The \f[C]author\f[R] variable in the default templates expects a simple
|
2016-09-26 14:25:09 +02:00
|
|
|
list or string, but can be changed to support more complicated
|
|
|
|
structures.
|
|
|
|
The following combination, for example, would add an affiliation to the
|
|
|
|
author if one is given:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
---
|
2018-11-02 05:56:41 +01:00
|
|
|
title: The document title
|
2016-09-26 14:25:09 +02:00
|
|
|
author:
|
2019-01-31 07:00:54 +01:00
|
|
|
- name: Author One
|
2018-11-02 05:56:41 +01:00
|
|
|
affiliation: University of Somewhere
|
2019-01-31 07:00:54 +01:00
|
|
|
- name: Author Two
|
2018-11-02 05:56:41 +01:00
|
|
|
affiliation: University of Nowhere
|
2016-09-26 14:25:09 +02:00
|
|
|
\&...
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2016-09-26 14:25:09 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
To use the structured authors in the example above, you would need a
|
|
|
|
custom template:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
$for(author)$
|
|
|
|
$if(author.name)$
|
2018-11-02 05:56:41 +01:00
|
|
|
$author.name$$if(author.affiliation)$ ($author.affiliation$)$endif$
|
2015-07-03 07:09:04 +02:00
|
|
|
$else$
|
|
|
|
$author$
|
|
|
|
$endif$
|
|
|
|
$endfor$
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
2018-01-17 20:06:43 +01:00
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
Raw content to include in the document\[cq]s header may be specified
|
2019-01-31 07:00:54 +01:00
|
|
|
using \f[C]header-includes\f[R]; however, it is important to mark up
|
2018-01-17 20:06:43 +01:00
|
|
|
this content as raw code for a particular output format, using the
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]raw_attribute\f[R] extension), or it will be interpreted as
|
2018-01-17 20:06:43 +01:00
|
|
|
markdown.
|
|
|
|
For example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
header-includes:
|
|
|
|
- |
|
2018-11-02 05:56:41 +01:00
|
|
|
\[ga]\[ga]\[ga]{=latex}
|
|
|
|
\[rs]let\[rs]oldsection\[rs]section
|
|
|
|
\[rs]renewcommand{\[rs]section}[1]{\[rs]clearpage\[rs]oldsection{#1}}
|
|
|
|
\[ga]\[ga]\[ga]
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-01-17 20:06:43 +01:00
|
|
|
.fi
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Backslash escapes
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]all_symbols_escapable\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Except inside a code block or inline code, any punctuation or space
|
|
|
|
character preceded by a backslash will be treated literally, even if it
|
|
|
|
would normally indicate formatting.
|
|
|
|
Thus, for example, if one writes
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-10-20 07:56:40 +02:00
|
|
|
*\[rs]*hello\[rs]**
|
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
one will get
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
<em>*hello*</em>
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
instead of
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
<strong>hello</strong>
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
This rule is easier to remember than standard Markdown\[cq]s rule, which
|
2019-01-31 07:00:54 +01:00
|
|
|
allows only the following characters to be backslash-escaped:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
\[rs]\[ga]*_{}[]()>#+-.!
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
(However, if the \f[C]markdown_strict\f[R] format is used, the standard
|
2015-11-13 04:52:02 +01:00
|
|
|
Markdown rule will be used.)
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
A backslash-escaped space is parsed as a nonbreaking space.
|
2020-03-24 00:43:31 +01:00
|
|
|
In TeX output, it will appear as \f[C]\[ti]\f[R].
|
|
|
|
In HTML and XML output, it will appear as a literal unicode nonbreaking
|
|
|
|
space character (note that it will thus actually look
|
2020-10-11 01:45:02 +02:00
|
|
|
\[lq]invisible\[rq] in the generated HTML source; you can still use the
|
2020-03-24 00:43:31 +01:00
|
|
|
\f[C]--ascii\f[R] command-line option to make it appear as an explicit
|
|
|
|
entity).
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
A backslash-escaped newline (i.e.\ a backslash occurring at the end of a
|
|
|
|
line) is parsed as a hard line break.
|
2018-10-20 07:56:40 +02:00
|
|
|
It will appear in TeX output as \f[C]\[rs]\[rs]\f[R] and in HTML as
|
2018-11-02 05:56:41 +01:00
|
|
|
\f[C]<br />\f[R].
|
2020-10-11 01:45:02 +02:00
|
|
|
This is a nice alternative to Markdown\[cq]s \[lq]invisible\[rq] way of
|
2015-07-03 07:09:04 +02:00
|
|
|
indicating hard line breaks using two trailing spaces on a line.
|
|
|
|
.PP
|
|
|
|
Backslash escapes do not work in verbatim contexts.
|
|
|
|
.SS Inline formatting
|
|
|
|
.SS Emphasis
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
To \f[I]emphasize\f[R] some text, surround it with \f[C]*\f[R]s or
|
|
|
|
\f[C]_\f[R], like this:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
This text is _emphasized with underscores_, and this
|
|
|
|
is *emphasized with asterisks*.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Double \f[C]*\f[R] or \f[C]_\f[R] produces \f[B]strong emphasis\f[R]:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
This is **strong emphasis** and __with underscores__.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
A \f[C]*\f[R] or \f[C]_\f[R] character surrounded by spaces, or
|
2019-01-31 07:00:54 +01:00
|
|
|
backslash-escaped, will not trigger emphasis:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
This is * not emphasized *, and \[rs]*neither is this\[rs]*.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]intraword_underscores\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Because \f[C]_\f[R] is sometimes used inside words and identifiers,
|
|
|
|
pandoc does not interpret a \f[C]_\f[R] surrounded by alphanumeric
|
2015-07-03 07:09:04 +02:00
|
|
|
characters as an emphasis marker.
|
2018-10-20 07:56:40 +02:00
|
|
|
If you want to emphasize just part of a word, use \f[C]*\f[R]:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
feas*ible*, not feas*able*.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.SS Strikeout
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]strikeout\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
To strikeout a section of text with a horizontal line, begin and end it
|
2018-10-20 07:56:40 +02:00
|
|
|
with \f[C]\[ti]\[ti]\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
Thus, for example,
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
This \[ti]\[ti]is deleted text.\[ti]\[ti]
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.SS Superscripts and subscripts
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]superscript\f[R], \f[C]subscript\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Superscripts may be written by surrounding the superscripted text by
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]\[ha]\f[R] characters; subscripts may be written by surrounding the
|
|
|
|
subscripted text by \f[C]\[ti]\f[R] characters.
|
2015-07-03 07:09:04 +02:00
|
|
|
Thus, for example,
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
H\[ti]2\[ti]O is a liquid. 2\[ha]10\[ha] is 1024.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2019-11-16 21:54:19 +01:00
|
|
|
The text between \f[C]\[ha]...\[ha]\f[R] or \f[C]\[ti]...\[ti]\f[R] may
|
|
|
|
not contain spaces or newlines.
|
2015-07-03 07:09:04 +02:00
|
|
|
If the superscripted or subscripted text contains spaces, these spaces
|
|
|
|
must be escaped with backslashes.
|
|
|
|
(This is to prevent accidental superscripting and subscripting through
|
2019-11-16 21:54:19 +01:00
|
|
|
the ordinary use of \f[C]\[ti]\f[R] and \f[C]\[ha]\f[R], and also bad
|
2020-10-11 01:45:02 +02:00
|
|
|
interactions with footnotes.) Thus, if you want the letter P with `a
|
|
|
|
cat' in subscripts, use \f[C]P\[ti]a\[rs] cat\[ti]\f[R], not
|
2019-11-16 21:54:19 +01:00
|
|
|
\f[C]P\[ti]a cat\[ti]\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Verbatim
|
|
|
|
.PP
|
|
|
|
To make a short span of text verbatim, put it inside backticks:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
What is the difference between \[ga]>>=\[ga] and \[ga]>>\[ga]?
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
If the verbatim text includes a backtick, use double backticks:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
Here is a literal backtick \[ga]\[ga] \[ga] \[ga]\[ga].
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
(The spaces after the opening backticks and before the closing backticks
|
|
|
|
will be ignored.)
|
|
|
|
.PP
|
|
|
|
The general rule is that a verbatim span starts with a string of
|
|
|
|
consecutive backticks (optionally followed by a space) and ends with a
|
|
|
|
string of the same number of backticks (optionally preceded by a space).
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
Note that backslash-escapes (and other Markdown constructs) do not work
|
2015-07-03 07:09:04 +02:00
|
|
|
in verbatim contexts:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
This is a backslash followed by an asterisk: \[ga]\[rs]*\[ga].
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]inline_code_attributes\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2015-07-21 19:24:59 +02:00
|
|
|
Attributes can be attached to verbatim text, just as with fenced code
|
|
|
|
blocks:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-10-20 07:56:40 +02:00
|
|
|
\[ga]<$>\[ga]{.haskell}
|
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.SS Small caps
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
To write small caps, use the \f[C]smallcaps\f[R] class:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
[Small caps]{.smallcaps}
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Or, without the \f[C]bracketed_spans\f[R] extension:
|
2017-11-01 05:29:31 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
<span class=\[dq]smallcaps\[dq]>Small caps</span>
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2017-11-01 05:29:31 +01:00
|
|
|
.fi
|
2016-11-16 11:53:51 +01:00
|
|
|
.PP
|
2017-11-01 05:29:31 +01:00
|
|
|
For compatibility with other Markdown flavors, CSS is also supported:
|
2016-11-16 11:53:51 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
<span style=\[dq]font-variant:small-caps;\[dq]>Small caps</span>
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2016-11-16 11:53:51 +01:00
|
|
|
.fi
|
2017-11-01 05:29:31 +01:00
|
|
|
.PP
|
|
|
|
This will work in all output formats that support small caps.
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Math
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]tex_math_dollars\f[R]
|
|
|
|
.PP
|
|
|
|
Anything between two \f[C]$\f[R] characters will be treated as TeX math.
|
2019-01-31 07:00:54 +01:00
|
|
|
The opening \f[C]$\f[R] must have a non-space character immediately to
|
|
|
|
its right, while the closing \f[C]$\f[R] must have a non-space character
|
|
|
|
immediately to its left, and must not be followed immediately by a
|
|
|
|
digit.
|
2020-10-11 01:45:02 +02:00
|
|
|
Thus, \f[C]$20,000 and $30,000\f[R] won\[cq]t parse as math.
|
2018-10-20 07:56:40 +02:00
|
|
|
If for some reason you need to enclose text in literal \f[C]$\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
characters, backslash-escape them and they won\[cq]t be treated as math
|
2015-07-03 07:09:04 +02:00
|
|
|
delimiters.
|
|
|
|
.PP
|
2019-12-12 06:03:29 +01:00
|
|
|
For display math, use \f[C]$$\f[R] delimiters.
|
|
|
|
(In this case, the delimiters may be separated from the formula by
|
|
|
|
whitespace.)
|
|
|
|
.PP
|
2015-07-03 07:09:04 +02:00
|
|
|
TeX math will be printed in all output formats.
|
|
|
|
How it is rendered depends on the output format:
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
LaTeX
|
2018-10-20 07:56:40 +02:00
|
|
|
It will appear verbatim surrounded by \f[C]\[rs](...\[rs])\f[R] (for
|
|
|
|
inline math) or \f[C]\[rs][...\[rs]]\f[R] (for display math).
|
2018-07-15 23:42:58 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
Markdown, Emacs Org mode, ConTeXt, ZimWiki
|
2018-10-20 07:56:40 +02:00
|
|
|
It will appear verbatim surrounded by \f[C]$...$\f[R] (for inline math)
|
|
|
|
or \f[C]$$...$$\f[R] (for display math).
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
XWiki
|
2019-04-06 00:11:08 +02:00
|
|
|
It will appear verbatim surrounded by
|
|
|
|
\f[C]{{formula}}..{{/formula}}\f[R].
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
reStructuredText
|
2018-10-20 07:56:40 +02:00
|
|
|
It will be rendered using an interpreted text role \f[C]:math:\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
AsciiDoc
|
2019-03-03 18:46:21 +01:00
|
|
|
For AsciiDoc output format (\f[C]-t asciidoc\f[R]) it will appear
|
|
|
|
verbatim surrounded by \f[C]latexmath:[$...$]\f[R] (for inline math) or
|
|
|
|
\f[C][latexmath]++++\[rs][...\[rs]]+++\f[R] (for display math).
|
|
|
|
For AsciiDoctor output format (\f[C]-t asciidoctor\f[R]) the LaTex
|
|
|
|
delimiters (\f[C]$..$\f[R] and \f[C]\[rs][..\[rs]]\f[R]) are omitted.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
Texinfo
|
2018-10-20 07:56:40 +02:00
|
|
|
It will be rendered inside a \f[C]\[at]math\f[R] command.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
roff man, Jira markup
|
2020-10-11 01:45:02 +02:00
|
|
|
It will be rendered verbatim without \f[C]$\f[R]\[cq]s.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
MediaWiki, DokuWiki
|
2018-10-20 07:56:40 +02:00
|
|
|
It will be rendered inside \f[C]<math>\f[R] tags.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
Textile
|
2018-11-02 05:56:41 +01:00
|
|
|
It will be rendered inside \f[C]<span class=\[dq]math\[dq]>\f[R] tags.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
RTF, OpenDocument
|
2016-12-10 11:29:58 +01:00
|
|
|
It will be rendered, if possible, using Unicode characters, and will
|
2015-07-03 07:09:04 +02:00
|
|
|
otherwise appear verbatim.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
ODT
|
2017-10-18 05:30:20 +02:00
|
|
|
It will be rendered, if possible, using MathML.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
DocBook
|
2019-01-31 07:00:54 +01:00
|
|
|
If the \f[C]--mathml\f[R] flag is used, it will be rendered using MathML
|
|
|
|
in an \f[C]inlineequation\f[R] or \f[C]informalequation\f[R] tag.
|
2016-12-10 11:29:58 +01:00
|
|
|
Otherwise it will be rendered, if possible, using Unicode characters.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
Docx
|
2015-07-03 07:09:04 +02:00
|
|
|
It will be rendered using OMML math markup.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
FictionBook2
|
2019-01-31 07:00:54 +01:00
|
|
|
If the \f[C]--webtex\f[R] option is used, formulas are rendered as
|
2016-10-26 22:10:02 +02:00
|
|
|
images using CodeCogs or other compatible web service, downloaded and
|
2019-01-31 07:00:54 +01:00
|
|
|
embedded in the e-book.
|
2015-07-03 07:09:04 +02:00
|
|
|
Otherwise, they will appear verbatim.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
HTML, Slidy, DZSlides, S5, EPUB
|
2019-01-31 07:00:54 +01:00
|
|
|
The way math is rendered in HTML will depend on the command-line options
|
|
|
|
selected.
|
2017-11-12 00:26:24 +01:00
|
|
|
Therefore see Math rendering in HTML above.
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Raw HTML
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]raw_html\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Markdown allows you to insert raw HTML (or DocBook) anywhere in a
|
2018-10-20 07:56:40 +02:00
|
|
|
document (except verbatim contexts, where \f[C]<\f[R], \f[C]>\f[R], and
|
|
|
|
\f[C]&\f[R] are interpreted literally).
|
2015-11-13 04:52:02 +01:00
|
|
|
(Technically this is not an extension, since standard Markdown allows
|
2015-07-03 07:09:04 +02:00
|
|
|
it, but it has been made an extension so that it can be disabled if
|
|
|
|
desired.)
|
|
|
|
.PP
|
|
|
|
The raw HTML is passed through unchanged in HTML, S5, Slidy, Slideous,
|
2018-10-20 07:56:40 +02:00
|
|
|
DZSlides, EPUB, Markdown, CommonMark, Emacs Org mode, and Textile
|
|
|
|
output, and suppressed in other formats.
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
For a more explicit way of including raw HTML in a Markdown document,
|
|
|
|
see the \f[C]raw_attribute\f[R] extension.
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
In the CommonMark format, if \f[C]raw_html\f[R] is enabled,
|
|
|
|
superscripts, subscripts, strikeouts and small capitals will be
|
|
|
|
represented as HTML.
|
2019-01-31 07:00:54 +01:00
|
|
|
Otherwise, plain-text fallbacks will be used.
|
2018-10-20 07:56:40 +02:00
|
|
|
Note that even if \f[C]raw_html\f[R] is disabled, tables will be
|
|
|
|
rendered with HTML syntax if they cannot use pipe syntax.
|
|
|
|
.SS Extension: \f[C]markdown_in_html_blocks\f[R]
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
Standard Markdown allows you to include HTML \[lq]blocks\[rq]: blocks of
|
2018-10-20 07:56:40 +02:00
|
|
|
HTML between balanced tags that are separated from the surrounding text
|
|
|
|
with blank lines, and start and end at the left margin.
|
2015-11-13 04:52:02 +01:00
|
|
|
Within these blocks, everything is interpreted as HTML, not Markdown; so
|
2018-10-20 07:56:40 +02:00
|
|
|
(for example), \f[C]*\f[R] does not signify emphasis.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Pandoc behaves this way when the \f[C]markdown_strict\f[R] format is
|
2015-07-03 07:09:04 +02:00
|
|
|
used; but by default, pandoc interprets material between HTML block tags
|
2015-11-13 04:52:02 +01:00
|
|
|
as Markdown.
|
|
|
|
Thus, for example, pandoc will turn
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td>*one*</td>
|
2020-02-16 06:26:29 +01:00
|
|
|
<td>[a link](https://google.com)</td>
|
2015-07-03 07:09:04 +02:00
|
|
|
</tr>
|
|
|
|
</table>
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
into
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td><em>one</em></td>
|
2020-02-16 06:26:29 +01:00
|
|
|
<td><a href=\[dq]https://google.com\[dq]>a link</a></td>
|
2015-07-03 07:09:04 +02:00
|
|
|
</tr>
|
|
|
|
</table>
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
whereas \f[C]Markdown.pl\f[R] will preserve it as is.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
There is one exception to this rule: text between \f[C]<script>\f[R] and
|
|
|
|
\f[C]<style>\f[R] tags is not interpreted as Markdown.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2015-11-13 04:52:02 +01:00
|
|
|
This departure from standard Markdown should make it easier to mix
|
|
|
|
Markdown with HTML block elements.
|
|
|
|
For example, one can surround a block of Markdown text with
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]<div>\f[R] tags without preventing it from being interpreted as
|
2015-11-13 04:52:02 +01:00
|
|
|
Markdown.
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]native_divs\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Use native pandoc \f[C]Div\f[R] blocks for content inside
|
|
|
|
\f[C]<div>\f[R] tags.
|
2015-07-03 07:09:04 +02:00
|
|
|
For the most part this should give the same output as
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]markdown_in_html_blocks\f[R], but it makes it easier to write
|
|
|
|
pandoc filters to manipulate groups of blocks.
|
|
|
|
.SS Extension: \f[C]native_spans\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Use native pandoc \f[C]Span\f[R] blocks for content inside
|
|
|
|
\f[C]<span>\f[R] tags.
|
|
|
|
For the most part this should give the same output as
|
|
|
|
\f[C]raw_html\f[R], but it makes it easier to write pandoc filters to
|
|
|
|
manipulate groups of inlines.
|
|
|
|
.SS Extension: \f[C]raw_tex\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
In addition to raw HTML, pandoc allows raw LaTeX, TeX, and ConTeXt to be
|
|
|
|
included in a document.
|
|
|
|
Inline TeX commands will be preserved and passed unchanged to the LaTeX
|
|
|
|
and ConTeXt writers.
|
|
|
|
Thus, for example, you can use LaTeX to include BibTeX citations:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
This result was proved in \[rs]cite{jones.1967}.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Note that in LaTeX environments, like
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-10-20 07:56:40 +02:00
|
|
|
\[rs]begin{tabular}{|l|l|}\[rs]hline
|
2018-11-02 05:56:41 +01:00
|
|
|
Age & Frequency \[rs]\[rs] \[rs]hline
|
2019-01-31 07:00:54 +01:00
|
|
|
18--25 & 15 \[rs]\[rs]
|
|
|
|
26--35 & 33 \[rs]\[rs]
|
|
|
|
36--45 & 22 \[rs]\[rs] \[rs]hline
|
2018-10-20 07:56:40 +02:00
|
|
|
\[rs]end{tabular}
|
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
the material between the begin and end tags will be interpreted as raw
|
2015-11-13 04:52:02 +01:00
|
|
|
LaTeX, not as Markdown.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
For a more explicit and flexible way of including raw TeX in a Markdown
|
|
|
|
document, see the \f[C]raw_attribute\f[R] extension.
|
|
|
|
.PP
|
2015-07-03 07:09:04 +02:00
|
|
|
Inline LaTeX is ignored in output formats other than Markdown, LaTeX,
|
2016-07-15 07:57:09 +02:00
|
|
|
Emacs Org mode, and ConTeXt.
|
2017-10-18 05:30:20 +02:00
|
|
|
.SS Generic raw attribute
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]raw_attribute\f[R]
|
2017-10-18 05:30:20 +02:00
|
|
|
.PP
|
|
|
|
Inline spans and fenced code blocks with a special kind of attribute
|
|
|
|
will be parsed as raw content with the designated format.
|
2018-11-02 05:56:41 +01:00
|
|
|
For example, the following produces a raw roff \f[C]ms\f[R] block:
|
2017-10-18 05:30:20 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-10-20 07:56:40 +02:00
|
|
|
\[ga]\[ga]\[ga]{=ms}
|
2017-10-18 05:30:20 +02:00
|
|
|
\&.MYMACRO
|
2018-11-02 05:56:41 +01:00
|
|
|
blah blah
|
2018-10-20 07:56:40 +02:00
|
|
|
\[ga]\[ga]\[ga]
|
|
|
|
\f[R]
|
2017-10-18 05:30:20 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
And the following produces a raw \f[C]html\f[R] inline element:
|
2017-10-18 05:30:20 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
This is \[ga]<a>html</a>\[ga]{=html}
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2017-10-18 05:30:20 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
This can be useful to insert raw xml into \f[C]docx\f[R] documents, e.g.
|
2018-04-21 06:50:42 +02:00
|
|
|
a pagebreak:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-10-20 07:56:40 +02:00
|
|
|
\[ga]\[ga]\[ga]{=openxml}
|
2018-04-21 06:50:42 +02:00
|
|
|
<w:p>
|
2018-11-02 05:56:41 +01:00
|
|
|
<w:r>
|
|
|
|
<w:br w:type=\[dq]page\[dq]/>
|
|
|
|
</w:r>
|
2018-04-21 06:50:42 +02:00
|
|
|
</w:p>
|
2018-10-20 07:56:40 +02:00
|
|
|
\[ga]\[ga]\[ga]
|
|
|
|
\f[R]
|
2018-04-21 06:50:42 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2017-10-18 05:30:20 +02:00
|
|
|
The format name should match the target format name (see
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]-t/--to\f[R], above, for a list, or use
|
|
|
|
\f[C]pandoc --list-output-formats\f[R]).
|
2018-10-20 07:56:40 +02:00
|
|
|
Use \f[C]openxml\f[R] for \f[C]docx\f[R] output, \f[C]opendocument\f[R]
|
|
|
|
for \f[C]odt\f[R] output, \f[C]html5\f[R] for \f[C]epub3\f[R] output,
|
|
|
|
\f[C]html4\f[R] for \f[C]epub2\f[R] output, and \f[C]latex\f[R],
|
|
|
|
\f[C]beamer\f[R], \f[C]ms\f[R], or \f[C]html5\f[R] for \f[C]pdf\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
output (depending on what you use for \f[C]--pdf-engine\f[R]).
|
2017-10-18 05:30:20 +02:00
|
|
|
.PP
|
|
|
|
This extension presupposes that the relevant kind of inline code or
|
|
|
|
fenced code block is enabled.
|
|
|
|
Thus, for example, to use a raw attribute with a backtick code block,
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]backtick_code_blocks\f[R] must be enabled.
|
2017-10-18 05:30:20 +02:00
|
|
|
.PP
|
|
|
|
The raw attribute cannot be combined with regular attributes.
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS LaTeX macros
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]latex_macros\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2018-11-25 05:40:07 +01:00
|
|
|
When this extension is enabled, pandoc will parse LaTeX macro
|
2017-12-27 18:42:06 +01:00
|
|
|
definitions and apply the resulting macros to all LaTeX math and raw
|
|
|
|
LaTeX.
|
2015-07-03 07:09:04 +02:00
|
|
|
So, for example, the following will work in all output formats, not just
|
|
|
|
LaTeX:
|
2016-01-03 00:52:49 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
\[rs]newcommand{\[rs]tuple}[1]{\[rs]langle #1 \[rs]rangle}
|
2016-01-03 00:52:49 +01:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
$\[rs]tuple{a, b, c}$
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2016-01-03 00:52:49 +01:00
|
|
|
.fi
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-05-07 18:24:13 +02:00
|
|
|
Note that LaTeX macros will not be applied if they occur inside a raw
|
|
|
|
span or block marked with the \f[C]raw_attribute\f[R] extension.
|
2017-12-27 18:42:06 +01:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
When \f[C]latex_macros\f[R] is disabled, the raw LaTeX and math will not
|
2018-01-17 20:06:43 +01:00
|
|
|
have macros applied.
|
2017-12-27 18:42:06 +01:00
|
|
|
This is usually a better approach when you are targeting LaTeX or PDF.
|
2018-01-17 20:06:43 +01:00
|
|
|
.PP
|
2019-11-16 21:54:19 +01:00
|
|
|
Macro definitions in LaTeX will be passed through as raw LaTeX only if
|
|
|
|
\f[C]latex_macros\f[R] is not enabled.
|
|
|
|
Macro definitions in Markdown source (or other formats allowing
|
|
|
|
\f[C]raw_tex\f[R]) will be passed through regardless of whether
|
|
|
|
\f[C]latex_macros\f[R] is enabled.
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Links
|
|
|
|
.PP
|
|
|
|
Markdown allows links to be specified in several ways.
|
|
|
|
.SS Automatic links
|
|
|
|
.PP
|
|
|
|
If you enclose a URL or email address in pointy brackets, it will become
|
|
|
|
a link:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2020-02-16 06:26:29 +01:00
|
|
|
<https://google.com>
|
2018-10-20 07:56:40 +02:00
|
|
|
<sam\[at]green.eggs.ham>
|
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.SS Inline links
|
|
|
|
.PP
|
|
|
|
An inline link consists of the link text in square brackets, followed by
|
|
|
|
the URL in parentheses.
|
|
|
|
(Optionally, the URL can be followed by a link title, in quotes.)
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
This is an [inline link](/url), and here\[aq]s [one with
|
2020-02-16 06:26:29 +01:00
|
|
|
a title](https://fsf.org \[dq]click here for a good time!\[dq]).
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
There can be no space between the bracketed part and the parenthesized
|
|
|
|
part.
|
|
|
|
The link text can contain formatting (such as emphasis), but the title
|
|
|
|
cannot.
|
|
|
|
.PP
|
|
|
|
Email addresses in inline links are not autodetected, so they have to be
|
2018-10-20 07:56:40 +02:00
|
|
|
prefixed with \f[C]mailto\f[R]:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
[Write me!](mailto:sam\[at]green.eggs.ham)
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.SS Reference links
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
An \f[I]explicit\f[R] reference link has two parts, the link itself and
|
2015-07-03 07:09:04 +02:00
|
|
|
the link definition, which may occur elsewhere in the document (either
|
|
|
|
before or after the link).
|
|
|
|
.PP
|
|
|
|
The link consists of link text in square brackets, followed by a label
|
|
|
|
in square brackets.
|
2017-06-04 20:40:09 +02:00
|
|
|
(There cannot be space between the two unless the
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]spaced_reference_links\f[R] extension is enabled.) The link
|
2017-06-04 20:40:09 +02:00
|
|
|
definition consists of the bracketed label, followed by a colon and a
|
|
|
|
space, followed by the URL, and optionally (after a space) a link title
|
|
|
|
either in quotes or in parentheses.
|
2015-07-03 07:09:04 +02:00
|
|
|
The label must not be parseable as a citation (assuming the
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]citations\f[R] extension is enabled): citations take precedence
|
|
|
|
over link labels.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Here are some examples:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
[my label 1]: /foo/bar.html \[dq]My title, optional\[dq]
|
|
|
|
[my label 2]: /foo
|
2020-02-16 06:26:29 +01:00
|
|
|
[my label 3]: https://fsf.org (The free software foundation)
|
2018-11-02 05:56:41 +01:00
|
|
|
[my label 4]: /bar#special \[aq]A title in single quotes\[aq]
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
The URL may optionally be surrounded by angle brackets:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
[my label 5]: <http://foo.bar.baz>
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
The title may go on the next line:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2020-02-16 06:26:29 +01:00
|
|
|
[my label 3]: https://fsf.org
|
2018-11-02 05:56:41 +01:00
|
|
|
\[dq]The free software foundation\[dq]
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Note that link labels are not case sensitive.
|
|
|
|
So, this will work:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
Here is [my link][FOO]
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
[Foo]: /bar/baz
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
In an \f[I]implicit\f[R] reference link, the second pair of brackets is
|
2015-07-03 07:09:04 +02:00
|
|
|
empty:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
See [my website][].
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
[my website]: http://foo.bar.baz
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Note: In \f[C]Markdown.pl\f[R] and most other Markdown implementations,
|
2015-07-03 07:09:04 +02:00
|
|
|
reference link definitions cannot occur in nested constructions such as
|
|
|
|
list items or block quotes.
|
|
|
|
Pandoc lifts this arbitrary seeming restriction.
|
|
|
|
So the following is fine in pandoc, though not in most other
|
|
|
|
implementations:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
> My block [quote].
|
2015-07-03 07:09:04 +02:00
|
|
|
>
|
2018-11-02 05:56:41 +01:00
|
|
|
> [quote]: /foo
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]shortcut_reference_links\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
In a \f[I]shortcut\f[R] reference link, the second pair of brackets may
|
2015-07-03 07:09:04 +02:00
|
|
|
be omitted entirely:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
See [my website].
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
[my website]: http://foo.bar.baz
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.SS Internal links
|
|
|
|
.PP
|
|
|
|
To link to another section of the same document, use the automatically
|
2019-04-06 00:11:08 +02:00
|
|
|
generated identifier (see Heading identifiers).
|
2015-07-03 07:09:04 +02:00
|
|
|
For example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
See the [Introduction](#introduction).
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
or
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
See the [Introduction].
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
[Introduction]: #introduction
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Internal links are currently supported for HTML formats (including HTML
|
|
|
|
slide shows and EPUB), LaTeX, and ConTeXt.
|
|
|
|
.SS Images
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
A link immediately preceded by a \f[C]!\f[R] will be treated as an
|
|
|
|
image.
|
2020-10-11 01:45:02 +02:00
|
|
|
The link text will be used as the image\[cq]s alt text:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
![la lune](lalune.jpg \[dq]Voyage to the moon\[dq])
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
![movie reel]
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
[movie reel]: movie.gif
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]implicit_figures\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2017-10-18 05:30:20 +02:00
|
|
|
An image with nonempty alt text, occurring by itself in a paragraph,
|
|
|
|
will be rendered as a figure with a caption.
|
2020-10-11 01:45:02 +02:00
|
|
|
The image\[cq]s alt text will be used as the caption.
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
![This is the caption](/url/of/image.png)
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2017-10-18 05:30:20 +02:00
|
|
|
How this is rendered depends on the output format.
|
2020-10-11 01:45:02 +02:00
|
|
|
Some output formats (e.g.\ RTF) do not yet support figures.
|
|
|
|
In those formats, you\[cq]ll just get an image in a paragraph by itself,
|
2017-10-18 05:30:20 +02:00
|
|
|
with no caption.
|
|
|
|
.PP
|
2015-07-03 07:09:04 +02:00
|
|
|
If you just want a regular inline image, just make sure it is not the
|
|
|
|
only thing in the paragraph.
|
|
|
|
One way to do this is to insert a nonbreaking space after the image:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
![This image won\[aq]t be a figure](/url/of/image.png)\[rs]
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
2017-06-04 20:40:09 +02:00
|
|
|
.PP
|
|
|
|
Note that in reveal.js slide shows, an image in a paragraph by itself
|
2018-10-20 07:56:40 +02:00
|
|
|
that has the \f[C]stretch\f[R] class will fill the screen, and the
|
2017-06-04 20:40:09 +02:00
|
|
|
caption and figure tags will be omitted.
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]link_attributes\f[R]
|
2016-01-03 00:52:49 +01:00
|
|
|
.PP
|
|
|
|
Attributes can be set on links and images:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
An inline ![image](foo.jpg){#id .class width=30 height=20px}
|
|
|
|
and a reference ![image][ref] with attributes.
|
2016-01-03 00:52:49 +01:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
[ref]: foo.jpg \[dq]optional title\[dq] {#id .class key=val key2=\[dq]val 2\[dq]}
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2016-01-03 00:52:49 +01:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
(This syntax is compatible with PHP Markdown Extra when only
|
2018-11-02 05:56:41 +01:00
|
|
|
\f[C]#id\f[R] and \f[C].class\f[R] are used.)
|
2016-01-03 00:52:49 +01:00
|
|
|
.PP
|
2019-07-14 01:41:43 +02:00
|
|
|
For HTML and EPUB, all known HTML5 attributes except \f[C]width\f[R] and
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]height\f[R] (but including \f[C]srcset\f[R] and \f[C]sizes\f[R])
|
|
|
|
are passed through as is.
|
2019-07-14 01:41:43 +02:00
|
|
|
Unknown attributes are passed through as custom attributes, with
|
|
|
|
\f[C]data-\f[R] prepended.
|
|
|
|
The other writers ignore attributes that are not specifically supported
|
|
|
|
by their output format.
|
2016-01-03 00:52:49 +01:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
The \f[C]width\f[R] and \f[C]height\f[R] attributes on images are
|
|
|
|
treated specially.
|
2016-01-03 00:52:49 +01:00
|
|
|
When used without a unit, the unit is assumed to be pixels.
|
2018-10-20 07:56:40 +02:00
|
|
|
However, any of the following unit identifiers can be used:
|
|
|
|
\f[C]px\f[R], \f[C]cm\f[R], \f[C]mm\f[R], \f[C]in\f[R], \f[C]inch\f[R]
|
|
|
|
and \f[C]%\f[R].
|
2016-01-03 00:52:49 +01:00
|
|
|
There must not be any spaces between the number and the unit.
|
|
|
|
For example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
![](file.jpg){ width=50% }
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2016-01-03 00:52:49 +01:00
|
|
|
.fi
|
|
|
|
.IP \[bu] 2
|
2020-06-29 22:33:57 +02:00
|
|
|
Dimensions may be converted to a form that is compatible with the output
|
|
|
|
format (for example, dimensions given in pixels will be converted to
|
|
|
|
inches when converting HTML to LaTeX).
|
|
|
|
Conversion between pixels and physical measurements is affected by the
|
|
|
|
\f[C]--dpi\f[R] option (by default, 96 dpi is assumed, unless the image
|
|
|
|
itself contains dpi information).
|
2016-01-03 00:52:49 +01:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
The \f[C]%\f[R] unit is generally relative to some available space.
|
2018-11-02 05:56:41 +01:00
|
|
|
For example the above example will render to the following.
|
|
|
|
.RS 2
|
|
|
|
.IP \[bu] 2
|
|
|
|
HTML:
|
|
|
|
\f[C]<img href=\[dq]file.jpg\[dq] style=\[dq]width: 50%;\[dq] />\f[R]
|
|
|
|
.IP \[bu] 2
|
|
|
|
LaTeX:
|
|
|
|
\f[C]\[rs]includegraphics[width=0.5\[rs]textwidth,height=\[rs]textheight]{file.jpg}\f[R]
|
2020-10-11 01:45:02 +02:00
|
|
|
(If you\[cq]re using a custom template, you need to configure
|
2018-11-02 05:56:41 +01:00
|
|
|
\f[C]graphicx\f[R] as in the default template.)
|
|
|
|
.IP \[bu] 2
|
|
|
|
ConTeXt:
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]\[rs]externalfigure[file.jpg][width=0.5\[rs]textwidth]\f[R]
|
2018-11-02 05:56:41 +01:00
|
|
|
.RE
|
2016-01-03 00:52:49 +01:00
|
|
|
.IP \[bu] 2
|
|
|
|
Some output formats have a notion of a class (ConTeXt) or a unique
|
2018-10-20 07:56:40 +02:00
|
|
|
identifier (LaTeX \f[C]\[rs]caption\f[R]), or both (HTML).
|
2016-01-03 00:52:49 +01:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
When no \f[C]width\f[R] or \f[C]height\f[R] attributes are specified,
|
|
|
|
the fallback is to look at the image resolution and the dpi metadata
|
2016-01-03 00:52:49 +01:00
|
|
|
embedded in the image file.
|
2018-01-08 06:27:30 +01:00
|
|
|
.SS Divs and Spans
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Using the \f[C]native_divs\f[R] and \f[C]native_spans\f[R] extensions
|
|
|
|
(see above), HTML syntax can be used as part of markdown to create
|
|
|
|
native \f[C]Div\f[R] and \f[C]Span\f[R] elements in the pandoc AST (as
|
|
|
|
opposed to raw HTML).
|
2018-01-08 06:27:30 +01:00
|
|
|
However, there is also nicer syntax available:
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]fenced_divs\f[R]
|
2018-01-08 06:27:30 +01:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Allow special fenced syntax for native \f[C]Div\f[R] blocks.
|
2018-01-08 06:27:30 +01:00
|
|
|
A Div starts with a fence containing at least three consecutive colons
|
|
|
|
plus some attributes.
|
|
|
|
The attributes may optionally be followed by another string of
|
|
|
|
consecutive colons.
|
|
|
|
The attribute syntax is exactly as in fenced code blocks (see Extension:
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]fenced_code_attributes\f[R]).
|
2018-01-08 06:27:30 +01:00
|
|
|
As with fenced code blocks, one can use either attributes in curly
|
|
|
|
braces or a single unbraced word, which will be treated as a class name.
|
|
|
|
The Div ends with another line containing a string of at least three
|
|
|
|
consecutive colons.
|
|
|
|
The fenced Div should be separated by blank lines from preceding and
|
|
|
|
following blocks.
|
|
|
|
.PP
|
|
|
|
Example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
::::: {#special .sidebar}
|
|
|
|
Here is a paragraph.
|
2018-01-08 06:27:30 +01:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
And another.
|
2018-01-08 06:27:30 +01:00
|
|
|
:::::
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-01-08 06:27:30 +01:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Fenced divs can be nested.
|
2018-10-20 07:56:40 +02:00
|
|
|
Opening fences are distinguished because they \f[I]must\f[R] have
|
2018-01-08 06:27:30 +01:00
|
|
|
attributes:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
::: Warning ::::::
|
|
|
|
This is a warning.
|
2018-01-08 06:27:30 +01:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
::: Danger
|
|
|
|
This is a warning within a warning.
|
2018-01-08 06:27:30 +01:00
|
|
|
:::
|
|
|
|
::::::::::::::::::
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-01-08 06:27:30 +01:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Fences without attributes are always closing fences.
|
|
|
|
Unlike with fenced code blocks, the number of colons in the closing
|
|
|
|
fence need not match the number in the opening fence.
|
|
|
|
However, it can be helpful for visual clarity to use fences of different
|
|
|
|
lengths to distinguish nested divs from their parents.
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]bracketed_spans\f[R]
|
2016-10-26 22:10:02 +02:00
|
|
|
.PP
|
|
|
|
A bracketed sequence of inlines, as one would use to begin a link, will
|
2018-10-20 07:56:40 +02:00
|
|
|
be treated as a \f[C]Span\f[R] with attributes if it is followed
|
2018-01-08 06:27:30 +01:00
|
|
|
immediately by attributes:
|
2016-10-26 22:10:02 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
[This is *some text*]{.class key=\[dq]val\[dq]}
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2016-10-26 22:10:02 +02:00
|
|
|
.fi
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Footnotes
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]footnotes\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
Pandoc\[cq]s Markdown allows footnotes, using the following syntax:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
Here is a footnote reference,[\[ha]1] and another.[\[ha]longnote]
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
[\[ha]1]: Here is the footnote.
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
[\[ha]longnote]: Here\[aq]s one with multiple blocks.
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
Subsequent paragraphs are indented to show that they
|
|
|
|
belong to the previous footnote.
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
{ some.code }
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
The whole paragraph can be indented, or just the first
|
2019-01-31 07:00:54 +01:00
|
|
|
line. In this way, multi-paragraph footnotes work like
|
|
|
|
multi-paragraph list items.
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
This paragraph won\[aq]t be part of the note, because it
|
|
|
|
isn\[aq]t indented.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
The identifiers in footnote references may not contain spaces, tabs, or
|
|
|
|
newlines.
|
|
|
|
These identifiers are used only to correlate the footnote reference with
|
|
|
|
the note itself; in the output, footnotes will be numbered sequentially.
|
|
|
|
.PP
|
|
|
|
The footnotes themselves need not be placed at the end of the document.
|
|
|
|
They may appear anywhere except inside other block elements (lists,
|
|
|
|
block quotes, tables, etc.).
|
2017-01-29 21:19:16 +01:00
|
|
|
Each footnote should be separated from surrounding content (including
|
|
|
|
other footnotes) by blank lines.
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]inline_notes\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Inline footnotes are also allowed (though, unlike regular notes, they
|
|
|
|
cannot contain multiple paragraphs).
|
|
|
|
The syntax is as follows:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
Here is an inline note.\[ha][Inlines notes are easier to write, since
|
|
|
|
you don\[aq]t have to pick an identifier and move down to type the
|
2015-07-03 07:09:04 +02:00
|
|
|
note.]
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Inline and regular footnotes may be mixed freely.
|
2020-10-11 01:45:02 +02:00
|
|
|
.SS Citation syntax
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]citations\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
Markdown citations go inside square brackets and are separated by
|
|
|
|
semicolons.
|
|
|
|
Each citation must have a key, composed of `\[at]' + the citation
|
|
|
|
identifier from the database, and may optionally have a prefix, a
|
|
|
|
locator, and a suffix.
|
2018-10-20 07:56:40 +02:00
|
|
|
The citation key must begin with a letter, digit, or \f[C]_\f[R], and
|
|
|
|
may contain alphanumerics, \f[C]_\f[R], and internal punctuation
|
2019-01-31 07:00:54 +01:00
|
|
|
characters (\f[C]:.#$%&-+?<>\[ti]/\f[R]).
|
2015-07-03 07:09:04 +02:00
|
|
|
Here are some examples:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
Blah blah [see \[at]doe99, pp. 33-35; also \[at]smith04, chap. 1].
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2019-01-31 07:00:54 +01:00
|
|
|
Blah blah [\[at]doe99, pp. 33-35, 38-39 and *passim*].
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
Blah blah [\[at]smith04; \[at]doe99].
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[C]pandoc\f[R] detects locator terms in the CSL locale files.
|
2015-10-11 00:45:50 +02:00
|
|
|
Either abbreviated or unabbreviated forms are accepted.
|
2019-01-31 07:00:54 +01:00
|
|
|
In the \f[C]en-US\f[R] locale, locator terms can be written in either
|
2018-10-20 07:56:40 +02:00
|
|
|
singular or plural forms, as \f[C]book\f[R],
|
|
|
|
\f[C]bk.\f[R]/\f[C]bks.\f[R]; \f[C]chapter\f[R],
|
|
|
|
\f[C]chap.\f[R]/\f[C]chaps.\f[R]; \f[C]column\f[R],
|
|
|
|
\f[C]col.\f[R]/\f[C]cols.\f[R]; \f[C]figure\f[R],
|
|
|
|
\f[C]fig.\f[R]/\f[C]figs.\f[R]; \f[C]folio\f[R],
|
|
|
|
\f[C]fol.\f[R]/\f[C]fols.\f[R]; \f[C]number\f[R],
|
|
|
|
\f[C]no.\f[R]/\f[C]nos.\f[R]; \f[C]line\f[R],
|
|
|
|
\f[C]l.\f[R]/\f[C]ll.\f[R]; \f[C]note\f[R], \f[C]n.\f[R]/\f[C]nn.\f[R];
|
|
|
|
\f[C]opus\f[R], \f[C]op.\f[R]/\f[C]opp.\f[R]; \f[C]page\f[R],
|
|
|
|
\f[C]p.\f[R]/\f[C]pp.\f[R]; \f[C]paragraph\f[R],
|
|
|
|
\f[C]para.\f[R]/\f[C]paras.\f[R]; \f[C]part\f[R],
|
|
|
|
\f[C]pt.\f[R]/\f[C]pts.\f[R]; \f[C]section\f[R],
|
2018-11-02 05:56:41 +01:00
|
|
|
\f[C]sec.\f[R]/\f[C]secs.\f[R]; \f[C]sub verbo\f[R],
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]s.v.\f[R]/\f[C]s.vv.\f[R]; \f[C]verse\f[R],
|
|
|
|
\f[C]v.\f[R]/\f[C]vv.\f[R]; \f[C]volume\f[R],
|
|
|
|
\f[C]vol.\f[R]/\f[C]vols.\f[R]; \f[C]\[ps]\f[R]/\f[C]\[ps]\[ps]\f[R];
|
|
|
|
\f[C]\[sc]\f[R]/\f[C]\[sc]\[sc]\f[R].
|
2020-10-11 01:45:02 +02:00
|
|
|
If no locator term is used, \[lq]page\[rq] is assumed.
|
2018-10-20 07:56:40 +02:00
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[C]pandoc\f[R] will use heuristics to distinguish the locator from the
|
|
|
|
suffix.
|
|
|
|
In complex cases, the locator can be enclosed in curly braces:
|
2018-11-25 05:40:07 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
[\[at]smith{ii, A, D-Z}, with a suffix]
|
|
|
|
[\[at]smith, {pp. iv, vi-xi, (xv)-(xvii)} with suffix here]
|
2018-11-25 05:40:07 +01:00
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
A minus sign (\f[C]-\f[R]) before the \f[C]\[at]\f[R] will suppress
|
2018-10-20 07:56:40 +02:00
|
|
|
mention of the author in the citation.
|
2015-07-03 07:09:04 +02:00
|
|
|
This can be useful when the author is already mentioned in the text:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
Smith says blah [-\[at]smith04].
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
You can also write an in-text citation, as follows:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
\[at]smith04 says blah.
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
\[at]smith04 [p. 33] says blah.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
2019-01-31 07:00:54 +01:00
|
|
|
.SS Non-pandoc extensions
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2015-11-13 04:52:02 +01:00
|
|
|
The following Markdown syntax extensions are not enabled by default in
|
2018-10-20 07:56:40 +02:00
|
|
|
pandoc, but may be enabled by adding \f[C]+EXTENSION\f[R] to the format
|
|
|
|
name, where \f[C]EXTENSION\f[R] is the name of the extension.
|
|
|
|
Thus, for example, \f[C]markdown+hard_line_breaks\f[R] is Markdown with
|
2015-07-03 07:09:04 +02:00
|
|
|
hard line breaks.
|
2020-07-24 02:56:12 +02:00
|
|
|
.SS Extension: \f[C]attributes\f[R]
|
|
|
|
.PP
|
|
|
|
Allows attributes to be attached to any inline or block-level element.
|
|
|
|
The syntax for the attributes is the same as that used in
|
|
|
|
\f[C]header_attributes\f[R].
|
|
|
|
.IP \[bu] 2
|
|
|
|
Attributes that occur immediately after an inline element affect that
|
|
|
|
element.
|
|
|
|
If they follow a space, then they belong to the space.
|
|
|
|
(Hence, this option subsumes \f[C]inline_code_attributes\f[R] and
|
|
|
|
\f[C]link_attributes\f[R].)
|
|
|
|
.IP \[bu] 2
|
|
|
|
Attributes that occur immediately before a block element, on a line by
|
|
|
|
themselves, affect that element.
|
|
|
|
.IP \[bu] 2
|
|
|
|
Consecutive attribute specifiers may be used, either for blocks or for
|
|
|
|
inlines.
|
|
|
|
Their attributes will be combined.
|
|
|
|
.IP \[bu] 2
|
|
|
|
Attributes that occur at the end of the text of a Setext or ATX heading
|
|
|
|
(separated by whitespace from the text) affect the heading element.
|
|
|
|
(Hence, this option subsumes \f[C]header_attributes\f[R].)
|
|
|
|
.IP \[bu] 2
|
|
|
|
Attributes that occur after the opening fence in a fenced code block
|
|
|
|
affect the code block element.
|
|
|
|
(Hence, this option subsumes \f[C]fenced_code_attributes\f[R].)
|
|
|
|
.IP \[bu] 2
|
|
|
|
Attributes that occur at the end of a reference link definition affect
|
|
|
|
links that refer to that definition.
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
Note that pandoc\[cq]s AST does not currently allow attributes to be
|
2020-07-24 02:56:12 +02:00
|
|
|
attached to arbitrary elements.
|
|
|
|
Hence a Span or Div container will be added if needed.
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]old_dashes\f[R]
|
2017-06-04 20:40:09 +02:00
|
|
|
.PP
|
|
|
|
Selects the pandoc <= 1.8.2.1 behavior for parsing smart dashes:
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]-\f[R] before a numeral is an en-dash, and \f[C]--\f[R] is an
|
|
|
|
em-dash.
|
2018-10-20 07:56:40 +02:00
|
|
|
This option only has an effect if \f[C]smart\f[R] is enabled.
|
|
|
|
It is selected automatically for \f[C]textile\f[R] input.
|
|
|
|
.SS Extension: \f[C]angle_brackets_escapable\f[R]
|
2016-10-26 22:10:02 +02:00
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
Allow \f[C]<\f[R] and \f[C]>\f[R] to be backslash-escaped, as they can
|
2018-10-20 07:56:40 +02:00
|
|
|
be in GitHub flavored Markdown but not original Markdown.
|
2020-10-11 01:45:02 +02:00
|
|
|
This is implied by pandoc\[cq]s default \f[C]all_symbols_escapable\f[R].
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]lists_without_preceding_blankline\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Allow a list to occur right after a paragraph, with no intervening blank
|
|
|
|
space.
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]four_space_rule\f[R]
|
2017-10-18 05:30:20 +02:00
|
|
|
.PP
|
|
|
|
Selects the pandoc <= 2.0 behavior for parsing lists, so that four
|
|
|
|
spaces indent are needed for list item continuation paragraphs.
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]spaced_reference_links\f[R]
|
2017-06-04 20:40:09 +02:00
|
|
|
.PP
|
|
|
|
Allow whitespace between the two components of a reference link, for
|
|
|
|
example,
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
[foo] [bar].
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2017-06-04 20:40:09 +02:00
|
|
|
.fi
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]hard_line_breaks\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Causes all newlines within a paragraph to be interpreted as hard line
|
|
|
|
breaks instead of spaces.
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]ignore_line_breaks\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Causes newlines within a paragraph to be ignored, rather than being
|
|
|
|
treated as spaces or as hard line breaks.
|
|
|
|
This option is intended for use with East Asian languages where spaces
|
|
|
|
are not used between words, but text is divided into lines for
|
|
|
|
readability.
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]east_asian_line_breaks\f[R]
|
2016-01-03 00:52:49 +01:00
|
|
|
.PP
|
|
|
|
Causes newlines within a paragraph to be ignored, rather than being
|
|
|
|
treated as spaces or as hard line breaks, when they occur between two
|
|
|
|
East Asian wide characters.
|
2018-10-20 07:56:40 +02:00
|
|
|
This is a better choice than \f[C]ignore_line_breaks\f[R] for texts that
|
2016-01-03 00:52:49 +01:00
|
|
|
include a mix of East Asian wide characters and other characters.
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]emoji\f[R]
|
2015-11-15 19:05:59 +01:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Parses textual emojis like \f[C]:smile:\f[R] as Unicode emoticons.
|
|
|
|
.SS Extension: \f[C]tex_math_single_backslash\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Causes anything between \f[C]\[rs](\f[R] and \f[C]\[rs])\f[R] to be
|
|
|
|
interpreted as inline TeX math, and anything between \f[C]\[rs][\f[R]
|
|
|
|
and \f[C]\[rs]]\f[R] to be interpreted as display TeX math.
|
2015-07-03 07:09:04 +02:00
|
|
|
Note: a drawback of this extension is that it precludes escaping
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C](\f[R] and \f[C][\f[R].
|
|
|
|
.SS Extension: \f[C]tex_math_double_backslash\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Causes anything between \f[C]\[rs]\[rs](\f[R] and \f[C]\[rs]\[rs])\f[R]
|
|
|
|
to be interpreted as inline TeX math, and anything between
|
|
|
|
\f[C]\[rs]\[rs][\f[R] and \f[C]\[rs]\[rs]]\f[R] to be interpreted as
|
|
|
|
display TeX math.
|
|
|
|
.SS Extension: \f[C]markdown_attribute\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
By default, pandoc interprets material inside block-level tags as
|
2015-11-13 04:52:02 +01:00
|
|
|
Markdown.
|
|
|
|
This extension changes the behavior so that Markdown is only parsed
|
2019-01-31 07:00:54 +01:00
|
|
|
inside block-level tags if the tags have the attribute
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]markdown=1\f[R].
|
|
|
|
.SS Extension: \f[C]mmd_title_block\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Enables a MultiMarkdown style title block at the top of the document,
|
|
|
|
for example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
Title: My title
|
|
|
|
Author: John Doe
|
|
|
|
Date: September 1, 2008
|
|
|
|
Comment: This is a sample mmd title block, with
|
|
|
|
a field spanning multiple lines.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
See the MultiMarkdown documentation for details.
|
2018-10-20 07:56:40 +02:00
|
|
|
If \f[C]pandoc_title_block\f[R] or \f[C]yaml_metadata_block\f[R] is
|
|
|
|
enabled, it will take precedence over \f[C]mmd_title_block\f[R].
|
|
|
|
.SS Extension: \f[C]abbreviations\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Parses PHP Markdown Extra abbreviation keys, like
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
*[HTML]: Hypertext Markup Language
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Note that the pandoc document model does not support abbreviations, so
|
|
|
|
if this extension is enabled, abbreviation keys are simply skipped (as
|
|
|
|
opposed to being parsed as paragraphs).
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]autolink_bare_uris\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Makes all absolute URIs into links, even when not surrounded by pointy
|
2018-10-20 07:56:40 +02:00
|
|
|
braces \f[C]<...>\f[R].
|
|
|
|
.SS Extension: \f[C]mmd_link_attributes\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
Parses multimarkdown style key-value attributes on link and image
|
2015-07-03 07:09:04 +02:00
|
|
|
references.
|
2018-10-20 07:56:40 +02:00
|
|
|
This extension should not be confused with the \f[C]link_attributes\f[R]
|
2016-01-03 00:52:49 +01:00
|
|
|
extension.
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
This is a reference ![image][ref] with multimarkdown attributes.
|
2016-01-03 00:52:49 +01:00
|
|
|
|
2020-02-16 06:26:29 +01:00
|
|
|
[ref]: https://path.to/image \[dq]Image title\[dq] width=20px height=30px
|
2018-11-02 05:56:41 +01:00
|
|
|
id=myId class=\[dq]myClass1 myClass2\[dq]
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2016-01-03 00:52:49 +01:00
|
|
|
.fi
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]mmd_header_identifiers\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
Parses multimarkdown style heading identifiers (in square brackets,
|
|
|
|
after the heading but before any trailing \f[C]#\f[R]s in an ATX
|
|
|
|
heading).
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS Extension: \f[C]compact_definition_lists\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
Activates the definition list syntax of pandoc 1.12.x and earlier.
|
2015-10-11 00:45:50 +02:00
|
|
|
This syntax differs from the one described above under Definition lists
|
|
|
|
in several respects:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP \[bu] 2
|
|
|
|
No blank line is required between consecutive items of the definition
|
|
|
|
list.
|
|
|
|
.IP \[bu] 2
|
2020-10-11 01:45:02 +02:00
|
|
|
To get a \[lq]tight\[rq] or \[lq]compact\[rq] list, omit space between
|
2018-10-20 07:56:40 +02:00
|
|
|
consecutive items; the space between a term and its definition does not
|
|
|
|
affect anything.
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP \[bu] 2
|
|
|
|
Lazy wrapping of paragraphs is not allowed: the entire definition must
|
|
|
|
be indented four spaces.
|
2019-11-16 21:54:19 +01:00
|
|
|
.SS Extension: \f[C]gutenberg\f[R]
|
|
|
|
.PP
|
|
|
|
Use Project Gutenberg conventions for \f[C]plain\f[R] output: all-caps
|
|
|
|
for strong emphasis, surround by underscores for regular emphasis, add
|
|
|
|
extra blank space around headings.
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Markdown variants
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
In addition to pandoc\[cq]s extended Markdown, the following Markdown
|
2015-07-03 07:09:04 +02:00
|
|
|
variants are supported:
|
2020-10-11 01:45:02 +02:00
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]markdown_phpextra\f[R] (PHP Markdown Extra)
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]markdown_github\f[R] (deprecated GitHub-Flavored Markdown)
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]markdown_mmd\f[R] (MultiMarkdown)
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]markdown_strict\f[R] (Markdown.pl)
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]commonmark\f[R] (CommonMark)
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]gfm\f[R] (Github-Flavored Markdown)
|
|
|
|
.IP \[bu] 2
|
|
|
|
\f[C]commonmark_x\f[R] (CommonMark with many pandoc extensions)
|
|
|
|
.PP
|
|
|
|
To see which extensions are supported for a given format, and which are
|
|
|
|
enabled by default, you can use the command
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
pandoc --list-extensions=FORMAT
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
where \f[C]FORMAT\f[R] is replaced with the name of the format.
|
|
|
|
.PP
|
|
|
|
Note that the list of extensions for \f[C]commonmark\f[R],
|
|
|
|
\f[C]gfm\f[R], and \f[C]commonmark_x\f[R] are defined relative to
|
|
|
|
default commonmark.
|
|
|
|
So, for example, \f[C]backtick_code_blocks\f[R] does not appear as an
|
|
|
|
extension, since it is enabled by default and cannot be disabled.
|
|
|
|
.SH CITATIONS
|
|
|
|
.PP
|
|
|
|
When the \f[C]--citeproc\f[R] option is used, pandoc can automatically
|
|
|
|
generate citations and a bibliography in a number of styles.
|
|
|
|
Basic usage is
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
pandoc --citeproc myinput.txt
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
To use this feature, you will need to have
|
|
|
|
.IP \[bu] 2
|
|
|
|
a document containing citations (see Extension: \f[C]citations\f[R]);
|
|
|
|
.IP \[bu] 2
|
|
|
|
a source of bibliographic data: either an external bibliography file or
|
|
|
|
a list of \f[C]references\f[R] in the document\[cq]s YAML metadata
|
|
|
|
.IP \[bu] 2
|
|
|
|
optionally, a CSL citation style.
|
|
|
|
.SS Specifying bibliographic data
|
|
|
|
.PP
|
|
|
|
You can specify an external bibliography using the
|
|
|
|
\f[C]bibliography\f[R] metadata field in a YAML metadata section or the
|
|
|
|
\f[C]--bibliography\f[R] command line argument.
|
|
|
|
If you want to use multiple bibliography files, you can supply multiple
|
|
|
|
\f[C]--bibliography\f[R] arguments or set \f[C]bibliography\f[R]
|
|
|
|
metadata field to YAML array.
|
|
|
|
A bibliography may have any of these formats:
|
|
|
|
.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{
|
|
|
|
CSL JSON
|
|
|
|
T}@T{
|
|
|
|
\&.json
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
CSL YAML
|
|
|
|
T}@T{
|
|
|
|
\&.yaml
|
|
|
|
T}
|
|
|
|
.TE
|
|
|
|
.PP
|
|
|
|
Note that \f[C].bib\f[R] can be used with both BibTeX and BibLaTeX
|
|
|
|
files; use the extension \f[C].bibtex\f[R] to force interpretation as
|
|
|
|
BibTeX.
|
|
|
|
.PP
|
|
|
|
In BibTeX and BibLaTeX databases, pandoc parses LaTeX markup inside
|
|
|
|
fields such as \f[C]title\f[R]; in CSL YAML databases, pandoc Markdown;
|
|
|
|
and in CSL JSON databases, an HTML-like markup:
|
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]<i>...</i>\f[B]\f[R]
|
|
|
|
italics
|
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]<b>...</b>\f[B]\f[R]
|
|
|
|
bold
|
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]<span style=\[dq]font-variant:small-caps;\[dq]>...</span>\f[B]\f[R] or \f[B]\f[CB]<sc>...</sc>\f[B]\f[R]
|
|
|
|
small capitals
|
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]<sub>...</sub>\f[B]\f[R]
|
|
|
|
subscript
|
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]<sup>...</sup>\f[B]\f[R]
|
|
|
|
superscript
|
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]<span class=\[dq]nocase\[dq]>...</span>\f[B]\f[R]
|
|
|
|
prevent a phrase from being capitalized as title case
|
|
|
|
.PP
|
|
|
|
As an alternative to specifying a bibliography file using
|
|
|
|
\f[C]--bibliography\f[R] or the YAML metadata field
|
|
|
|
\f[C]bibliography\f[R], you can include the citation data directly in
|
|
|
|
the \f[C]references\f[R] field of the document\[cq]s YAML metadata.
|
|
|
|
The field should contain an array of YAML-encoded references, for
|
|
|
|
example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
---
|
|
|
|
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: \[aq]Molecular structure of nucleic acids: a structure for
|
|
|
|
deoxyribose nucleic acid\[aq]
|
|
|
|
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
|
|
|
|
\&...
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Note that \f[C]pandoc\f[R] can be used to produce such a YAML metadata
|
|
|
|
section from a BibTeX, BibLaTeX, or CSL JSON bibliography:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
pandoc chem.bib -s -t markdown
|
|
|
|
pandoc chem.json -s -t markdown
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
\f[C]pandoc\f[R] can also be used to produce CSL JSON bibliography from
|
|
|
|
BibTeX, BibLaTeX, or markdown YAML:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
pandoc chem.bib -s -t csljson
|
|
|
|
pandoc chem.yaml -s -t csljson
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Running pandoc on a bibliography file with the \f[C]--citeproc\f[R]
|
|
|
|
option will create a formatted bibliography in the format of your
|
|
|
|
choice:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
pandoc chem.bib -s --citeproc -o chem.html
|
|
|
|
pandoc chem.bib -s --citeproc -o chem.pdf
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.SS Capitalization in titles
|
|
|
|
.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[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],
|
|
|
|
\f[C]australian\f[R], \f[C]newzealand\f[R], \f[C]USenglish\f[R], or
|
|
|
|
\f[C]UKenglish\f[R].)
|
|
|
|
.IP \[bu] 2
|
|
|
|
As is standard with bibtex/biblatex, proper names should be protected
|
|
|
|
with curly braces so that they won\[cq]t be lowercased in styles that
|
|
|
|
call for sentence case.
|
|
|
|
For example:
|
|
|
|
.RS 2
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
title = {My Dinner with {Andre}}
|
|
|
|
\f[R]
|
|
|
|
.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[R]
|
|
|
|
.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\[cq]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[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
|
|
|
|
Protect words that should not be converted to title case using this
|
|
|
|
syntax:
|
|
|
|
.RS 2
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
Spin wave dispersion on the <span class=\[dq]nocase\[dq]>nm</span> scale
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.RE
|
|
|
|
.SS Conference Papers, Published vs.\ Unpublished
|
|
|
|
.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]).
|
|
|
|
.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
|
|
|
|
type will be mapped to CSL \f[C]manuscript\f[R]).
|
|
|
|
.PP
|
|
|
|
For a talk, an unpublished conference paper, or a poster presentation,
|
|
|
|
use the biblatex entry type \f[C]unpublished\f[R] with an
|
|
|
|
\f[C]eventtitle\f[R] field (this entry type will be mapped to CSL
|
|
|
|
\f[C]speech\f[R]).
|
|
|
|
Use the biblatex \f[C]type\f[R] field to indicate the type,
|
|
|
|
e.g.\ \[lq]Paper\[rq], or \[lq]Poster\[rq].
|
|
|
|
\f[C]venue\f[R] and \f[C]eventdate\f[R] may be useful too, though
|
|
|
|
\f[C]eventdate\f[R] will not be rendered by most CSL styles.
|
|
|
|
Note that \f[C]venue\f[R] is for the event\[cq]s venue, unlike
|
|
|
|
\f[C]location\f[R] which describes the publisher\[cq]s location; do not
|
|
|
|
use the latter for an unpublished conference paper.
|
|
|
|
.SS Specifying a citation style
|
|
|
|
.PP
|
|
|
|
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 \f[C]--csl\f[R] option or the
|
|
|
|
\f[C]csl\f[R] (or \f[C]citation-style\f[R]) 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
|
|
|
|
\f[C]default.csl\f[R] in your user data directory.) The CSL project
|
|
|
|
provides further information on finding and editing styles.
|
|
|
|
.PP
|
|
|
|
The \f[C]--citation-abbreviations\f[R] option (or the
|
|
|
|
\f[C]citation-abbreviations\f[R] metadata field) may be used to specify
|
|
|
|
a JSON file containing abbreviations of journals that should be used in
|
|
|
|
formatted bibliographies when \f[C]form=\[dq]short\[dq]\f[R] is
|
|
|
|
specified.
|
|
|
|
The format of the file can be illustrated with an example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
{ \[dq]default\[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]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.SS Raw content in a style
|
|
|
|
.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[R]
|
|
|
|
.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.
|
2020-10-14 07:47:57 +02:00
|
|
|
However, stylesheets customized in this way will not be usable by other
|
2020-10-11 01:45:02 +02:00
|
|
|
CSL implementations.
|
|
|
|
.SS Placement of the bibliography
|
|
|
|
.PP
|
|
|
|
If the style calls for a list of works cited, it will be placed in a div
|
|
|
|
with id \f[C]refs\f[R], if one exists:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
::: {#refs}
|
|
|
|
:::
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Otherwise, it will be placed at the end of the document.
|
|
|
|
Generation of the bibliography can be suppressed by setting
|
|
|
|
\f[C]suppress-bibliography: true\f[R] in the YAML metadata.
|
|
|
|
.PP
|
|
|
|
If you wish the bibliography to have a section heading, you can set
|
|
|
|
\f[C]reference-section-title\f[R] in the metadata, or put the heading at
|
|
|
|
the beginning of the div with id \f[C]refs\f[R] (if you are using it) or
|
|
|
|
at the end of your document:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
last paragraph...
|
|
|
|
|
|
|
|
# References
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
The bibliography will be inserted after this heading.
|
|
|
|
Note that the \f[C]unnumbered\f[R] class will be added to this heading,
|
|
|
|
so that the section will not be numbered.
|
|
|
|
.SS Including uncited items in the bibliography
|
|
|
|
.PP
|
|
|
|
If you want to include items in the bibliography without actually citing
|
|
|
|
them in the body text, you can define a dummy \f[C]nocite\f[R] metadata
|
|
|
|
field and put the citations there:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
---
|
|
|
|
nocite: |
|
|
|
|
\[at]item1, \[at]item2
|
|
|
|
\&...
|
|
|
|
|
|
|
|
\[at]item3
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
In this example, the document will contain a citation for
|
|
|
|
\f[C]item3\f[R] only, but the bibliography will contain entries for
|
|
|
|
\f[C]item1\f[R], \f[C]item2\f[R], and \f[C]item3\f[R].
|
|
|
|
.PP
|
|
|
|
It is possible to create a bibliography with all the citations, whether
|
|
|
|
or not they appear in the document, by using a wildcard:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
---
|
|
|
|
nocite: |
|
|
|
|
\[at]*
|
|
|
|
\&...
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
For LaTeX output, you can also use \f[C]natbib\f[R] or
|
|
|
|
\f[C]biblatex\f[R] to render the bibliography.
|
|
|
|
In order to do so, specify bibliography files as outlined above, and add
|
|
|
|
\f[C]--natbib\f[R] or \f[C]--biblatex\f[R] argument to \f[C]pandoc\f[R]
|
|
|
|
invocation.
|
|
|
|
Bear in mind that bibliography files have to be in either BibTeX (for
|
|
|
|
\f[C]--natbib\f[R]) or BibLaTeX (for \f[C]--biblatex\f[R]) format.
|
|
|
|
.SS Other relevant metadata fields
|
|
|
|
.PP
|
|
|
|
A few other metadata fields affect bibliography formatting:
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2020-10-11 01:45:02 +02:00
|
|
|
\f[B]\f[CB]link-citation\f[B]\f[R]
|
|
|
|
If true, citations will be hyperlinked to the corresponding bibliography
|
|
|
|
entries (for author-date and numerical styles only).
|
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]lang\f[B]\f[R]
|
|
|
|
The \f[C]lang\f[R] field will affect how the style is localized, for
|
|
|
|
example in the translation of labels and the use of quotation marks.
|
|
|
|
(For backwards compatibility, \f[C]locale\f[R] may be used instead of
|
|
|
|
\f[C]lang\f[R], but this use is deprecated.)
|
|
|
|
.TP
|
|
|
|
\f[B]\f[CB]notes-after-punctuation\f[B]\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],
|
|
|
|
the result will look like \f[C]blah blah.[\[ha]1]\f[R], 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.
|
|
|
|
.SH SLIDE SHOWS
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2016-12-10 11:29:58 +01:00
|
|
|
You can use pandoc to produce an HTML + JavaScript slide presentation
|
2015-07-03 07:09:04 +02:00
|
|
|
that can be viewed via a web browser.
|
|
|
|
There are five ways to do this, using S5, DZSlides, Slidy, Slideous, or
|
|
|
|
reveal.js.
|
2018-10-20 07:56:40 +02:00
|
|
|
You can also produce a PDF slide show using LaTeX \f[C]beamer\f[R], or
|
2017-12-12 06:46:58 +01:00
|
|
|
slides shows in Microsoft PowerPoint format.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
Here\[cq]s the Markdown source for a simple slide show,
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]habits.txt\f[R]:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
% Habits
|
|
|
|
% John Doe
|
|
|
|
% March 22, 2005
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
# In the morning
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
## Getting up
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2019-01-31 07:00:54 +01:00
|
|
|
- Turn off alarm
|
|
|
|
- Get out of bed
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
## Breakfast
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2019-01-31 07:00:54 +01:00
|
|
|
- Eat eggs
|
|
|
|
- Drink coffee
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
# In the evening
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
## Dinner
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2019-01-31 07:00:54 +01:00
|
|
|
- Eat spaghetti
|
|
|
|
- Drink wine
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2019-01-31 07:00:54 +01:00
|
|
|
------------------
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
![picture of spaghetti](images/spaghetti.jpg)
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
## Going to sleep
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2019-01-31 07:00:54 +01:00
|
|
|
- Get in bed
|
|
|
|
- Count sheep
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2016-12-10 11:29:58 +01:00
|
|
|
To produce an HTML/JavaScript slide show, simply type
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc -t FORMAT -s habits.txt -o habits.html
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
where \f[C]FORMAT\f[R] is either \f[C]s5\f[R], \f[C]slidy\f[R],
|
|
|
|
\f[C]slideous\f[R], \f[C]dzslides\f[R], or \f[C]revealjs\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
For Slidy, Slideous, reveal.js, and S5, the file produced by pandoc with
|
2019-01-31 07:00:54 +01:00
|
|
|
the \f[C]-s/--standalone\f[R] option embeds a link to JavaScript and CSS
|
|
|
|
files, which are assumed to be available at the relative path
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]s5/default\f[R] (for S5), \f[C]slideous\f[R] (for Slideous),
|
|
|
|
\f[C]reveal.js\f[R] (for reveal.js), or at the Slidy website at
|
|
|
|
\f[C]w3.org\f[R] (for Slidy).
|
2019-01-31 07:00:54 +01:00
|
|
|
(These paths can be changed by setting the \f[C]slidy-url\f[R],
|
|
|
|
\f[C]slideous-url\f[R], \f[C]revealjs-url\f[R], or \f[C]s5-url\f[R]
|
|
|
|
variables; see Variables for HTML slides, above.) For DZSlides, the
|
2016-12-10 11:29:58 +01:00
|
|
|
(relatively short) JavaScript and CSS are included in the file by
|
2015-07-03 07:09:04 +02:00
|
|
|
default.
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
With all HTML slide formats, the \f[C]--self-contained\f[R] option can
|
|
|
|
be used to produce a single file that contains all of the data necessary
|
|
|
|
to display the slide show, including linked scripts, stylesheets,
|
|
|
|
images, and videos.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
To produce a PDF slide show using beamer, type
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc -t beamer habits.txt -o habits.pdf
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Note that a reveal.js slide show can also be converted to a PDF by
|
|
|
|
printing it to a file from the browser.
|
2017-12-12 06:46:58 +01:00
|
|
|
.PP
|
|
|
|
To produce a Powerpoint slide show, type
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc habits.txt -o habits.pptx
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2017-12-12 06:46:58 +01:00
|
|
|
.fi
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Structuring the slide show
|
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
By default, the \f[I]slide level\f[R] is the highest heading level in
|
|
|
|
the hierarchy that is followed immediately by content, and not another
|
|
|
|
heading, somewhere in the document.
|
|
|
|
In the example above, level-1 headings are always followed by level-2
|
|
|
|
headings, which are followed by content, so the slide level is 2.
|
2019-01-31 07:00:54 +01:00
|
|
|
This default can be overridden using the \f[C]--slide-level\f[R] option.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
The document is carved up into slides according to the following rules:
|
|
|
|
.IP \[bu] 2
|
|
|
|
A horizontal rule always starts a new slide.
|
|
|
|
.IP \[bu] 2
|
2019-04-06 00:11:08 +02:00
|
|
|
A heading at the slide level always starts a new slide.
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP \[bu] 2
|
2019-04-06 00:11:08 +02:00
|
|
|
Headings \f[I]below\f[R] the slide level in the hierarchy create
|
|
|
|
headings \f[I]within\f[R] a slide.
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP \[bu] 2
|
2019-04-06 00:11:08 +02:00
|
|
|
Headings \f[I]above\f[R] the slide level in the hierarchy create
|
2020-10-11 01:45:02 +02:00
|
|
|
\[lq]title slides,\[rq] which just contain the section title and help to
|
2018-10-20 07:56:40 +02:00
|
|
|
break the slide show into sections.
|
2019-04-06 00:11:08 +02:00
|
|
|
Non-slide content under these headings will be included on the title
|
2019-03-03 18:46:21 +01:00
|
|
|
slide (for HTML slide shows) or in a subsequent slide with the same
|
|
|
|
title (for beamer).
|
2017-06-04 20:40:09 +02:00
|
|
|
.IP \[bu] 2
|
2020-10-11 01:45:02 +02:00
|
|
|
A title page is constructed automatically from the document\[cq]s title
|
2015-07-03 07:09:04 +02:00
|
|
|
block, if present.
|
|
|
|
(In the case of beamer, this can be disabled by commenting out some
|
|
|
|
lines in the default template.)
|
|
|
|
.PP
|
|
|
|
These rules are designed to support many different styles of slide show.
|
2020-10-11 01:45:02 +02:00
|
|
|
If you don\[cq]t care about structuring your slides into sections and
|
2019-04-06 00:11:08 +02:00
|
|
|
subsections, you can just use level-1 headings for all each slide.
|
|
|
|
(In that case, level-1 will be the slide level.) But you can also
|
2015-07-03 07:09:04 +02:00
|
|
|
structure the slide show into sections, as in the example above.
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
Note: in reveal.js slide shows, if slide level is 2, a two-dimensional
|
2019-04-06 00:11:08 +02:00
|
|
|
layout will be produced, with level-1 headings building horizontally and
|
|
|
|
level-2 headings building vertically.
|
2015-07-03 07:09:04 +02:00
|
|
|
It is not recommended that you use deeper nesting of section levels with
|
|
|
|
reveal.js.
|
|
|
|
.SS Incremental lists
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
By default, these writers produce lists that display \[lq]all at
|
|
|
|
once.\[rq] If you want your lists to display incrementally (one item at
|
2019-01-31 07:00:54 +01:00
|
|
|
a time), use the \f[C]-i\f[R] option.
|
2018-03-03 05:23:53 +01:00
|
|
|
If you want a particular list to depart from the default, put it in a
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]div\f[R] block with class \f[C]incremental\f[R] or
|
|
|
|
\f[C]nonincremental\f[R].
|
2018-11-02 05:56:41 +01:00
|
|
|
So, for example, using the \f[C]fenced div\f[R] syntax, the following
|
2018-03-03 05:23:53 +01:00
|
|
|
would be incremental regardless of the document default:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
::: incremental
|
2018-03-03 05:23:53 +01:00
|
|
|
|
2019-01-31 07:00:54 +01:00
|
|
|
- Eat spaghetti
|
|
|
|
- Drink wine
|
2018-03-03 05:23:53 +01:00
|
|
|
|
|
|
|
:::
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-03-03 05:23:53 +01:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
or
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
::: nonincremental
|
2018-03-03 05:23:53 +01:00
|
|
|
|
2019-01-31 07:00:54 +01:00
|
|
|
- Eat spaghetti
|
|
|
|
- Drink wine
|
2018-03-03 05:23:53 +01:00
|
|
|
|
|
|
|
:::
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-03-03 05:23:53 +01:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
While using \f[C]incremental\f[R] and \f[C]nonincremental\f[R] divs are
|
2019-01-31 07:00:54 +01:00
|
|
|
the recommended method of setting incremental lists on a per-case basis,
|
|
|
|
an older method is also supported: putting lists inside a blockquote
|
|
|
|
will depart from the document default (that is, it will display
|
|
|
|
incrementally without the \f[C]-i\f[R] option and all at once with the
|
|
|
|
\f[C]-i\f[R] option):
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
> - Eat spaghetti
|
|
|
|
> - Drink wine
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-03-03 05:23:53 +01:00
|
|
|
Both methods allow incremental and nonincremental lists to be mixed in a
|
2015-07-03 07:09:04 +02:00
|
|
|
single document.
|
2019-11-16 21:54:19 +01:00
|
|
|
.PP
|
|
|
|
Note: Neither the \f[C]-i/--incremental\f[R] option nor any of the
|
|
|
|
methods described here currently works for PowerPoint output.
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Inserting pauses
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
You can add \[lq]pauses\[rq] within a slide by including a paragraph
|
2018-10-20 07:56:40 +02:00
|
|
|
containing three dots, separated by spaces:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
# Slide with a pause
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
content before the pause
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
\&. . .
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
content after the pause
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
2019-11-16 21:54:19 +01:00
|
|
|
.PP
|
|
|
|
Note: this feature is not yet implemented for PowerPoint output.
|
2015-07-03 07:09:04 +02:00
|
|
|
.SS Styling the slides
|
|
|
|
.PP
|
|
|
|
You can change the style of HTML slides by putting customized CSS files
|
2018-10-20 07:56:40 +02:00
|
|
|
in \f[C]$DATADIR/s5/default\f[R] (for S5), \f[C]$DATADIR/slidy\f[R] (for
|
|
|
|
Slidy), or \f[C]$DATADIR/slideous\f[R] (for Slideous), where
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]$DATADIR\f[R] is the user data directory (see \f[C]--data-dir\f[R],
|
|
|
|
above).
|
2020-10-11 01:45:02 +02:00
|
|
|
The originals may be found in pandoc\[cq]s system data directory
|
2019-01-31 07:00:54 +01:00
|
|
|
(generally \f[C]$CABALDIR/pandoc-VERSION/s5/default\f[R]).
|
2015-07-03 07:09:04 +02:00
|
|
|
Pandoc will look there for any files it does not find in the user data
|
|
|
|
directory.
|
|
|
|
.PP
|
|
|
|
For dzslides, the CSS is included in the HTML file itself, and may be
|
|
|
|
modified there.
|
|
|
|
.PP
|
2015-10-15 05:49:15 +02:00
|
|
|
All reveal.js configuration options can be set through variables.
|
2018-10-20 07:56:40 +02:00
|
|
|
For example, themes can be used by setting the \f[C]theme\f[R] variable:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
-V theme=moon
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
Or you can specify a custom stylesheet using the \f[C]--css\f[R] option.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
To style beamer slides, you can specify a \f[C]theme\f[R],
|
|
|
|
\f[C]colortheme\f[R], \f[C]fonttheme\f[R], \f[C]innertheme\f[R], and
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]outertheme\f[R], using the \f[C]-V\f[R] option:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc -t beamer habits.txt -V theme:Warsaw -o habits.pdf
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
Note that heading attributes will turn into slide attributes (on a
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]<div>\f[R] or \f[C]<section>\f[R]) in HTML slide formats, allowing
|
2015-07-03 07:09:04 +02:00
|
|
|
you to style individual slides.
|
2019-04-06 00:11:08 +02:00
|
|
|
In beamer, the only heading attribute that affects slides is the
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]allowframebreaks\f[R] class, which sets the
|
|
|
|
\f[C]allowframebreaks\f[R] option, causing multiple slides to be created
|
2015-07-03 07:09:04 +02:00
|
|
|
if the content overfills the frame.
|
|
|
|
This is recommended especially for bibliographies:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
# References {.allowframebreaks}
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.SS Speaker notes
|
|
|
|
.PP
|
2018-03-03 05:23:53 +01:00
|
|
|
Speaker notes are supported in reveal.js and PowerPoint (pptx) output.
|
2015-11-13 04:52:02 +01:00
|
|
|
You can add notes to your Markdown document thus:
|
2015-07-03 07:09:04 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
::: notes
|
2017-11-01 05:29:31 +01:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
This is my note.
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2019-01-31 07:00:54 +01:00
|
|
|
- It can contain Markdown
|
|
|
|
- like this list
|
2015-07-03 07:09:04 +02:00
|
|
|
|
2017-11-01 05:29:31 +01:00
|
|
|
:::
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
To show the notes window in reveal.js, press \f[C]s\f[R] while viewing
|
2018-03-03 05:23:53 +01:00
|
|
|
the presentation.
|
|
|
|
Speaker notes in PowerPoint will be available, as usual, in handouts and
|
|
|
|
presenter view.
|
|
|
|
.PP
|
2015-07-03 07:09:04 +02:00
|
|
|
Notes are not yet supported for other slide formats, but the notes will
|
|
|
|
not appear on the slides themselves.
|
2017-11-01 05:29:31 +01:00
|
|
|
.SS Columns
|
|
|
|
.PP
|
|
|
|
To put material in side by side columns, you can use a native div
|
2018-10-20 07:56:40 +02:00
|
|
|
container with class \f[C]columns\f[R], containing two or more div
|
|
|
|
containers with class \f[C]column\f[R] and a \f[C]width\f[R] attribute:
|
2017-11-01 05:29:31 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
:::::::::::::: {.columns}
|
|
|
|
::: {.column width=\[dq]40%\[dq]}
|
2017-11-01 05:29:31 +01:00
|
|
|
contents...
|
|
|
|
:::
|
2018-11-02 05:56:41 +01:00
|
|
|
::: {.column width=\[dq]60%\[dq]}
|
2017-11-01 05:29:31 +01:00
|
|
|
contents...
|
|
|
|
:::
|
|
|
|
::::::::::::::
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2017-11-01 05:29:31 +01:00
|
|
|
.fi
|
2020-06-29 22:33:57 +02:00
|
|
|
.SS Additional columns attributes in beamer
|
|
|
|
.PP
|
|
|
|
The div containers with classes \f[C]columns\f[R] and \f[C]column\f[R]
|
|
|
|
can optionally have an \f[C]align\f[R] attribute.
|
|
|
|
The class \f[C]columns\f[R] can optionally have a \f[C]totalwidth\f[R]
|
|
|
|
attribute or an \f[C]onlytextwidth\f[R] class.
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
:::::::::::::: {.columns align=center totalwidth=8em}
|
|
|
|
::: {.column width=\[dq]40%\[dq]}
|
|
|
|
contents...
|
|
|
|
:::
|
|
|
|
::: {.column width=\[dq]60%\[dq] align=bottom}
|
|
|
|
contents...
|
|
|
|
:::
|
|
|
|
::::::::::::::
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
The \f[C]align\f[R] attributes on \f[C]columns\f[R] and \f[C]column\f[R]
|
|
|
|
can be used with the values \f[C]top\f[R], \f[C]top-baseline\f[R],
|
|
|
|
\f[C]center\f[R] and \f[C]bottom\f[R] to vertically align the columns.
|
|
|
|
It defaults to \f[C]top\f[R] in \f[C]columns\f[R].
|
|
|
|
.PP
|
|
|
|
The \f[C]totalwidth\f[R] attribute limits the width of the columns to
|
|
|
|
the given value.
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
:::::::::::::: {.columns align=top .onlytextwidth}
|
|
|
|
::: {.column width=\[dq]40%\[dq] align=center}
|
|
|
|
contents...
|
|
|
|
:::
|
|
|
|
::: {.column width=\[dq]60%\[dq]}
|
|
|
|
contents...
|
|
|
|
:::
|
|
|
|
::::::::::::::
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
The class \f[C]onlytextwidth\f[R] sets the \f[C]totalwidth\f[R] to
|
|
|
|
\f[C]\[rs]textwidth\f[R].
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
See Section 12.7 of the Beamer User\[cq]s Guide for more details.
|
2015-10-16 19:52:00 +02:00
|
|
|
.SS Frame attributes in beamer
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Sometimes it is necessary to add the LaTeX \f[C][fragile]\f[R] option to
|
|
|
|
a frame in beamer (for example, when using the \f[C]minted\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
environment).
|
2019-04-06 00:11:08 +02:00
|
|
|
This can be forced by adding the \f[C]fragile\f[R] class to the heading
|
2015-07-03 07:09:04 +02:00
|
|
|
introducing the slide:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
# Fragile slide {.fragile}
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
2015-10-16 19:52:00 +02:00
|
|
|
.PP
|
|
|
|
All of the other frame attributes described in Section 8.1 of the Beamer
|
2020-10-11 01:45:02 +02:00
|
|
|
User\[cq]s Guide may also be used: \f[C]allowdisplaybreaks\f[R],
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]allowframebreaks\f[R], \f[C]b\f[R], \f[C]c\f[R], \f[C]t\f[R],
|
|
|
|
\f[C]environment\f[R], \f[C]label\f[R], \f[C]plain\f[R],
|
|
|
|
\f[C]shrink\f[R], \f[C]standout\f[R], \f[C]noframenumbering\f[R].
|
2018-08-05 21:40:56 +02:00
|
|
|
.SS Background in reveal.js and beamer
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
Background images can be added to self-contained reveal.js slideshows
|
2018-08-05 21:40:56 +02:00
|
|
|
and to beamer slideshows.
|
2018-03-18 03:04:20 +01:00
|
|
|
.PP
|
2018-08-05 21:40:56 +02:00
|
|
|
For the same image on every slide, use the configuration option
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]background-image\f[R] either in the YAML metadata block or as a
|
|
|
|
command-line variable.
|
2018-08-05 21:40:56 +02:00
|
|
|
(There are no other options in beamer and the rest of this section
|
|
|
|
concerns reveal.js slideshows.)
|
2018-03-18 03:04:20 +01:00
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
For reveal.js, you can instead use the reveal.js-native option
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]parallaxBackgroundImage\f[R].
|
|
|
|
You can also set \f[C]parallaxBackgroundHorizontal\f[R] and
|
|
|
|
\f[C]parallaxBackgroundVertical\f[R] the same way and must also set
|
|
|
|
\f[C]parallaxBackgroundSize\f[R] to have your values take effect.
|
2018-03-18 03:04:20 +01:00
|
|
|
.PP
|
2018-08-05 21:40:56 +02:00
|
|
|
To set an image for a particular reveal.js slide, add
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]{data-background-image=\[dq]/path/to/image\[dq]}\f[R] to the first
|
2019-04-06 00:11:08 +02:00
|
|
|
slide-level heading on the slide (which may even be empty).
|
2018-03-18 03:04:20 +01:00
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
In reveal.js\[cq]s overview mode, the parallaxBackgroundImage will show
|
2018-03-18 03:04:20 +01:00
|
|
|
up only on the first slide.
|
|
|
|
.PP
|
2018-08-05 21:40:56 +02:00
|
|
|
Other reveal.js background settings also work on individual slides,
|
2019-01-31 07:00:54 +01:00
|
|
|
including \f[C]data-background-size\f[R],
|
|
|
|
\f[C]data-background-repeat\f[R], \f[C]data-background-color\f[R],
|
|
|
|
\f[C]data-transition\f[R], and \f[C]data-transition-speed\f[R].
|
2018-03-18 03:04:20 +01:00
|
|
|
.PP
|
2019-12-12 06:03:29 +01:00
|
|
|
To add a background image to the automatically generated title slide,
|
|
|
|
use the \f[C]title-slide-attributes\f[R] variable in the YAML metadata
|
|
|
|
block.
|
|
|
|
It must contain a map of attribute names and values.
|
|
|
|
.PP
|
2018-03-18 03:04:20 +01:00
|
|
|
See the reveal.js documentation for more details.
|
|
|
|
.PP
|
2018-08-05 21:40:56 +02:00
|
|
|
For example in reveal.js:
|
2018-03-18 03:04:20 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
---
|
2018-11-02 05:56:41 +01:00
|
|
|
title: My Slideshow
|
|
|
|
parallaxBackgroundImage: /path/to/my/background_image.png
|
2019-12-12 06:03:29 +01:00
|
|
|
title-slide-attributes:
|
|
|
|
data-background-image: /path/to/title_image.png
|
|
|
|
data-background-size: contain
|
2019-01-31 07:00:54 +01:00
|
|
|
---
|
2018-03-18 03:04:20 +01:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
## Slide One
|
2018-03-18 03:04:20 +01:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
Slide 1 has background_image.png as its background.
|
2018-03-18 03:04:20 +01:00
|
|
|
|
2019-01-31 07:00:54 +01:00
|
|
|
## {data-background-image=\[dq]/path/to/special_image.jpg\[dq]}
|
2018-03-18 03:04:20 +01:00
|
|
|
|
2019-04-06 00:11:08 +02:00
|
|
|
Slide 2 has a special image for its background, even though the heading has no content.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-03-18 03:04:20 +01:00
|
|
|
.fi
|
2020-10-11 01:45:02 +02:00
|
|
|
.SH EPUBS
|
2015-11-13 04:52:02 +01:00
|
|
|
.SS EPUB Metadata
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
EPUB metadata may be specified using the \f[C]--epub-metadata\f[R]
|
2015-11-13 04:52:02 +01:00
|
|
|
option, but if the source document is Markdown, it is better to use a
|
2015-07-03 07:09:04 +02:00
|
|
|
YAML metadata block.
|
|
|
|
Here is an example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
---
|
2015-07-03 07:09:04 +02:00
|
|
|
title:
|
2019-01-31 07:00:54 +01:00
|
|
|
- type: main
|
2018-11-02 05:56:41 +01:00
|
|
|
text: My Book
|
2019-01-31 07:00:54 +01:00
|
|
|
- type: subtitle
|
2018-11-02 05:56:41 +01:00
|
|
|
text: An investigation of metadata
|
2015-07-03 07:09:04 +02:00
|
|
|
creator:
|
2019-01-31 07:00:54 +01:00
|
|
|
- role: author
|
2018-11-02 05:56:41 +01:00
|
|
|
text: John Smith
|
2019-01-31 07:00:54 +01:00
|
|
|
- role: editor
|
2018-11-02 05:56:41 +01:00
|
|
|
text: Sarah Jones
|
2015-07-03 07:09:04 +02:00
|
|
|
identifier:
|
2019-01-31 07:00:54 +01:00
|
|
|
- scheme: DOI
|
2018-11-02 05:56:41 +01:00
|
|
|
text: doi:10.234234.234/33
|
|
|
|
publisher: My Press
|
2019-01-31 07:00:54 +01:00
|
|
|
rights: \[co] 2007 John Smith, CC BY-NC
|
2017-10-18 05:30:20 +02:00
|
|
|
ibooks:
|
2018-11-02 05:56:41 +01:00
|
|
|
version: 1.3.4
|
2015-07-03 07:09:04 +02:00
|
|
|
\&...
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
The following fields are recognized:
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]identifier\f[B]\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Either a string value or an object with fields \f[C]text\f[R] and
|
|
|
|
\f[C]scheme\f[R].
|
2019-01-31 07:00:54 +01:00
|
|
|
Valid values for \f[C]scheme\f[R] are \f[C]ISBN-10\f[R],
|
|
|
|
\f[C]GTIN-13\f[R], \f[C]UPC\f[R], \f[C]ISMN-10\f[R], \f[C]DOI\f[R],
|
|
|
|
\f[C]LCCN\f[R], \f[C]GTIN-14\f[R], \f[C]ISBN-13\f[R],
|
2018-11-02 05:56:41 +01:00
|
|
|
\f[C]Legal deposit number\f[R], \f[C]URN\f[R], \f[C]OCLC\f[R],
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]ISMN-13\f[R], \f[C]ISBN-A\f[R], \f[C]JP\f[R], \f[C]OLCC\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]title\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
Either a string value, or an object with fields \f[C]file-as\f[R] and
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]type\f[R], or a list of such objects.
|
|
|
|
Valid values for \f[C]type\f[R] are \f[C]main\f[R], \f[C]subtitle\f[R],
|
|
|
|
\f[C]short\f[R], \f[C]collection\f[R], \f[C]edition\f[R],
|
|
|
|
\f[C]extended\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]creator\f[B]\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Either a string value, or an object with fields \f[C]role\f[R],
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]file-as\f[R], and \f[C]text\f[R], or a list of such objects.
|
2018-10-20 07:56:40 +02:00
|
|
|
Valid values for \f[C]role\f[R] are MARC relators, but pandoc will
|
2020-10-11 01:45:02 +02:00
|
|
|
attempt to translate the human-readable versions (like \[lq]author\[rq]
|
|
|
|
and \[lq]editor\[rq]) to the appropriate marc relators.
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]contributor\f[B]\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Same format as \f[C]creator\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]date\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
A string value in \f[C]YYYY-MM-DD\f[R] format.
|
2015-07-03 07:09:04 +02:00
|
|
|
(Only the year is necessary.) Pandoc will attempt to convert other
|
|
|
|
common date formats.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]lang\f[B]\f[R] (or legacy: \f[B]\f[CB]language\f[B]\f[R])
|
2015-10-11 00:45:50 +02:00
|
|
|
A string value in BCP 47 format.
|
2015-07-03 07:09:04 +02:00
|
|
|
Pandoc will default to the local language if nothing is specified.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]subject\f[B]\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
A string value or a list of such values.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]description\f[B]\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
A string value.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]type\f[B]\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
A string value.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]format\f[B]\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
A string value.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]relation\f[B]\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
A string value.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]coverage\f[B]\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
A string value.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]rights\f[B]\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
A string value.
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]cover-image\f[B]\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
A string value (path to cover image).
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]css\f[B]\f[R] (or legacy: \f[B]\f[CB]stylesheet\f[B]\f[R])
|
2015-07-03 07:09:04 +02:00
|
|
|
A string value (path to CSS stylesheet).
|
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]page-progression-direction\f[B]\f[R]
|
2018-10-20 07:56:40 +02:00
|
|
|
Either \f[C]ltr\f[R] or \f[C]rtl\f[R].
|
2019-01-31 07:00:54 +01:00
|
|
|
Specifies the \f[C]page-progression-direction\f[R] attribute for the
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]spine\f[R] element.
|
2017-10-18 05:30:20 +02:00
|
|
|
.TP
|
2019-07-14 01:41:43 +02:00
|
|
|
\f[B]\f[CB]ibooks\f[B]\f[R]
|
2019-01-31 07:00:54 +01:00
|
|
|
iBooks-specific metadata, with the following fields:
|
2017-10-18 05:30:20 +02:00
|
|
|
.RS
|
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]version\f[R]: (string)
|
2017-10-18 05:30:20 +02:00
|
|
|
.IP \[bu] 2
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]specified-fonts\f[R]: \f[C]true\f[R]|\f[C]false\f[R] (default
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]false\f[R])
|
2017-10-18 05:30:20 +02:00
|
|
|
.IP \[bu] 2
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]ipad-orientation-lock\f[R]:
|
|
|
|
\f[C]portrait-only\f[R]|\f[C]landscape-only\f[R]
|
2017-10-18 05:30:20 +02:00
|
|
|
.IP \[bu] 2
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]iphone-orientation-lock\f[R]:
|
|
|
|
\f[C]portrait-only\f[R]|\f[C]landscape-only\f[R]
|
2017-10-18 05:30:20 +02:00
|
|
|
.IP \[bu] 2
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]binding\f[R]: \f[C]true\f[R]|\f[C]false\f[R] (default
|
|
|
|
\f[C]true\f[R])
|
2017-10-18 05:30:20 +02:00
|
|
|
.IP \[bu] 2
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]scroll-axis\f[R]:
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]vertical\f[R]|\f[C]horizontal\f[R]|\f[C]default\f[R]
|
2017-10-18 05:30:20 +02:00
|
|
|
.RE
|
2018-10-20 07:56:40 +02:00
|
|
|
.SS The \f[C]epub:type\f[R] attribute
|
2018-09-16 20:18:41 +02:00
|
|
|
.PP
|
2019-04-06 00:11:08 +02:00
|
|
|
For \f[C]epub3\f[R] output, you can mark up the heading that corresponds
|
2018-10-20 07:56:40 +02:00
|
|
|
to an EPUB chapter using the \f[C]epub:type\f[R] attribute.
|
|
|
|
For example, to set the attribute to the value \f[C]prologue\f[R], use
|
2018-09-16 20:18:41 +02:00
|
|
|
this markdown:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
# My chapter {epub:type=prologue}
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-09-16 20:18:41 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Which will result in:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
<body epub:type=\[dq]frontmatter\[dq]>
|
|
|
|
<section epub:type=\[dq]prologue\[dq]>
|
|
|
|
<h1>My chapter</h1>
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-09-16 20:18:41 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-11-02 05:56:41 +01:00
|
|
|
Pandoc will output \f[C]<body epub:type=\[dq]bodymatter\[dq]>\f[R],
|
2018-10-20 07:56:40 +02:00
|
|
|
unless you use one of the following values, in which case either
|
|
|
|
\f[C]frontmatter\f[R] or \f[C]backmatter\f[R] will be output.
|
2018-09-16 20:18:41 +02:00
|
|
|
.PP
|
|
|
|
.TS
|
|
|
|
tab(@);
|
|
|
|
l l.
|
|
|
|
T{
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]epub:type\f[R] of first section
|
2018-09-16 20:18:41 +02:00
|
|
|
T}@T{
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]epub:type\f[R] of body
|
2018-09-16 20:18:41 +02:00
|
|
|
T}
|
|
|
|
_
|
|
|
|
T{
|
|
|
|
prologue
|
|
|
|
T}@T{
|
|
|
|
frontmatter
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
abstract
|
|
|
|
T}@T{
|
|
|
|
frontmatter
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
acknowledgments
|
|
|
|
T}@T{
|
|
|
|
frontmatter
|
|
|
|
T}
|
|
|
|
T{
|
2019-01-31 07:00:54 +01:00
|
|
|
copyright-page
|
2018-09-16 20:18:41 +02:00
|
|
|
T}@T{
|
|
|
|
frontmatter
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
dedication
|
|
|
|
T}@T{
|
|
|
|
frontmatter
|
|
|
|
T}
|
|
|
|
T{
|
2019-06-12 06:50:10 +02:00
|
|
|
credits
|
2018-09-16 20:18:41 +02:00
|
|
|
T}@T{
|
|
|
|
frontmatter
|
|
|
|
T}
|
|
|
|
T{
|
2019-06-12 06:50:10 +02:00
|
|
|
keywords
|
2018-09-16 20:18:41 +02:00
|
|
|
T}@T{
|
|
|
|
frontmatter
|
|
|
|
T}
|
|
|
|
T{
|
2019-06-12 06:50:10 +02:00
|
|
|
imprint
|
2018-09-16 20:18:41 +02:00
|
|
|
T}@T{
|
|
|
|
frontmatter
|
|
|
|
T}
|
|
|
|
T{
|
2019-06-12 06:50:10 +02:00
|
|
|
contributors
|
2018-09-16 20:18:41 +02:00
|
|
|
T}@T{
|
|
|
|
frontmatter
|
|
|
|
T}
|
|
|
|
T{
|
2019-06-12 06:50:10 +02:00
|
|
|
other-credits
|
|
|
|
T}@T{
|
|
|
|
frontmatter
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
errata
|
|
|
|
T}@T{
|
|
|
|
frontmatter
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
revision-history
|
2018-09-16 20:18:41 +02:00
|
|
|
T}@T{
|
|
|
|
frontmatter
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
titlepage
|
|
|
|
T}@T{
|
|
|
|
frontmatter
|
|
|
|
T}
|
|
|
|
T{
|
2019-06-12 06:50:10 +02:00
|
|
|
halftitlepage
|
2018-09-16 20:18:41 +02:00
|
|
|
T}@T{
|
2019-06-12 06:50:10 +02:00
|
|
|
frontmatter
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
seriespage
|
|
|
|
T}@T{
|
|
|
|
frontmatter
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
foreword
|
|
|
|
T}@T{
|
|
|
|
frontmatter
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
preface
|
|
|
|
T}@T{
|
|
|
|
frontmatter
|
|
|
|
T}
|
|
|
|
T{
|
2018-09-16 20:18:41 +02:00
|
|
|
appendix
|
|
|
|
T}@T{
|
|
|
|
backmatter
|
|
|
|
T}
|
|
|
|
T{
|
|
|
|
colophon
|
|
|
|
T}@T{
|
|
|
|
backmatter
|
|
|
|
T}
|
|
|
|
T{
|
2019-06-12 06:50:10 +02:00
|
|
|
bibliography
|
2018-09-16 20:18:41 +02:00
|
|
|
T}@T{
|
|
|
|
backmatter
|
|
|
|
T}
|
|
|
|
T{
|
2019-06-12 06:50:10 +02:00
|
|
|
index
|
2018-09-16 20:18:41 +02:00
|
|
|
T}@T{
|
|
|
|
backmatter
|
|
|
|
T}
|
|
|
|
.TE
|
2015-11-13 04:52:02 +01:00
|
|
|
.SS Linked media
|
|
|
|
.PP
|
2018-07-15 23:42:58 +02:00
|
|
|
By default, pandoc will download media referenced from any
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[C]<img>\f[R], \f[C]<audio>\f[R], \f[C]<video>\f[R] or
|
|
|
|
\f[C]<source>\f[R] element present in the generated EPUB, and include it
|
2019-01-31 07:00:54 +01:00
|
|
|
in the EPUB container, yielding a completely self-contained EPUB.
|
2015-11-13 04:52:02 +01:00
|
|
|
If you want to link to external media resources instead, use raw HTML in
|
2019-01-31 07:00:54 +01:00
|
|
|
your source and add \f[C]data-external=\[dq]1\[dq]\f[R] to the tag with
|
2018-10-20 07:56:40 +02:00
|
|
|
the \f[C]src\f[R] attribute.
|
2015-11-13 04:52:02 +01:00
|
|
|
For example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2018-11-02 05:56:41 +01:00
|
|
|
<audio controls=\[dq]1\[dq]>
|
2020-02-16 06:26:29 +01:00
|
|
|
<source src=\[dq]https://example.com/music/toccata.mp3\[dq]
|
2019-01-31 07:00:54 +01:00
|
|
|
data-external=\[dq]1\[dq] type=\[dq]audio/mpeg\[dq]>
|
2018-11-02 05:56:41 +01:00
|
|
|
</source>
|
2015-11-13 04:52:02 +01:00
|
|
|
</audio>
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-11-13 04:52:02 +01:00
|
|
|
.fi
|
2020-10-11 01:45:02 +02:00
|
|
|
.SH JUPYTER NOTEBOOKS
|
2019-01-31 07:00:54 +01:00
|
|
|
.PP
|
|
|
|
When creating a Jupyter notebook, pandoc will try to infer the notebook
|
|
|
|
structure.
|
|
|
|
Code blocks with the class \f[C]code\f[R] will be taken as code cells,
|
|
|
|
and intervening content will be taken as Markdown cells.
|
|
|
|
Attachments will automatically be created for images in Markdown cells.
|
|
|
|
Metadata will be taken from the \f[C]jupyter\f[R] metadata field.
|
|
|
|
For example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
---
|
|
|
|
title: My notebook
|
|
|
|
jupyter:
|
|
|
|
nbformat: 4
|
|
|
|
nbformat_minor: 5
|
|
|
|
kernelspec:
|
|
|
|
display_name: Python 2
|
|
|
|
language: python
|
|
|
|
name: python2
|
|
|
|
language_info:
|
|
|
|
codemirror_mode:
|
|
|
|
name: ipython
|
|
|
|
version: 2
|
|
|
|
file_extension: \[dq].py\[dq]
|
|
|
|
mimetype: \[dq]text/x-python\[dq]
|
|
|
|
name: \[dq]python\[dq]
|
|
|
|
nbconvert_exporter: \[dq]python\[dq]
|
|
|
|
pygments_lexer: \[dq]ipython2\[dq]
|
|
|
|
version: \[dq]2.7.15\[dq]
|
|
|
|
---
|
|
|
|
|
|
|
|
# Lorem ipsum
|
|
|
|
|
|
|
|
**Lorem ipsum** dolor sit amet, consectetur adipiscing elit. Nunc luctus
|
|
|
|
bibendum felis dictum sodales.
|
|
|
|
|
|
|
|
\[ga]\[ga]\[ga] code
|
|
|
|
print(\[dq]hello\[dq])
|
|
|
|
\[ga]\[ga]\[ga]
|
|
|
|
|
|
|
|
## Pyout
|
|
|
|
|
|
|
|
\[ga]\[ga]\[ga] code
|
|
|
|
from IPython.display import HTML
|
|
|
|
HTML(\[dq]\[dq]\[dq]
|
|
|
|
<script>
|
|
|
|
console.log(\[dq]hello\[dq]);
|
|
|
|
</script>
|
|
|
|
<b>HTML</b>
|
|
|
|
\[dq]\[dq]\[dq])
|
|
|
|
\[ga]\[ga]\[ga]
|
|
|
|
|
|
|
|
## Image
|
|
|
|
|
|
|
|
This image ![image](myimage.png) will be
|
|
|
|
included as a cell attachment.
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
If you want to add cell attributes, group cells differently, or add
|
|
|
|
output to code cells, then you need to include divs to indicate the
|
|
|
|
structure.
|
|
|
|
You can use either fenced divs or native divs for this.
|
|
|
|
Here is an example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
:::::: {.cell .markdown}
|
|
|
|
# Lorem
|
|
|
|
|
|
|
|
**Lorem ipsum** dolor sit amet, consectetur adipiscing elit. Nunc luctus
|
|
|
|
bibendum felis dictum sodales.
|
|
|
|
::::::
|
|
|
|
|
|
|
|
:::::: {.cell .code execution_count=1}
|
|
|
|
\[ga]\[ga]\[ga] {.python}
|
|
|
|
print(\[dq]hello\[dq])
|
|
|
|
\[ga]\[ga]\[ga]
|
|
|
|
|
|
|
|
::: {.output .stream .stdout}
|
|
|
|
\[ga]\[ga]\[ga]
|
|
|
|
hello
|
|
|
|
\[ga]\[ga]\[ga]
|
|
|
|
:::
|
|
|
|
::::::
|
|
|
|
|
|
|
|
:::::: {.cell .code execution_count=2}
|
|
|
|
\[ga]\[ga]\[ga] {.python}
|
|
|
|
from IPython.display import HTML
|
|
|
|
HTML(\[dq]\[dq]\[dq]
|
|
|
|
<script>
|
|
|
|
console.log(\[dq]hello\[dq]);
|
|
|
|
</script>
|
|
|
|
<b>HTML</b>
|
|
|
|
\[dq]\[dq]\[dq])
|
|
|
|
\[ga]\[ga]\[ga]
|
|
|
|
|
|
|
|
::: {.output .execute_result execution_count=2}
|
|
|
|
\[ga]\[ga]\[ga]{=html}
|
|
|
|
<script>
|
|
|
|
console.log(\[dq]hello\[dq]);
|
|
|
|
</script>
|
|
|
|
<b>HTML</b>
|
|
|
|
hello
|
|
|
|
\[ga]\[ga]\[ga]
|
|
|
|
:::
|
|
|
|
::::::
|
|
|
|
\f[R]
|
|
|
|
.fi
|
2019-03-14 04:59:25 +01:00
|
|
|
.PP
|
|
|
|
If you include raw HTML or TeX in an output cell, use the [raw
|
|
|
|
attribute][Extension: \f[C]fenced_attribute\f[R]], as shown in the last
|
|
|
|
cell of the example above.
|
2020-10-11 01:45:02 +02:00
|
|
|
Although pandoc can process \[lq]bare\[rq] raw HTML and TeX, the result
|
2019-03-14 04:59:25 +01:00
|
|
|
is often interspersed raw elements and normal textual elements, and in
|
|
|
|
an output cell pandoc expects a single, connected raw block.
|
|
|
|
To avoid using raw HTML or TeX except when marked explicitly using raw
|
|
|
|
attributes, we recommend specifying the extensions
|
|
|
|
\f[C]-raw_html-raw_tex+raw_attribute\f[R] when translating between
|
|
|
|
Markdown and ipynb notebooks.
|
2019-04-06 00:11:08 +02:00
|
|
|
.PP
|
|
|
|
Note that options and extensions that affect reading and writing of
|
|
|
|
Markdown will also affect Markdown cells in ipynb notebooks.
|
|
|
|
For example, \f[C]--wrap=preserve\f[R] will preserve soft line breaks in
|
|
|
|
Markdown cells; \f[C]--atx-headers\f[R] will cause ATX-style headings to
|
|
|
|
be used; and \f[C]--preserve-tabs\f[R] will prevent tabs from being
|
|
|
|
turned to spaces.
|
2015-07-03 07:09:04 +02:00
|
|
|
.SH SYNTAX HIGHLIGHTING
|
|
|
|
.PP
|
|
|
|
Pandoc will automatically highlight syntax in fenced code blocks that
|
|
|
|
are marked with a language name.
|
2018-09-16 20:18:41 +02:00
|
|
|
The Haskell library skylighting is used for highlighting.
|
|
|
|
Currently highlighting is supported only for HTML, EPUB, Docx, Ms, and
|
|
|
|
LaTeX/PDF output.
|
2016-11-30 21:03:17 +01:00
|
|
|
To see a list of language names that pandoc will recognize, type
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]pandoc --list-highlight-languages\f[R].
|
2016-11-30 21:03:17 +01:00
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
The color scheme can be selected using the \f[C]--highlight-style\f[R]
|
|
|
|
option.
|
2018-10-20 07:56:40 +02:00
|
|
|
The default color scheme is \f[C]pygments\f[R], which imitates the
|
2016-11-30 21:03:17 +01:00
|
|
|
default color scheme used by the Python library pygments (though
|
|
|
|
pygments is not actually used to do the highlighting).
|
|
|
|
To see a list of highlight styles, type
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]pandoc --list-highlight-styles\f[R].
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
2018-09-16 20:18:41 +02:00
|
|
|
If you are not satisfied with the predefined styles, you can use
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]--print-highlight-style\f[R] to generate a JSON \f[C].theme\f[R]
|
|
|
|
file which can be modified and used as the argument to
|
|
|
|
\f[C]--highlight-style\f[R].
|
2018-10-20 07:56:40 +02:00
|
|
|
To get a JSON version of the \f[C]pygments\f[R] style, for example:
|
2018-09-16 20:18:41 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc --print-highlight-style pygments > my.theme
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-09-16 20:18:41 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Then edit \f[C]my.theme\f[R] and use it like this:
|
2018-09-16 20:18:41 +02:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc --highlight-style my.theme
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-09-16 20:18:41 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
If you are not satisfied with the built-in highlighting, or you want
|
2020-10-11 01:45:02 +02:00
|
|
|
highlight a language that isn\[cq]t supported, you can use the
|
2019-01-31 07:00:54 +01:00
|
|
|
\f[C]--syntax-definition\f[R] option to load a KDE-style XML syntax
|
2018-09-16 20:18:41 +02:00
|
|
|
definition file.
|
2020-10-11 01:45:02 +02:00
|
|
|
Before writing your own, have a look at KDE\[cq]s repository of syntax
|
2018-09-16 20:18:41 +02:00
|
|
|
definitions.
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
To disable highlighting, use the \f[C]--no-highlight\f[R] option.
|
|
|
|
.SH CUSTOM STYLES
|
|
|
|
.PP
|
|
|
|
Custom styles can be used in the docx and ICML formats.
|
2019-03-03 18:46:21 +01:00
|
|
|
.SS Output
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
By default, pandoc\[cq]s docx and ICML output applies a predefined set
|
2019-03-03 18:46:21 +01:00
|
|
|
of styles for blocks such as paragraphs and block quotes, and uses
|
|
|
|
largely default formatting (italics, bold) for inlines.
|
|
|
|
This will work for most purposes, especially alongside a
|
|
|
|
\f[C]reference.docx\f[R] file.
|
|
|
|
However, if you need to apply your own styles to blocks, or match a
|
|
|
|
preexisting set of styles, pandoc allows you to define custom styles for
|
|
|
|
blocks and text using \f[C]div\f[R]s and \f[C]span\f[R]s, respectively.
|
|
|
|
.PP
|
|
|
|
If you define a \f[C]div\f[R] or \f[C]span\f[R] with the attribute
|
|
|
|
\f[C]custom-style\f[R], pandoc will apply your specified style to the
|
2019-11-16 21:54:19 +01:00
|
|
|
contained elements (with the exception of elements whose function
|
|
|
|
depends on a style, like headings, code blocks, block quotes, or links).
|
|
|
|
So, for example, using the \f[C]bracketed_spans\f[R] syntax,
|
2019-03-03 18:46:21 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
[Get out]{custom-style=\[dq]Emphatically\[dq]}, he said.
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
would produce a docx file with \[lq]Get out\[rq] styled with character
|
2019-03-03 18:46:21 +01:00
|
|
|
style \f[C]Emphatically\f[R].
|
|
|
|
Similarly, using the \f[C]fenced_divs\f[R] syntax,
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
Dickinson starts the poem simply:
|
|
|
|
|
|
|
|
::: {custom-style=\[dq]Poetry\[dq]}
|
|
|
|
| A Bird came down the Walk---
|
|
|
|
| He did not know I saw---
|
|
|
|
:::
|
|
|
|
\f[R]
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
would style the two contained lines with the \f[C]Poetry\f[R] paragraph
|
|
|
|
style.
|
|
|
|
.PP
|
|
|
|
For docx output, styles will be defined in the output file as inheriting
|
|
|
|
from normal text, if the styles are not yet in your reference.docx.
|
|
|
|
If they are already defined, pandoc will not alter the definition.
|
|
|
|
.PP
|
|
|
|
This feature allows for greatest customization in conjunction with
|
|
|
|
pandoc filters.
|
|
|
|
If you want all paragraphs after block quotes to be indented, you can
|
|
|
|
write a filter to apply the styles necessary.
|
|
|
|
If you want all italics to be transformed to the \f[C]Emphasis\f[R]
|
|
|
|
character style (perhaps to change their color), you can write a filter
|
|
|
|
which will transform all italicized inlines to inlines within an
|
|
|
|
\f[C]Emphasis\f[R] custom-style \f[C]span\f[R].
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
For docx output, you don\[cq]t need to enable any extensions for custom
|
2019-03-03 18:46:21 +01:00
|
|
|
styles to work.
|
2018-03-03 05:23:53 +01:00
|
|
|
.SS Input
|
|
|
|
.PP
|
|
|
|
The docx reader, by default, only reads those styles that it can convert
|
|
|
|
into pandoc elements, either by direct conversion or interpreting the
|
2020-10-11 01:45:02 +02:00
|
|
|
derivation of the input document\[cq]s styles.
|
2018-03-03 05:23:53 +01:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
By enabling the \f[C]styles\f[R] extension in the docx reader
|
2019-01-31 07:00:54 +01:00
|
|
|
(\f[C]-f docx+styles\f[R]), you can produce output that maintains the
|
|
|
|
styles of the input document, using the \f[C]custom-style\f[R] class.
|
2018-03-03 05:23:53 +01:00
|
|
|
Paragraph styles are interpreted as divs, while character styles are
|
|
|
|
interpreted as spans.
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
For example, using the \f[C]custom-style-reference.docx\f[R] file in the
|
|
|
|
test directory, we have the following different outputs:
|
2018-03-03 05:23:53 +01:00
|
|
|
.PP
|
2018-10-20 07:56:40 +02:00
|
|
|
Without the \f[C]+styles\f[R] extension:
|
2018-03-03 05:23:53 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
$ pandoc test/docx/custom-style-reference.docx -f docx -t markdown
|
2018-11-02 05:56:41 +01:00
|
|
|
This is some text.
|
2018-03-03 05:23:53 +01:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
This is text with an *emphasized* text style. And this is text with a
|
|
|
|
**strengthened** text style.
|
2018-03-03 05:23:53 +01:00
|
|
|
|
2018-11-02 05:56:41 +01:00
|
|
|
> Here is a styled paragraph that inherits from Block Text.
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-03-03 05:23:53 +01:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
And with the extension:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
$ pandoc test/docx/custom-style-reference.docx -f docx+styles -t markdown
|
2018-03-03 05:23:53 +01:00
|
|
|
|
2019-11-16 21:54:19 +01:00
|
|
|
::: {custom-style=\[dq]First Paragraph\[dq]}
|
2018-11-02 05:56:41 +01:00
|
|
|
This is some text.
|
2018-03-03 05:23:53 +01:00
|
|
|
:::
|
|
|
|
|
2019-11-16 21:54:19 +01:00
|
|
|
::: {custom-style=\[dq]Body Text\[dq]}
|
2019-01-31 07:00:54 +01:00
|
|
|
This is text with an [emphasized]{custom-style=\[dq]Emphatic\[dq]} text style.
|
|
|
|
And this is text with a [strengthened]{custom-style=\[dq]Strengthened\[dq]}
|
2018-11-02 05:56:41 +01:00
|
|
|
text style.
|
2018-03-03 05:23:53 +01:00
|
|
|
:::
|
|
|
|
|
2019-11-16 21:54:19 +01:00
|
|
|
::: {custom-style=\[dq]My Block Style\[dq]}
|
2018-11-02 05:56:41 +01:00
|
|
|
> Here is a styled paragraph that inherits from Block Text.
|
2018-03-03 05:23:53 +01:00
|
|
|
:::
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2018-03-03 05:23:53 +01:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
With these custom styles, you can use your input document as a
|
2019-01-31 07:00:54 +01:00
|
|
|
reference-doc while creating docx output (see below), and maintain the
|
2018-03-03 05:23:53 +01:00
|
|
|
same styles in your input and output files.
|
2015-07-03 07:09:04 +02:00
|
|
|
.SH CUSTOM WRITERS
|
|
|
|
.PP
|
2020-02-16 06:26:29 +01:00
|
|
|
Pandoc can be extended with custom writers written in Lua.
|
|
|
|
(Pandoc includes a Lua interpreter, so Lua need not be installed
|
2015-07-03 07:09:04 +02:00
|
|
|
separately.)
|
|
|
|
.PP
|
2020-02-16 06:26:29 +01:00
|
|
|
To use a custom writer, simply specify the path to the Lua script in
|
2015-07-03 07:09:04 +02:00
|
|
|
place of the output format.
|
|
|
|
For example:
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc -t data/sample.lua
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
|
|
|
.PP
|
2020-02-16 06:26:29 +01:00
|
|
|
Creating a custom writer requires writing a Lua function for each
|
2015-07-03 07:09:04 +02:00
|
|
|
possible element in a pandoc document.
|
|
|
|
To get a documented example which you can modify according to your
|
|
|
|
needs, do
|
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2019-01-31 07:00:54 +01:00
|
|
|
pandoc --print-default-data-file sample.lua
|
2018-10-20 07:56:40 +02:00
|
|
|
\f[R]
|
2015-07-03 07:09:04 +02:00
|
|
|
.fi
|
2019-11-16 21:54:19 +01:00
|
|
|
.PP
|
|
|
|
Note that custom writers have no default template.
|
|
|
|
If you want to use \f[C]--standalone\f[R] with a custom writer, you will
|
|
|
|
need to specify a template manually using \f[C]--template\f[R] or add a
|
|
|
|
new default template with the name
|
|
|
|
\f[C]default.NAME_OF_CUSTOM_WRITER.lua\f[R] to the \f[C]templates\f[R]
|
|
|
|
subdirectory of your user data directory (see Templates).
|
2018-11-25 05:40:07 +01:00
|
|
|
.SH A NOTE ON SECURITY
|
|
|
|
.PP
|
2019-01-31 07:00:54 +01:00
|
|
|
If you use pandoc to convert user-contributed content in a web
|
2018-11-25 05:40:07 +01:00
|
|
|
application, here are some things to keep in mind:
|
|
|
|
.IP "1." 3
|
|
|
|
Although pandoc itself will not create or modify any files other than
|
|
|
|
those you explicitly ask it create (with the exception of temporary
|
|
|
|
files used in producing PDFs), a filter or custom writer could in
|
|
|
|
principle do anything on your file system.
|
|
|
|
Please audit filters and custom writers very carefully before using
|
|
|
|
them.
|
|
|
|
.IP "2." 3
|
|
|
|
If your application uses pandoc as a Haskell library (rather than
|
|
|
|
shelling out to the executable), it is possible to use it in a mode that
|
|
|
|
fully isolates pandoc from your file system, by running the pandoc
|
|
|
|
operations in the \f[C]PandocPure\f[R] monad.
|
|
|
|
See the document Using the pandoc API for more details.
|
|
|
|
.IP "3." 3
|
2020-10-11 01:45:02 +02:00
|
|
|
Pandoc\[cq]s parsers can exhibit pathological performance on some corner
|
2018-11-25 05:40:07 +01:00
|
|
|
cases.
|
|
|
|
It is wise to put any pandoc operations under a timeout, to avoid DOS
|
|
|
|
attacks that exploit these issues.
|
|
|
|
If you are using the pandoc executable, you can add the command line
|
2019-01-31 07:00:54 +01:00
|
|
|
options \f[C]+RTS -M512M -RTS\f[R] (for example) to limit the heap size
|
|
|
|
to 512MB.
|
2018-11-25 05:40:07 +01:00
|
|
|
.IP "4." 3
|
|
|
|
The HTML generated by pandoc is not guaranteed to be safe.
|
|
|
|
If \f[C]raw_html\f[R] is enabled for the Markdown input, users can
|
|
|
|
inject arbitrary HTML.
|
|
|
|
Even if \f[C]raw_html\f[R] is disabled, users can include dangerous
|
2019-04-06 00:11:08 +02:00
|
|
|
content in attributes for headings, spans, and code blocks.
|
2018-11-25 05:40:07 +01:00
|
|
|
To be safe, you should run all the generated HTML through an HTML
|
|
|
|
sanitizer.
|
2015-07-03 07:09:04 +02:00
|
|
|
.SH AUTHORS
|
|
|
|
.PP
|
2020-10-11 01:45:02 +02:00
|
|
|
Copyright 2006\[en]2020 John MacFarlane (jgm\[at]berkeley.edu).
|
2015-07-03 07:09:04 +02:00
|
|
|
Released under the GPL, version 2 or greater.
|
|
|
|
This software carries no warranty of any kind.
|
2017-10-18 05:30:20 +02:00
|
|
|
(See COPYRIGHT for full copyright and warranty notices.) For a full list
|
|
|
|
of contributors, see the file AUTHORS.md in the pandoc source code.
|
2015-07-03 07:09:04 +02:00
|
|
|
.PP
|
|
|
|
The Pandoc source code and all documentation may be downloaded
|
|
|
|
from <http://pandoc.org>.
|