git.iko.soy/typeable/pandoc
on 1.9.4 help sign in
2307 lines 81 kB history raw
1% Pandoc User's Guide
2% John MacFarlane
3% January 27, 2012
5Synopsis
6========
8pandoc [*options*] [*input-file*]...
10Description
11===========
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], and [DocBook XML]; and it can write plain text, [markdown],
17[reStructuredText], [XHTML], [HTML 5], [LaTeX] (including [beamer]
18slide shows), [ConTeXt], [RTF], [DocBook XML], [OpenDocument XML],
19[ODT], [Word docx], [GNU Texinfo], [MediaWiki markup], [EPUB],
20[Textile], [groff man] pages, [Emacs Org-Mode], [AsciiDoc], and [Slidy],
21[Slideous], [DZSlides], or [S5] HTML slide shows. It can also produce
22[PDF] output on systems where LaTeX is installed.
24Pandoc's enhanced version of markdown includes syntax for footnotes,
25tables, flexible ordered lists, definition lists, delimited code blocks,
26superscript, subscript, strikeout, title blocks, automatic tables of
27contents, embedded LaTeX math, citations, and markdown inside HTML block
28elements. (These enhancements, described below under
29[Pandoc's markdown](#pandocs-markdown), can be disabled using the `--strict`
30option.)
32In contrast to most existing tools for converting markdown to HTML, which
33use regex substitutions, Pandoc has a modular design: it consists of a
34set of readers, which parse text in a given format and produce a native
35representation of the document, and a set of writers, which convert
36this native representation into a target format. Thus, adding an input
37or output format requires only adding a reader or writer.
39Using `pandoc`
40--------------
42If no *input-file* is specified, input is read from *stdin*.
43Otherwise, the *input-files* are concatenated (with a blank
44line between each) and used as input. Output goes to *stdout* by
45default (though output to *stdout* is disabled for the `odt`, `docx`,
46and `epub` output formats). For output to a file, use the
47`-o` option:
49 pandoc -o output.html input.txt
51Instead of a file, an absolute URI may be given. In this case
52pandoc will fetch the content using HTTP:
54 pandoc -f html -t markdown http://www.fsf.org
56If multiple input files are given, `pandoc` will concatenate them all (with
57blank lines between them) before parsing.
59The format of the input and output can be specified explicitly using
60command-line options. The input format can be specified using the
61`-r/--read` or `-f/--from` options, the output format using the
62`-w/--write` or `-t/--to` options. Thus, to convert `hello.txt` from
63markdown to LaTeX, you could type:
65 pandoc -f markdown -t latex hello.txt
67To convert `hello.html` from html to markdown:
69 pandoc -f html -t markdown hello.html
71Supported output formats are listed below under the `-t/--to` option.
72Supported input formats are listed below under the `-f/--from` option. Note
73that the `rst`, `textile`, `latex`, and `html` readers are not complete;
74there are some constructs that they do not parse.
76If the input or output format is not specified explicitly, `pandoc`
77will attempt to guess it from the extensions of
78the input and output filenames. Thus, for example,
80 pandoc -o hello.tex hello.txt
82will convert `hello.txt` from markdown to LaTeX. If no output file
83is specified (so that output goes to *stdout*), or if the output file's
84extension is unknown, the output format will default to HTML.
85If no input file is specified (so that input comes from *stdin*), or
86if the input files' extensions are unknown, the input format will
87be assumed to be markdown unless explicitly specified.
89Pandoc uses the UTF-8 character encoding for both input and output.
90If your local character encoding is not UTF-8, you
91should pipe input and output through `iconv`:
93 iconv -t utf-8 input.txt | pandoc | iconv -f utf-8
95Creating a PDF
96--------------
98Earlier versions of pandoc came with a program, `markdown2pdf`, that
99used pandoc and pdflatex to produce a PDF. This is no longer needed,
100since `pandoc` can now produce `pdf` output itself. To produce a PDF, simply
101specify an output file with a `.pdf` extension. Pandoc will create a latex
102file and use pdflatex (or another engine, see `--latex-engine`) to convert it
103to PDF:
105 pandoc test.txt -o test.pdf
107Production of a PDF requires that a LaTeX engine be installed (see
108`--latex-engine`, below), and assumes that the following LaTeX packages are
109available: `amssymb`, `amsmath`, `ifxetex`, `ifluatex`, `listings` (if the
110`--listings` option is used), `fancyvrb`, `enumerate`, `ctable`, `url`,
111`graphicx`, `hyperref`, `ulem`, `babel` (if the `lang` variable is set),
112`fontspec` (if `xelatex` or `lualatex` is used as the LaTeX engine), `xltxtra`
113and `xunicode` (if `xelatex` is used).
115`hsmarkdown`
116------------
118A user who wants a drop-in replacement for `Markdown.pl` may create
119a symbolic link to the `pandoc` executable called `hsmarkdown`. When
120invoked under the name `hsmarkdown`, `pandoc` will behave as if the
121`--strict` flag had been selected, and no command-line options will be
122recognized. However, this approach does not work under Cygwin, due to
123problems with its simulation of symbolic links.
125[Cygwin]: http://www.cygwin.com/
126[`iconv`]: http://www.gnu.org/software/libiconv/
127[CTAN]: http://www.ctan.org "Comprehensive TeX Archive Network"
128[TeX Live]: http://www.tug.org/texlive/
129[MacTeX]: http://www.tug.org/mactex/
131Options
132=======
134General options
135---------------
137`-f` *FORMAT*, `-r` *FORMAT*, `--from=`*FORMAT*, `--read=`*FORMAT*
138: Specify input format. *FORMAT* can be `native` (native Haskell),
139 `json` (JSON version of native AST), `markdown` (markdown),
140 `textile` (Textile), `rst` (reStructuredText), `html` (HTML),
141 `docbook` (DocBook XML), or `latex` (LaTeX). If `+lhs` is
142 appended to `markdown`, `rst`, `latex`, the input will be
143 treated as literate Haskell source: see [Literate Haskell
144 support](#literate-haskell-support), below.
146`-t` *FORMAT*, `-w` *FORMAT*, `--to=`*FORMAT*, `--write=`*FORMAT*
147: Specify output format. *FORMAT* can be `native` (native Haskell),
148 `json` (JSON version of native AST), `plain` (plain text),
149 `markdown` (markdown), `rst` (reStructuredText), `html` (XHTML 1),
150 `html5` (HTML 5), `latex` (LaTeX), `beamer` (LaTeX beamer slide show),
151 `context` (ConTeXt), `man` (groff man), `mediawiki` (MediaWiki markup),
152 `textile` (Textile), `org` (Emacs Org-Mode), `texinfo` (GNU Texinfo),
153 `docbook` (DocBook XML), `opendocument` (OpenDocument XML), `odt`
154 (OpenOffice text document), `docx` (Word docx), `epub` (EPUB book),
155 `asciidoc` (AsciiDoc), `slidy` (Slidy HTML and javascript slide show),
156 `slideous` (Slideous HTML and javascript slide show),
157 `dzslides` (HTML5 + javascript slide show), `s5` (S5 HTML and javascript
158 slide show), or `rtf` (rich text format). Note that `odt` and `epub`
159 output will not be directed to *stdout*; an output filename must
160 be specified using the `-o/--output` option. If `+lhs` is appended
161 to `markdown`, `rst`, `latex`, `beamer`, `html`, or `html5`, the output
162 will be rendered as literate Haskell source: see [Literate Haskell
163 support](#literate-haskell-support), below.
165`-o` *FILE*, `--output=`*FILE*
166: Write output to *FILE* instead of *stdout*. If *FILE* is
167 `-`, output will go to *stdout*. (Exception: if the output
168 format is `odt`, `docx`, or `epub`, output to stdout is disabled.)
170`--data-dir=`*DIRECTORY*
171: Specify the user data directory to search for pandoc data files.
172 If this option is not specified, the default user data directory
173 will be used:
175 $HOME/.pandoc
177 in unix and
179 C:\Documents And Settings\USERNAME\Application Data\pandoc
181 in Windows. A `reference.odt`, `reference.docx`, `default.csl`,
182 `epub.css`, `templates`, `slidy`, `slideous`, or `s5` directory
183 placed in this directory will override pandoc's normal defaults.
185`-v`, `--version`
186: Print version.
188`-h`, `--help`
189: Show usage message.
191Reader options
192--------------
194`--strict`
195: Use strict markdown syntax, with no pandoc extensions or variants.
196 When the input format is HTML, this means that constructs that have no
197 equivalents in standard markdown (e.g. definition lists or strikeout
198 text) will be parsed as raw HTML.
200`-R`, `--parse-raw`
201: Parse untranslatable HTML codes and LaTeX environments as raw HTML
202 or LaTeX, instead of ignoring them. Affects only HTML and LaTeX
203 input. Raw HTML can be printed in markdown, reStructuredText, HTML,
204 Slidy, Slideous,
205 DZSlides, and S5 output; raw LaTeX can be printed in markdown,
206 reStructuredText, LaTeX, and ConTeXt output. The default is for the
207 readers to omit untranslatable HTML codes and LaTeX environments.
208 (The LaTeX reader does pass through untranslatable LaTeX *commands*,
209 even if `-R` is not specified.)
211`-S`, `--smart`
212: Produce typographically correct output, converting straight quotes
213 to curly quotes, `---` to em-dashes, `--` to en-dashes, and
214 `...` to ellipses. Nonbreaking spaces are inserted after certain
215 abbreviations, such as "Mr." (Note: This option is significant only when
216 the input format is `markdown` or `textile`. It is selected automatically
217 when the input format is `textile` or the output format is `latex` or
218 `context`, unless `--no-tex-ligatures` is used.)
220`--old-dashes`
221: Selects the pandoc <= 1.8.2.1 behavior for parsing smart dashes: `-` before
222 a numeral is an en-dash, and `--` is an em-dash. This option is selected
223 automatically for `textile` input.
225`--base-header-level=`*NUMBER*
226: Specify the base level for headers (defaults to 1).
228`--indented-code-classes=`*CLASSES*
229: Specify classes to use for indented code blocks--for example,
230 `perl,numberLines` or `haskell`. Multiple classes may be separated
231 by spaces or commas.
233`--normalize`
234: Normalize the document after reading: merge adjacent
235 `Str` or `Emph` elements, for example, and remove repeated `Space`s.
237`-p`, `--preserve-tabs`
238: Preserve tabs instead of converting them to spaces (the default).
240`--tab-stop=`*NUMBER*
241: Specify the number of spaces per tab (default is 4).
243General writer options
244----------------------
246`-s`, `--standalone`
247: Produce output with an appropriate header and footer (e.g. a
248 standalone HTML, LaTeX, or RTF file, not a fragment). This option
249 is set automatically for `pdf`, `epub`, `docx`, and `odt` output.
251`--template=`*FILE*
252: Use *FILE* as a custom template for the generated document. Implies
253 `--standalone`. See [Templates](#templates) below for a description
254 of template syntax. If no extension is specified, an extension
255 corresponding to the writer will be added, so that `--template=special`
256 looks for `special.html` for HTML output. If the template is not
257 found, pandoc will search for it in the user data directory
258 (see `--data-dir`). If this option is not used, a default
259 template appropriate for the output format will be used (see
260 `-D/--print-default-template`).
262`-V` *KEY[=VAL]*, `--variable=`*KEY[:VAL]*
263: Set the template variable *KEY* to the value *VAL* when rendering the
264 document in standalone mode. This is generally only useful when the
265 `--template` option is used to specify a custom template, since
266 pandoc automatically sets the variables used in the default
267 templates. If no *VAL* is specified, the key will be given the
268 value `true`.
270`-D` *FORMAT*, `--print-default-template=`*FORMAT*
271: Print the default template for an output *FORMAT*. (See `-t`
272 for a list of possible *FORMAT*s.)
274`--no-wrap`
275: Disable text wrapping in output. By default, text is wrapped
276 appropriately for the output format.
278`--columns`=*NUMBER*
279: Specify length of lines in characters (for text wrapping).
281`--toc`, `--table-of-contents`
282: Include an automatically generated table of contents (or, in
283 the case of `latex`, `context`, and `rst`, an instruction to create
284 one) in the output document. This option has no effect on `man`,
285 `docbook`, `slidy`, `slideous`, or `s5` output.
287`--no-highlight`
288: Disables syntax highlighting for code blocks and inlines, even when
289 a language attribute is given.
291`--highlight-style`=*STYLE*
292: Specifies the coloring style to be used in highlighted source code.
293 Options are `pygments` (the default), `kate`, `monochrome`,
294 `espresso`, `zenburn`, `haddock`, and `tango`.
296`-H` *FILE*, `--include-in-header=`*FILE*
297: Include contents of *FILE*, verbatim, at the end of the header.
298 This can be used, for example, to include special
299 CSS or javascript in HTML documents. This option can be used
300 repeatedly to include multiple files in the header. They will be
301 included in the order specified. Implies `--standalone`.
303`-B` *FILE*, `--include-before-body=`*FILE*
304: Include contents of *FILE*, verbatim, at the beginning of the
305 document body (e.g. after the `<body>` tag in HTML, or the
306 `\begin{document}` command in LaTeX). This can be used to include
307 navigation bars or banners in HTML documents. This option can be
308 used repeatedly to include multiple files. They will be included in
309 the order specified. Implies `--standalone`.
311`-A` *FILE*, `--include-after-body=`*FILE*
312: Include contents of *FILE*, verbatim, at the end of the document
313 body (before the `</body>` tag in HTML, or the
314 `\end{document}` command in LaTeX). This option can be be used
315 repeatedly to include multiple files. They will be included in the
316 order specified. Implies `--standalone`.
318Options affecting specific writers
319----------------------------------
321`--self-contained`
322: Produce a standalone HTML file with no external dependencies, using
323 `data:` URIs to incorporate the contents of linked scripts, stylesheets,
324 images, and videos. The resulting file should be "self-contained,"
325 in the sense that it needs no external files and no net access to be
326 displayed properly by a browser. This option works only with HTML output
327 formats, including `html`, `html5`, `html+lhs`, `html5+lhs`, `s5`,
328 `slidy`, `slideous`,
329 and `dzslides`. Scripts, images, and stylesheets at absolute URLs
330 will be downloaded; those at relative URLs will be sought first relative
331 to the working directory, then relative to the user data directory (see
332 `--data-dir`), and finally relative to pandoc's default data directory.
334`--offline`
335: Deprecated synonym for `--self-contained`.
337`-5`, `--html5`
338: Produce HTML5 instead of HTML4. This option has no effect for writers
339 other than `html`. (*Deprecated:* Use the `html5` output format instead.)
341`--ascii`
342: Use only ascii characters in output. Currently supported only
343 for HTML output (which uses numerical entities instead of
344 UTF-8 when this option is selected).
346`--reference-links`
347: Use reference-style links, rather than inline links, in writing markdown
348 or reStructuredText. By default inline links are used.
350`--atx-headers`
351: Use ATX style headers in markdown output. The default is to use
352 setext-style headers for levels 1-2, and then ATX headers.
354`--chapters`
355: Treat top-level headers as chapters in LaTeX, ConTeXt, and DocBook
356 output. When the LaTeX template uses the report, book, or
357 memoir class, this option is implied. If `--beamer` is used,
358 top-level headers will become `\part{..}`.
360`-N`, `--number-sections`
361: Number section headings in LaTeX, ConTeXt, or HTML output.
362 By default, sections are not numbered.
364`--no-tex-ligatures`
365: Do not convert quotation marks, apostrophes, and dashes to
366 the TeX ligatures when writing LaTeX or ConTeXt. Instead, just
367 use literal unicode characters. This is needed for using advanced
368 OpenType features with XeLaTeX and LuaLaTeX. Note: normally
369 `--smart` is selected automatically for LaTeX and ConTeXt
370 output, but it must be specified explicitly if `--no-tex-ligatures`
371 is selected. If you use literal curly quotes, dashes, and ellipses
372 in your source, then you may want to use `--no-tex-ligatures`
373 without `--smart`.
375`--listings`
376: Use listings package for LaTeX code blocks
378`-i`, `--incremental`
379: Make list items in slide shows display incrementally (one by one).
380 The default is for lists to be displayed all at once.
382`--slide-level`=*NUMBER*
383: Specifies that headers with the specified level create
384 slides (for `beamer`, `s5`, `slidy`, `slideous`, `dzslides`). Headers
385 above this level in the hierarchy are used to divide the
386 slide show into sections; headers below this level create
387 subheads within a slide. The default is to set the slide level
388 based on the contents of the document; see
389 [Structuring the slide show](#structuring-the-slide-show), below.
391`--section-divs`
392: Wrap sections in `<div>` tags (or `<section>` tags in HTML5),
393 and attach identifiers to the enclosing `<div>` (or `<section>`)
394 rather than the header itself.
395 See [Section identifiers](#header-identifiers-in-html-latex-and-context), below.
397`--email-obfuscation=`*none|javascript|references*
398: Specify a method for obfuscating `mailto:` links in HTML documents.
399 *none* leaves `mailto:` links as they are. *javascript* obfuscates
400 them using javascript. *references* obfuscates them by printing their
401 letters as decimal or hexadecimal character references.
402 If `--strict` is specified, *references* is used regardless of the
403 presence of this option.
405`--id-prefix`=*STRING*
406: Specify a prefix to be added to all automatically generated identifiers
407 in HTML output. This is useful for preventing duplicate identifiers
408 when generating fragments to be included in other pages.
410`-T` *STRING*, `--title-prefix=`*STRING*
411: Specify *STRING* as a prefix at the beginning of the title
412 that appears in the HTML header (but not in the title as it
413 appears at the beginning of the HTML body). Implies
414 `--standalone`.
416`-c` *URL*, `--css=`*URL*
417: Link to a CSS style sheet.
419`--reference-odt=`*FILE*
420: Use the specified file as a style reference in producing an ODT.
421 For best results, the reference ODT should be a modified version
422 of an ODT produced using pandoc. The contents of the reference ODT
423 are ignored, but its stylesheets are used in the new ODT. If no
424 reference ODT is specified on the command line, pandoc will look
425 for a file `reference.odt` in the user data directory (see
426 `--data-dir`). If this is not found either, sensible defaults will be
427 used.
429`--reference-docx=`*FILE*
430: Use the specified file as a style reference in producing a docx file.
431 For best results, the reference docx should be a modified version
432 of a docx file produced using pandoc. The contents of the reference docx
433 are ignored, but its stylesheets are used in the new docx. If no
434 reference docx is specified on the command line, pandoc will look
435 for a file `reference.docx` in the user data directory (see
436 `--data-dir`). If this is not found either, sensible defaults will be
437 used.
439`--epub-stylesheet=`*FILE*
440: Use the specified CSS file to style the EPUB. If no stylesheet
441 is specified, pandoc will look for a file `epub.css` in the
442 user data directory (see `--data-dir`). If it is not
443 found there, sensible defaults will be used.
445`--epub-cover-image=`*FILE*
446: Use the specified image as the EPUB cover. It is recommended
447 that the image be less than 1000px in width and height.
449`--epub-metadata=`*FILE*
450: Look in the specified XML file for metadata for the EPUB.
451 The file should contain a series of Dublin Core elements,
452 as documented at <http://dublincore.org/documents/dces/>.
453 For example:
455 <dc:rights>Creative Commons</dc:rights>
456 <dc:language>es-AR</dc:language>
458 By default, pandoc will include the following metadata elements:
459 `<dc:title>` (from the document title), `<dc:creator>` (from the
460 document authors), `<dc:date>` (from the document date, which should
461 be in [ISO 8601 format]), `<dc:language>` (from the `lang`
462 variable, or, if is not set, the locale), and `<dc:identifier
463 id="BookId">` (a randomly generated UUID). Any of these may be
464 overridden by elements in the metadata file.
466`--epub-embed-font=`*FILE*
467: Embed the specified font in the EPUB. This option can be repeated
468 to embed multiple fonts. To use embedded fonts, you
469 will need to add declarations like the following to your CSS (see
470 `--epub-stylesheet`):
472 @font-face {
473 font-family: DejaVuSans;
474 font-style: normal;
475 font-weight: normal;
476 src:url("DejaVuSans-Regular.ttf");
477 }
478 @font-face {
479 font-family: DejaVuSans;
480 font-style: normal;
481 font-weight: bold;
482 src:url("DejaVuSans-Bold.ttf");
483 }
484 @font-face {
485 font-family: DejaVuSans;
486 font-style: italic;
487 font-weight: normal;
488 src:url("DejaVuSans-Oblique.ttf");
489 }
490 @font-face {
491 font-family: DejaVuSans;
492 font-style: italic;
493 font-weight: bold;
494 src:url("DejaVuSans-BoldOblique.ttf");
495 }
496 body { font-family: "DejaVuSans"; }
498`--latex-engine=`*pdflatex|lualatex|xelatex*
499: Use the specified LaTeX engine when producing PDF output.
500 The default is `pdflatex`. If the engine is not in your PATH,
501 the full path of the engine may be specified here.
503Citations
504---------
506`--bibliography=`*FILE*
507: Specify bibliography database to be used in resolving
508 citations. The database type will be determined from the
509 extension of *FILE*, which may be `.mods` (MODS format),
510 `.bib` (BibTeX/BibLaTeX format),
511 `.ris` (RIS format), `.enl` (EndNote format),
512 `.xml` (EndNote XML format), `.wos` (ISI format),
513 `.medline` (MEDLINE format), `.copac` (Copac format),
514 or `.json` (citeproc JSON). If you want to use multiple
515 bibliographies, just use this option repeatedly.
517`--csl=`*FILE*
518: Specify [CSL] style to be used in formatting citations and
519 the bibliography. If *FILE* is not found, pandoc will look
520 for it in
522 $HOME/.csl
524 in unix and
526 C:\Documents And Settings\USERNAME\Application Data\csl
528 in Windows. If the `--csl` option is not specified, pandoc
529 will use a default style: either `default.csl` in the
530 user data directory (see `--data-dir`), or, if that is
531 not present, the Chicago author-date style.
533`--citation-abbreviations=`*FILE*
534: Specify a file containing abbreviations for journal titles and
535 other bibliographic fields (indicated by setting `form="short"`
536 in the CSL node for the field). The format is described at
537 <http://citationstylist.org/2011/10/19/abbreviations-for-zotero-test-release/>.
538 Here is a short example:
540 { "default": {
541 "container-title": {
542 "Lloyd's Law Reports": "Lloyd's Rep",
543 "Estates Gazette": "EG",
544 "Scots Law Times": "SLT"
545 }
546 }
547 }
549`--natbib`
550: Use natbib for citations in LaTeX output.
552`--biblatex`
553: Use biblatex for citations in LaTeX output.
555Math rendering in HTML
556----------------------
558`-m` [*URL*], `--latexmathml`[=*URL*]
559: Use the [LaTeXMathML] script to display embedded TeX math in HTML output.
560 To insert a link to a local copy of the `LaTeXMathML.js` script,
561 provide a *URL*. If no *URL* is provided, the contents of the
562 script will be inserted directly into the HTML header, preserving
563 portability at the price of efficiency. If you plan to use math on
564 several pages, it is much better to link to a copy of the script,
565 so it can be cached.
567`--mathml`[=*URL*]
568: Convert TeX math to MathML (in `docbook` as well as `html` and `html5`).
569 In standalone `html` output, a small javascript (or a link to such a
570 script if a *URL* is supplied) will be inserted that allows the MathML to
571 be viewed on some browsers.
573`--jsmath`[=*URL*]
574: Use [jsMath] to display embedded TeX math in HTML output.
575 The *URL* should point to the jsMath load script (e.g.
576 `jsMath/easy/load.js`); if provided, it will be linked to in
577 the header of standalone HTML documents. If a *URL* is not provided,
578 no link to the jsMath load script will be inserted; it is then
579 up to the author to provide such a link in the HTML template.
581`--mathjax`[=*URL*]
582: Use [MathJax] to display embedded TeX math in HTML output.
583 The *URL* should point to the `MathJax.js` load script.
584 If a *URL* is not provided, a link to the MathJax CDN will
585 be inserted.
587`--gladtex`
588: Enclose TeX math in `<eq>` tags in HTML output. These can then
589 be processed by [gladTeX] to produce links to images of the typeset
590 formulas.
592`--mimetex`[=*URL*]
593: Render TeX math using the [mimeTeX] CGI script. If *URL* is not
594 specified, it is assumed that the script is at `/cgi-bin/mimetex.cgi`.
596`--webtex`[=*URL*]
597: Render TeX formulas using an external script that converts TeX
598 formulas to images. The formula will be concatenated with the URL
599 provided. If *URL* is not specified, the Google Chart API will be used.
601Options for wrapper scripts
602---------------------------
604`--dump-args`
605: Print information about command-line arguments to *stdout*, then exit.
606 This option is intended primarily for use in wrapper scripts.
607 The first line of output contains the name of the output file specified
608 with the `-o` option, or `-` (for *stdout*) if no output file was
609 specified. The remaining lines contain the command-line arguments,
610 one per line, in the order they appear. These do not include regular
611 Pandoc options and their arguments, but do include any options appearing
612 after a `--` separator at the end of the line.
614`--ignore-args`
615: Ignore command-line arguments (for use in wrapper scripts).
616 Regular Pandoc options are not ignored. Thus, for example,
618 pandoc --ignore-args -o foo.html -s foo.txt -- -e latin1
620 is equivalent to
622 pandoc -o foo.html -s
624[LaTeXMathML]: http://math.etsu.edu/LaTeXMathML/
625[jsMath]: http://www.math.union.edu/~dpvc/jsmath/
626[MathJax]: http://www.mathjax.org/
627[gladTeX]: http://www.math.uio.no/~martingu/gladtex/index.html
628[mimeTeX]: http://www.forkosh.com/mimetex.html
629[CSL]: http://CitationStyles.org
631Templates
632=========
634When the `-s/--standalone` option is used, pandoc uses a template to
635add header and footer material that is needed for a self-standing
636document. To see the default template that is used, just type
638 pandoc -D FORMAT
640where `FORMAT` is the name of the output format. A custom template
641can be specified using the `--template` option. You can also override
642the system default templates for a given output format `FORMAT`
643by putting a file `templates/default.FORMAT` in the user data
644directory (see `--data-dir`, above). *Exceptions:* For `odt` output,
645customize the `default.opendocument` template. For `pdf` output,
646customize the `default.latex` template. For `epub` output, customize
647the `epub-page.html`, `epub-coverimage.html`, and `epub-titlepage.html`
648templates.
650Templates may contain *variables*. Variable names are sequences of
651alphanumerics, `-`, and `_`, starting with a letter. A variable name
652surrounded by `$` signs will be replaced by its value. For example,
653the string `$title$` in
655 <title>$title$</title>
657will be replaced by the document title.
659To write a literal `$` in a template, use `$$`.
661Some variables are set automatically by pandoc. These vary somewhat
662depending on the output format, but include:
664`header-includes`
665: contents specified by `-H/--include-in-header` (may have multiple
666 values)
667`toc`
668: non-null value if `--toc/--table-of-contents` was specified
669`include-before`
670: contents specified by `-B/--include-before-body` (may have
671 multiple values)
672`include-after`
673: contents specified by `-A/--include-after-body` (may have
674 multiple values)
675`body`
676: body of document
677`title`
678: title of document, as specified in title block
679`author`
680: author of document, as specified in title block (may have
681 multiple values)
682`date`
683: date of document, as specified in title block
684`lang`
685: language code for HTML or LaTeX documents
686`slidy-url`
687: base URL for Slidy documents (defaults to
688 `http://www.w3.org/Talks/Tools/Slidy2`)
689`slideous-url`
690: base URL for Slideous documents (defaults to `default`)
691`s5-url`
692: base URL for S5 documents (defaults to `ui/default`)
693`fontsize`
694: font size (10pt, 11pt, 12pt) for LaTeX documents
695`documentclass`
696: document class for LaTeX documents
697`geometry`
698: options for LaTeX `geometry` class, e.g. `margin=1in`;
699 may be repeated for multiple options
700`mainfont`, `sansfont`, `monofont`, `mathfont`
701: fonts for LaTeX documents (works only with xelatex
702 and lualatex)
703`theme`
704: theme for LaTeX beamer documents
705`colortheme`
706: colortheme for LaTeX beamer documents
708Variables may be set at the command line using the `-V/--variable`
709option. This allows users to include custom variables in their
710templates.
712Templates may contain conditionals. The syntax is as follows:
714 $if(variable)$
715 X
716 $else$
717 Y
718 $endif$
720This will include `X` in the template if `variable` has a non-null
721value; otherwise it will include `Y`. `X` and `Y` are placeholders for
722any valid template text, and may include interpolated variables or other
723conditionals. The `$else$` section may be omitted.
725When variables can have multiple values (for example, `author` in
726a multi-author document), you can use the `$for$` keyword:
728 $for(author)$
729 <meta name="author" content="$author$" />
730 $endfor$
732You can optionally specify a separator to be used between
733consecutive items:
735 $for(author)$$author$$sep$, $endfor$
737If you use custom templates, you may need to revise them as pandoc
738changes. We recommend tracking the changes in the default templates,
739and modifying your custom templates accordingly. An easy way to do this
740is to fork the pandoc-templates repository
741(<http://github.com/jgm/pandoc-templates>) and merge in changes after each
742pandoc release.
744Pandoc's markdown
745=================
747Pandoc understands an extended and slightly revised version of
748John Gruber's [markdown] syntax. This document explains the syntax,
749noting differences from standard markdown. Except where noted, these
750differences can be suppressed by specifying the `--strict` command-line
751option.
753Philosophy
754----------
756Markdown is designed to be easy to write, and, even more importantly,
757easy to read:
759> A Markdown-formatted document should be publishable as-is, as plain
760> text, without looking like it's been marked up with tags or formatting
761> instructions.
762> -- [John Gruber](http://daringfireball.net/projects/markdown/syntax#philosophy)
764This principle has guided pandoc's decisions in finding syntax for
765tables, footnotes, and other extensions.
767There is, however, one respect in which pandoc's aims are different
768from the original aims of markdown. Whereas markdown was originally
769designed with HTML generation in mind, pandoc is designed for multiple
770output formats. Thus, while pandoc allows the embedding of raw HTML,
771it discourages it, and provides other, non-HTMLish ways of representing
772important document elements like definition lists, tables, mathematics, and
773footnotes.
775Paragraphs
776----------
778A paragraph is one or more lines of text followed by one or more blank line.
779Newlines are treated as spaces, so you can reflow your paragraphs as you like.
780If you need a hard line break, put two or more spaces at the end of a line,
781or type a backslash followed by a newline.
783Headers
784-------
786There are two kinds of headers, Setext and atx.
788### Setext-style headers ###
790A setext-style header is a line of text "underlined" with a row of `=` signs
791(for a level one header) of `-` signs (for a level two header):
793 A level-one header
794 ==================
796 A level-two header
797 ------------------
799The header text can contain inline formatting, such as emphasis (see
800[Inline formatting](#inline-formatting), below).
803### Atx-style headers ###
805An Atx-style header consists of one to six `#` signs and a line of
806text, optionally followed by any number of `#` signs. The number of
807`#` signs at the beginning of the line is the header level:
809 ## A level-two header
811 ### A level-three header ###
813As with setext-style headers, the header text can contain formatting:
815 # A level-one header with a [link](/url) and *emphasis*
817Standard markdown syntax does not require a blank line before a header.
818Pandoc does require this (except, of course, at the beginning of the
819document). The reason for the requirement is that it is all too easy for a
820`#` to end up at the beginning of a line by accident (perhaps through line
821wrapping). Consider, for example:
823 I like several of their flavors of ice cream:
824 #22, for example, and #5.
827### Header identifiers in HTML, LaTeX, and ConTeXt ###
829*Pandoc extension*.
831Each header element in pandoc's HTML and ConTeXt output is given a
832unique identifier. This identifier is based on the text of the header.
833To derive the identifier from the header text,
835 - Remove all formatting, links, etc.
836 - Remove all punctuation, except underscores, hyphens, and periods.
837 - Replace all spaces and newlines with hyphens.
838 - Convert all alphabetic characters to lowercase.
839 - Remove everything up to the first letter (identifiers may
840 not begin with a number or punctuation mark).
841 - If nothing is left after this, use the identifier `section`.
843Thus, for example,
845 Header Identifier
846 ------------------------------- ----------------------------
847 Header identifiers in HTML `header-identifiers-in-html`
848 *Dogs*?--in *my* house? `dogs--in-my-house`
849 [HTML], [S5], or [RTF]? `html-s5-or-rtf`
850 3. Applications `applications`
851 33 `section`
853These rules should, in most cases, allow one to determine the identifier
854from the header text. The exception is when several headers have the
855same text; in this case, the first will get an identifier as described
856above; the second will get the same identifier with `-1` appended; the
857third with `-2`; and so on.
859These identifiers are used to provide link targets in the table of
860contents generated by the `--toc|--table-of-contents` option. They
861also make it easy to provide links from one section of a document to
862another. A link to this section, for example, might look like this:
864 See the section on
865 [header identifiers](#header-identifiers-in-html).
867Note, however, that this method of providing links to sections works
868only in HTML, LaTeX, and ConTeXt formats.
870If the `--section-divs` option is specified, then each section will
871be wrapped in a `div` (or a `section`, if `--html5` was specified),
872and the identifier will be attached to the enclosing `<div>`
873(or `<section>`) tag rather than the header itself. This allows entire
874sections to be manipulated using javascript or treated differently in
875CSS.
878Block quotations
879----------------
881Markdown uses email conventions for quoting blocks of text.
882A block quotation is one or more paragraphs or other block elements
883(such as lists or headers), with each line preceded by a `>` character
884and a space. (The `>` need not start at the left margin, but it should
885not be indented more than three spaces.)
887 > This is a block quote. This
888 > paragraph has two lines.
889 >
890 > 1. This is a list inside a block quote.
891 > 2. Second item.
893A "lazy" form, which requires the `>` character only on the first
894line of each block, is also allowed:
896 > This is a block quote. This
897 paragraph has two lines.
899 > 1. This is a list inside a block quote.
900 2. Second item.
902Among the block elements that can be contained in a block quote are
903other block quotes. That is, block quotes can be nested:
905 > This is a block quote.
906 >
907 > > A block quote within a block quote.
909Standard markdown syntax does not require a blank line before a block
910quote. Pandoc does require this (except, of course, at the beginning of the
911document). The reason for the requirement is that it is all too easy for a
912`>` to end up at the beginning of a line by accident (perhaps through line
913wrapping). So, unless `--strict` is used, the following does not produce
914a nested block quote in pandoc:
916 > This is a block quote.
917 >> Nested.
920Verbatim (code) blocks
921----------------------
923### Indented code blocks ###
925A block of text indented four spaces (or one tab) is treated as verbatim
926text: that is, special characters do not trigger special formatting,
927and all spaces and line breaks are preserved. For example,
929 if (a > 3) {
930 moveShip(5 * gravity, DOWN);
931 }
933The initial (four space or one tab) indentation is not considered part
934of the verbatim text, and is removed in the output.
936Note: blank lines in the verbatim text need not begin with four spaces.
939### Delimited code blocks ###
941*Pandoc extension*.
943In addition to standard indented code blocks, Pandoc supports
944*delimited* code blocks. These begin with a row of three or more
945tildes (`~`) or backticks (`` ` ``) and end with a row of tildes or
946backticks that must be at least as long as the starting row. Everything
947between these lines is treated as code. No indentation is necessary:
949 ~~~~~~~
950 if (a > 3) {
951 moveShip(5 * gravity, DOWN);
952 }
953 ~~~~~~~
955Like regular code blocks, delimited code blocks must be separated
956from surrounding text by blank lines.
958If the code itself contains a row of tildes or backticks, just use a longer
959row of tildes or backticks at the start and end:
961 ~~~~~~~~~~~~~~~~
962 ~~~~~~~~~~
963 code including tildes
964 ~~~~~~~~~~
965 ~~~~~~~~~~~~~~~~
967Optionally, you may attach attributes to the code block using
968this syntax:
970 ~~~~ {#mycode .haskell .numberLines startFrom="100"}
971 qsort [] = []
972 qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
973 qsort (filter (>= x) xs)
974 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
976Here `mycode` is an identifier, `haskell` and `numberLines` are classes, and
977`startFrom` is an attribute with value `100`. Some output formats can use this
978information to do syntax highlighting. Currently, the only output formats
979that uses this information are HTML and LaTeX. If highlighting is supported
980for your output format and language, then the code block above will appear
981highlighted, with numbered lines. (To see which languages are supported, do
982`pandoc --version`.) Otherwise, the code block above will appear as follows:
984 <pre id="mycode" class="haskell numberLines" startFrom="100">
985 <code>
986 ...
987 </code>
988 </pre>
990A shortcut form can also be used for specifying the language of
991the code block:
993 ```haskell
994 qsort [] = []
995 ```
997This is equivalent to:
999 ``` {.haskell}
1000 qsort [] = []
1001 ```
1003To prevent all highlighting, use the `--no-highlight` flag.
1004To set the highlighting style, use `--highlight-style`.
1006Lists
1007-----
1009### Bullet lists ###
1011A bullet list is a list of bulleted list items. A bulleted list
1012item begins with a bullet (`*`, `+`, or `-`). Here is a simple
1013example:
1015 * one
1016 * two
1017 * three
1019This will produce a "compact" list. If you want a "loose" list, in which
1020each item is formatted as a paragraph, put spaces between the items:
1022 * one
1024 * two
1026 * three
1028The bullets need not be flush with the left margin; they may be
1029indented one, two, or three spaces. The bullet must be followed
1030by whitespace.
1032List items look best if subsequent lines are flush with the first
1033line (after the bullet):
1035 * here is my first
1036 list item.
1037 * and my second.
1039But markdown also allows a "lazy" format:
1041 * here is my first
1042 list item.
1043 * and my second.
1045### The four-space rule ###
1047A list item may contain multiple paragraphs and other block-level
1048content. However, subsequent paragraphs must be preceded by a blank line
1049and indented four spaces or a tab. The list will look better if the first
1050paragraph is aligned with the rest:
1052 * First paragraph.
1054 Continued.
1056 * Second paragraph. With a code block, which must be indented
1057 eight spaces:
1059 { code }
1061List items may include other lists. In this case the preceding blank
1062line is optional. The nested list must be indented four spaces or
1063one tab:
1065 * fruits
1066 + apples
1067 - macintosh
1068 - red delicious
1069 + pears
1070 + peaches
1071 * vegetables
1072 + brocolli
1073 + chard
1075As noted above, markdown allows you to write list items "lazily," instead of
1076indenting continuation lines. However, if there are multiple paragraphs or
1077other blocks in a list item, the first line of each must be indented.
1079 + A lazy, lazy, list
1080 item.
1082 + Another one; this looks
1083 bad but is legal.
1085 Second paragraph of second
1086 list item.
1088**Note:** Although the four-space rule for continuation paragraphs
1089comes from the official [markdown syntax guide], the reference implementation,
1090`Markdown.pl`, does not follow it. So pandoc will give different results than
1091`Markdown.pl` when authors have indented continuation paragraphs fewer than
1092four spaces.
1094The [markdown syntax guide] is not explicit whether the four-space
1095rule applies to *all* block-level content in a list item; it only
1096mentions paragraphs and code blocks. But it implies that the rule
1097applies to all block-level content (including nested lists), and
1098pandoc interprets it that way.
1100 [markdown syntax guide]:
1101 http://daringfireball.net/projects/markdown/syntax#list
1103### Ordered lists ###
1105Ordered lists work just like bulleted lists, except that the items
1106begin with enumerators rather than bullets.
1108In standard markdown, enumerators are decimal numbers followed
1109by a period and a space. The numbers themselves are ignored, so
1110there is no difference between this list:
1112 1. one
1113 2. two
1114 3. three
1116and this one:
1118 5. one
1119 7. two
1120 1. three
1122*Pandoc extension*.
1124Unlike standard markdown, Pandoc allows ordered list items to be marked
1125with uppercase and lowercase letters and roman numerals, in addition to
1126arabic numerals. List markers may be enclosed in parentheses or followed by a
1127single right-parentheses or period. They must be separated from the
1128text that follows by at least one space, and, if the list marker is a
1129capital letter with a period, by at least two spaces.[^2]
1131[^2]: The point of this rule is to ensure that normal paragraphs
1132 starting with people's initials, like
1134 B. Russell was an English philosopher.
1136 do not get treated as list items.
1138 This rule will not prevent
1140 (C) 2007 Joe Smith
1142 from being interpreted as a list item. In this case, a backslash
1143 escape can be used:
1145 (C\) 2007 Joe Smith
1147Pandoc also pays attention to the type of list marker used, and to the
1148starting number, and both of these are preserved where possible in the
1149output format. Thus, the following yields a list with numbers followed
1150by a single parenthesis, starting with 9, and a sublist with lowercase
1151roman numerals:
1153 9) Ninth
1154 10) Tenth
1155 11) Eleventh
1156 i. subone
1157 ii. subtwo
1158 iii. subthree
1160Note that Pandoc pays attention only to the *starting* marker in a list.
1161So, the following yields a list numbered sequentially starting from 2:
1163 (2) Two
1164 (5) Three
1165 1. Four
1166 * Five
1168If default list markers are desired, use `#.`:
1170 #. one
1171 #. two
1172 #. three
1175### Definition lists ###
1177*Pandoc extension*.
1179Pandoc supports definition lists, using a syntax inspired by
1180[PHP Markdown Extra] and [reStructuredText]:[^3]
1182 Term 1
1184 : Definition 1
1186 Term 2 with *inline markup*
1188 : Definition 2
1190 { some code, part of Definition 2 }
1192 Third paragraph of definition 2.
1194Each term must fit on one line, which may optionally be followed by
1195a blank line, and must be followed by one or more definitions.
1196A definition begins with a colon or tilde, which may be indented one
1197or two spaces. The body of the definition (including the first line,
1198aside from the colon or tilde) should be indented four spaces. A term may have
1199multiple definitions, and each definition may consist of one or more block
1200elements (paragraph, code block, list, etc.), each indented four spaces or one
1201tab stop.
1203If you leave space after the definition (as in the example above),
1204the blocks of the definitions will be considered paragraphs. In some
1205output formats, this will mean greater spacing between term/definition
1206pairs. For a compact definition list, do not leave space between the
1207definition and the next term:
1209 Term 1
1210 ~ Definition 1
1211 Term 2
1212 ~ Definition 2a
1213 ~ Definition 2b
1215[^3]: I have also been influenced by the suggestions of [David Wheeler](http://www.justatheory.com/computers/markup/modest-markdown-proposal.html).
1217[PHP Markdown Extra]: http://www.michelf.com/projects/php-markdown/extra/
1220### Numbered example lists ###
1222*Pandoc extension*.
1224The special list marker `@` can be used for sequentially numbered
1225examples. The first list item with a `@` marker will be numbered '1',
1226the next '2', and so on, throughout the document. The numbered examples
1227need not occur in a single list; each new list using `@` will take up
1228where the last stopped. So, for example:
1230 (@) My first example will be numbered (1).
1231 (@) My second example will be numbered (2).
1233 Explanation of examples.
1235 (@) My third example will be numbered (3).
1237Numbered examples can be labeled and referred to elsewhere in the
1238document:
1240 (@good) This is a good example.
1242 As (@good) illustrates, ...
1244The label can be any string of alphanumeric characters, underscores,
1245or hyphens.
1248### Compact and loose lists ###
1250Pandoc behaves differently from `Markdown.pl` on some "edge
1251cases" involving lists. Consider this source:
1253 + First
1254 + Second:
1255 - Fee
1256 - Fie
1257 - Foe
1259 + Third
1261Pandoc transforms this into a "compact list" (with no `<p>` tags around
1262"First", "Second", or "Third"), while markdown puts `<p>` tags around
1263"Second" and "Third" (but not "First"), because of the blank space
1264around "Third". Pandoc follows a simple rule: if the text is followed by
1265a blank line, it is treated as a paragraph. Since "Second" is followed
1266by a list, and not a blank line, it isn't treated as a paragraph. The
1267fact that the list is followed by a blank line is irrelevant. (Note:
1268Pandoc works this way even when the `--strict` option is specified. This
1269behavior is consistent with the official markdown syntax description,
1270even though it is different from that of `Markdown.pl`.)
1273### Ending a list ###
1275What if you want to put an indented code block after a list?
1277 - item one
1278 - item two
1280 { my code block }
1282Trouble! Here pandoc (like other markdown implementations) will treat
1283`{ my code block }` as the second paragraph of item two, and not as
1284a code block.
1286To "cut off" the list after item two, you can insert some non-indented
1287content, like an HTML comment, which won't produce visible output in
1288any format:
1290 - item one
1291 - item two
1293 <!-- end of list -->
1295 { my code block }
1297You can use the same trick if you want two consecutive lists instead
1298of one big list:
1300 1. one
1301 2. two
1302 3. three
1304 <!-- -->
1306 1. uno
1307 2. dos
1308 3. tres
1310Horizontal rules
1311----------------
1313A line containing a row of three or more `*`, `-`, or `_` characters
1314(optionally separated by spaces) produces a horizontal rule:
1316 * * * *
1318 ---------------
1321Tables
1322------
1324*Pandoc extension*.
1326Three kinds of tables may be used. All three kinds presuppose the use of
1327a fixed-width font, such as Courier.
1329**Simple tables** look like this:
1331 Right Left Center Default
1332 ------- ------ ---------- -------
1333 12 12 12 12
1334 123 123 123 123
1335 1 1 1 1
1337 Table: Demonstration of simple table syntax.
1339The headers and table rows must each fit on one line. Column
1340alignments are determined by the position of the header text relative
1341to the dashed line below it:[^4]
1343 - If the dashed line is flush with the header text on the right side
1344 but extends beyond it on the left, the column is right-aligned.
1345 - If the dashed line is flush with the header text on the left side
1346 but extends beyond it on the right, the column is left-aligned.
1347 - If the dashed line extends beyond the header text on both sides,
1348 the column is centered.
1349 - If the dashed line is flush with the header text on both sides,
1350 the default alignment is used (in most cases, this will be left).
1352[^4]: This scheme is due to Michel Fortin, who proposed it on the
1353 [Markdown discussion list](http://six.pairlist.net/pipermail/markdown-discuss/2005-March/001097.html).
1355The table must end with a blank line, or a line of dashes followed by
1356a blank line. A caption may optionally be provided (as illustrated in
1357the example above). A caption is a paragraph beginning with the string
1358`Table:` (or just `:`), which will be stripped off. It may appear either
1359before or after the table.
1361The column headers may be omitted, provided a dashed line is used
1362to end the table. For example:
1364 ------- ------ ---------- -------
1365 12 12 12 12
1366 123 123 123 123
1367 1 1 1 1
1368 ------- ------ ---------- -------
1370When headers are omitted, column alignments are determined on the basis
1371of the first line of the table body. So, in the tables above, the columns
1372would be right, left, center, and right aligned, respectively.
1374**Multiline tables** allow headers and table rows to span multiple lines
1375of text (but cells that span multiple columns or rows of the table are
1376not supported). Here is an example:
1378 -------------------------------------------------------------
1379 Centered Default Right Left
1380 Header Aligned Aligned Aligned
1381 ----------- ------- --------------- -------------------------
1382 First row 12.0 Example of a row that
1383 spans multiple lines.
1385 Second row 5.0 Here's another one. Note
1386 the blank line between
1387 rows.
1388 -------------------------------------------------------------
1390 Table: Here's the caption. It, too, may span
1391 multiple lines.
1393These work like simple tables, but with the following differences:
1395 - They must begin with a row of dashes, before the header text
1396 (unless the headers are omitted).
1397 - They must end with a row of dashes, then a blank line.
1398 - The rows must be separated by blank lines.
1400In multiline tables, the table parser pays attention to the widths of
1401the columns, and the writers try to reproduce these relative widths in
1402the output. So, if you find that one of the columns is too narrow in the
1403output, try widening it in the markdown source.
1405Headers may be omitted in multiline tables as well as simple tables:
1407 ----------- ------- --------------- -------------------------
1408 First row 12.0 Example of a row that
1409 spans multiple lines.
1411 Second row 5.0 Here's another one. Note
1412 the blank line between
1413 rows.
1414 -------------------------------------------------------------
1416 : Here's a multiline table without headers.
1418It is possible for a multiline table to have just one row, but the row
1419should be followed by a blank line (and then the row of dashes that ends
1420the table), or the table may be interpreted as a simple table.
1422**Grid tables** look like this:
1424 : Sample grid table.
1426 +---------------+---------------+--------------------+
1427 | Fruit | Price | Advantages |
1428 +===============+===============+====================+
1429 | Bananas | $1.34 | - built-in wrapper |
1430 | | | - bright color |
1431 +---------------+---------------+--------------------+
1432 | Oranges | $2.10 | - cures scurvy |
1433 | | | - tasty |
1434 +---------------+---------------+--------------------+
1436The row of `=`s separates the header from the table body, and can be
1437omitted for a headerless table. The cells of grid tables may contain
1438arbitrary block elements (multiple paragraphs, code blocks, lists,
1439etc.). Alignments are not supported, nor are cells that span multiple
1440columns or rows. Grid tables can be created easily using [Emacs table mode].
1442 [Emacs table mode]: http://table.sourceforge.net/
1445Title block
1446-----------
1448*Pandoc extension*.
1450If the file begins with a title block
1452 % title
1453 % author(s) (separated by semicolons)
1454 % date
1456it will be parsed as bibliographic information, not regular text. (It
1457will be used, for example, in the title of standalone LaTeX or HTML
1458output.) The block may contain just a title, a title and an author,
1459or all three elements. If you want to include an author but no
1460title, or a title and a date but no author, you need a blank line:
1463 % Author
1465 % My title
1467 % June 15, 2006
1469The title may occupy multiple lines, but continuation lines must
1470begin with leading space, thus:
1472 % My title
1473 on multiple lines
1475If a document has multiple authors, the authors may be put on
1476separate lines with leading space, or separated by semicolons, or
1477both. So, all of the following are equivalent:
1479 % Author One
1480 Author Two
1482 % Author One; Author Two
1484 % Author One;
1485 Author Two
1487The date must fit on one line.
1489All three metadata fields may contain standard inline formatting
1490(italics, links, footnotes, etc.).
1492Title blocks will always be parsed, but they will affect the output only
1493when the `--standalone` (`-s`) option is chosen. In HTML output, titles
1494will appear twice: once in the document head -- this is the title that
1495will appear at the top of the window in a browser -- and once at the
1496beginning of the document body. The title in the document head can have
1497an optional prefix attached (`--title-prefix` or `-T` option). The title
1498in the body appears as an H1 element with class "title", so it can be
1499suppressed or reformatted with CSS. If a title prefix is specified with
1500`-T` and no title block appears in the document, the title prefix will
1501be used by itself as the HTML title.
1503The man page writer extracts a title, man page section number, and
1504other header and footer information from the title line. The title
1505is assumed to be the first word on the title line, which may optionally
1506end with a (single-digit) section number in parentheses. (There should
1507be no space between the title and the parentheses.) Anything after
1508this is assumed to be additional footer and header text. A single pipe
1509character (`|`) should be used to separate the footer text from the header
1510text. Thus,
1512 % PANDOC(1)
1514will yield a man page with the title `PANDOC` and section 1.
1516 % PANDOC(1) Pandoc User Manuals
1518will also have "Pandoc User Manuals" in the footer.
1520 % PANDOC(1) Pandoc User Manuals | Version 4.0
1522will also have "Version 4.0" in the header.
1525Backslash escapes
1526-----------------
1528Except inside a code block or inline code, any punctuation or space
1529character preceded by a backslash will be treated literally, even if it
1530would normally indicate formatting. Thus, for example, if one writes
1532 *\*hello\**
1534one will get
1536 <em>*hello*</em>
1538instead of
1540 <strong>hello</strong>
1542This rule is easier to remember than standard markdown's rule,
1543which allows only the following characters to be backslash-escaped:
1545 \`*_{}[]()>#+-.!
1547(However, if the `--strict` option is supplied, the standard
1548markdown rule will be used.)
1550A backslash-escaped space is parsed as a nonbreaking space. It will
1551appear in TeX output as `~` and in HTML and XML as `\&#160;` or
1552`\&nbsp;`.
1554A backslash-escaped newline (i.e. a backslash occurring at the end of
1555a line) is parsed as a hard line break. It will appear in TeX output as
1556`\\` and in HTML as `<br />`. This is a nice alternative to
1557markdown's "invisible" way of indicating hard line breaks using
1558two trailing spaces on a line.
1560Backslash escapes do not work in verbatim contexts.
1562Smart punctuation
1563-----------------
1565*Pandoc extension*.
1567If the `--smart` option is specified, pandoc will produce typographically
1568correct output, converting straight quotes to curly quotes, `---` to
1569em-dashes, `--` to en-dashes, and `...` to ellipses. Nonbreaking spaces
1570are inserted after certain abbreviations, such as "Mr."
1572Note: if your LaTeX template uses the `csquotes` package, pandoc will
1573detect automatically this and use `\enquote{...}` for quoted text.
1575Inline formatting
1576-----------------
1578### Emphasis ###
1580To *emphasize* some text, surround it with `*`s or `_`, like this:
1582 This text is _emphasized with underscores_, and this
1583 is *emphasized with asterisks*.
1585Double `*` or `_` produces **strong emphasis**:
1587 This is **strong emphasis** and __with underscores__.
1589A `*` or `_` character surrounded by spaces, or backslash-escaped,
1590will not trigger emphasis:
1592 This is * not emphasized *, and \*neither is this\*.
1594Because `_` is sometimes used inside words and identifiers,
1595pandoc does not interpret a `_` surrounded by alphanumeric
1596characters as an emphasis marker. If you want to emphasize
1597just part of a word, use `*`:
1599 feas*ible*, not feas*able*.
1602### Strikeout ###
1604*Pandoc extension*.
1606To strikeout a section of text with a horizontal line, begin and end it
1607with `~~`. Thus, for example,
1609 This ~~is deleted text.~~
1612### Superscripts and subscripts ###
1614*Pandoc extension*.
1616Superscripts may be written by surrounding the superscripted text by `^`
1617characters; subscripts may be written by surrounding the subscripted
1618text by `~` characters. Thus, for example,
1620 H~2~O is a liquid. 2^10^ is 1024.
1622If the superscripted or subscripted text contains spaces, these spaces
1623must be escaped with backslashes. (This is to prevent accidental
1624superscripting and subscripting through the ordinary use of `~` and `^`.)
1625Thus, if you want the letter P with 'a cat' in subscripts, use
1626`P~a\ cat~`, not `P~a cat~`.
1629### Verbatim ###
1631To make a short span of text verbatim, put it inside backticks:
1633 What is the difference between `>>=` and `>>`?
1635If the verbatim text includes a backtick, use double backticks:
1637 Here is a literal backtick `` ` ``.
1639(The spaces after the opening backticks and before the closing
1640backticks will be ignored.)
1642The general rule is that a verbatim span starts with a string
1643of consecutive backticks (optionally followed by a space)
1644and ends with a string of the same number of backticks (optionally
1645preceded by a space).
1647Note that backslash-escapes (and other markdown constructs) do not
1648work in verbatim contexts:
1650 This is a backslash followed by an asterisk: `\*`.
1652Attributes can be attached to verbatim text, just as with
1653[delimited code blocks](#delimited-code-blocks):
1655 `<$>`{.haskell}
1657Math
1658----
1660*Pandoc extension*.
1662Anything between two `$` characters will be treated as TeX math. The
1663opening `$` must have a character immediately to its right, while the
1664closing `$` must have a character immediately to its left. Thus,
1665`$20,000 and $30,000` won't parse as math. If for some reason
1666you need to enclose text in literal `$` characters, backslash-escape
1667them and they won't be treated as math delimiters.
1669TeX math will be printed in all output formats. How it is rendered
1670depends on the output format:
1672Markdown, LaTeX, Org-Mode, ConTeXt
1673 ~ It will appear verbatim between `$` characters.
1675reStructuredText
1676 ~ It will be rendered using an interpreted text role `:math:`, as described
1677 [here](http://www.american.edu/econ/itex2mml/mathhack.rst).
1679AsciiDoc
1680 ~ It will be rendered as `latexmath:[...]`.
1682Texinfo
1683 ~ It will be rendered inside a `@math` command.
1685groff man
1686 ~ It will be rendered verbatim without `$`'s.
1688MediaWiki
1689 ~ It will be rendered inside `<math>` tags.
1691Textile
1692 ~ It will be rendered inside `<span class="math">` tags.
1694RTF, OpenDocument, ODT
1695 ~ It will be rendered, if possible, using unicode characters,
1696 and will otherwise appear verbatim.
1698Docbook
1699 ~ If the `--mathml` flag is used, it will be rendered using mathml
1700 in an `inlineequation` or `informalequation` tag. Otherwise it
1701 will be rendered, if possible, using unicode characters.
1703Docx
1704 ~ It will be rendered using OMML math markup.
1706HTML, Slidy, Slideous, DZSlides, S5, EPUB
1707 ~ The way math is rendered in HTML will depend on the
1708 command-line options selected:
1710 1. The default is to render TeX math as far as possible using unicode
1711 characters, as with RTF, DocBook, and OpenDocument output. Formulas
1712 are put inside a `span` with `class="math"`, so that they may be
1713 styled differently from the surrounding text if needed.
1715 2. If the `--latexmathml` option is used, TeX math will be displayed
1716 between $ or $$ characters and put in `<span>` tags with class `LaTeX`.
1717 The [LaTeXMathML] script will be used to render it as formulas.
1718 (This trick does not work in all browsers, but it works in Firefox.
1719 In browsers that do not support LaTeXMathML, TeX math will appear
1720 verbatim between $ characters.)
1722 3. If the `--jsmath` option is used, TeX math will be put inside
1723 `<span>` tags (for inline math) or `<div>` tags (for display math)
1724 with class `math`. The [jsMath] script will be used to render
1725 it.
1727 4. If the `--mimetex` option is used, the [mimeTeX] CGI script will
1728 be called to generate images for each TeX formula. This should
1729 work in all browsers. The `--mimetex` option takes an optional URL
1730 as argument. If no URL is specified, it will be assumed that the
1731 mimeTeX CGI script is at `/cgi-bin/mimetex.cgi`.
1733 5. If the `--gladtex` option is used, TeX formulas will be enclosed
1734 in `<eq>` tags in the HTML output. The resulting `htex` file may then
1735 be processed by [gladTeX], which will produce image files for each
1736 formula and an `html` file with links to these images. So, the
1737 procedure is:
1739 pandoc -s --gladtex myfile.txt -o myfile.htex
1740 gladtex -d myfile-images myfile.htex
1741 # produces myfile.html and images in myfile-images
1743 6. If the `--webtex` option is used, TeX formulas will be converted
1744 to `<img>` tags that link to an external script that converts
1745 formulas to images. The formula will be URL-encoded and concatenated
1746 with the URL provided. If no URL is specified, the Google Chart
1747 API will be used (`http://chart.apis.google.com/chart?cht=tx&chl=`).
1750Raw HTML
1751--------
1753Markdown allows you to insert raw HTML (or DocBook) anywhere in a document
1754(except verbatim contexts, where `<`, `>`, and `&` are interpreted
1755literally).
1757The raw HTML is passed through unchanged in HTML, S5, Slidy, Slideous,
1758DZSlides, EPUB,
1759Markdown, and Textile output, and suppressed in other formats.
1761*Pandoc extension*.
1763Standard markdown allows you to include HTML "blocks": blocks
1764of HTML between balanced tags that are separated from the surrounding text
1765with blank lines, and start and end at the left margin. Within
1766these blocks, everything is interpreted as HTML, not markdown;
1767so (for example), `*` does not signify emphasis.
1769Pandoc behaves this way when `--strict` is specified; but by default,
1770pandoc interprets material between HTML block tags as markdown.
1771Thus, for example, Pandoc will turn
1773 <table>
1774 <tr>
1775 <td>*one*</td>
1776 <td>[a link](http://google.com)</td>
1777 </tr>
1778 </table>
1780into
1782 <table>
1783 <tr>
1784 <td><em>one</em></td>
1785 <td><a href="http://google.com">a link</a></td>
1786 </tr>
1787 </table>
1789whereas `Markdown.pl` will preserve it as is.
1791There is one exception to this rule: text between `<script>` and
1792`<style>` tags is not interpreted as markdown.
1794This departure from standard markdown should make it easier to mix
1795markdown with HTML block elements. For example, one can surround
1796a block of markdown text with `<div>` tags without preventing it
1797from being interpreted as markdown.
1799Raw TeX
1800-------
1802*Pandoc extension*.
1804In addition to raw HTML, pandoc allows raw LaTeX, TeX, and ConTeXt to be
1805included in a document. Inline TeX commands will be preserved and passed
1806unchanged to the LaTeX and ConTeXt writers. Thus, for example, you can use
1807LaTeX to include BibTeX citations:
1809 This result was proved in \cite{jones.1967}.
1811Note that in LaTeX environments, like
1813 \begin{tabular}{|l|l|}\hline
1814 Age & Frequency \\ \hline
1815 18--25 & 15 \\
1816 26--35 & 33 \\
1817 36--45 & 22 \\ \hline
1818 \end{tabular}
1820the material between the begin and end tags will be interpreted as raw
1821LaTeX, not as markdown.
1823Inline LaTeX is ignored in output formats other than Markdown, LaTeX,
1824and ConTeXt.
1826### Macros ###
1828For output formats other than LaTeX, pandoc will parse LaTeX `\newcommand` and
1829`\renewcommand` definitions and apply the resulting macros to all LaTeX
1830math. So, for example, the following will work in all output formats,
1831not just LaTeX:
1833 \newcommand{\tuple}[1]{\langle #1 \rangle}
1835 $\tuple{a, b, c}$
1837In LaTeX output, the `\newcommand` definition will simply be passed
1838unchanged to the output.
1841Links
1842-----
1844Markdown allows links to be specified in several ways.
1846### Automatic links ###
1848If you enclose a URL or email address in pointy brackets, it
1849will become a link:
1851 <http://google.com>
1852 <sam@green.eggs.ham>
1855### Inline links ###
1857An inline link consists of the link text in square brackets,
1858followed by the URL in parentheses. (Optionally, the URL can
1859be followed by a link title, in quotes.)
1861 This is an [inline link](/url), and here's [one with
1862 a title](http://fsf.org "click here for a good time!").
1864There can be no space between the bracketed part and the parenthesized part.
1865The link text can contain formatting (such as emphasis), but the title cannot.
1868### Reference links ###
1870An *explicit* reference link has two parts, the link itself and the link
1871definition, which may occur elsewhere in the document (either
1872before or after the link).
1874The link consists of link text in square brackets, followed by a label in
1875square brackets. (There can be space between the two.) The link definition
1876must begin at the left margin or indented no more than three spaces. It
1877consists of the bracketed label, followed by a colon and a space, followed by
1878the URL, and optionally (after a space) a link title either in quotes or in
1879parentheses.
1881Here are some examples:
1883 [my label 1]: /foo/bar.html "My title, optional"
1884 [my label 2]: /foo
1885 [my label 3]: http://fsf.org (The free software foundation)
1886 [my label 4]: /bar#special 'A title in single quotes'
1888The URL may optionally be surrounded by angle brackets:
1890 [my label 5]: <http://foo.bar.baz>
1892The title may go on the next line:
1894 [my label 3]: http://fsf.org
1895 "The free software foundation"
1897Note that link labels are not case sensitive. So, this will work:
1899 Here is [my link][FOO]
1901 [Foo]: /bar/baz
1903In an *implicit* reference link, the second pair of brackets is
1904empty, or omitted entirely:
1906 See [my website][], or [my website].
1908 [my website]: http://foo.bar.baz
1910### Internal links
1912To link to another section of the same document, use the automatically
1913generated identifier (see [Header identifiers in HTML, LaTeX, and
1914ConTeXt](#header-identifiers-in-html-latex-and-context), below).
1915For example:
1917 See the [Introduction](#introduction).
1921 See the [Introduction].
1923 [Introduction]: #introduction
1925Internal links are currently supported for HTML formats (including
1926HTML slide shows and EPUB), LaTeX, and ConTeXt.
1928Images
1929------
1931A link immediately preceded by a `!` will be treated as an image.
1932The link text will be used as the image's alt text:
1934 ![la lune](lalune.jpg "Voyage to the moon")
1936 ![movie reel]
1938 [movie reel]: movie.gif
1940### Pictures with captions ###
1942*Pandoc extension*.
1944An image occurring by itself in a paragraph will be rendered as
1945a figure with a caption.[^5] (In LaTeX, a figure environment will be
1946used; in HTML, the image will be placed in a `div` with class
1947`figure`, together with a caption in a `p` with class `caption`.)
1948The image's alt text will be used as the caption.
1950 ![This is the caption](/url/of/image.png)
1952[^5]: This feature is not yet implemented for RTF, OpenDocument, or
1953 ODT. In those formats, you'll just get an image in a paragraph by
1954 itself, with no caption.
1956If you just want a regular inline image, just make sure it is not
1957the only thing in the paragraph. One way to do this is to insert a
1958nonbreaking space after the image:
1960 ![This image won't be a figure](/url/of/image.png)\
1963Footnotes
1964---------
1966*Pandoc extension*.
1968Pandoc's markdown allows footnotes, using the following syntax:
1970 Here is a footnote reference,[^1] and another.[^longnote]
1972 [^1]: Here is the footnote.
1974 [^longnote]: Here's one with multiple blocks.
1976 Subsequent paragraphs are indented to show that they
1977 belong to the previous footnote.
1979 { some.code }
1981 The whole paragraph can be indented, or just the first
1982 line. In this way, multi-paragraph footnotes work like
1983 multi-paragraph list items.
1985 This paragraph won't be part of the note, because it
1986 isn't indented.
1988The identifiers in footnote references may not contain spaces, tabs,
1989or newlines. These identifiers are used only to correlate the
1990footnote reference with the note itself; in the output, footnotes
1991will be numbered sequentially.
1993The footnotes themselves need not be placed at the end of the
1994document. They may appear anywhere except inside other block elements
1995(lists, block quotes, tables, etc.).
1997Inline footnotes are also allowed (though, unlike regular notes,
1998they cannot contain multiple paragraphs). The syntax is as follows:
2000 Here is an inline note.^[Inlines notes are easier to write, since
2001 you don't have to pick an identifier and move down to type the
2002 note.]
2004Inline and regular footnotes may be mixed freely.
2007Citations
2008---------
2010*Pandoc extension*.
2012Pandoc can automatically generate citations and a bibliography in a number of
2013styles (using Andrea Rossato's `hs-citeproc`). In order to use this feature,
2014you will need a bibliographic database in one of the following formats:
2016 Format File extension
2017 ------------ --------------
2018 MODS .mods
2019 BibTeX/BibLaTeX .bib
2020 RIS .ris
2021 EndNote .enl
2022 EndNote XML .xml
2023 ISI .wos
2024 MEDLINE .medline
2025 Copac .copac
2026 JSON citeproc .json
2028You will need to specify the bibliography file using the `--bibliography`
2029command-line option (which may be repeated if you have several
2030bibliographies).
2032By default, pandoc will use a Chicago author-date format for citations
2033and references. To use another style, you will need to use the
2034`--csl` option to specify a [CSL] 1.0 style file. A primer on
2035creating and modifying CSL styles can be found at
2036<http://citationstyles.org/downloads/primer.html>.
2037A repository of CSL styles can be found at
2038<https://github.com/citation-style-language/styles>.
2039See also <http://zotero.org/styles> for easy browsing.
2041Citations go inside square brackets and are separated by semicolons.
2042Each citation must have a key, composed of '@' + the citation
2043identifier from the database, and may optionally have a prefix,
2044a locator, and a suffix. Here are some examples:
2046 Blah blah [see @doe99, pp. 33-35; also @smith04, ch. 1].
2048 Blah blah [@doe99, pp. 33-35, 38-39 and *passim*].
2050 Blah blah [@smith04; @doe99].
2052A minus sign (`-`) before the `@` will suppress mention of
2053the author in the citation. This can be useful when the
2054author is already mentioned in the text:
2056 Smith says blah [-@smith04].
2058You can also write an in-text citation, as follows:
2060 @smith04 says blah.
2062 @smith04 [p. 33] says blah.
2064If the style calls for a list of works cited, it will be placed
2065at the end of the document. Normally, you will want to end your
2066document with an appropriate header:
2068 last paragraph...
2070 # References
2072The bibliography will be inserted after this header.
2075Producing slide shows with Pandoc
2076=================================
2078You can use Pandoc to produce an HTML + javascript slide presentation
2079that can be viewed via a web browser. There are four ways to do this,
2080using [S5], [DZSlides], [Slidy], or [Slideous]. You can also produce a
2081PDF slide show using LaTeX [beamer].
2083Here's the markdown source for a simple slide show, `habits.txt`:
2085 % Habits
2086 % John Doe
2087 % March 22, 2005
2089 # In the morning
2091 ## Getting up
2093 - Turn off alarm
2094 - Get out of bed
2096 ## Breakfast
2098 - Eat eggs
2099 - Drink coffee
2101 # In the evening
2103 ## Dinner
2105 - Eat spaghetti
2106 - Drink wine
2108 ------------------
2110 ![picture of spaghetti](images/spaghetti.jpg)
2112 ## Going to sleep
2114 - Get in bed
2115 - Count sheep
2117To produce the slide show, simply type
2119 pandoc -t s5 -s habits.txt -o habits.html
2121for S5,
2123 pandoc -t slidy -s habits.txt -o habits.html
2125for Slidy,
2127 pandoc -t slideous -s habits.txt -o habits.html
2129for Slideous,
2131 pandoc -t dzslides -s habits.txt -o habits.html
2133for DZSlides, or
2135 pandoc -t beamer habits.txt -o habits.pdf
2137for beamer.
2139With all HTML slide formats, the `--self-contained` option can be used to
2140produce a single file that contains all of the data necessary to display the
2141slide show, including linked scripts, stylesheets, images, and videos.
2143Structuring the slide show
2144--------------------------
2146By default, the *slide level* is the highest header level in
2147the hierarchy that is followed immediately by content, and not another
2148header, somewhere in the document. In the example above, level 1 headers
2149are always followed by level 2 headers, which are followed by content,
2150so 2 is the slide level. This default can be overridden using
2151the `--slide-level` option.
2153The document is carved up into slides according to the following
2154rules:
2156 * A horizontal rule always starts a new slide.
2158 * A header at the slide level always starts a new slide.
2160 * Headers *below* the slide level in the hierarchy create
2161 headers *within* a slide.
2163 * Headers *above* the slide level in the hierarchy create
2164 "title slides," which just contain the section title
2165 and help to break the slide show into sections.
2167 * A title page is constructed automatically from the document's title
2168 block, if present. (In the case of beamer, this can be disabled
2169 by commenting out some lines in the default template.)
2171These rules are designed to support many different styles of slide show. If
2172you don't care about structuring your slides into sections and subsections,
2173you can just use level 1 headers for all each slide. (In that case, level 1
2174will be the slide level.) But you can also structure the slide show into
2175sections, as in the example above.
2177For Slidy, Slideous and S5, the file produced by pandoc with the
2178`-s/--standalone`
2179option embeds a link to javascripts and CSS files, which are assumed to
2180be available at the relative path `s5/default` (for S5) or `slideous`
2181(for Slideous), or at the Slidy
2182website at `w3.org` (for Slidy). (These paths can be changed by setting
2183the `slidy-url`, `slideous-url` or `s5-url` variables; see `--variable`,
2184above.) For DZSlides,
2185the (relatively short) javascript and css are included in the file by default.
2187Incremental lists
2188-----------------
2190By default, these writers produces lists that display "all at once."
2191If you want your lists to display incrementally (one item at a time),
2192use the `-i` option. If you want a particular list to depart from the
2193default (that is, to display incrementally without the `-i` option and
2194all at once with the `-i` option), put it in a block quote:
2196 > - Eat spaghetti
2197 > - Drink wine
2199In this way incremental and nonincremental lists can be mixed in
2200a single document.
2202Styling the slides
2203------------------
2205You can change the style of HTML slides by putting customized CSS files
2206in `$DATADIR/s5/default` (for S5), `$DATADIR/slidy` (for Slidy),
2207or `$DATADIR/slideous` (for Slideous),
2208where `$DATADIR` is the user data directory (see `--data-dir`, above).
2209The originals may be found in pandoc's system data directory (generally
2210`$CABALDIR/pandoc-VERSION/s5/default`). Pandoc will look there for any
2211files it does not find in the user data directory.
2213For dzslides, the CSS is included in the HTML file itself, and may
2214be modified there.
2216To style beamer slides, you can specify a beamer "theme" or "colortheme"
2217using the `-V` option:
2219 pandoc -t beamer habits.txt -V theme:Warsaw -o habits.pdf
2221Literate Haskell support
2222========================
2224If you append `+lhs` to an appropriate input or output format (`markdown`,
2225`rst`, or `latex` for input or output; `beamer`, `html` or `html5` for
2226output only), pandoc will treat the document as literate Haskell source.
2227This means that
2229 - In markdown input, "bird track" sections will be parsed as Haskell
2230 code rather than block quotations. Text between `\begin{code}`
2231 and `\end{code}` will also be treated as Haskell code.
2233 - In markdown output, code blocks with classes `haskell` and `literate`
2234 will be rendered using bird tracks, and block quotations will be
2235 indented one space, so they will not be treated as Haskell code.
2236 In addition, headers will be rendered setext-style (with underlines)
2237 rather than atx-style (with '#' characters). (This is because ghc
2238 treats '#' characters in column 1 as introducing line numbers.)
2240 - In restructured text input, "bird track" sections will be parsed
2241 as Haskell code.
2243 - In restructured text output, code blocks with class `haskell` will
2244 be rendered using bird tracks.
2246 - In LaTeX input, text in `code` environments will be parsed as
2247 Haskell code.
2249 - In LaTeX output, code blocks with class `haskell` will be rendered
2250 inside `code` environments.
2252 - In HTML output, code blocks with class `haskell` will be rendered
2253 with class `literatehaskell` and bird tracks.
2255Examples:
2257 pandoc -f markdown+lhs -t html
2259reads literate Haskell source formatted with markdown conventions and writes
2260ordinary HTML (without bird tracks).
2262 pandoc -f markdown+lhs -t html+lhs
2264writes HTML with the Haskell code in bird tracks, so it can be copied
2265and pasted as literate Haskell source.
2267Authors
2268=======
2270© 2006-2011 John MacFarlane (jgm at berkeley dot edu). Released under the
2271[GPL], version 2 or greater. This software carries no warranty of
2272any kind. (See COPYRIGHT for full copyright and warranty notices.)
2273Other contributors include Recai Oktaş, Paulo Tanimoto, Peter Wang,
2274Andrea Rossato, Eric Kow, infinity0x, Luke Plant, shreevatsa.public,
2275Puneeth Chaganti, Paul Rivier, rodja.trappe, Bradley Kuhn, thsutton,
2276Nathan Gass, Jonathan Daugherty, Jérémy Bobbio, Justin Bogner, qerub,
2277Christopher Sawicki, Kelsey Hightower, Masayoshi Takahashi, Antoine
2278Latter, Ralf Stephan, Eric Seidel, B. Scott Michel.
2280[markdown]: http://daringfireball.net/projects/markdown/
2281[reStructuredText]: http://docutils.sourceforge.net/docs/ref/rst/introduction.html
2282[S5]: http://meyerweb.com/eric/tools/s5/
2283[Slidy]: http://www.w3.org/Talks/Tools/Slidy/
2284[Slideous]: http://goessner.net/articles/slideous/
2285[HTML]: http://www.w3.org/TR/html40/
2286[HTML 5]: http://www.w3.org/TR/html5/
2287[XHTML]: http://www.w3.org/TR/xhtml1/
2288[LaTeX]: http://www.latex-project.org/
2289[beamer]: http://www.tex.ac.uk/CTAN/macros/latex/contrib/beamer
2290[ConTeXt]: http://www.pragma-ade.nl/
2291[RTF]: http://en.wikipedia.org/wiki/Rich_Text_Format
2292[DocBook XML]: http://www.docbook.org/
2293[OpenDocument XML]: http://opendocument.xml.org/
2294[ODT]: http://en.wikipedia.org/wiki/OpenDocument
2295[Textile]: http://redcloth.org/textile
2296[MediaWiki markup]: http://www.mediawiki.org/wiki/Help:Formatting
2297[groff man]: http://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPages/man7/groff_man.7.html
2298[Haskell]: http://www.haskell.org/
2299[GNU Texinfo]: http://www.gnu.org/software/texinfo/
2300[Emacs Org-Mode]: http://orgmode.org
2301[AsciiDoc]: http://www.methods.co.nz/asciidoc/
2302[EPUB]: http://www.idpf.org/
2303[GPL]: http://www.gnu.org/copyleft/gpl.html "GNU General Public License"
2304[DZSlides]: http://paulrouget.com/dzslides/
2305[ISO 8601 format]: http://www.w3.org/TR/NOTE-datetime
2306[Word docx]: http://www.microsoft.com/interop/openup/openxml/default.aspx
2307[PDF]: http://www.adobe.com/pdf/