8pandoc [*options*] [*input-file*]...
13Pandoc is a [Haskell] library for converting from one markup format to
14another, and a command-line tool that uses this library. It can read
15[markdown] and (subsets of) [Textile], [reStructuredText], [HTML],
16[LaTeX], [MediaWiki markup], [Haddock markup], [OPML], and [DocBook]; and
17it can write plain text, [markdown], [reStructuredText], [XHTML], [HTML 5],
18[LaTeX] (including [beamer] slide shows), [ConTeXt], [RTF], [OPML], [DocBook],
19[OpenDocument], [ODT], [Word docx], [GNU Texinfo], [MediaWiki markup],
20[EPUB] (v2 or v3), [FictionBook2], [Textile], [groff man] pages, [Emacs
21Org-Mode], [AsciiDoc], and [Slidy], [Slideous], [DZSlides], [reveal.js]
22or [S5] HTML slide shows. It can also produce [PDF] output on systems
23where LaTeX is installed.
25Pandoc's enhanced version of markdown includes syntax for footnotes,
26tables, flexible ordered lists, definition lists, fenced code blocks,
27superscript, subscript, strikeout, title blocks, automatic tables of
28contents, embedded LaTeX math, citations, and markdown inside HTML block
29elements. (These enhancements, described below under
30[Pandoc's markdown](#pandocs-markdown), can be disabled using the
31`markdown_strict` input or output format.)
33In contrast to most existing tools for converting markdown to HTML, which
34use regex substitutions, Pandoc has a modular design: it consists of a
35set of readers, which parse text in a given format and produce a native
36representation of the document, and a set of writers, which convert
37this native representation into a target format. Thus, adding an input
38or output format requires only adding a reader or writer.
43If no *input-file* is specified, input is read from *stdin*.
44Otherwise, the *input-files* are concatenated (with a blank
45line between each) and used as input. Output goes to *stdout* by
46default (though output to *stdout* is disabled for the `odt`, `docx`,
47`epub`, and `epub3` output formats). For output to a file, use the
50 pandoc -o output.html input.txt
52Instead of a file, an absolute URI may be given. In this case
53pandoc will fetch the content using HTTP:
55 pandoc -f html -t markdown http://www.fsf.org
57If multiple input files are given, `pandoc` will concatenate them all (with
58blank lines between them) before parsing.
60The format of the input and output can be specified explicitly using
61command-line options. The input format can be specified using the
62`-r/--read` or `-f/--from` options, the output format using the
63`-w/--write` or `-t/--to` options. Thus, to convert `hello.txt` from
64markdown to LaTeX, you could type:
66 pandoc -f markdown -t latex hello.txt
68To convert `hello.html` from html to markdown:
70 pandoc -f html -t markdown hello.html
72Supported output formats are listed below under the `-t/--to` option.
73Supported input formats are listed below under the `-f/--from` option. Note
74that the `rst`, `textile`, `latex`, and `html` readers are not complete;
75there are some constructs that they do not parse.
77If the input or output format is not specified explicitly, `pandoc`
78will attempt to guess it from the extensions of
79the input and output filenames. Thus, for example,
81 pandoc -o hello.tex hello.txt
83will convert `hello.txt` from markdown to LaTeX. If no output file
84is specified (so that output goes to *stdout*), or if the output file's
85extension is unknown, the output format will default to HTML.
86If no input file is specified (so that input comes from *stdin*), or
87if the input files' extensions are unknown, the input format will
88be assumed to be markdown unless explicitly specified.
90Pandoc uses the UTF-8 character encoding for both input and output.
91If your local character encoding is not UTF-8, you
92should pipe input and output through `iconv`:
94 iconv -t utf-8 input.txt | pandoc | iconv -f utf-8
99Earlier versions of pandoc came with a program, `markdown2pdf`, that
100used pandoc and pdflatex to produce a PDF. This is no longer needed,
101since `pandoc` can now produce `pdf` output itself. To produce a PDF, simply
102specify an output file with a `.pdf` extension. Pandoc will create a latex
103file and use pdflatex (or another engine, see `--latex-engine`) to convert it
106 pandoc test.txt -o test.pdf
108Production of a PDF requires that a LaTeX engine be installed (see
109`--latex-engine`, below), and assumes that the following LaTeX packages are
110available: `amssymb`, `amsmath`, `ifxetex`, `ifluatex`, `listings` (if the
111`--listings` option is used), `fancyvrb`, `longtable`, `url`,
112`graphicx`, `hyperref`, `ulem`, `babel` (if the `lang` variable is set),
113`fontspec` (if `xelatex` or `lualatex` is used as the LaTeX engine), `xltxtra`
114and `xunicode` (if `xelatex` is used).
119A user who wants a drop-in replacement for `Markdown.pl` may create
120a symbolic link to the `pandoc` executable called `hsmarkdown`. When
121invoked under the name `hsmarkdown`, `pandoc` will behave as if
122invoked with `-f markdown_strict --email-obfuscation=references`,
123and all command-line options will be treated as regular arguments.
124However, this approach does not work under Cygwin, due to problems with
125its simulation of symbolic links.
127[Cygwin]: http://www.cygwin.com/
128[`iconv`]: http://www.gnu.org/software/libiconv/
129[CTAN]: http://www.ctan.org "Comprehensive TeX Archive Network"
130[TeX Live]: http://www.tug.org/texlive/
131[MacTeX]: http://www.tug.org/mactex/
139`-f` *FORMAT*, `-r` *FORMAT*, `--from=`*FORMAT*, `--read=`*FORMAT*
140: Specify input format. *FORMAT* can be `native` (native Haskell),
141 `json` (JSON version of native AST), `markdown` (pandoc's
142 extended markdown), `markdown_strict` (original unextended markdown),
143 `markdown_phpextra` (PHP Markdown Extra extended markdown),
144 `markdown_github` (github extended markdown),
145 `textile` (Textile), `rst` (reStructuredText), `html` (HTML),
146 `docbook` (DocBook), `opml` (OPML), `mediawiki` (MediaWiki markup),
147 `haddock` (Haddock markup), or `latex` (LaTeX).
148 If `+lhs` is appended to `markdown`, `rst`, `latex`, or `html`,
149 the input will be treated as literate Haskell source:
150 see [Literate Haskell support](#literate-haskell-support), below.
151 Markdown syntax extensions can be individually enabled or disabled
152 by appending `+EXTENSION` or `-EXTENSION` to the format name.
153 So, for example, `markdown_strict+footnotes+definition_lists`
154 is strict markdown with footnotes and definition lists enabled,
155 and `markdown-pipe_tables+hard_line_breaks` is pandoc's markdown
156 without pipe tables and with hard line breaks. See [Pandoc's
157 markdown](#pandocs-markdown), below, for a list of extensions and
160`-t` *FORMAT*, `-w` *FORMAT*, `--to=`*FORMAT*, `--write=`*FORMAT*
161: Specify output format. *FORMAT* can be `native` (native Haskell),
162 `json` (JSON version of native AST), `plain` (plain text),
163 `markdown` (pandoc's extended markdown), `markdown_strict` (original
164 unextended markdown), `markdown_phpextra` (PHP Markdown extra
165 extended markdown), `markdown_github` (github extended markdown),
166 `rst` (reStructuredText), `html` (XHTML 1), `html5` (HTML 5),
167 `latex` (LaTeX), `beamer` (LaTeX beamer slide show),
168 `context` (ConTeXt), `man` (groff man), `mediawiki` (MediaWiki markup),
169 `textile` (Textile), `org` (Emacs Org-Mode), `texinfo` (GNU Texinfo),
170 `opml` (OPML), `docbook` (DocBook), `opendocument` (OpenDocument), `odt`
171 (OpenOffice text document), `docx` (Word docx),
172 `rtf` (rich text format), `epub` (EPUB v2 book), `epub3`
173 (EPUB v3), `fb2` (FictionBook2 e-book), `asciidoc` (AsciiDoc), `slidy`
174 (Slidy HTML and javascript slide show), `slideous` (Slideous HTML and
175 javascript slide show), `dzslides` (DZSlides HTML5 + javascript slide
176 show), `revealjs` (reveal.js HTML5 + javascript slide show), `s5`
177 (S5 HTML and javascript slide show). Note that `odt`, `epub`, and
178 `epub3` output will not be directed to *stdout*; an output
179 filename must be specified using the `-o/--output` option. If `+lhs` is
180 appended to `markdown`, `rst`, `latex`, `beamer`, `html`, or `html5`, the
181 output will be rendered as literate Haskell source: see [Literate Haskell
182 support](#literate-haskell-support), below. Markdown syntax extensions can
183 be individually enabled or disabled by appending `+EXTENSION` or
184 `-EXTENSION` to the format name, as described above under `-f`.
186`-o` *FILE*, `--output=`*FILE*
187: Write output to *FILE* instead of *stdout*. If *FILE* is
188 `-`, output will go to *stdout*. (Exception: if the output
189 format is `odt`, `docx`, `epub`, or `epub3`, output to stdout is disabled.)
191`--data-dir=`*DIRECTORY*
192: Specify the user data directory to search for pandoc data files.
193 If this option is not specified, the default user data directory
194 will be used. This is
200 C:\Documents And Settings\USERNAME\Application Data\pandoc
204 C:\Users\USERNAME\AppData\Roaming\pandoc
206 in Windows 7. (You can find the default user data directory
207 on your system by looking at the output of `pandoc --version`.)
208 A `reference.odt`, `reference.docx`, `default.csl`,
209 `epub.css`, `templates`, `slidy`, `slideous`, or `s5` directory
210 placed in this directory will override pandoc's normal defaults.
222: Parse untranslatable HTML codes and LaTeX environments as raw HTML
223 or LaTeX, instead of ignoring them. Affects only HTML and LaTeX
224 input. Raw HTML can be printed in markdown, reStructuredText, HTML,
225 Slidy, Slideous, DZSlides, reveal.js, and S5 output; raw LaTeX
226 can be printed in markdown, reStructuredText, LaTeX, and ConTeXt output.
227 The default is for the readers to omit untranslatable HTML codes and
228 LaTeX environments. (The LaTeX reader does pass through untranslatable
229 LaTeX *commands*, even if `-R` is not specified.)
232: Produce typographically correct output, converting straight quotes
233 to curly quotes, `---` to em-dashes, `--` to en-dashes, and
234 `...` to ellipses. Nonbreaking spaces are inserted after certain
235 abbreviations, such as "Mr." (Note: This option is significant only when
236 the input format is `markdown`, `markdown_strict`, or `textile`. It
237 is selected automatically when the input format is `textile` or the
238 output format is `latex` or `context`, unless `--no-tex-ligatures`
242: Selects the pandoc <= 1.8.2.1 behavior for parsing smart dashes: `-` before
243 a numeral is an en-dash, and `--` is an em-dash. This option is selected
244 automatically for `textile` input.
246`--base-header-level=`*NUMBER*
247: Specify the base level for headers (defaults to 1).
249`--indented-code-classes=`*CLASSES*
250: Specify classes to use for indented code blocks--for example,
251 `perl,numberLines` or `haskell`. Multiple classes may be separated
254`--default-image-extension=`*EXTENSION*
255: Specify a default extension to use when image paths/URLs have no
256 extension. This allows you to use the same source for formats that
257 require different kinds of images. Currently this option only affects
258 the markdown and LaTeX readers.
261: Normalize the document after reading: merge adjacent
262 `Str` or `Emph` elements, for example, and remove repeated `Space`s.
264`-p`, `--preserve-tabs`
265: Preserve tabs instead of converting them to spaces (the default).
266 Note that this will only affect tabs in literal code spans and code
267 blocks; tabs in regular text will be treated as spaces.
270: Specify the number of spaces per tab (default is 4).
272General writer options
273----------------------
276: Produce output with an appropriate header and footer (e.g. a
277 standalone HTML, LaTeX, or RTF file, not a fragment). This option
278 is set automatically for `pdf`, `epub`, `epub3`, `fb2`, `docx`, and `odt`
282: Use *FILE* as a custom template for the generated document. Implies
283 `--standalone`. See [Templates](#templates) below for a description
284 of template syntax. If no extension is specified, an extension
285 corresponding to the writer will be added, so that `--template=special`
286 looks for `special.html` for HTML output. If the template is not
287 found, pandoc will search for it in the user data directory
288 (see `--data-dir`). If this option is not used, a default
289 template appropriate for the output format will be used (see
290 `-D/--print-default-template`).
292`-V` *KEY[=VAL]*, `--variable=`*KEY[:VAL]*
293: Set the template variable *KEY* to the value *VAL* when rendering the
294 document in standalone mode. This is generally only useful when the
295 `--template` option is used to specify a custom template, since
296 pandoc automatically sets the variables used in the default
297 templates. If no *VAL* is specified, the key will be given the
300`-D` *FORMAT*, `--print-default-template=`*FORMAT*
301: Print the default template for an output *FORMAT*. (See `-t`
302 for a list of possible *FORMAT*s.)
305: Disable text wrapping in output. By default, text is wrapped
306 appropriately for the output format.
309: Specify length of lines in characters (for text wrapping).
311`--toc`, `--table-of-contents`
312: Include an automatically generated table of contents (or, in
313 the case of `latex`, `context`, and `rst`, an instruction to create
314 one) in the output document. This option has no effect on `man`,
315 `docbook`, `slidy`, `slideous`, or `s5` output.
317`--toc-depth=`*NUMBER*
318: Specify the number of section levels to include in the table
319 of contents. The default is 3 (which means that level 1, 2, and 3
320 headers will be listed in the contents). Implies `--toc`.
323: Disables syntax highlighting for code blocks and inlines, even when
324 a language attribute is given.
326`--highlight-style`=*STYLE*
327: Specifies the coloring style to be used in highlighted source code.
328 Options are `pygments` (the default), `kate`, `monochrome`,
329 `espresso`, `zenburn`, `haddock`, and `tango`.
331`-H` *FILE*, `--include-in-header=`*FILE*
332: Include contents of *FILE*, verbatim, at the end of the header.
333 This can be used, for example, to include special
334 CSS or javascript in HTML documents. This option can be used
335 repeatedly to include multiple files in the header. They will be
336 included in the order specified. Implies `--standalone`.
338`-B` *FILE*, `--include-before-body=`*FILE*
339: Include contents of *FILE*, verbatim, at the beginning of the
340 document body (e.g. after the `<body>` tag in HTML, or the
341 `\begin{document}` command in LaTeX). This can be used to include
342 navigation bars or banners in HTML documents. This option can be
343 used repeatedly to include multiple files. They will be included in
344 the order specified. Implies `--standalone`.
346`-A` *FILE*, `--include-after-body=`*FILE*
347: Include contents of *FILE*, verbatim, at the end of the document
348 body (before the `</body>` tag in HTML, or the
349 `\end{document}` command in LaTeX). This option can be be used
350 repeatedly to include multiple files. They will be included in the
351 order specified. Implies `--standalone`.
353Options affecting specific writers
354----------------------------------
357: Produce a standalone HTML file with no external dependencies, using
358 `data:` URIs to incorporate the contents of linked scripts, stylesheets,
359 images, and videos. The resulting file should be "self-contained,"
360 in the sense that it needs no external files and no net access to be
361 displayed properly by a browser. This option works only with HTML output
362 formats, including `html`, `html5`, `html+lhs`, `html5+lhs`, `s5`,
364 and `dzslides`. Scripts, images, and stylesheets at absolute URLs
365 will be downloaded; those at relative URLs will be sought first relative
366 to the working directory, then relative to the user data directory (see
367 `--data-dir`), and finally relative to pandoc's default data directory.
370: Deprecated synonym for `--self-contained`.
373: Produce HTML5 instead of HTML4. This option has no effect for writers
374 other than `html`. (*Deprecated:* Use the `html5` output format instead.)
377: Use `<q>` tags for quotes in HTML.
380: Use only ascii characters in output. Currently supported only
381 for HTML output (which uses numerical entities instead of
382 UTF-8 when this option is selected).
385: Use reference-style links, rather than inline links, in writing markdown
386 or reStructuredText. By default inline links are used.
389: Use ATX style headers in markdown output. The default is to use
390 setext-style headers for levels 1-2, and then ATX headers.
393: Treat top-level headers as chapters in LaTeX, ConTeXt, and DocBook
394 output. When the LaTeX template uses the report, book, or
395 memoir class, this option is implied. If `--beamer` is used,
396 top-level headers will become `\part{..}`.
398`-N`, `--number-sections`
399: Number section headings in LaTeX, ConTeXt, HTML, or EPUB output.
400 By default, sections are not numbered. Sections with class
401 `unnumbered` will never be numbered, even if `--number-sections`
404`--number-offset`=*NUMBER[,NUMBER,...]*,
405: Offset for section headings in HTML output (ignored in other
406 output formats). The first number is added to the section number for
407 top-level headers, the second for second-level headers, and so on.
408 So, for example, if you want the first top-level header in your
409 document to be numbered "6", specify `--number-offset=5`.
410 If your document starts with a level-2 header which you want to
411 be numbered "1.5", specify `--number-offset=1,4`.
412 Offsets are 0 by default. Implies `--number-sections`.
415: Do not convert quotation marks, apostrophes, and dashes to
416 the TeX ligatures when writing LaTeX or ConTeXt. Instead, just
417 use literal unicode characters. This is needed for using advanced
418 OpenType features with XeLaTeX and LuaLaTeX. Note: normally
419 `--smart` is selected automatically for LaTeX and ConTeXt
420 output, but it must be specified explicitly if `--no-tex-ligatures`
421 is selected. If you use literal curly quotes, dashes, and ellipses
422 in your source, then you may want to use `--no-tex-ligatures`
426: Use listings package for LaTeX code blocks
429: Make list items in slide shows display incrementally (one by one).
430 The default is for lists to be displayed all at once.
432`--slide-level`=*NUMBER*
433: Specifies that headers with the specified level create
434 slides (for `beamer`, `s5`, `slidy`, `slideous`, `dzslides`). Headers
435 above this level in the hierarchy are used to divide the
436 slide show into sections; headers below this level create
437 subheads within a slide. The default is to set the slide level
438 based on the contents of the document; see
439 [Structuring the slide show](#structuring-the-slide-show), below.
442: Wrap sections in `<div>` tags (or `<section>` tags in HTML5),
443 and attach identifiers to the enclosing `<div>` (or `<section>`)
444 rather than the header itself.
445 See [Section identifiers](#header-identifiers-in-html-latex-and-context), below.
447`--email-obfuscation=`*none|javascript|references*
448: Specify a method for obfuscating `mailto:` links in HTML documents.
449 *none* leaves `mailto:` links as they are. *javascript* obfuscates
450 them using javascript. *references* obfuscates them by printing their
451 letters as decimal or hexadecimal character references.
453`--id-prefix`=*STRING*
454: Specify a prefix to be added to all automatically generated identifiers
455 in HTML and DocBook output, and to footnote numbers in markdown output.
456 This is useful for preventing duplicate identifiers when generating
457 fragments to be included in other pages.
459`-T` *STRING*, `--title-prefix=`*STRING*
460: Specify *STRING* as a prefix at the beginning of the title
461 that appears in the HTML header (but not in the title as it
462 appears at the beginning of the HTML body). Implies
465`-c` *URL*, `--css=`*URL*
466: Link to a CSS style sheet. This option can be be used repeatedly to
467 include multiple files. They will be included in the order specified.
469`--reference-odt=`*FILE*
470: Use the specified file as a style reference in producing an ODT.
471 For best results, the reference ODT should be a modified version
472 of an ODT produced using pandoc. The contents of the reference ODT
473 are ignored, but its stylesheets are used in the new ODT. If no
474 reference ODT is specified on the command line, pandoc will look
475 for a file `reference.odt` in the user data directory (see
476 `--data-dir`). If this is not found either, sensible defaults will be
479`--reference-docx=`*FILE*
480: Use the specified file as a style reference in producing a docx file.
481 For best results, the reference docx should be a modified version
482 of a docx file produced using pandoc. The contents of the reference docx
483 are ignored, but its stylesheets are used in the new docx. If no
484 reference docx is specified on the command line, pandoc will look
485 for a file `reference.docx` in the user data directory (see
486 `--data-dir`). If this is not found either, sensible defaults will be
487 used. The following styles are used by pandoc: [paragraph]
488 Normal, Title, Authors, Date, Heading 1, Heading 2, Heading 3,
489 Heading 4, Heading 5, Block Quote, Definition Term, Definition,
490 Body Text, Table Caption, Image Caption; [character] Default
491 Paragraph Font, Body Text Char, Verbatim Char, Footnote Ref,
494`--epub-stylesheet=`*FILE*
495: Use the specified CSS file to style the EPUB. If no stylesheet
496 is specified, pandoc will look for a file `epub.css` in the
497 user data directory (see `--data-dir`). If it is not
498 found there, sensible defaults will be used.
500`--epub-cover-image=`*FILE*
501: Use the specified image as the EPUB cover. It is recommended
502 that the image be less than 1000px in width and height.
504`--epub-metadata=`*FILE*
505: Look in the specified XML file for metadata for the EPUB.
506 The file should contain a series of Dublin Core elements,
507 as documented at <http://dublincore.org/documents/dces/>.
510 <dc:rights>Creative Commons</dc:rights>
511 <dc:language>es-AR</dc:language>
513 By default, pandoc will include the following metadata elements:
514 `<dc:title>` (from the document title), `<dc:creator>` (from the
515 document authors), `<dc:date>` (from the document date, which should
516 be in [ISO 8601 format]), `<dc:language>` (from the `lang`
517 variable, or, if is not set, the locale), and `<dc:identifier
518 id="BookId">` (a randomly generated UUID). Any of these may be
519 overridden by elements in the metadata file.
521`--epub-embed-font=`*FILE*
522: Embed the specified font in the EPUB. This option can be repeated
523 to embed multiple fonts. To use embedded fonts, you
524 will need to add declarations like the following to your CSS (see
525 `--epub-stylesheet`):
528 font-family: DejaVuSans;
531 src:url("DejaVuSans-Regular.ttf");
534 font-family: DejaVuSans;
537 src:url("DejaVuSans-Bold.ttf");
540 font-family: DejaVuSans;
543 src:url("DejaVuSans-Oblique.ttf");
546 font-family: DejaVuSans;
549 src:url("DejaVuSans-BoldOblique.ttf");
551 body { font-family: "DejaVuSans"; }
553`--epub-chapter-level=`*NUMBER*
554: Specify the header level at which to split the EPUB into separate
555 "chapter" files. The default is to split into chapters at level 1
556 headers. This option only affects the internal composition of the
557 EPUB, not the way chapters and sections are displayed to users. Some
558 readers may be slow if the chapter files are too large, so for large
559 documents with few level 1 headers, one might want to use a chapter
562`--latex-engine=`*pdflatex|lualatex|xelatex*
563: Use the specified LaTeX engine when producing PDF output.
564 The default is `pdflatex`. If the engine is not in your PATH,
565 the full path of the engine may be specified here.
570`--bibliography=`*FILE*
571: Specify bibliography database to be used in resolving
572 citations. The database type will be determined from the
573 extension of *FILE*, which may be `.mods` (MODS format),
574 `.bib` (BibLaTeX format, which will normally work for BibTeX
575 files as well), `.bibtex` (BibTeX format),
576 `.ris` (RIS format), `.enl` (EndNote format),
577 `.xml` (EndNote XML format), `.wos` (ISI format),
578 `.medline` (MEDLINE format), `.copac` (Copac format),
579 or `.json` (citeproc JSON). If you want to use multiple
580 bibliographies, just use this option repeatedly.
583: Specify [CSL] style to be used in formatting citations and
584 the bibliography. If *FILE* is not found, pandoc will look
591 C:\Documents And Settings\USERNAME\Application Data\csl
595 C:\Users\USERNAME\AppData\Roaming\csl
597 in Windows 7. If the `--csl` option is not specified, pandoc
598 will use a default style: either `default.csl` in the
599 user data directory (see `--data-dir`), or, if that is
600 not present, the Chicago author-date style.
602`--citation-abbreviations=`*FILE*
603: Specify a file containing abbreviations for journal titles and
604 other bibliographic fields (indicated by setting `form="short"`
605 in the CSL node for the field). The format is described at
606 <http://citationstylist.org/2011/10/19/abbreviations-for-zotero-test-release/>.
607 Here is a short example:
611 "Lloyd's Law Reports": "Lloyd's Rep",
612 "Estates Gazette": "EG",
613 "Scots Law Times": "SLT"
619: Use natbib for citations in LaTeX output.
622: Use biblatex for citations in LaTeX output.
624Math rendering in HTML
625----------------------
627`-m` [*URL*], `--latexmathml`[=*URL*]
628: Use the [LaTeXMathML] script to display embedded TeX math in HTML output.
629 To insert a link to a local copy of the `LaTeXMathML.js` script,
630 provide a *URL*. If no *URL* is provided, the contents of the
631 script will be inserted directly into the HTML header, preserving
632 portability at the price of efficiency. If you plan to use math on
633 several pages, it is much better to link to a copy of the script,
637: Convert TeX math to MathML (in `docbook` as well as `html` and `html5`).
638 In standalone `html` output, a small javascript (or a link to such a
639 script if a *URL* is supplied) will be inserted that allows the MathML to
640 be viewed on some browsers.
643: Use [jsMath] to display embedded TeX math in HTML output.
644 The *URL* should point to the jsMath load script (e.g.
645 `jsMath/easy/load.js`); if provided, it will be linked to in
646 the header of standalone HTML documents. If a *URL* is not provided,
647 no link to the jsMath load script will be inserted; it is then
648 up to the author to provide such a link in the HTML template.
651: Use [MathJax] to display embedded TeX math in HTML output.
652 The *URL* should point to the `MathJax.js` load script.
653 If a *URL* is not provided, a link to the MathJax CDN will
657: Enclose TeX math in `<eq>` tags in HTML output. These can then
658 be processed by [gladTeX] to produce links to images of the typeset
662: Render TeX math using the [mimeTeX] CGI script. If *URL* is not
663 specified, it is assumed that the script is at `/cgi-bin/mimetex.cgi`.
666: Render TeX formulas using an external script that converts TeX
667 formulas to images. The formula will be concatenated with the URL
668 provided. If *URL* is not specified, the Google Chart API will be used.
670Options for wrapper scripts
671---------------------------
674: Print information about command-line arguments to *stdout*, then exit.
675 This option is intended primarily for use in wrapper scripts.
676 The first line of output contains the name of the output file specified
677 with the `-o` option, or `-` (for *stdout*) if no output file was
678 specified. The remaining lines contain the command-line arguments,
679 one per line, in the order they appear. These do not include regular
680 Pandoc options and their arguments, but do include any options appearing
681 after a `--` separator at the end of the line.
684: Ignore command-line arguments (for use in wrapper scripts).
685 Regular Pandoc options are not ignored. Thus, for example,
687 pandoc --ignore-args -o foo.html -s foo.txt -- -e latin1
691 pandoc -o foo.html -s
693[LaTeXMathML]: http://math.etsu.edu/LaTeXMathML/
694[jsMath]: http://www.math.union.edu/~dpvc/jsmath/
695[MathJax]: http://www.mathjax.org/
696[gladTeX]: http://ans.hsh.no/home/mgg/gladtex/
697[mimeTeX]: http://www.forkosh.com/mimetex.html
698[CSL]: http://CitationStyles.org
703When the `-s/--standalone` option is used, pandoc uses a template to
704add header and footer material that is needed for a self-standing
705document. To see the default template that is used, just type
709where `FORMAT` is the name of the output format. A custom template
710can be specified using the `--template` option. You can also override
711the system default templates for a given output format `FORMAT`
712by putting a file `templates/default.FORMAT` in the user data
713directory (see `--data-dir`, above). *Exceptions:* For `odt` output,
714customize the `default.opendocument` template. For `pdf` output,
715customize the `default.latex` template.
717Templates may contain *variables*. Variable names are sequences of
718alphanumerics, `-`, and `_`, starting with a letter. A variable name
719surrounded by `$` signs will be replaced by its value. For example,
720the string `$title$` in
722 <title>$title$</title>
724will be replaced by the document title.
726To write a literal `$` in a template, use `$$`.
728Some variables are set automatically by pandoc. These vary somewhat
729depending on the output format, but include:
732: contents specified by `-H/--include-in-header` (may have multiple
735: non-null value if `--toc/--table-of-contents` was specified
737: contents specified by `-B/--include-before-body` (may have
740: contents specified by `-A/--include-after-body` (may have
745: title of document, as specified in title block
747: author of document, as specified in title block (may have
750: date of document, as specified in title block
752: language code for HTML or LaTeX documents
754: base URL for Slidy documents (defaults to
755 `http://www.w3.org/Talks/Tools/Slidy2`)
757: base URL for Slideous documents (defaults to `default`)
759: base URL for S5 documents (defaults to `ui/default`)
761: base URL for reveal.js documents (defaults to `reveal.js`)
765: reveal.js transition
767: font size (10pt, 11pt, 12pt) for LaTeX documents
769: document class for LaTeX documents
771: options for LaTeX `geometry` class, e.g. `margin=1in`;
772 may be repeated for multiple options
773`mainfont`, `sansfont`, `monofont`, `mathfont`
774: fonts for LaTeX documents (works only with xelatex
777: theme for LaTeX beamer documents
779: colortheme for LaTeX beamer documents
781: color for internal links in LaTeX documents (`red`, `green`,
782 `magenta`, `cyan`, `blue`, `black`)
784: color for external links in LaTeX documents
786: causes links to be printed as footnotes in LaTeX documents
788Variables may be set at the command line using the `-V/--variable`
789option. This allows users to include custom variables in their
792Templates may contain conditionals. The syntax is as follows:
800This will include `X` in the template if `variable` has a non-null
801value; otherwise it will include `Y`. `X` and `Y` are placeholders for
802any valid template text, and may include interpolated variables or other
803conditionals. The `$else$` section may be omitted.
805When variables can have multiple values (for example, `author` in
806a multi-author document), you can use the `$for$` keyword:
809 <meta name="author" content="$author$" />
812You can optionally specify a separator to be used between
815 $for(author)$$author$$sep$, $endfor$
817If you use custom templates, you may need to revise them as pandoc
818changes. We recommend tracking the changes in the default templates,
819and modifying your custom templates accordingly. An easy way to do this
820is to fork the pandoc-templates repository
821(<http://github.com/jgm/pandoc-templates>) and merge in changes after each
827Pandoc understands an extended and slightly revised version of
828John Gruber's [markdown] syntax. This document explains the syntax,
829noting differences from standard markdown. Except where noted, these
830differences can be suppressed by using the `markdown_strict` format instead
831of `markdown`. An extensions can be enabled by adding `+EXTENSION`
832to the format name and disabled by adding `-EXTENSION`. For example,
833`markdown_strict+footnotes` is strict markdown with footnotes
834enabled, while `markdown-footnotes-pipe_tables` is pandoc's
835markdown without footnotes or pipe tables.
840Markdown is designed to be easy to write, and, even more importantly,
843> A Markdown-formatted document should be publishable as-is, as plain
844> text, without looking like it's been marked up with tags or formatting
846> -- [John Gruber](http://daringfireball.net/projects/markdown/syntax#philosophy)
848This principle has guided pandoc's decisions in finding syntax for
849tables, footnotes, and other extensions.
851There is, however, one respect in which pandoc's aims are different
852from the original aims of markdown. Whereas markdown was originally
853designed with HTML generation in mind, pandoc is designed for multiple
854output formats. Thus, while pandoc allows the embedding of raw HTML,
855it discourages it, and provides other, non-HTMLish ways of representing
856important document elements like definition lists, tables, mathematics, and
862A paragraph is one or more lines of text followed by one or more blank line.
863Newlines are treated as spaces, so you can reflow your paragraphs as you like.
864If you need a hard line break, put two or more spaces at the end of a line.
866**Extension: `escaped_line_breaks`**
868A backslash followed by a newline is also a hard line break.
873There are two kinds of headers, Setext and atx.
875### Setext-style headers ###
877A setext-style header is a line of text "underlined" with a row of `=` signs
878(for a level one header) of `-` signs (for a level two header):
886The header text can contain inline formatting, such as emphasis (see
887[Inline formatting](#inline-formatting), below).
890### Atx-style headers ###
892An Atx-style header consists of one to six `#` signs and a line of
893text, optionally followed by any number of `#` signs. The number of
894`#` signs at the beginning of the line is the header level:
896 ## A level-two header
898 ### A level-three header ###
900As with setext-style headers, the header text can contain formatting:
902 # A level-one header with a [link](/url) and *emphasis*
904**Extension: `blank_before_header`**
906Standard markdown syntax does not require a blank line before a header.
907Pandoc does require this (except, of course, at the beginning of the
908document). The reason for the requirement is that it is all too easy for a
909`#` to end up at the beginning of a line by accident (perhaps through line
910wrapping). Consider, for example:
912 I like several of their flavors of ice cream:
913 #22, for example, and #5.
916### Header identifiers in HTML, LaTeX, and ConTeXt ###
918**Extension: `header_attributes`**
920Headers can be assigned attributes using this syntax at the end
921of the line containing the header text:
923 {#identifier .class .class key=value key=value}
925Although this syntax allows assignment of classes and key/value attributes,
926only identifiers currently have any affect in the writers (and only in some
927writers: HTML, LaTeX, ConTeXt, Textile, AsciiDoc). Thus, for example,
928the following headers will all be assigned the identifier `foo`:
932 ## My header ## {#foo}
934 My other header {#foo}
937(This syntax is compatible with [PHP Markdown Extra].)
939Headers with the class `unnumbered` will not be numbered, even if
940`--number-sections` is specified. A single hyphen (`-`) in an attribute
941context is equivalent to `.unnumbered`, and preferable in non-English
948 # My header {.unnumbered}
950**Extension: `auto_identifiers`**
952A header without an explicitly specified identifier will be
953automatically assigned a unique identifier based on the header text.
954To derive the identifier from the header text,
956 - Remove all formatting, links, etc.
957 - Remove all punctuation, except underscores, hyphens, and periods.
958 - Replace all spaces and newlines with hyphens.
959 - Convert all alphabetic characters to lowercase.
960 - Remove everything up to the first letter (identifiers may
961 not begin with a number or punctuation mark).
962 - If nothing is left after this, use the identifier `section`.
967 ------------------------------- ----------------------------
968 Header identifiers in HTML `header-identifiers-in-html`
969 *Dogs*?--in *my* house? `dogs--in-my-house`
970 [HTML], [S5], or [RTF]? `html-s5-or-rtf`
971 3. Applications `applications`
974These rules should, in most cases, allow one to determine the identifier
975from the header text. The exception is when several headers have the
976same text; in this case, the first will get an identifier as described
977above; the second will get the same identifier with `-1` appended; the
978third with `-2`; and so on.
980These identifiers are used to provide link targets in the table of
981contents generated by the `--toc|--table-of-contents` option. They
982also make it easy to provide links from one section of a document to
983another. A link to this section, for example, might look like this:
986 [header identifiers](#header-identifiers-in-html-latex-and-context).
988Note, however, that this method of providing links to sections works
989only in HTML, LaTeX, and ConTeXt formats.
991If the `--section-divs` option is specified, then each section will
992be wrapped in a `div` (or a `section`, if `--html5` was specified),
993and the identifier will be attached to the enclosing `<div>`
994(or `<section>`) tag rather than the header itself. This allows entire
995sections to be manipulated using javascript or treated differently in
998**Extension: `implicit_header_references`**
1000Pandoc behaves as if reference links have been defined for each header.
1003 [header identifiers](#header-identifiers-in-html)
1007 [header identifiers]
1011 [header identifiers][]
1015 [the section on header identifiers][header identifiers]
1017If there are multiple headers with identical text, the corresponding
1018reference will link to the first one only, and you will need to use explicit
1019links to link to the others, as described above.
1021Unlike regular reference links, these references are case-sensitive.
1023Note: if you have defined an explicit identifier for a header,
1024then implicit references to it will not work.
1029Markdown uses email conventions for quoting blocks of text.
1030A block quotation is one or more paragraphs or other block elements
1031(such as lists or headers), with each line preceded by a `>` character
1032and a space. (The `>` need not start at the left margin, but it should
1033not be indented more than three spaces.)
1035 > This is a block quote. This
1036 > paragraph has two lines.
1038 > 1. This is a list inside a block quote.
1041A "lazy" form, which requires the `>` character only on the first
1042line of each block, is also allowed:
1044 > This is a block quote. This
1045 paragraph has two lines.
1047 > 1. This is a list inside a block quote.
1050Among the block elements that can be contained in a block quote are
1051other block quotes. That is, block quotes can be nested:
1053 > This is a block quote.
1055 > > A block quote within a block quote.
1057**Extension: `blank_before_blockquote`**
1059Standard markdown syntax does not require a blank line before a block
1060quote. Pandoc does require this (except, of course, at the beginning of the
1061document). The reason for the requirement is that it is all too easy for a
1062`>` to end up at the beginning of a line by accident (perhaps through line
1063wrapping). So, unless the `markdown_strict` format is used, the following does
1064not produce a nested block quote in pandoc:
1066 > This is a block quote.
1070Verbatim (code) blocks
1071----------------------
1073### Indented code blocks ###
1075A block of text indented four spaces (or one tab) is treated as verbatim
1076text: that is, special characters do not trigger special formatting,
1077and all spaces and line breaks are preserved. For example,
1080 moveShip(5 * gravity, DOWN);
1083The initial (four space or one tab) indentation is not considered part
1084of the verbatim text, and is removed in the output.
1086Note: blank lines in the verbatim text need not begin with four spaces.
1089### Fenced code blocks ###
1091**Extension: `fenced_code_blocks`**
1093In addition to standard indented code blocks, Pandoc supports
1094*fenced* code blocks. These begin with a row of three or more
1095tildes (`~`) or backticks (`` ` ``) and end with a row of tildes or
1096backticks that must be at least as long as the starting row. Everything
1097between these lines is treated as code. No indentation is necessary:
1101 moveShip(5 * gravity, DOWN);
1105Like regular code blocks, fenced code blocks must be separated
1106from surrounding text by blank lines.
1108If the code itself contains a row of tildes or backticks, just use a longer
1109row of tildes or backticks at the start and end:
1113 code including tildes
1117Optionally, you may attach attributes to the code block using
1120 ~~~~ {#mycode .haskell .numberLines startFrom="100"}
1122 qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
1123 qsort (filter (>= x) xs)
1124 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1126Here `mycode` is an identifier, `haskell` and `numberLines` are classes, and
1127`startFrom` is an attribute with value `100`. Some output formats can use this
1128information to do syntax highlighting. Currently, the only output formats
1129that uses this information are HTML and LaTeX. If highlighting is supported
1130for your output format and language, then the code block above will appear
1131highlighted, with numbered lines. (To see which languages are supported, do
1132`pandoc --version`.) Otherwise, the code block above will appear as follows:
1134 <pre id="mycode" class="haskell numberLines" startFrom="100">
1140A shortcut form can also be used for specifying the language of
1147This is equivalent to:
1153To prevent all highlighting, use the `--no-highlight` flag.
1154To set the highlighting style, use `--highlight-style`.
1159**Extension: `line_blocks`**
1161A line block is a sequence of lines beginning with a vertical bar (`|`)
1162followed by a space. The division into lines will be preserved in
1163the output, as will any leading spaces; otherwise, the lines will
1164be formatted as markdown. This is useful for verse and addresses:
1166 | The limerick packs laughs anatomical
1167 | In space that is quite economical.
1168 | But the good ones I've seen
1169 | So seldom are clean
1170 | And the clean ones so seldom are comical
1173 | Berkeley, CA 94718
1175The lines can be hard-wrapped if needed, but the continuation
1176line must begin with a space.
1178 | The Right Honorable Most Venerable and Righteous Samuel L.
1181 | Berkeley, CA 94718
1183This syntax is borrowed from [reStructuredText].
1190A bullet list is a list of bulleted list items. A bulleted list
1191item begins with a bullet (`*`, `+`, or `-`). Here is a simple
1198This will produce a "compact" list. If you want a "loose" list, in which
1199each item is formatted as a paragraph, put spaces between the items:
1207The bullets need not be flush with the left margin; they may be
1208indented one, two, or three spaces. The bullet must be followed
1211List items look best if subsequent lines are flush with the first
1212line (after the bullet):
1218But markdown also allows a "lazy" format:
1224### The four-space rule ###
1226A list item may contain multiple paragraphs and other block-level
1227content. However, subsequent paragraphs must be preceded by a blank line
1228and indented four spaces or a tab. The list will look better if the first
1229paragraph is aligned with the rest:
1235 * Second paragraph. With a code block, which must be indented
1240List items may include other lists. In this case the preceding blank
1241line is optional. The nested list must be indented four spaces or
1254As noted above, markdown allows you to write list items "lazily," instead of
1255indenting continuation lines. However, if there are multiple paragraphs or
1256other blocks in a list item, the first line of each must be indented.
1258 + A lazy, lazy, list
1261 + Another one; this looks
1264 Second paragraph of second
1267**Note:** Although the four-space rule for continuation paragraphs
1268comes from the official [markdown syntax guide], the reference implementation,
1269`Markdown.pl`, does not follow it. So pandoc will give different results than
1270`Markdown.pl` when authors have indented continuation paragraphs fewer than
1273The [markdown syntax guide] is not explicit whether the four-space
1274rule applies to *all* block-level content in a list item; it only
1275mentions paragraphs and code blocks. But it implies that the rule
1276applies to all block-level content (including nested lists), and
1277pandoc interprets it that way.
1279 [markdown syntax guide]:
1280 http://daringfireball.net/projects/markdown/syntax#list
1282### Ordered lists ###
1284Ordered lists work just like bulleted lists, except that the items
1285begin with enumerators rather than bullets.
1287In standard markdown, enumerators are decimal numbers followed
1288by a period and a space. The numbers themselves are ignored, so
1289there is no difference between this list:
1301**Extension: `fancy_lists`**
1303Unlike standard markdown, Pandoc allows ordered list items to be marked
1304with uppercase and lowercase letters and roman numerals, in addition to
1305arabic numerals. List markers may be enclosed in parentheses or followed by a
1306single right-parentheses or period. They must be separated from the
1307text that follows by at least one space, and, if the list marker is a
1308capital letter with a period, by at least two spaces.[^2]
1310[^2]: The point of this rule is to ensure that normal paragraphs
1311 starting with people's initials, like
1313 B. Russell was an English philosopher.
1315 do not get treated as list items.
1317 This rule will not prevent
1321 from being interpreted as a list item. In this case, a backslash
1326**Extension: `startnum`**
1328Pandoc also pays attention to the type of list marker used, and to the
1329starting number, and both of these are preserved where possible in the
1330output format. Thus, the following yields a list with numbers followed
1331by a single parenthesis, starting with 9, and a sublist with lowercase
1341Pandoc will start a new list each time a different type of list
1342marker is used. So, the following will create three lists:
1349If default list markers are desired, use `#.`:
1356### Definition lists ###
1358**Extension: `definition_lists`**
1360Pandoc supports definition lists, using a syntax inspired by
1361[PHP Markdown Extra] and [reStructuredText]:[^3]
1367 Term 2 with *inline markup*
1371 { some code, part of Definition 2 }
1373 Third paragraph of definition 2.
1375Each term must fit on one line, which may optionally be followed by
1376a blank line, and must be followed by one or more definitions.
1377A definition begins with a colon or tilde, which may be indented one
1378or two spaces. The body of the definition (including the first line,
1379aside from the colon or tilde) should be indented four spaces. A term may have
1380multiple definitions, and each definition may consist of one or more block
1381elements (paragraph, code block, list, etc.), each indented four spaces or one
1384If you leave space after the definition (as in the example above),
1385the blocks of the definitions will be considered paragraphs. In some
1386output formats, this will mean greater spacing between term/definition
1387pairs. For a compact definition list, do not leave space between the
1388definition and the next term:
1396[^3]: I have also been influenced by the suggestions of [David Wheeler](http://www.justatheory.com/computers/markup/modest-markdown-proposal.html).
1398[PHP Markdown Extra]: http://www.michelf.com/projects/php-markdown/extra/
1401### Numbered example lists ###
1403**Extension: `example_lists`**
1405The special list marker `@` can be used for sequentially numbered
1406examples. The first list item with a `@` marker will be numbered '1',
1407the next '2', and so on, throughout the document. The numbered examples
1408need not occur in a single list; each new list using `@` will take up
1409where the last stopped. So, for example:
1411 (@) My first example will be numbered (1).
1412 (@) My second example will be numbered (2).
1414 Explanation of examples.
1416 (@) My third example will be numbered (3).
1418Numbered examples can be labeled and referred to elsewhere in the
1421 (@good) This is a good example.
1423 As (@good) illustrates, ...
1425The label can be any string of alphanumeric characters, underscores,
1429### Compact and loose lists ###
1431Pandoc behaves differently from `Markdown.pl` on some "edge
1432cases" involving lists. Consider this source:
1442Pandoc transforms this into a "compact list" (with no `<p>` tags around
1443"First", "Second", or "Third"), while markdown puts `<p>` tags around
1444"Second" and "Third" (but not "First"), because of the blank space
1445around "Third". Pandoc follows a simple rule: if the text is followed by
1446a blank line, it is treated as a paragraph. Since "Second" is followed
1447by a list, and not a blank line, it isn't treated as a paragraph. The
1448fact that the list is followed by a blank line is irrelevant. (Note:
1449Pandoc works this way even when the `markdown_strict` format is specified. This
1450behavior is consistent with the official markdown syntax description,
1451even though it is different from that of `Markdown.pl`.)
1454### Ending a list ###
1456What if you want to put an indented code block after a list?
1463Trouble! Here pandoc (like other markdown implementations) will treat
1464`{ my code block }` as the second paragraph of item two, and not as
1467To "cut off" the list after item two, you can insert some non-indented
1468content, like an HTML comment, which won't produce visible output in
1474 <!-- end of list -->
1478You can use the same trick if you want two consecutive lists instead
1494A line containing a row of three or more `*`, `-`, or `_` characters
1495(optionally separated by spaces) produces a horizontal rule:
1505Four kinds of tables may be used. The first three kinds presuppose the use of
1506a fixed-width font, such as Courier. The fourth kind can be used with
1507proportionally spaced fonts, as it does not require lining up columns.
1511**Extension: `simple_tables`, `table_captions`**
1513Simple tables look like this:
1515 Right Left Center Default
1516 ------- ------ ---------- -------
1521 Table: Demonstration of simple table syntax.
1523The headers and table rows must each fit on one line. Column
1524alignments are determined by the position of the header text relative
1525to the dashed line below it:[^4]
1527 - If the dashed line is flush with the header text on the right side
1528 but extends beyond it on the left, the column is right-aligned.
1529 - If the dashed line is flush with the header text on the left side
1530 but extends beyond it on the right, the column is left-aligned.
1531 - If the dashed line extends beyond the header text on both sides,
1532 the column is centered.
1533 - If the dashed line is flush with the header text on both sides,
1534 the default alignment is used (in most cases, this will be left).
1536[^4]: This scheme is due to Michel Fortin, who proposed it on the
1537 [Markdown discussion list](http://six.pairlist.net/pipermail/markdown-discuss/2005-March/001097.html).
1539The table must end with a blank line, or a line of dashes followed by
1540a blank line. A caption may optionally be provided (as illustrated in
1541the example above). A caption is a paragraph beginning with the string
1542`Table:` (or just `:`), which will be stripped off. It may appear either
1543before or after the table.
1545The column headers may be omitted, provided a dashed line is used
1546to end the table. For example:
1548 ------- ------ ---------- -------
1552 ------- ------ ---------- -------
1554When headers are omitted, column alignments are determined on the basis
1555of the first line of the table body. So, in the tables above, the columns
1556would be right, left, center, and right aligned, respectively.
1560**Extension: `multiline_tables`, `table_captions`**
1562Multiline tables allow headers and table rows to span multiple lines
1563of text (but cells that span multiple columns or rows of the table are
1564not supported). Here is an example:
1566 -------------------------------------------------------------
1567 Centered Default Right Left
1568 Header Aligned Aligned Aligned
1569 ----------- ------- --------------- -------------------------
1570 First row 12.0 Example of a row that
1571 spans multiple lines.
1573 Second row 5.0 Here's another one. Note
1574 the blank line between
1576 -------------------------------------------------------------
1578 Table: Here's the caption. It, too, may span
1581These work like simple tables, but with the following differences:
1583 - They must begin with a row of dashes, before the header text
1584 (unless the headers are omitted).
1585 - They must end with a row of dashes, then a blank line.
1586 - The rows must be separated by blank lines.
1588In multiline tables, the table parser pays attention to the widths of
1589the columns, and the writers try to reproduce these relative widths in
1590the output. So, if you find that one of the columns is too narrow in the
1591output, try widening it in the markdown source.
1593Headers may be omitted in multiline tables as well as simple tables:
1595 ----------- ------- --------------- -------------------------
1596 First row 12.0 Example of a row that
1597 spans multiple lines.
1599 Second row 5.0 Here's another one. Note
1600 the blank line between
1602 ----------- ------- --------------- -------------------------
1604 : Here's a multiline table without headers.
1606It is possible for a multiline table to have just one row, but the row
1607should be followed by a blank line (and then the row of dashes that ends
1608the table), or the table may be interpreted as a simple table.
1612**Extension: `grid_tables`, `table_captions`**
1614Grid tables look like this:
1616 : Sample grid table.
1618 +---------------+---------------+--------------------+
1619 | Fruit | Price | Advantages |
1620 +===============+===============+====================+
1621 | Bananas | $1.34 | - built-in wrapper |
1622 | | | - bright color |
1623 +---------------+---------------+--------------------+
1624 | Oranges | $2.10 | - cures scurvy |
1626 +---------------+---------------+--------------------+
1628The row of `=`s separates the header from the table body, and can be
1629omitted for a headerless table. The cells of grid tables may contain
1630arbitrary block elements (multiple paragraphs, code blocks, lists,
1631etc.). Alignments are not supported, nor are cells that span multiple
1632columns or rows. Grid tables can be created easily using [Emacs table mode].
1634 [Emacs table mode]: http://table.sourceforge.net/
1638**Extension: `pipe_tables`, `table_captions`**
1640Pipe tables look like this:
1642 | Right | Left | Default | Center |
1643 |------:|:-----|---------|:------:|
1644 | 12 | 12 | 12 | 12 |
1645 | 123 | 123 | 123 | 123 |
1648 : Demonstration of simple table syntax.
1650The syntax is [the same as in PHP markdown extra]. The beginning and
1651ending pipe characters are optional, but pipes are required between all
1652columns. The colons indicate column alignment as shown. The header
1653can be omitted, but the horizontal line must still be included, as
1654it defines column alignments.
1656Since the pipes indicate column boundaries, columns need not be vertically
1657aligned, as they are in the above example. So, this is a perfectly
1658legal (though ugly) pipe table:
1666The cells of pipe tables cannot contain block elements like paragraphs
1667and lists, and cannot span multiple lines.
1669 [the same as in PHP markdown extra]:
1670 http://michelf.ca/projects/php-markdown/extra/#table
1672Note: Pandoc also recognizes pipe tables of the following
1673form, as can produced by Emacs' orgtbl-mode:
1680The difference is that `+` is used instead of `|`. Other orgtbl features
1681are not supported. In particular, to get non-default column alignment,
1682you'll need to add colons as above.
1687**Extension: `pandoc_title_block`**
1689If the file begins with a title block
1692 % author(s) (separated by semicolons)
1695it will be parsed as bibliographic information, not regular text. (It
1696will be used, for example, in the title of standalone LaTeX or HTML
1697output.) The block may contain just a title, a title and an author,
1698or all three elements. If you want to include an author but no
1699title, or a title and a date but no author, you need a blank line:
1708The title may occupy multiple lines, but continuation lines must
1709begin with leading space, thus:
1714If a document has multiple authors, the authors may be put on
1715separate lines with leading space, or separated by semicolons, or
1716both. So, all of the following are equivalent:
1721 % Author One; Author Two
1726The date must fit on one line.
1728All three metadata fields may contain standard inline formatting
1729(italics, links, footnotes, etc.).
1731Title blocks will always be parsed, but they will affect the output only
1732when the `--standalone` (`-s`) option is chosen. In HTML output, titles
1733will appear twice: once in the document head -- this is the title that
1734will appear at the top of the window in a browser -- and once at the
1735beginning of the document body. The title in the document head can have
1736an optional prefix attached (`--title-prefix` or `-T` option). The title
1737in the body appears as an H1 element with class "title", so it can be
1738suppressed or reformatted with CSS. If a title prefix is specified with
1739`-T` and no title block appears in the document, the title prefix will
1740be used by itself as the HTML title.
1742The man page writer extracts a title, man page section number, and
1743other header and footer information from the title line. The title
1744is assumed to be the first word on the title line, which may optionally
1745end with a (single-digit) section number in parentheses. (There should
1746be no space between the title and the parentheses.) Anything after
1747this is assumed to be additional footer and header text. A single pipe
1748character (`|`) should be used to separate the footer text from the header
1753will yield a man page with the title `PANDOC` and section 1.
1755 % PANDOC(1) Pandoc User Manuals
1757will also have "Pandoc User Manuals" in the footer.
1759 % PANDOC(1) Pandoc User Manuals | Version 4.0
1761will also have "Version 4.0" in the header.
1767**Extension: `all_symbols_escapable`**
1769Except inside a code block or inline code, any punctuation or space
1770character preceded by a backslash will be treated literally, even if it
1771would normally indicate formatting. Thus, for example, if one writes
1781 <strong>hello</strong>
1783This rule is easier to remember than standard markdown's rule,
1784which allows only the following characters to be backslash-escaped:
1788(However, if the `markdown_strict` format is used, the standard markdown rule
1791A backslash-escaped space is parsed as a nonbreaking space. It will
1792appear in TeX output as `~` and in HTML and XML as `\ ` or
1795A backslash-escaped newline (i.e. a backslash occurring at the end of
1796a line) is parsed as a hard line break. It will appear in TeX output as
1797`\\` and in HTML as `<br />`. This is a nice alternative to
1798markdown's "invisible" way of indicating hard line breaks using
1799two trailing spaces on a line.
1801Backslash escapes do not work in verbatim contexts.
1808If the `--smart` option is specified, pandoc will produce typographically
1809correct output, converting straight quotes to curly quotes, `---` to
1810em-dashes, `--` to en-dashes, and `...` to ellipses. Nonbreaking spaces
1811are inserted after certain abbreviations, such as "Mr."
1813Note: if your LaTeX template uses the `csquotes` package, pandoc will
1814detect automatically this and use `\enquote{...}` for quoted text.
1821To *emphasize* some text, surround it with `*`s or `_`, like this:
1823 This text is _emphasized with underscores_, and this
1824 is *emphasized with asterisks*.
1826Double `*` or `_` produces **strong emphasis**:
1828 This is **strong emphasis** and __with underscores__.
1830A `*` or `_` character surrounded by spaces, or backslash-escaped,
1831will not trigger emphasis:
1833 This is * not emphasized *, and \*neither is this\*.
1835**Extension: `intraword_underscores`**
1837Because `_` is sometimes used inside words and identifiers,
1838pandoc does not interpret a `_` surrounded by alphanumeric
1839characters as an emphasis marker. If you want to emphasize
1840just part of a word, use `*`:
1842 feas*ible*, not feas*able*.
1847**Extension: `strikeout`**
1849To strikeout a section of text with a horizontal line, begin and end it
1850with `~~`. Thus, for example,
1852 This ~~is deleted text.~~
1855### Superscripts and subscripts ###
1857**Extension: `superscript`, `subscript`**
1859Superscripts may be written by surrounding the superscripted text by `^`
1860characters; subscripts may be written by surrounding the subscripted
1861text by `~` characters. Thus, for example,
1863 H~2~O is a liquid. 2^10^ is 1024.
1865If the superscripted or subscripted text contains spaces, these spaces
1866must be escaped with backslashes. (This is to prevent accidental
1867superscripting and subscripting through the ordinary use of `~` and `^`.)
1868Thus, if you want the letter P with 'a cat' in subscripts, use
1869`P~a\ cat~`, not `P~a cat~`.
1874To make a short span of text verbatim, put it inside backticks:
1876 What is the difference between `>>=` and `>>`?
1878If the verbatim text includes a backtick, use double backticks:
1880 Here is a literal backtick `` ` ``.
1882(The spaces after the opening backticks and before the closing
1883backticks will be ignored.)
1885The general rule is that a verbatim span starts with a string
1886of consecutive backticks (optionally followed by a space)
1887and ends with a string of the same number of backticks (optionally
1888preceded by a space).
1890Note that backslash-escapes (and other markdown constructs) do not
1891work in verbatim contexts:
1893 This is a backslash followed by an asterisk: `\*`.
1895**Extension: `inline_code_attributes`**
1897Attributes can be attached to verbatim text, just as with
1898[fenced code blocks](#fenced-code-blocks):
1905**Extension: `tex_math_dollars`**
1907Anything between two `$` characters will be treated as TeX math. The
1908opening `$` must have a character immediately to its right, while the
1909closing `$` must have a character immediately to its left. Thus,
1910`$20,000 and $30,000` won't parse as math. If for some reason
1911you need to enclose text in literal `$` characters, backslash-escape
1912them and they won't be treated as math delimiters.
1914TeX math will be printed in all output formats. How it is rendered
1915depends on the output format:
1917Markdown, LaTeX, Org-Mode, ConTeXt
1918 ~ It will appear verbatim between `$` characters.
1921 ~ It will be rendered using an interpreted text role `:math:`, as described
1922 [here](http://www.american.edu/econ/itex2mml/mathhack.rst).
1925 ~ It will be rendered as `latexmath:[...]`.
1928 ~ It will be rendered inside a `@math` command.
1931 ~ It will be rendered verbatim without `$`'s.
1934 ~ It will be rendered inside `<math>` tags.
1937 ~ It will be rendered inside `<span class="math">` tags.
1939RTF, OpenDocument, ODT
1940 ~ It will be rendered, if possible, using unicode characters,
1941 and will otherwise appear verbatim.
1944 ~ If the `--mathml` flag is used, it will be rendered using mathml
1945 in an `inlineequation` or `informalequation` tag. Otherwise it
1946 will be rendered, if possible, using unicode characters.
1949 ~ It will be rendered using OMML math markup.
1952 ~ If the `--webtex` option is used, formulas are rendered as images
1953 using Google Charts or other compatible web service, downloaded
1954 and embedded in the e-book. Otherwise, they will appear verbatim.
1956HTML, Slidy, DZSlides, S5, EPUB
1957 ~ The way math is rendered in HTML will depend on the
1958 command-line options selected:
1960 1. The default is to render TeX math as far as possible using unicode
1961 characters, as with RTF, DocBook, and OpenDocument output. Formulas
1962 are put inside a `span` with `class="math"`, so that they may be
1963 styled differently from the surrounding text if needed.
1965 2. If the `--latexmathml` option is used, TeX math will be displayed
1966 between `$` or `$$` characters and put in `<span>` tags with class `LaTeX`.
1967 The [LaTeXMathML] script will be used to render it as formulas.
1968 (This trick does not work in all browsers, but it works in Firefox.
1969 In browsers that do not support LaTeXMathML, TeX math will appear
1970 verbatim between `$` characters.)
1972 3. If the `--jsmath` option is used, TeX math will be put inside
1973 `<span>` tags (for inline math) or `<div>` tags (for display math)
1974 with class `math`. The [jsMath] script will be used to render
1977 4. If the `--mimetex` option is used, the [mimeTeX] CGI script will
1978 be called to generate images for each TeX formula. This should
1979 work in all browsers. The `--mimetex` option takes an optional URL
1980 as argument. If no URL is specified, it will be assumed that the
1981 mimeTeX CGI script is at `/cgi-bin/mimetex.cgi`.
1983 5. If the `--gladtex` option is used, TeX formulas will be enclosed
1984 in `<eq>` tags in the HTML output. The resulting `htex` file may then
1985 be processed by [gladTeX], which will produce image files for each
1986 formula and an `html` file with links to these images. So, the
1989 pandoc -s --gladtex myfile.txt -o myfile.htex
1990 gladtex -d myfile-images myfile.htex
1991 # produces myfile.html and images in myfile-images
1993 6. If the `--webtex` option is used, TeX formulas will be converted
1994 to `<img>` tags that link to an external script that converts
1995 formulas to images. The formula will be URL-encoded and concatenated
1996 with the URL provided. If no URL is specified, the Google Chart
1997 API will be used (`http://chart.apis.google.com/chart?cht=tx&chl=`).
1999 7. If the `--mathjax` option is used, TeX math will be displayed
2000 between `\(...\)` (for inline math) or `\[...\]` (for display
2001 math) and put in `<span>` tags with class `math`.
2002 The [MathJax] script will be used to render it as formulas.
2007**Extension: `raw_html`**
2009Markdown allows you to insert raw HTML (or DocBook) anywhere in a document
2010(except verbatim contexts, where `<`, `>`, and `&` are interpreted
2011literally). (Techncially this is not an extension, since standard
2012markdown allows it, but it has been made an extension so that it can
2013be disabled if desired.)
2015The raw HTML is passed through unchanged in HTML, S5, Slidy, Slideous,
2016DZSlides, EPUB, Markdown, and Textile output, and suppressed in other
2019**Extension: `markdown_in_html_blocks`**
2021Standard markdown allows you to include HTML "blocks": blocks
2022of HTML between balanced tags that are separated from the surrounding text
2023with blank lines, and start and end at the left margin. Within
2024these blocks, everything is interpreted as HTML, not markdown;
2025so (for example), `*` does not signify emphasis.
2027Pandoc behaves this way when the `markdown_strict` format is used; but
2028by default, pandoc interprets material between HTML block tags as markdown.
2029Thus, for example, Pandoc will turn
2034 <td>[a link](http://google.com)</td>
2042 <td><em>one</em></td>
2043 <td><a href="http://google.com">a link</a></td>
2047whereas `Markdown.pl` will preserve it as is.
2049There is one exception to this rule: text between `<script>` and
2050`<style>` tags is not interpreted as markdown.
2052This departure from standard markdown should make it easier to mix
2053markdown with HTML block elements. For example, one can surround
2054a block of markdown text with `<div>` tags without preventing it
2055from being interpreted as markdown.
2060**Extension: `raw_tex`**
2062In addition to raw HTML, pandoc allows raw LaTeX, TeX, and ConTeXt to be
2063included in a document. Inline TeX commands will be preserved and passed
2064unchanged to the LaTeX and ConTeXt writers. Thus, for example, you can use
2065LaTeX to include BibTeX citations:
2067 This result was proved in \cite{jones.1967}.
2069Note that in LaTeX environments, like
2071 \begin{tabular}{|l|l|}\hline
2072 Age & Frequency \\ \hline
2075 36--45 & 22 \\ \hline
2078the material between the begin and end tags will be interpreted as raw
2079LaTeX, not as markdown.
2081Inline LaTeX is ignored in output formats other than Markdown, LaTeX,
2087**Extension: `latex_macros`**
2089For output formats other than LaTeX, pandoc will parse LaTeX `\newcommand` and
2090`\renewcommand` definitions and apply the resulting macros to all LaTeX
2091math. So, for example, the following will work in all output formats,
2094 \newcommand{\tuple}[1]{\langle #1 \rangle}
2098In LaTeX output, the `\newcommand` definition will simply be passed
2099unchanged to the output.
2105Markdown allows links to be specified in several ways.
2107### Automatic links ###
2109If you enclose a URL or email address in pointy brackets, it
2113 <sam@green.eggs.ham>
2117An inline link consists of the link text in square brackets,
2118followed by the URL in parentheses. (Optionally, the URL can
2119be followed by a link title, in quotes.)
2121 This is an [inline link](/url), and here's [one with
2122 a title](http://fsf.org "click here for a good time!").
2124There can be no space between the bracketed part and the parenthesized part.
2125The link text can contain formatting (such as emphasis), but the title cannot.
2128### Reference links ###
2130An *explicit* reference link has two parts, the link itself and the link
2131definition, which may occur elsewhere in the document (either
2132before or after the link).
2134The link consists of link text in square brackets, followed by a label in
2135square brackets. (There can be space between the two.) The link definition
2136consists of the bracketed label, followed by a colon and a space, followed by
2137the URL, and optionally (after a space) a link title either in quotes or in
2140Here are some examples:
2142 [my label 1]: /foo/bar.html "My title, optional"
2144 [my label 3]: http://fsf.org (The free software foundation)
2145 [my label 4]: /bar#special 'A title in single quotes'
2147The URL may optionally be surrounded by angle brackets:
2149 [my label 5]: <http://foo.bar.baz>
2151The title may go on the next line:
2153 [my label 3]: http://fsf.org
2154 "The free software foundation"
2156Note that link labels are not case sensitive. So, this will work:
2158 Here is [my link][FOO]
2162In an *implicit* reference link, the second pair of brackets is
2163empty, or omitted entirely:
2165 See [my website][], or [my website].
2167 [my website]: http://foo.bar.baz
2169Note: In `Markdown.pl` and most other markdown implementations,
2170reference link definitions cannot occur in nested constructions
2171such as list items or block quotes. Pandoc lifts this arbitrary
2172seeming restriction. So the following is fine in pandoc, though
2173not in most other implementations:
2181To link to another section of the same document, use the automatically
2182generated identifier (see [Header identifiers in HTML, LaTeX, and
2183ConTeXt](#header-identifiers-in-html-latex-and-context), below).
2186 See the [Introduction](#introduction).
2190 See the [Introduction].
2192 [Introduction]: #introduction
2194Internal links are currently supported for HTML formats (including
2195HTML slide shows and EPUB), LaTeX, and ConTeXt.
2200A link immediately preceded by a `!` will be treated as an image.
2201The link text will be used as the image's alt text:
2203 
2207 [movie reel]: movie.gif
2209### Pictures with captions ###
2211**Extension: `implicit_figures`**
2213An image occurring by itself in a paragraph will be rendered as
2214a figure with a caption.[^5] (In LaTeX, a figure environment will be
2215used; in HTML, the image will be placed in a `div` with class
2216`figure`, together with a caption in a `p` with class `caption`.)
2217The image's alt text will be used as the caption.
2219 
2221[^5]: This feature is not yet implemented for RTF, OpenDocument, or
2222 ODT. In those formats, you'll just get an image in a paragraph by
2223 itself, with no caption.
2225If you just want a regular inline image, just make sure it is not
2226the only thing in the paragraph. One way to do this is to insert a
2227nonbreaking space after the image:
2229 \
2235**Extension: `footnotes`**
2237Pandoc's markdown allows footnotes, using the following syntax:
2239 Here is a footnote reference,[^1] and another.[^longnote]
2241 [^1]: Here is the footnote.
2243 [^longnote]: Here's one with multiple blocks.
2245 Subsequent paragraphs are indented to show that they
2246 belong to the previous footnote.
2250 The whole paragraph can be indented, or just the first
2251 line. In this way, multi-paragraph footnotes work like
2252 multi-paragraph list items.
2254 This paragraph won't be part of the note, because it
2257The identifiers in footnote references may not contain spaces, tabs,
2258or newlines. These identifiers are used only to correlate the
2259footnote reference with the note itself; in the output, footnotes
2260will be numbered sequentially.
2262The footnotes themselves need not be placed at the end of the
2263document. They may appear anywhere except inside other block elements
2264(lists, block quotes, tables, etc.).
2266**Extension: `inline_notes`**
2268Inline footnotes are also allowed (though, unlike regular notes,
2269they cannot contain multiple paragraphs). The syntax is as follows:
2271 Here is an inline note.^[Inlines notes are easier to write, since
2272 you don't have to pick an identifier and move down to type the
2275Inline and regular footnotes may be mixed freely.
2281**Extension: `citations`**
2283Pandoc can automatically generate citations and a bibliography in a number of
2284styles (using Andrea Rossato's `hs-citeproc`). In order to use this feature,
2285you will need a bibliographic database in one of the following formats:
2287 Format File extension
2288 ------------ --------------
2300Note that `.bib` can generally be used with both BibTeX and BibLaTeX
2301files, but you can use `.bibtex` to force BibTeX.
2303You will need to specify the bibliography file using the `--bibliography`
2304command-line option (which may be repeated if you have several
2307By default, pandoc will use a Chicago author-date format for citations
2308and references. To use another style, you will need to use the
2309`--csl` option to specify a [CSL] 1.0 style file. A primer on
2310creating and modifying CSL styles can be found at
2311<http://citationstyles.org/downloads/primer.html>.
2312A repository of CSL styles can be found at
2313<https://github.com/citation-style-language/styles>.
2314See also <http://zotero.org/styles> for easy browsing.
2316Citations go inside square brackets and are separated by semicolons.
2317Each citation must have a key, composed of '@' + the citation
2318identifier from the database, and may optionally have a prefix,
2319a locator, and a suffix. Here are some examples:
2321 Blah blah [see @doe99, pp. 33-35; also @smith04, ch. 1].
2323 Blah blah [@doe99, pp. 33-35, 38-39 and *passim*].
2325 Blah blah [@smith04; @doe99].
2327A minus sign (`-`) before the `@` will suppress mention of
2328the author in the citation. This can be useful when the
2329author is already mentioned in the text:
2331 Smith says blah [-@smith04].
2333You can also write an in-text citation, as follows:
2337 @smith04 [p. 33] says blah.
2339If the style calls for a list of works cited, it will be placed
2340at the end of the document. Normally, you will want to end your
2341document with an appropriate header:
2347The bibliography will be inserted after this header.
2349Non-pandoc extensions
2350=====================
2352The following markdown syntax extensions are not enabled by default
2353in pandoc, but may be enabled by adding `+EXTENSION` to the format
2354name, where `EXTENSION` is the name of the extension. Thus, for
2355example, `markdown+hard_line_breaks` is markdown with hard line breaks.
2357**Extension: `hard_line_breaks`**\
2358Causes all newlines within a paragraph to be interpreted as hard line
2359breaks instead of spaces.
2361**Extension: `tex_math_single_backslash`**\
2362Causes anything between `\(` and `\)` to be interpreted as inline
2363TeX math, and anything between `\[` and `\]` to be interpreted
2364as display TeX math. Note: a drawback of this extension is that
2365it precludes escaping `(` and `[`.
2367**Extension: `tex_math_double_backslash`**\
2368Causes anything between `\\(` and `\\)` to be interpreted as inline
2369TeX math, and anything between `\\[` and `\\]` to be interpreted
2372**Extension: `markdown_attribute`**\
2373By default, pandoc interprets material inside block-level tags as markdown.
2374This extension changes the behavior so that markdown is only parsed
2375inside block-level tags if the tags have the attribute `markdown=1`.
2377**Extension: `mmd_title_block`**\
2378Enables a [MultiMarkdown] style title block at the top of
2379the document, for example:
2383 Date: September 1, 2008
2384 Comment: This is a sample mmd title block, with
2385 a field spanning multiple lines.
2387See the MultiMarkdown documentation for details. Note that only title,
2388author, and date are recognized; other fields are simply ignored by
2389pandoc. If `pandoc_title_block` is enabled, it will take precedence over
2392 [MultiMarkdown]: http://fletcherpenney.net/multimarkdown/
2394**Extension: `abbreviations`**\
2395Parses PHP Markdown Extra abbreviation keys, like
2397 *[HTML]: Hyper Text Markup Language
2399Note that the pandoc document model does not support
2400abbreviations, so if this extension is enabled, abbreviation keys are
2401simply skipped (as opposed to being parsed as paragraphs).
2403**Extension: `autolink_bare_uris`**\
2404Makes all absolute URIs into links, even when not surrounded by
2405pointy braces `<...>`.
2407**Extension: `link_attributes`**\
2408Parses multimarkdown style key-value attributes on link and image references.
2409Note that pandoc's internal document model provides nowhere to put
2410these, so they are presently just ignored.
2412**Extension: `mmd_header_identifiers`**\
2413Parses multimarkdown style header identifiers (in square brackets,
2414after the header but before any trailing `#`s in an ATX header).
2416Producing slide shows with Pandoc
2417=================================
2419You can use Pandoc to produce an HTML + javascript slide presentation
2420that can be viewed via a web browser. There are five ways to do this,
2421using [S5], [DZSlides], [Slidy], [Slideous], or [reveal.js].
2422You can also produce a PDF slide show using LaTeX [beamer].
2424Here's the markdown source for a simple slide show, `habits.txt`:
2451 
2458To produce an HTML/javascript slide show, simply type
2460 pandoc -t FORMAT -s habits.txt -o habits.html
2462where `FORMAT` is either `s5`, `slidy`, `slideous`, `dzslides`, or `revealjs`.
2464For Slidy, Slideous, reveal.js, and S5, the file produced by pandoc with the
2465`-s/--standalone` option embeds a link to javascripts and CSS files, which are
2466assumed to be available at the relative path `s5/default` (for S5), `slideous`
2467(for Slideous), `reveal.js` (for reveal.js), or at the Slidy website at
2468`w3.org` (for Slidy). (These paths can be changed by setting the `slidy-url`,
2469`slideous-url`, `revealjs-url`, or `s5-url` variables; see `--variable`,
2470above.) For DZSlides, the (relatively short) javascript and css are included in
2473With all HTML slide formats, the `--self-contained` option can be used to
2474produce a single file that contains all of the data necessary to display the
2475slide show, including linked scripts, stylesheets, images, and videos.
2477To produce a PDF slide show using beamer, type
2479 pandoc -t beamer habits.txt -o habits.pdf
2481Note that a reveal.js slide show can also be converted to a PDF
2482by printing it to a file from the browser.
2484Structuring the slide show
2485--------------------------
2487By default, the *slide level* is the highest header level in
2488the hierarchy that is followed immediately by content, and not another
2489header, somewhere in the document. In the example above, level 1 headers
2490are always followed by level 2 headers, which are followed by content,
2491so 2 is the slide level. This default can be overridden using
2492the `--slide-level` option.
2494The document is carved up into slides according to the following
2497 * A horizontal rule always starts a new slide.
2499 * A header at the slide level always starts a new slide.
2501 * Headers *below* the slide level in the hierarchy create
2502 headers *within* a slide.
2504 * Headers *above* the slide level in the hierarchy create
2505 "title slides," which just contain the section title
2506 and help to break the slide show into sections.
2508 * A title page is constructed automatically from the document's title
2509 block, if present. (In the case of beamer, this can be disabled
2510 by commenting out some lines in the default template.)
2512These rules are designed to support many different styles of slide show. If
2513you don't care about structuring your slides into sections and subsections,
2514you can just use level 1 headers for all each slide. (In that case, level 1
2515will be the slide level.) But you can also structure the slide show into
2516sections, as in the example above.
2518Note: in reveal.js slide shows, if slide level is 2, a two-dimensional
2519layout will be produced, with level 1 headers building horizontally
2520and level 2 headers building vertically. It is not recommended that
2521you use deeper nesting of section levels with reveal.js.
2526By default, these writers produces lists that display "all at once."
2527If you want your lists to display incrementally (one item at a time),
2528use the `-i` option. If you want a particular list to depart from the
2529default (that is, to display incrementally without the `-i` option and
2530all at once with the `-i` option), put it in a block quote:
2535In this way incremental and nonincremental lists can be mixed in
2541In reveal.js and beamer slide shows, you can add "pauses" within
2542a slide by including a paragraph containing three dots, separated
2545 # Slide with a pause
2547 content before the pause
2551 content after the pause
2556You can change the style of HTML slides by putting customized CSS files
2557in `$DATADIR/s5/default` (for S5), `$DATADIR/slidy` (for Slidy),
2558or `$DATADIR/slideous` (for Slideous),
2559where `$DATADIR` is the user data directory (see `--data-dir`, above).
2560The originals may be found in pandoc's system data directory (generally
2561`$CABALDIR/pandoc-VERSION/s5/default`). Pandoc will look there for any
2562files it does not find in the user data directory.
2564For dzslides, the CSS is included in the HTML file itself, and may
2567For reveal.js, themes can be used by setting the `theme` variable,
2572Or you can specify a custom stylesheet using the `--css` option.
2574To style beamer slides, you can specify a beamer "theme" or "colortheme"
2575using the `-V` option:
2577 pandoc -t beamer habits.txt -V theme:Warsaw -o habits.pdf
2579Literate Haskell support
2580========================
2582If you append `+lhs` (or `+literate_haskell`) to an appropriate input or output
2583format (`markdown`, `mardkown_strict`, `rst`, or `latex` for input or output;
2584`beamer`, `html` or `html5` for output only), pandoc will treat the document as
2585literate Haskell source. This means that
2587 - In markdown input, "bird track" sections will be parsed as Haskell
2588 code rather than block quotations. Text between `\begin{code}`
2589 and `\end{code}` will also be treated as Haskell code.
2591 - In markdown output, code blocks with classes `haskell` and `literate`
2592 will be rendered using bird tracks, and block quotations will be
2593 indented one space, so they will not be treated as Haskell code.
2594 In addition, headers will be rendered setext-style (with underlines)
2595 rather than atx-style (with '#' characters). (This is because ghc
2596 treats '#' characters in column 1 as introducing line numbers.)
2598 - In restructured text input, "bird track" sections will be parsed
2601 - In restructured text output, code blocks with class `haskell` will
2602 be rendered using bird tracks.
2604 - In LaTeX input, text in `code` environments will be parsed as
2607 - In LaTeX output, code blocks with class `haskell` will be rendered
2608 inside `code` environments.
2610 - In HTML output, code blocks with class `haskell` will be rendered
2611 with class `literatehaskell` and bird tracks.
2615 pandoc -f markdown+lhs -t html
2617reads literate Haskell source formatted with markdown conventions and writes
2618ordinary HTML (without bird tracks).
2620 pandoc -f markdown+lhs -t html+lhs
2622writes HTML with the Haskell code in bird tracks, so it can be copied
2623and pasted as literate Haskell source.
2628© 2006-2013 John MacFarlane (jgm at berkeley dot edu). Released under the
2629[GPL], version 2 or greater. This software carries no warranty of
2630any kind. (See COPYRIGHT for full copyright and warranty notices.)
2631Other contributors include Recai Oktaş, Paulo Tanimoto, Peter Wang,
2632Andrea Rossato, Eric Kow, infinity0x, Luke Plant, shreevatsa.public,
2633Puneeth Chaganti, Paul Rivier, rodja.trappe, Bradley Kuhn, thsutton,
2634Nathan Gass, Jonathan Daugherty, Jérémy Bobbio, Justin Bogner, qerub,
2635Christopher Sawicki, Kelsey Hightower, Masayoshi Takahashi, Antoine
2636Latter, Ralf Stephan, Eric Seidel, B. Scott Michel, Gavin Beatty,
2637Sergey Astanin, Arlo O'Keeffe, Denis Laxalde, Brent Yorgey.
2639[markdown]: http://daringfireball.net/projects/markdown/
2640[reStructuredText]: http://docutils.sourceforge.net/docs/ref/rst/introduction.html
2641[S5]: http://meyerweb.com/eric/tools/s5/
2642[Slidy]: http://www.w3.org/Talks/Tools/Slidy/
2643[Slideous]: http://goessner.net/articles/slideous/
2644[HTML]: http://www.w3.org/TR/html40/
2645[HTML 5]: http://www.w3.org/TR/html5/
2646[XHTML]: http://www.w3.org/TR/xhtml1/
2647[LaTeX]: http://www.latex-project.org/
2648[beamer]: http://www.tex.ac.uk/CTAN/macros/latex/contrib/beamer
2649[ConTeXt]: http://www.pragma-ade.nl/
2650[RTF]: http://en.wikipedia.org/wiki/Rich_Text_Format
2651[DocBook]: http://www.docbook.org/
2652[OPML]: http://dev.opml.org/spec2.html
2653[OpenDocument]: http://opendocument.xml.org/
2654[ODT]: http://en.wikipedia.org/wiki/OpenDocument
2655[Textile]: http://redcloth.org/textile
2656[MediaWiki markup]: http://www.mediawiki.org/wiki/Help:Formatting
2657[Haddock markup]: http://www.haskell.org/haddock/doc/html/ch03s08.html
2658[groff man]: http://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPages/man7/groff_man.7.html
2659[Haskell]: http://www.haskell.org/
2660[GNU Texinfo]: http://www.gnu.org/software/texinfo/
2661[Emacs Org-Mode]: http://orgmode.org
2662[AsciiDoc]: http://www.methods.co.nz/asciidoc/
2663[EPUB]: http://www.idpf.org/
2664[GPL]: http://www.gnu.org/copyleft/gpl.html "GNU General Public License"
2665[DZSlides]: http://paulrouget.com/dzslides/
2666[ISO 8601 format]: http://www.w3.org/TR/NOTE-datetime
2667[Word docx]: http://www.microsoft.com/interop/openup/openxml/default.aspx
2668[PDF]: http://www.adobe.com/pdf/
2669[reveal.js]: http://lab.hakim.se/reveal-js/
2670[FictionBook2]: http://www.fictionbook.org/index.php/Eng:XML_Schema_Fictionbook_2.1
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list