git.iko.soy/typeable/pandoc
on 1.9.1.2 help sign in
2253 lines 79 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],
16and [LaTeX]; and it can write plain text, [markdown], [reStructuredText],
17[XHTML], [HTML 5], [LaTeX] (including [beamer] slide shows),
18[ConTeXt], [RTF], [DocBook XML], [OpenDocument XML], [ODT], [Word docx], [GNU
19Texinfo], [MediaWiki markup], [EPUB], [Textile], [groff man] pages, [Emacs
20Org-Mode], [AsciiDoc], and [Slidy], [DZSlides], or [S5] HTML slide shows. It
21can also produce [PDF] output on systems where LaTeX is installed.
23Pandoc's enhanced version of markdown includes syntax for footnotes,
24tables, flexible ordered lists, definition lists, delimited code blocks,
25superscript, subscript, strikeout, title blocks, automatic tables of
26contents, embedded LaTeX math, citations, and markdown inside HTML block
27elements. (These enhancements, described below under
28[Pandoc's markdown](#pandocs-markdown), can be disabled using the `--strict`
29option.)
31In contrast to most existing tools for converting markdown to HTML, which
32use regex substitutions, Pandoc has a modular design: it consists of a
33set of readers, which parse text in a given format and produce a native
34representation of the document, and a set of writers, which convert
35this native representation into a target format. Thus, adding an input
36or output format requires only adding a reader or writer.
38Using `pandoc`
39--------------
41If no *input-file* is specified, input is read from *stdin*.
42Otherwise, the *input-files* are concatenated (with a blank
43line between each) and used as input. Output goes to *stdout* by
44default (though output to *stdout* is disabled for the `odt`, `docx`,
45and `epub` output formats). For output to a file, use the
46`-o` option:
48 pandoc -o output.html input.txt
50Instead of a file, an absolute URI may be given. In this case
51pandoc will fetch the content using HTTP:
53 pandoc -f html -t markdown http://www.fsf.org
55If multiple input files are given, `pandoc` will concatenate them all (with
56blank lines between them) before parsing.
58The format of the input and output can be specified explicitly using
59command-line options. The input format can be specified using the
60`-r/--read` or `-f/--from` options, the output format using the
61`-w/--write` or `-t/--to` options. Thus, to convert `hello.txt` from
62markdown to LaTeX, you could type:
64 pandoc -f markdown -t latex hello.txt
66To convert `hello.html` from html to markdown:
68 pandoc -f html -t markdown hello.html
70Supported output formats are listed below under the `-t/--to` option.
71Supported input formats are listed below under the `-f/--from` option. Note
72that the `rst`, `textile`, `latex`, and `html` readers are not complete;
73there are some constructs that they do not parse.
75If the input or output format is not specified explicitly, `pandoc`
76will attempt to guess it from the extensions of
77the input and output filenames. Thus, for example,
79 pandoc -o hello.tex hello.txt
81will convert `hello.txt` from markdown to LaTeX. If no output file
82is specified (so that output goes to *stdout*), or if the output file's
83extension is unknown, the output format will default to HTML.
84If no input file is specified (so that input comes from *stdin*), or
85if the input files' extensions are unknown, the input format will
86be assumed to be markdown unless explicitly specified.
88Pandoc uses the UTF-8 character encoding for both input and output.
89If your local character encoding is not UTF-8, you
90should pipe input and output through `iconv`:
92 iconv -t utf-8 input.txt | pandoc | iconv -f utf-8
94Creating a PDF
95--------------
97Earlier versions of pandoc came with a program, `markdown2pdf`, that
98used pandoc and pdflatex to produce a PDF. This is no longer needed,
99since `pandoc` can now produce `pdf` output itself. To produce a PDF, simply
100specify an output file with a `.pdf` extension. Pandoc will create a latex
101file and use pdflatex (or another engine, see `--latex-engine`) to convert it
102to PDF:
104 pandoc test.txt -o test.pdf
106Production of a PDF requires that a LaTeX engine be installed (see
107`--latex-engine`, below), and assumes that the following LaTeX packages are
108available: `amssymb`, `amsmath`, `ifxetex`, `ifluatex`, `listings` (if the
109`--listings` option is used), `fancyvrb`, `enumerate`, `ctable`, `url`,
110`graphicx`, `hyperref`, `ulem`, `babel` (if the `lang` variable is set),
111`fontspec` (if `xelatex` or `lualatex` is used as the LaTeX engine), `xltxtra`
112and `xunicode` (if `xelatex` is used).
114`hsmarkdown`
115------------
117A user who wants a drop-in replacement for `Markdown.pl` may create
118a symbolic link to the `pandoc` executable called `hsmarkdown`. When
119invoked under the name `hsmarkdown`, `pandoc` will behave as if the
120`--strict` flag had been selected, and no command-line options will be
121recognized. However, this approach does not work under Cygwin, due to
122problems with its simulation of symbolic links.
124[Cygwin]: http://www.cygwin.com/
125[`iconv`]: http://www.gnu.org/software/libiconv/
126[CTAN]: http://www.ctan.org "Comprehensive TeX Archive Network"
127[TeX Live]: http://www.tug.org/texlive/
128[MacTeX]: http://www.tug.org/mactex/
130Options
131=======
133General options
134---------------
136`-f` *FORMAT*, `-r` *FORMAT*, `--from=`*FORMAT*, `--read=`*FORMAT*
137: Specify input format. *FORMAT* can be `native` (native Haskell),
138 `json` (JSON version of native AST), `markdown` (markdown),
139 `textile` (Textile), `rst` (reStructuredText), `html` (HTML),
140 or `latex` (LaTeX). If `+lhs` is appended to `markdown`, `rst`,
141 `latex`, the input will be treated as literate Haskell source:
142 see [Literate Haskell support](#literate-haskell-support),
143 below.
145`-t` *FORMAT*, `-w` *FORMAT*, `--to=`*FORMAT*, `--write=`*FORMAT*
146: Specify output format. *FORMAT* can be `native` (native Haskell),
147 `json` (JSON version of native AST), `plain` (plain text),
148 `markdown` (markdown), `rst` (reStructuredText), `html` (XHTML 1),
149 `html5` (HTML 5), `latex` (LaTeX), `beamer` (LaTeX beamer slide show),
150 `context` (ConTeXt), `man` (groff man), `mediawiki` (MediaWiki markup),
151 `textile` (Textile), `org` (Emacs Org-Mode), `texinfo` (GNU Texinfo),
152 `docbook` (DocBook XML), `opendocument` (OpenDocument XML), `odt`
153 (OpenOffice text document), `docx` (Word docx), `epub` (EPUB book),
154 `asciidoc` (AsciiDoc), `slidy` (Slidy HTML and javascript slide show),
155 `dzslides` (HTML5 + javascript slide show), `s5` (S5 HTML and javascript
156 slide show), or `rtf` (rich text format). Note that `odt` and `epub`
157 output will not be directed to *stdout*; an output filename must
158 be specified using the `-o/--output` option. If `+lhs` is appended
159 to `markdown`, `rst`, `latex`, `beamer`, `html`, or `html5`, the output
160 will be rendered as literate Haskell source: see [Literate Haskell
161 support](#literate-haskell-support), below.
163`-o` *FILE*, `--output=`*FILE*
164: Write output to *FILE* instead of *stdout*. If *FILE* is
165 `-`, output will go to *stdout*. (Exception: if the output
166 format is `odt`, `docx`, or `epub`, output to stdout is disabled.)
168`--data-dir=`*DIRECTORY*
169: Specify the user data directory to search for pandoc data files.
170 If this option is not specified, the default user data directory
171 will be used:
173 $HOME/.pandoc
175 in unix and
177 C:\Documents And Settings\USERNAME\Application Data\pandoc
179 in Windows. A `reference.odt`, `reference.docx`, `default.csl`,
180 `epub.css`, `templates`, `slidy`, or `s5` directory placed in this
181 directory will override pandoc's normal defaults.
183`-v`, `--version`
184: Print version.
186`-h`, `--help`
187: Show usage message.
189Reader options
190--------------
192`--strict`
193: Use strict markdown syntax, with no pandoc extensions or variants.
194 When the input format is HTML, this means that constructs that have no
195 equivalents in standard markdown (e.g. definition lists or strikeout
196 text) will be parsed as raw HTML.
198`-R`, `--parse-raw`
199: Parse untranslatable HTML codes and LaTeX environments as raw HTML
200 or LaTeX, instead of ignoring them. Affects only HTML and LaTeX
201 input. Raw HTML can be printed in markdown, reStructuredText, HTML, Slidy,
202 DZSlides, and S5 output; raw LaTeX can be printed in markdown,
203 reStructuredText, LaTeX, and ConTeXt output. The default is for the
204 readers to omit untranslatable HTML codes and LaTeX environments.
205 (The LaTeX reader does pass through untranslatable LaTeX *commands*,
206 even if `-R` is not specified.)
208`-S`, `--smart`
209: Produce typographically correct output, converting straight quotes
210 to curly quotes, `---` to em-dashes, `--` to en-dashes, and
211 `...` to ellipses. Nonbreaking spaces are inserted after certain
212 abbreviations, such as "Mr." (Note: This option is significant only when
213 the input format is `markdown` or `textile`. It is selected automatically
214 when the input format is `textile` or the output format is `latex` or
215 `context`.)
217`--old-dashes`
218: Selects the pandoc <= 1.8.2.1 behavior for parsing smart dashes: `-` before
219 a numeral is an en-dash, and `--` is an em-dash. This option is selected
220 automatically for `textile` input.
222`--base-header-level=`*NUMBER*
223: Specify the base level for headers (defaults to 1).
225`--indented-code-classes=`*CLASSES*
226: Specify classes to use for indented code blocks--for example,
227 `perl,numberLines` or `haskell`. Multiple classes may be separated
228 by spaces or commas.
230`--normalize`
231: Normalize the document after reading: merge adjacent
232 `Str` or `Emph` elements, for example, and remove repeated `Space`s.
234`-p`, `--preserve-tabs`
235: Preserve tabs instead of converting them to spaces (the default).
237`--tab-stop=`*NUMBER*
238: Specify the number of spaces per tab (default is 4).
240General writer options
241----------------------
243`-s`, `--standalone`
244: Produce output with an appropriate header and footer (e.g. a
245 standalone HTML, LaTeX, or RTF file, not a fragment). This option
246 is set automatically for `pdf`, `epub`, `docx`, and `odt` output.
248`--template=`*FILE*
249: Use *FILE* as a custom template for the generated document. Implies
250 `--standalone`. See [Templates](#templates) below for a description
251 of template syntax. If no extension is specified, an extension
252 corresponding to the writer will be added, so that `--template=special`
253 looks for `special.html` for HTML output. If the template is not
254 found, pandoc will search for it in the user data directory
255 (see `--data-dir`). If this option is not used, a default
256 template appropriate for the output format will be used (see
257 `-D/--print-default-template`).
259`-V` *KEY[=VAL]*, `--variable=`*KEY[:VAL]*
260: Set the template variable *KEY* to the value *VAL* when rendering the
261 document in standalone mode. This is generally only useful when the
262 `--template` option is used to specify a custom template, since
263 pandoc automatically sets the variables used in the default
264 templates. If no *VAL* is specified, the key will be given the
265 value `true`.
267`-D` *FORMAT*, `--print-default-template=`*FORMAT*
268: Print the default template for an output *FORMAT*. (See `-t`
269 for a list of possible *FORMAT*s.)
271`--no-wrap`
272: Disable text wrapping in output. By default, text is wrapped
273 appropriately for the output format.
275`--columns`=*NUMBER*
276: Specify length of lines in characters (for text wrapping).
278`--toc`, `--table-of-contents`
279: Include an automatically generated table of contents (or, in
280 the case of `latex`, `context`, and `rst`, an instruction to create
281 one) in the output document. This option has no effect on `man`,
282 `docbook`, `slidy`, or `s5` output.
284`--no-highlight`
285: Disables syntax highlighting for code blocks and inlines, even when
286 a language attribute is given.
288`--highlight-style`=*STYLE*
289: Specifies the coloring style to be used in highlighted source code.
290 Options are `pygments` (the default), `kate`, `monochrome`,
291 `espresso`, `haddock`, and `tango`.
293`-H` *FILE*, `--include-in-header=`*FILE*
294: Include contents of *FILE*, verbatim, at the end of the header.
295 This can be used, for example, to include special
296 CSS or javascript in HTML documents. This option can be used
297 repeatedly to include multiple files in the header. They will be
298 included in the order specified. Implies `--standalone`.
300`-B` *FILE*, `--include-before-body=`*FILE*
301: Include contents of *FILE*, verbatim, at the beginning of the
302 document body (e.g. after the `<body>` tag in HTML, or the
303 `\begin{document}` command in LaTeX). This can be used to include
304 navigation bars or banners in HTML documents. This option can be
305 used repeatedly to include multiple files. They will be included in
306 the order specified. Implies `--standalone`.
308`-A` *FILE*, `--include-after-body=`*FILE*
309: Include contents of *FILE*, verbatim, at the end of the document
310 body (before the `</body>` tag in HTML, or the
311 `\end{document}` command in LaTeX). This option can be be used
312 repeatedly to include multiple files. They will be included in the
313 order specified. Implies `--standalone`.
315Options affecting specific writers
316----------------------------------
318`--self-contained`
319: Produce a standalone HTML file with no external dependencies, using
320 `data:` URIs to incorporate the contents of linked scripts, stylesheets,
321 images, and videos. The resulting file should be "self-contained,"
322 in the sense that it needs no external files and no net access to be
323 displayed properly by a browser. This option works only with HTML output
324 formats, including `html`, `html5`, `html+lhs`, `html5+lhs`, `s5`,
325 `slidy`, and `dzslides`. Scripts, images, and stylesheets at absolute URLs
326 will be downloaded; those at relative URLs will be sought first relative
327 to the working directory, then relative to the user data directory (see
328 `--data-dir`), and finally relative to pandoc's default data directory.
330`--offline`
331: Deprecated synonym for `--self-contained`.
333`-5`, `--html5`
334: Produce HTML5 instead of HTML4. This option has no effect for writers
335 other than `html`. (*Deprecated:* Use the `html5` output format instead.)
337`--ascii`
338: Use only ascii characters in output. Currently supported only
339 for HTML output (which uses numerical entities instead of
340 UTF-8 when this option is selected).
342`--reference-links`
343: Use reference-style links, rather than inline links, in writing markdown
344 or reStructuredText. By default inline links are used.
346`--atx-headers`
347: Use ATX style headers in markdown output. The default is to use
348 setext-style headers for levels 1-2, and then ATX headers.
350`--chapters`
351: Treat top-level headers as chapters in LaTeX, ConTeXt, and DocBook
352 output. When the LaTeX template uses the report, book, or
353 memoir class, this option is implied. If `--beamer` is used,
354 top-level headers will become `\part{..}`.
356`-N`, `--number-sections`
357: Number section headings in LaTeX, ConTeXt, or HTML output.
358 By default, sections are not numbered.
360`--listings`
361: Use listings package for LaTeX code blocks
363`-i`, `--incremental`
364: Make list items in slide shows display incrementally (one by one).
365 The default is for lists to be displayed all at once.
367`--slide-level`=*NUMBER*
368: Specifies that headers with the specified level create
369 slides (for `beamer`, `s5`, `slidy`, `dzslides`). Headers
370 above this level in the hierarchy are used to divide the
371 slide show into sections; headers below this level create
372 subheads within a slide. The default is to set the slide level
373 based on the contents of the document; see
374 [Structuring the slide show](#structuring-the-slide-show), below.
376`--section-divs`
377: Wrap sections in `<div>` tags (or `<section>` tags in HTML5),
378 and attach identifiers to the enclosing `<div>` (or `<section>`)
379 rather than the header itself.
380 See [Section identifiers](#header-identifiers-in-html-latex-and-context), below.
382`--email-obfuscation=`*none|javascript|references*
383: Specify a method for obfuscating `mailto:` links in HTML documents.
384 *none* leaves `mailto:` links as they are. *javascript* obfuscates
385 them using javascript. *references* obfuscates them by printing their
386 letters as decimal or hexadecimal character references.
387 If `--strict` is specified, *references* is used regardless of the
388 presence of this option.
390`--id-prefix`=*STRING*
391: Specify a prefix to be added to all automatically generated identifiers
392 in HTML output. This is useful for preventing duplicate identifiers
393 when generating fragments to be included in other pages.
395`-T` *STRING*, `--title-prefix=`*STRING*
396: Specify *STRING* as a prefix at the beginning of the title
397 that appears in the HTML header (but not in the title as it
398 appears at the beginning of the HTML body). Implies
399 `--standalone`.
401`-c` *URL*, `--css=`*URL*
402: Link to a CSS style sheet.
404`--reference-odt=`*FILE*
405: Use the specified file as a style reference in producing an ODT.
406 For best results, the reference ODT should be a modified version
407 of an ODT produced using pandoc. The contents of the reference ODT
408 are ignored, but its stylesheets are used in the new ODT. If no
409 reference ODT is specified on the command line, pandoc will look
410 for a file `reference.odt` in the user data directory (see
411 `--data-dir`). If this is not found either, sensible defaults will be
412 used.
414`--reference-docx=`*FILE*
415: Use the specified file as a style reference in producing a docx file.
416 For best results, the reference docx should be a modified version
417 of a docx file produced using pandoc. The contents of the reference docx
418 are ignored, but its stylesheets are used in the new docx. If no
419 reference docx is specified on the command line, pandoc will look
420 for a file `reference.docx` in the user data directory (see
421 `--data-dir`). If this is not found either, sensible defaults will be
422 used.
424`--epub-stylesheet=`*FILE*
425: Use the specified CSS file to style the EPUB. If no stylesheet
426 is specified, pandoc will look for a file `epub.css` in the
427 user data directory (see `--data-dir`). If it is not
428 found there, sensible defaults will be used.
430`--epub-cover-image=`*FILE*
431: Use the specified image as the EPUB cover. It is recommended
432 that the image be less than 1000px in width and height.
434`--epub-metadata=`*FILE*
435: Look in the specified XML file for metadata for the EPUB.
436 The file should contain a series of Dublin Core elements,
437 as documented at <http://dublincore.org/documents/dces/>.
438 For example:
440 <dc:rights>Creative Commons</dc:rights>
441 <dc:language>es-AR</dc:language>
443 By default, pandoc will include the following metadata elements:
444 `<dc:title>` (from the document title), `<dc:creator>` (from the
445 document authors), `<dc:date>` (from the document date, which should
446 be in [ISO 8601 format]), `<dc:language>` (from the `lang`
447 variable, or, if is not set, the locale), and `<dc:identifier
448 id="BookId">` (a randomly generated UUID). Any of these may be
449 overridden by elements in the metadata file.
451`--epub-embed-font=`*FILE*
452: Embed the specified font in the EPUB. This option can be repeated
453 to embed multiple fonts. To use embedded fonts, you
454 will need to add declarations like the following to your CSS (see
455 ``--epub-stylesheet`):
457 @font-face {
458 font-family: DejaVuSans;
459 font-style: normal;
460 font-weight: normal;
461 src:url("DejaVuSans-Regular.ttf");
462 }
463 @font-face {
464 font-family: DejaVuSans;
465 font-style: normal;
466 font-weight: bold;
467 src:url("DejaVuSans-Bold.ttf");
468 }
469 @font-face {
470 font-family: DejaVuSans;
471 font-style: italic;
472 font-weight: normal;
473 src:url("DejaVuSans-Oblique.ttf");
474 }
475 @font-face {
476 font-family: DejaVuSans;
477 font-style: italic;
478 font-weight: bold;
479 src:url("DejaVuSans-BoldOblique.ttf");
480 }
481 body { font-family: "DejaVuSans"; }
483`--latex-engine=`*pdflatex|lualatex|xelatex*
484: Use the specified LaTeX engine when producing PDF output.
485 The default is `pdflatex`. If the engine is not in your PATH,
486 the full path of the engine may be specified here.
488Citations
489---------
491`--bibliography=`*FILE*
492: Specify bibliography database to be used in resolving
493 citations. The database type will be determined from the
494 extension of *FILE*, which may be `.mods` (MODS format),
495 `.bib` (BibTeX/BibLaTeX format),
496 `.ris` (RIS format), `.enl` (EndNote format),
497 `.xml` (EndNote XML format), `.wos` (ISI format),
498 `.medline` (MEDLINE format), `.copac` (Copac format),
499 or `.json` (citeproc JSON). If you want to use multiple
500 bibliographies, just use this option repeatedly.
502`--csl=`*FILE*
503: Specify [CSL] style to be used in formatting citations and
504 the bibliography. If *FILE* is not found, pandoc will look
505 for it in
507 $HOME/.csl
509 in unix and
511 C:\Documents And Settings\USERNAME\Application Data\csl
513 in Windows. If the `--csl` option is not specified, pandoc
514 will use a default style: either `default.csl` in the
515 user data directory (see `--data-dir`), or, if that is
516 not present, the Chicago author-date style.
518`--citation-abbreviations=`*FILE*
519: Specify a file containing abbreviations for journal titles and
520 other bibliographic fields (indicated by setting `form="short"`
521 in the CSL node for the field). The format is described at
522 <http://citationstylist.org/2011/10/19/abbreviations-for-zotero-test-release/>.
523 Here is a short example:
525 { "default": {
526 "container-title": {
527 "Lloyd's Law Reports": "Lloyd's Rep",
528 "Estates Gazette": "EG",
529 "Scots Law Times": "SLT"
530 }
531 }
532 }
534`--natbib`
535: Use natbib for citations in LaTeX output.
537`--biblatex`
538: Use biblatex for citations in LaTeX output.
540Math rendering in HTML
541----------------------
543`-m` [*URL*], `--latexmathml`[=*URL*]
544: Use the [LaTeXMathML] script to display embedded TeX math in HTML output.
545 To insert a link to a local copy of the `LaTeXMathML.js` script,
546 provide a *URL*. If no *URL* is provided, the contents of the
547 script will be inserted directly into the HTML header, preserving
548 portability at the price of efficiency. If you plan to use math on
549 several pages, it is much better to link to a copy of the script,
550 so it can be cached.
552`--mathml`[=*URL*]
553: Convert TeX math to MathML (in `docbook` as well as `html` and `html5`).
554 In standalone `html` output, a small javascript (or a link to such a
555 script if a *URL* is supplied) will be inserted that allows the MathML to
556 be viewed on some browsers.
558`--jsmath`[=*URL*]
559: Use [jsMath] to display embedded TeX math in HTML output.
560 The *URL* should point to the jsMath load script (e.g.
561 `jsMath/easy/load.js`); if provided, it will be linked to in
562 the header of standalone HTML documents. If a *URL* is not provided,
563 no link to the jsMath load script will be inserted; it is then
564 up to the author to provide such a link in the HTML template.
566`--mathjax`[=*URL*]
567: Use [MathJax] to display embedded TeX math in HTML output.
568 The *URL* should point to the `MathJax.js` load script.
569 If a *URL* is not provided, a link to the MathJax CDN will
570 be inserted.
572`--gladtex`
573: Enclose TeX math in `<eq>` tags in HTML output. These can then
574 be processed by [gladTeX] to produce links to images of the typeset
575 formulas.
577`--mimetex`[=*URL*]
578: Render TeX math using the [mimeTeX] CGI script. If *URL* is not
579 specified, it is assumed that the script is at `/cgi-bin/mimetex.cgi`.
581`--webtex`[=*URL*]
582: Render TeX formulas using an external script that converts TeX
583 formulas to images. The formula will be concatenated with the URL
584 provided. If *URL* is not specified, the Google Chart API will be used.
586Options for wrapper scripts
587---------------------------
589`--dump-args`
590: Print information about command-line arguments to *stdout*, then exit.
591 This option is intended primarily for use in wrapper scripts.
592 The first line of output contains the name of the output file specified
593 with the `-o` option, or `-` (for *stdout*) if no output file was
594 specified. The remaining lines contain the command-line arguments,
595 one per line, in the order they appear. These do not include regular
596 Pandoc options and their arguments, but do include any options appearing
597 after a `--` separator at the end of the line.
599`--ignore-args`
600: Ignore command-line arguments (for use in wrapper scripts).
601 Regular Pandoc options are not ignored. Thus, for example,
603 pandoc --ignore-args -o foo.html -s foo.txt -- -e latin1
605 is equivalent to
607 pandoc -o foo.html -s
609[LaTeXMathML]: http://math.etsu.edu/LaTeXMathML/
610[jsMath]: http://www.math.union.edu/~dpvc/jsmath/
611[MathJax]: http://www.mathjax.org/
612[gladTeX]: http://www.math.uio.no/~martingu/gladtex/index.html
613[mimeTeX]: http://www.forkosh.com/mimetex.html
614[CSL]: http://CitationStyles.org
616Templates
617=========
619When the `-s/--standalone` option is used, pandoc uses a template to
620add header and footer material that is needed for a self-standing
621document. To see the default template that is used, just type
623 pandoc -D FORMAT
625where `FORMAT` is the name of the output format. A custom template
626can be specified using the `--template` option. You can also override
627the system default templates for a given output format `FORMAT`
628by putting a file `templates/default.FORMAT` in the user data
629directory (see `--data-dir`, above). *Exceptions:* For `odt` output,
630customize the `default.opendocument` template. For `pdf` output,
631customize the `default.latex` template. For `epub` output, customize
632the `epub-page.html`, `epub-coverimage.html`, and `epub-titlepage.html`
633templates.
635Templates may contain *variables*. Variable names are sequences of
636alphanumerics, `-`, and `_`, starting with a letter. A variable name
637surrounded by `$` signs will be replaced by its value. For example,
638the string `$title$` in
640 <title>$title$</title>
642will be replaced by the document title.
644To write a literal `$` in a template, use `$$`.
646Some variables are set automatically by pandoc. These vary somewhat
647depending on the output format, but include:
649`header-includes`
650: contents specified by `-H/--include-in-header` (may have multiple
651 values)
652`toc`
653: non-null value if `--toc/--table-of-contents` was specified
654`include-before`
655: contents specified by `-B/--include-before-body` (may have
656 multiple values)
657`include-after`
658: contents specified by `-A/--include-after-body` (may have
659 multiple values)
660`body`
661: body of document
662`title`
663: title of document, as specified in title block
664`author`
665: author of document, as specified in title block (may have
666 multiple values)
667`date`
668: date of document, as specified in title block
669`lang`
670: language code for HTML or LaTeX documents
671`slidy-url`
672: base URL for Slidy documents (defaults to
673 `http://www.w3.org/Talks/Tools/Slidy2`)
674`s5-url`
675: base URL for S5 documents (defaults to `ui/default`)
676`fontsize`
677: font size (10pt, 11pt, 12pt) for LaTeX documents
678`documentclass`
679: document class for LaTeX documents
680`theme`
681: theme for LaTeX beamer documents
682`colortheme`
683: colortheme for LaTeX beamer documents
685Variables may be set at the command line using the `-V/--variable`
686option. This allows users to include custom variables in their
687templates.
689Templates may contain conditionals. The syntax is as follows:
691 $if(variable)$
692 X
693 $else$
694 Y
695 $endif$
697This will include `X` in the template if `variable` has a non-null
698value; otherwise it will include `Y`. `X` and `Y` are placeholders for
699any valid template text, and may include interpolated variables or other
700conditionals. The `$else$` section may be omitted.
702When variables can have multiple values (for example, `author` in
703a multi-author document), you can use the `$for$` keyword:
705 $for(author)$
706 <meta name="author" content="$author$" />
707 $endfor$
709You can optionally specify a separator to be used between
710consecutive items:
712 $for(author)$$author$$sep$, $endfor$
714If you use custom templates, you may need to revise them as pandoc
715changes. We recommend tracking the changes in the default templates,
716and modifying your custom templates accordingly. An easy way to do this
717is to fork the pandoc-templates repository
718(<http://github.com/jgm/pandoc-templates>) and merge in changes after each
719pandoc release.
721Pandoc's markdown
722=================
724Pandoc understands an extended and slightly revised version of
725John Gruber's [markdown] syntax. This document explains the syntax,
726noting differences from standard markdown. Except where noted, these
727differences can be suppressed by specifying the `--strict` command-line
728option.
730Philosophy
731----------
733Markdown is designed to be easy to write, and, even more importantly,
734easy to read:
736> A Markdown-formatted document should be publishable as-is, as plain
737> text, without looking like it's been marked up with tags or formatting
738> instructions.
739> -- [John Gruber](http://daringfireball.net/projects/markdown/syntax#philosophy)
741This principle has guided pandoc's decisions in finding syntax for
742tables, footnotes, and other extensions.
744There is, however, one respect in which pandoc's aims are different
745from the original aims of markdown. Whereas markdown was originally
746designed with HTML generation in mind, pandoc is designed for multiple
747output formats. Thus, while pandoc allows the embedding of raw HTML,
748it discourages it, and provides other, non-HTMLish ways of representing
749important document elements like definition lists, tables, mathematics, and
750footnotes.
752Paragraphs
753----------
755A paragraph is one or more lines of text followed by one or more blank line.
756Newlines are treated as spaces, so you can reflow your paragraphs as you like.
757If you need a hard line break, put two or more spaces at the end of a line,
758or type a backslash followed by a newline.
760Headers
761-------
763There are two kinds of headers, Setext and atx.
765### Setext-style headers ###
767A setext-style header is a line of text "underlined" with a row of `=` signs
768(for a level one header) of `-` signs (for a level two header):
770 A level-one header
771 ==================
773 A level-two header
774 ------------------
776The header text can contain inline formatting, such as emphasis (see
777[Inline formatting](#inline-formatting), below).
780### Atx-style headers ###
782An Atx-style header consists of one to six `#` signs and a line of
783text, optionally followed by any number of `#` signs. The number of
784`#` signs at the beginning of the line is the header level:
786 ## A level-two header
788 ### A level-three header ###
790As with setext-style headers, the header text can contain formatting:
792 # A level-one header with a [link](/url) and *emphasis*
794Standard markdown syntax does not require a blank line before a header.
795Pandoc does require this (except, of course, at the beginning of the
796document). The reason for the requirement is that it is all too easy for a
797`#` to end up at the beginning of a line by accident (perhaps through line
798wrapping). Consider, for example:
800 I like several of their flavors of ice cream:
801 #22, for example, and #5.
804### Header identifiers in HTML, LaTeX, and ConTeXt ###
806*Pandoc extension*.
808Each header element in pandoc's HTML and ConTeXt output is given a
809unique identifier. This identifier is based on the text of the header.
810To derive the identifier from the header text,
812 - Remove all formatting, links, etc.
813 - Remove all punctuation, except underscores, hyphens, and periods.
814 - Replace all spaces and newlines with hyphens.
815 - Convert all alphabetic characters to lowercase.
816 - Remove everything up to the first letter (identifiers may
817 not begin with a number or punctuation mark).
818 - If nothing is left after this, use the identifier `section`.
820Thus, for example,
822 Header Identifier
823 ------------------------------- ----------------------------
824 Header identifiers in HTML `header-identifiers-in-html`
825 *Dogs*?--in *my* house? `dogs--in-my-house`
826 [HTML], [S5], or [RTF]? `html-s5-or-rtf`
827 3. Applications `applications`
828 33 `section`
830These rules should, in most cases, allow one to determine the identifier
831from the header text. The exception is when several headers have the
832same text; in this case, the first will get an identifier as described
833above; the second will get the same identifier with `-1` appended; the
834third with `-2`; and so on.
836These identifiers are used to provide link targets in the table of
837contents generated by the `--toc|--table-of-contents` option. They
838also make it easy to provide links from one section of a document to
839another. A link to this section, for example, might look like this:
841 See the section on
842 [header identifiers](#header-identifiers-in-html).
844Note, however, that this method of providing links to sections works
845only in HTML, LaTeX, and ConTeXt formats.
847If the `--section-divs` option is specified, then each section will
848be wrapped in a `div` (or a `section`, if `--html5` was specified),
849and the identifier will be attached to the enclosing `<div>`
850(or `<section>`) tag rather than the header itself. This allows entire
851sections to be manipulated using javascript or treated differently in
852CSS.
855Block quotations
856----------------
858Markdown uses email conventions for quoting blocks of text.
859A block quotation is one or more paragraphs or other block elements
860(such as lists or headers), with each line preceded by a `>` character
861and a space. (The `>` need not start at the left margin, but it should
862not be indented more than three spaces.)
864 > This is a block quote. This
865 > paragraph has two lines.
866 >
867 > 1. This is a list inside a block quote.
868 > 2. Second item.
870A "lazy" form, which requires the `>` character only on the first
871line of each block, is also allowed:
873 > This is a block quote. This
874 paragraph has two lines.
876 > 1. This is a list inside a block quote.
877 2. Second item.
879Among the block elements that can be contained in a block quote are
880other block quotes. That is, block quotes can be nested:
882 > This is a block quote.
883 >
884 > > A block quote within a block quote.
886Standard markdown syntax does not require a blank line before a block
887quote. Pandoc does require this (except, of course, at the beginning of the
888document). The reason for the requirement is that it is all too easy for a
889`>` to end up at the beginning of a line by accident (perhaps through line
890wrapping). So, unless `--strict` is used, the following does not produce
891a nested block quote in pandoc:
893 > This is a block quote.
894 >> Nested.
897Verbatim (code) blocks
898----------------------
900### Indented code blocks ###
902A block of text indented four spaces (or one tab) is treated as verbatim
903text: that is, special characters do not trigger special formatting,
904and all spaces and line breaks are preserved. For example,
906 if (a > 3) {
907 moveShip(5 * gravity, DOWN);
908 }
910The initial (four space or one tab) indentation is not considered part
911of the verbatim text, and is removed in the output.
913Note: blank lines in the verbatim text need not begin with four spaces.
916### Delimited code blocks ###
918*Pandoc extension*.
920In addition to standard indented code blocks, Pandoc supports
921*delimited* code blocks. These begin with a row of three or more
922tildes (`~`) or backticks (`` ` ``) and end with a row of tildes or
923backticks that must be at least as long as the starting row. Everything
924between these lines is treated as code. No indentation is necessary:
926 ~~~~~~~
927 if (a > 3) {
928 moveShip(5 * gravity, DOWN);
929 }
930 ~~~~~~~
932Like regular code blocks, delimited code blocks must be separated
933from surrounding text by blank lines.
935If the code itself contains a row of tildes or backticks, just use a longer
936row of tildes or backticks at the start and end:
938 ~~~~~~~~~~~~~~~~
939 ~~~~~~~~~~
940 code including tildes
941 ~~~~~~~~~~
942 ~~~~~~~~~~~~~~~~
944Optionally, you may attach attributes to the code block using
945this syntax:
947 ~~~~ {#mycode .haskell .numberLines startFrom="100"}
948 qsort [] = []
949 qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
950 qsort (filter (>= x) xs)
951 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
953Here `mycode` is an identifier, `haskell` and `numberLines` are classes, and
954`startFrom` is an attribute with value `100`. Some output formats can use this
955information to do syntax highlighting. Currently, the only output formats
956that uses this information are HTML and LaTeX. If highlighting is supported
957for your output format and language, then the code block above will appear
958highlighted, with numbered lines. (To see which languages are supported, do
959`pandoc --version`.) Otherwise, the code block above will appear as follows:
961 <pre id="mycode" class="haskell numberLines" startFrom="100">
962 <code>
963 ...
964 </code>
965 </pre>
967A shortcut form can also be used for specifying the language of
968the code block:
970 ```haskell
971 qsort [] = []
972 ```
974This is equivalent to:
976 ``` {.haskell}
977 qsort [] = []
978 ```
980To prevent all highlighting, use the `--no-highlight` flag.
981To set the highlighting style, use `--highlight-style`.
983Lists
984-----
986### Bullet lists ###
988A bullet list is a list of bulleted list items. A bulleted list
989item begins with a bullet (`*`, `+`, or `-`). Here is a simple
990example:
992 * one
993 * two
994 * three
996This will produce a "compact" list. If you want a "loose" list, in which
997each item is formatted as a paragraph, put spaces between the items:
999 * one
1001 * two
1003 * three
1005The bullets need not be flush with the left margin; they may be
1006indented one, two, or three spaces. The bullet must be followed
1007by whitespace.
1009List items look best if subsequent lines are flush with the first
1010line (after the bullet):
1012 * here is my first
1013 list item.
1014 * and my second.
1016But markdown also allows a "lazy" format:
1018 * here is my first
1019 list item.
1020 * and my second.
1022### The four-space rule ###
1024A list item may contain multiple paragraphs and other block-level
1025content. However, subsequent paragraphs must be preceded by a blank line
1026and indented four spaces or a tab. The list will look better if the first
1027paragraph is aligned with the rest:
1029 * First paragraph.
1031 Continued.
1033 * Second paragraph. With a code block, which must be indented
1034 eight spaces:
1036 { code }
1038List items may include other lists. In this case the preceding blank
1039line is optional. The nested list must be indented four spaces or
1040one tab:
1042 * fruits
1043 + apples
1044 - macintosh
1045 - red delicious
1046 + pears
1047 + peaches
1048 * vegetables
1049 + brocolli
1050 + chard
1052As noted above, markdown allows you to write list items "lazily," instead of
1053indenting continuation lines. However, if there are multiple paragraphs or
1054other blocks in a list item, the first line of each must be indented.
1056 + A lazy, lazy, list
1057 item.
1059 + Another one; this looks
1060 bad but is legal.
1062 Second paragraph of second
1063 list item.
1065**Note:** Although the four-space rule for continuation paragraphs
1066comes from the official [markdown syntax guide], the reference implementation,
1067`Markdown.pl`, does not follow it. So pandoc will give different results than
1068`Markdown.pl` when authors have indented continuation paragraphs fewer than
1069four spaces.
1071The [markdown syntax guide] is not explicit whether the four-space
1072rule applies to *all* block-level content in a list item; it only
1073mentions paragraphs and code blocks. But it implies that the rule
1074applies to all block-level content (including nested lists), and
1075pandoc interprets it that way.
1077 [markdown syntax guide]:
1078 http://daringfireball.net/projects/markdown/syntax#list
1080### Ordered lists ###
1082Ordered lists work just like bulleted lists, except that the items
1083begin with enumerators rather than bullets.
1085In standard markdown, enumerators are decimal numbers followed
1086by a period and a space. The numbers themselves are ignored, so
1087there is no difference between this list:
1089 1. one
1090 2. two
1091 3. three
1093and this one:
1095 5. one
1096 7. two
1097 1. three
1099*Pandoc extension*.
1101Unlike standard markdown, Pandoc allows ordered list items to be marked
1102with uppercase and lowercase letters and roman numerals, in addition to
1103arabic numerals. List markers may be enclosed in parentheses or followed by a
1104single right-parentheses or period. They must be separated from the
1105text that follows by at least one space, and, if the list marker is a
1106capital letter with a period, by at least two spaces.[^2]
1108[^2]: The point of this rule is to ensure that normal paragraphs
1109 starting with people's initials, like
1111 B. Russell was an English philosopher.
1113 do not get treated as list items.
1115 This rule will not prevent
1117 (C) 2007 Joe Smith
1119 from being interpreted as a list item. In this case, a backslash
1120 escape can be used:
1122 (C\) 2007 Joe Smith
1124Pandoc also pays attention to the type of list marker used, and to the
1125starting number, and both of these are preserved where possible in the
1126output format. Thus, the following yields a list with numbers followed
1127by a single parenthesis, starting with 9, and a sublist with lowercase
1128roman numerals:
1130 9) Ninth
1131 10) Tenth
1132 11) Eleventh
1133 i. subone
1134 ii. subtwo
1135 iii. subthree
1137Note that Pandoc pays attention only to the *starting* marker in a list.
1138So, the following yields a list numbered sequentially starting from 2:
1140 (2) Two
1141 (5) Three
1142 1. Four
1143 * Five
1145If default list markers are desired, use `#.`:
1147 #. one
1148 #. two
1149 #. three
1152### Definition lists ###
1154*Pandoc extension*.
1156Pandoc supports definition lists, using a syntax inspired by
1157[PHP Markdown Extra] and [reStructuredText]:[^3]
1159 Term 1
1161 : Definition 1
1163 Term 2 with *inline markup*
1165 : Definition 2
1167 { some code, part of Definition 2 }
1169 Third paragraph of definition 2.
1171Each term must fit on one line, which may optionally be followed by
1172a blank line, and must be followed by one or more definitions.
1173A definition begins with a colon or tilde, which may be indented one
1174or two spaces. The body of the definition (including the first line,
1175aside from the colon or tilde) should be indented four spaces. A term may have
1176multiple definitions, and each definition may consist of one or more block
1177elements (paragraph, code block, list, etc.), each indented four spaces or one
1178tab stop.
1180If you leave space after the definition (as in the example above),
1181the blocks of the definitions will be considered paragraphs. In some
1182output formats, this will mean greater spacing between term/definition
1183pairs. For a compact definition list, do not leave space between the
1184definition and the next term:
1186 Term 1
1187 ~ Definition 1
1188 Term 2
1189 ~ Definition 2a
1190 ~ Definition 2b
1192[^3]: I have also been influenced by the suggestions of [David Wheeler](http://www.justatheory.com/computers/markup/modest-markdown-proposal.html).
1194[PHP Markdown Extra]: http://www.michelf.com/projects/php-markdown/extra/
1197### Numbered example lists ###
1199*Pandoc extension*.
1201The special list marker `@` can be used for sequentially numbered
1202examples. The first list item with a `@` marker will be numbered '1',
1203the next '2', and so on, throughout the document. The numbered examples
1204need not occur in a single list; each new list using `@` will take up
1205where the last stopped. So, for example:
1207 (@) My first example will be numbered (1).
1208 (@) My second example will be numbered (2).
1210 Explanation of examples.
1212 (@) My third example will be numbered (3).
1214Numbered examples can be labeled and referred to elsewhere in the
1215document:
1217 (@good) This is a good example.
1219 As (@good) illustrates, ...
1221The label can be any string of alphanumeric characters, underscores,
1222or hyphens.
1225### Compact and loose lists ###
1227Pandoc behaves differently from `Markdown.pl` on some "edge
1228cases" involving lists. Consider this source:
1230 + First
1231 + Second:
1232 - Fee
1233 - Fie
1234 - Foe
1236 + Third
1238Pandoc transforms this into a "compact list" (with no `<p>` tags around
1239"First", "Second", or "Third"), while markdown puts `<p>` tags around
1240"Second" and "Third" (but not "First"), because of the blank space
1241around "Third". Pandoc follows a simple rule: if the text is followed by
1242a blank line, it is treated as a paragraph. Since "Second" is followed
1243by a list, and not a blank line, it isn't treated as a paragraph. The
1244fact that the list is followed by a blank line is irrelevant. (Note:
1245Pandoc works this way even when the `--strict` option is specified. This
1246behavior is consistent with the official markdown syntax description,
1247even though it is different from that of `Markdown.pl`.)
1250### Ending a list ###
1252What if you want to put an indented code block after a list?
1254 - item one
1255 - item two
1257 { my code block }
1259Trouble! Here pandoc (like other markdown implementations) will treat
1260`{ my code block }` as the second paragraph of item two, and not as
1261a code block.
1263To "cut off" the list after item two, you can insert some non-indented
1264content, like an HTML comment, which won't produce visible output in
1265any format:
1267 - item one
1268 - item two
1270 <!-- end of list -->
1272 { my code block }
1274You can use the same trick if you want two consecutive lists instead
1275of one big list:
1277 1. one
1278 2. two
1279 3. three
1281 <!-- -->
1283 1. uno
1284 2. dos
1285 3. tres
1287Horizontal rules
1288----------------
1290A line containing a row of three or more `*`, `-`, or `_` characters
1291(optionally separated by spaces) produces a horizontal rule:
1293 * * * *
1295 ---------------
1298Tables
1299------
1301*Pandoc extension*.
1303Three kinds of tables may be used. All three kinds presuppose the use of
1304a fixed-width font, such as Courier.
1306**Simple tables** look like this:
1308 Right Left Center Default
1309 ------- ------ ---------- -------
1310 12 12 12 12
1311 123 123 123 123
1312 1 1 1 1
1314 Table: Demonstration of simple table syntax.
1316The headers and table rows must each fit on one line. Column
1317alignments are determined by the position of the header text relative
1318to the dashed line below it:[^4]
1320 - If the dashed line is flush with the header text on the right side
1321 but extends beyond it on the left, the column is right-aligned.
1322 - If the dashed line is flush with the header text on the left side
1323 but extends beyond it on the right, the column is left-aligned.
1324 - If the dashed line extends beyond the header text on both sides,
1325 the column is centered.
1326 - If the dashed line is flush with the header text on both sides,
1327 the default alignment is used (in most cases, this will be left).
1329[^4]: This scheme is due to Michel Fortin, who proposed it on the
1330 [Markdown discussion list](http://six.pairlist.net/pipermail/markdown-discuss/2005-March/001097.html).
1332The table must end with a blank line, or a line of dashes followed by
1333a blank line. A caption may optionally be provided (as illustrated in
1334the example above). A caption is a paragraph beginning with the string
1335`Table:` (or just `:`), which will be stripped off. It may appear either
1336before or after the table.
1338The column headers may be omitted, provided a dashed line is used
1339to end the table. For example:
1341 ------- ------ ---------- -------
1342 12 12 12 12
1343 123 123 123 123
1344 1 1 1 1
1345 ------- ------ ---------- -------
1347When headers are omitted, column alignments are determined on the basis
1348of the first line of the table body. So, in the tables above, the columns
1349would be right, left, center, and right aligned, respectively.
1351**Multiline tables** allow headers and table rows to span multiple lines
1352of text (but cells that span multiple columns or rows of the table are
1353not supported). Here is an example:
1355 -------------------------------------------------------------
1356 Centered Default Right Left
1357 Header Aligned Aligned Aligned
1358 ----------- ------- --------------- -------------------------
1359 First row 12.0 Example of a row that
1360 spans multiple lines.
1362 Second row 5.0 Here's another one. Note
1363 the blank line between
1364 rows.
1365 -------------------------------------------------------------
1367 Table: Here's the caption. It, too, may span
1368 multiple lines.
1370These work like simple tables, but with the following differences:
1372 - They must begin with a row of dashes, before the header text
1373 (unless the headers are omitted).
1374 - They must end with a row of dashes, then a blank line.
1375 - The rows must be separated by blank lines.
1377In multiline tables, the table parser pays attention to the widths of
1378the columns, and the writers try to reproduce these relative widths in
1379the output. So, if you find that one of the columns is too narrow in the
1380output, try widening it in the markdown source.
1382Headers may be omitted in multiline tables as well as simple tables:
1384 ----------- ------- --------------- -------------------------
1385 First row 12.0 Example of a row that
1386 spans multiple lines.
1388 Second row 5.0 Here's another one. Note
1389 the blank line between
1390 rows.
1391 -------------------------------------------------------------
1393 : Here's a multiline table without headers.
1395It is possible for a multiline table to have just one row, but the row
1396should be followed by a blank line (and then the row of dashes that ends
1397the table), or the table may be interpreted as a simple table.
1399**Grid tables** look like this:
1401 : Sample grid table.
1403 +---------------+---------------+--------------------+
1404 | Fruit | Price | Advantages |
1405 +===============+===============+====================+
1406 | Bananas | $1.34 | - built-in wrapper |
1407 | | | - bright color |
1408 +---------------+---------------+--------------------+
1409 | Oranges | $2.10 | - cures scurvy |
1410 | | | - tasty |
1411 +---------------+---------------+--------------------+
1413The row of `=`s separates the header from the table body, and can be
1414omitted for a headerless table. The cells of grid tables may contain
1415arbitrary block elements (multiple paragraphs, code blocks, lists,
1416etc.). Alignments are not supported, nor are cells that span multiple
1417columns or rows. Grid tables can be created easily using [Emacs table mode].
1419 [Emacs table mode]: http://table.sourceforge.net/
1422Title block
1423-----------
1425*Pandoc extension*.
1427If the file begins with a title block
1429 % title
1430 % author(s) (separated by semicolons)
1431 % date
1433it will be parsed as bibliographic information, not regular text. (It
1434will be used, for example, in the title of standalone LaTeX or HTML
1435output.) The block may contain just a title, a title and an author,
1436or all three elements. If you want to include an author but no
1437title, or a title and a date but no author, you need a blank line:
1440 % Author
1442 % My title
1444 % June 15, 2006
1446The title may occupy multiple lines, but continuation lines must
1447begin with leading space, thus:
1449 % My title
1450 on multiple lines
1452If a document has multiple authors, the authors may be put on
1453separate lines with leading space, or separated by semicolons, or
1454both. So, all of the following are equivalent:
1456 % Author One
1457 Author Two
1459 % Author One; Author Two
1461 % Author One;
1462 Author Two
1464The date must fit on one line.
1466All three metadata fields may contain standard inline formatting
1467(italics, links, footnotes, etc.).
1469Title blocks will always be parsed, but they will affect the output only
1470when the `--standalone` (`-s`) option is chosen. In HTML output, titles
1471will appear twice: once in the document head -- this is the title that
1472will appear at the top of the window in a browser -- and once at the
1473beginning of the document body. The title in the document head can have
1474an optional prefix attached (`--title-prefix` or `-T` option). The title
1475in the body appears as an H1 element with class "title", so it can be
1476suppressed or reformatted with CSS. If a title prefix is specified with
1477`-T` and no title block appears in the document, the title prefix will
1478be used by itself as the HTML title.
1480The man page writer extracts a title, man page section number, and
1481other header and footer information from the title line. The title
1482is assumed to be the first word on the title line, which may optionally
1483end with a (single-digit) section number in parentheses. (There should
1484be no space between the title and the parentheses.) Anything after
1485this is assumed to be additional footer and header text. A single pipe
1486character (`|`) should be used to separate the footer text from the header
1487text. Thus,
1489 % PANDOC(1)
1491will yield a man page with the title `PANDOC` and section 1.
1493 % PANDOC(1) Pandoc User Manuals
1495will also have "Pandoc User Manuals" in the footer.
1497 % PANDOC(1) Pandoc User Manuals | Version 4.0
1499will also have "Version 4.0" in the header.
1502Backslash escapes
1503-----------------
1505Except inside a code block or inline code, any punctuation or space
1506character preceded by a backslash will be treated literally, even if it
1507would normally indicate formatting. Thus, for example, if one writes
1509 *\*hello\**
1511one will get
1513 <em>*hello*</em>
1515instead of
1517 <strong>hello</strong>
1519This rule is easier to remember than standard markdown's rule,
1520which allows only the following characters to be backslash-escaped:
1522 \`*_{}[]()>#+-.!
1524(However, if the `--strict` option is supplied, the standard
1525markdown rule will be used.)
1527A backslash-escaped space is parsed as a nonbreaking space. It will
1528appear in TeX output as `~` and in HTML and XML as `\&#160;` or
1529`\&nbsp;`.
1531A backslash-escaped newline (i.e. a backslash occurring at the end of
1532a line) is parsed as a hard line break. It will appear in TeX output as
1533`\\` and in HTML as `<br />`. This is a nice alternative to
1534markdown's "invisible" way of indicating hard line breaks using
1535two trailing spaces on a line.
1537Backslash escapes do not work in verbatim contexts.
1539Smart punctuation
1540-----------------
1542*Pandoc extension*.
1544If the `--smart` option is specified, pandoc will produce typographically
1545correct output, converting straight quotes to curly quotes, `---` to
1546em-dashes, `--` to en-dashes, and `...` to ellipses. Nonbreaking spaces
1547are inserted after certain abbreviations, such as "Mr."
1549Note: if your LaTeX template uses the `csquotes` package, pandoc will
1550detect automatically this and use `\enquote{...}` for quoted text.
1552Inline formatting
1553-----------------
1555### Emphasis ###
1557To *emphasize* some text, surround it with `*`s or `_`, like this:
1559 This text is _emphasized with underscores_, and this
1560 is *emphasized with asterisks*.
1562Double `*` or `_` produces **strong emphasis**:
1564 This is **strong emphasis** and __with underscores__.
1566A `*` or `_` character surrounded by spaces, or backslash-escaped,
1567will not trigger emphasis:
1569 This is * not emphasized *, and \*neither is this\*.
1571Because `_` is sometimes used inside words and identifiers,
1572pandoc does not interpret a `_` surrounded by alphanumeric
1573characters as an emphasis marker. If you want to emphasize
1574just part of a word, use `*`:
1576 feas*ible*, not feas*able*.
1579### Strikeout ###
1581*Pandoc extension*.
1583To strikeout a section of text with a horizontal line, begin and end it
1584with `~~`. Thus, for example,
1586 This ~~is deleted text.~~
1589### Superscripts and subscripts ###
1591*Pandoc extension*.
1593Superscripts may be written by surrounding the superscripted text by `^`
1594characters; subscripts may be written by surrounding the subscripted
1595text by `~` characters. Thus, for example,
1597 H~2~O is a liquid. 2^10^ is 1024.
1599If the superscripted or subscripted text contains spaces, these spaces
1600must be escaped with backslashes. (This is to prevent accidental
1601superscripting and subscripting through the ordinary use of `~` and `^`.)
1602Thus, if you want the letter P with 'a cat' in subscripts, use
1603`P~a\ cat~`, not `P~a cat~`.
1606### Verbatim ###
1608To make a short span of text verbatim, put it inside backticks:
1610 What is the difference between `>>=` and `>>`?
1612If the verbatim text includes a backtick, use double backticks:
1614 Here is a literal backtick `` ` ``.
1616(The spaces after the opening backticks and before the closing
1617backticks will be ignored.)
1619The general rule is that a verbatim span starts with a string
1620of consecutive backticks (optionally followed by a space)
1621and ends with a string of the same number of backticks (optionally
1622preceded by a space).
1624Note that backslash-escapes (and other markdown constructs) do not
1625work in verbatim contexts:
1627 This is a backslash followed by an asterisk: `\*`.
1630Math
1631----
1633*Pandoc extension*.
1635Anything between two `$` characters will be treated as TeX math. The
1636opening `$` must have a character immediately to its right, while the
1637closing `$` must have a character immediately to its left. Thus,
1638`$20,000 and $30,000` won't parse as math. If for some reason
1639you need to enclose text in literal `$` characters, backslash-escape
1640them and they won't be treated as math delimiters.
1642TeX math will be printed in all output formats. How it is rendered
1643depends on the output format:
1645Markdown, reStructuredText, LaTeX, Org-Mode, ConTeXt
1646 ~ It will appear verbatim between `$` characters.
1648reStructuredText
1649 ~ It will be rendered using an interpreted text role `:math:`, as described
1650 [here](http://www.american.edu/econ/itex2mml/mathhack.rst).
1652AsciiDoc
1653 ~ It will be rendered as `latexmath:[...]`.
1655Texinfo
1656 ~ It will be rendered inside a `@math` command.
1658groff man
1659 ~ It will be rendered verbatim without `$`'s.
1661MediaWiki
1662 ~ It will be rendered inside `<math>` tags.
1664Textile
1665 ~ It will be rendered inside `<span class="math">` tags.
1667RTF, OpenDocument, ODT
1668 ~ It will be rendered, if possible, using unicode characters,
1669 and will otherwise appear verbatim.
1671Docbook
1672 ~ If the `--mathml` flag is used, it will be rendered using mathml
1673 in an `inlineequation` or `informalequation` tag. Otherwise it
1674 will be rendered, if possible, using unicode characters.
1676Docx
1677 ~ It will be rendered using OMML math markup.
1679HTML, Slidy, DZSlides, S5, EPUB
1680 ~ The way math is rendered in HTML will depend on the
1681 command-line options selected:
1683 1. The default is to render TeX math as far as possible using unicode
1684 characters, as with RTF, DocBook, and OpenDocument output. Formulas
1685 are put inside a `span` with `class="math"`, so that they may be
1686 styled differently from the surrounding text if needed.
1688 2. If the `--latexmathml` option is used, TeX math will be displayed
1689 between $ or $$ characters and put in `<span>` tags with class `LaTeX`.
1690 The [LaTeXMathML] script will be used to render it as formulas.
1691 (This trick does not work in all browsers, but it works in Firefox.
1692 In browsers that do not support LaTeXMathML, TeX math will appear
1693 verbatim between $ characters.)
1695 3. If the `--jsmath` option is used, TeX math will be put inside
1696 `<span>` tags (for inline math) or `<div>` tags (for display math)
1697 with class `math`. The [jsMath] script will be used to render
1698 it.
1700 4. If the `--mimetex` option is used, the [mimeTeX] CGI script will
1701 be called to generate images for each TeX formula. This should
1702 work in all browsers. The `--mimetex` option takes an optional URL
1703 as argument. If no URL is specified, it will be assumed that the
1704 mimeTeX CGI script is at `/cgi-bin/mimetex.cgi`.
1706 5. If the `--gladtex` option is used, TeX formulas will be enclosed
1707 in `<eq>` tags in the HTML output. The resulting `htex` file may then
1708 be processed by [gladTeX], which will produce image files for each
1709 formula and an `html` file with links to these images. So, the
1710 procedure is:
1712 pandoc -s --gladtex myfile.txt -o myfile.htex
1713 gladtex -d myfile-images myfile.htex
1714 # produces myfile.html and images in myfile-images
1716 6. If the `--webtex` option is used, TeX formulas will be converted
1717 to `<img>` tags that link to an external script that converts
1718 formulas to images. The formula will be URL-encoded and concatenated
1719 with the URL provided. If no URL is specified, the Google Chart
1720 API will be used (`http://chart.apis.google.com/chart?cht=tx&chl=`).
1723Raw HTML
1724--------
1726Markdown allows you to insert raw HTML (or DocBook) anywhere in a document
1727(except verbatim contexts, where `<`, `>`, and `&` are interpreted
1728literally).
1730The raw HTML is passed through unchanged in HTML, S5, Slidy, DZSlides, EPUB,
1731Markdown, and Textile output, and suppressed in other formats.
1733*Pandoc extension*.
1735Standard markdown allows you to include HTML "blocks": blocks
1736of HTML between balanced tags that are separated from the surrounding text
1737with blank lines, and start and end at the left margin. Within
1738these blocks, everything is interpreted as HTML, not markdown;
1739so (for example), `*` does not signify emphasis.
1741Pandoc behaves this way when `--strict` is specified; but by default,
1742pandoc interprets material between HTML block tags as markdown.
1743Thus, for example, Pandoc will turn
1745 <table>
1746 <tr>
1747 <td>*one*</td>
1748 <td>[a link](http://google.com)</td>
1749 </tr>
1750 </table>
1752into
1754 <table>
1755 <tr>
1756 <td><em>one</em></td>
1757 <td><a href="http://google.com">a link</a></td>
1758 </tr>
1759 </table>
1761whereas `Markdown.pl` will preserve it as is.
1763There is one exception to this rule: text between `<script>` and
1764`<style>` tags is not interpreted as markdown.
1766This departure from standard markdown should make it easier to mix
1767markdown with HTML block elements. For example, one can surround
1768a block of markdown text with `<div>` tags without preventing it
1769from being interpreted as markdown.
1771Raw TeX
1772-------
1774*Pandoc extension*.
1776In addition to raw HTML, pandoc allows raw LaTeX, TeX, and ConTeXt to be
1777included in a document. Inline TeX commands will be preserved and passed
1778unchanged to the LaTeX and ConTeXt writers. Thus, for example, you can use
1779LaTeX to include BibTeX citations:
1781 This result was proved in \cite{jones.1967}.
1783Note that in LaTeX environments, like
1785 \begin{tabular}{|l|l|}\hline
1786 Age & Frequency \\ \hline
1787 18--25 & 15 \\
1788 26--35 & 33 \\
1789 36--45 & 22 \\ \hline
1790 \end{tabular}
1792the material between the begin and end tags will be interpreted as raw
1793LaTeX, not as markdown.
1795Inline LaTeX is ignored in output formats other than Markdown, LaTeX,
1796and ConTeXt.
1798### Macros ###
1800For output formats other than LaTeX, pandoc will parse LaTeX `\newcommand` and
1801`\renewcommand` definitions and apply the resulting macros to all LaTeX
1802math. So, for example, the following will work in all output formats,
1803not just LaTeX:
1805 \newcommand{\tuple}[1]{\langle #1 \rangle}
1807 $\tuple{a, b, c}$
1809In LaTeX output, the `\newcommand` definition will simply be passed
1810unchanged to the output.
1813Links
1814-----
1816Markdown allows links to be specified in several ways.
1818### Automatic links ###
1820If you enclose a URL or email address in pointy brackets, it
1821will become a link:
1823 <http://google.com>
1824 <sam@green.eggs.ham>
1827### Inline links ###
1829An inline link consists of the link text in square brackets,
1830followed by the URL in parentheses. (Optionally, the URL can
1831be followed by a link title, in quotes.)
1833 This is an [inline link](/url), and here's [one with
1834 a title](http://fsf.org "click here for a good time!").
1836There can be no space between the bracketed part and the parenthesized part.
1837The link text can contain formatting (such as emphasis), but the title cannot.
1840### Reference links ###
1842An *explicit* reference link has two parts, the link itself and the link
1843definition, which may occur elsewhere in the document (either
1844before or after the link).
1846The link consists of link text in square brackets, followed by a label in
1847square brackets. (There can be space between the two.) The link definition
1848must begin at the left margin or indented no more than three spaces. It
1849consists of the bracketed label, followed by a colon and a space, followed by
1850the URL, and optionally (after a space) a link title either in quotes or in
1851parentheses.
1853Here are some examples:
1855 [my label 1]: /foo/bar.html "My title, optional"
1856 [my label 2]: /foo
1857 [my label 3]: http://fsf.org (The free software foundation)
1858 [my label 4]: /bar#special 'A title in single quotes'
1860The URL may optionally be surrounded by angle brackets:
1862 [my label 5]: <http://foo.bar.baz>
1864The title may go on the next line:
1866 [my label 3]: http://fsf.org
1867 "The free software foundation"
1869Note that link labels are not case sensitive. So, this will work:
1871 Here is [my link][FOO]
1873 [Foo]: /bar/baz
1875In an *implicit* reference link, the second pair of brackets is
1876empty, or omitted entirely:
1878 See [my website][], or [my website].
1880 [my website]: http://foo.bar.baz
1883Images
1884------
1886A link immediately preceded by a `!` will be treated as an image.
1887The link text will be used as the image's alt text:
1889 ![la lune](lalune.jpg "Voyage to the moon")
1891 ![movie reel]
1893 [movie reel]: movie.gif
1895### Pictures with captions ###
1897*Pandoc extension*.
1899An image occurring by itself in a paragraph will be rendered as
1900a figure with a caption.[^5] (In LaTeX, a figure environment will be
1901used; in HTML, the image will be placed in a `div` with class
1902`figure`, together with a caption in a `p` with class `caption`.)
1903The image's alt text will be used as the caption.
1905 ![This is the caption](/url/of/image.png)
1907[^5]: This feature is not yet implemented for RTF, OpenDocument, or
1908 ODT. In those formats, you'll just get an image in a paragraph by
1909 itself, with no caption.
1911If you just want a regular inline image, just make sure it is not
1912the only thing in the paragraph. One way to do this is to insert a
1913nonbreaking space after the image:
1915 ![This image won't be a figure](/url/of/image.png)\
1918Footnotes
1919---------
1921*Pandoc extension*.
1923Pandoc's markdown allows footnotes, using the following syntax:
1925 Here is a footnote reference,[^1] and another.[^longnote]
1927 [^1]: Here is the footnote.
1929 [^longnote]: Here's one with multiple blocks.
1931 Subsequent paragraphs are indented to show that they
1932 belong to the previous footnote.
1934 { some.code }
1936 The whole paragraph can be indented, or just the first
1937 line. In this way, multi-paragraph footnotes work like
1938 multi-paragraph list items.
1940 This paragraph won't be part of the note, because it
1941 isn't indented.
1943The identifiers in footnote references may not contain spaces, tabs,
1944or newlines. These identifiers are used only to correlate the
1945footnote reference with the note itself; in the output, footnotes
1946will be numbered sequentially.
1948The footnotes themselves need not be placed at the end of the
1949document. They may appear anywhere except inside other block elements
1950(lists, block quotes, tables, etc.).
1952Inline footnotes are also allowed (though, unlike regular notes,
1953they cannot contain multiple paragraphs). The syntax is as follows:
1955 Here is an inline note.^[Inlines notes are easier to write, since
1956 you don't have to pick an identifier and move down to type the
1957 note.]
1959Inline and regular footnotes may be mixed freely.
1962Citations
1963---------
1965*Pandoc extension*.
1967Pandoc can automatically generate citations and a bibliography in a number of
1968styles (using Andrea Rossato's `hs-citeproc`). In order to use this feature,
1969you will need a bibliographic database in one of the following formats:
1971 Format File extension
1972 ------------ --------------
1973 MODS .mods
1974 BibTeX/BibLaTeX .bib
1975 RIS .ris
1976 EndNote .enl
1977 EndNote XML .xml
1978 ISI .wos
1979 MEDLINE .medline
1980 Copac .copac
1981 JSON citeproc .json
1983You will need to specify the bibliography file using the `--bibliography`
1984command-line option (which may be repeated if you have several
1985bibliographies).
1987By default, pandoc will use a Chicago author-date format for citations
1988and references. To use another style, you will need to use the
1989`--csl` option to specify a [CSL] 1.0 style file. A primer on
1990creating and modifying CSL styles can be found at
1991<http://citationstyles.org/downloads/primer.html>.
1992A repository of CSL styles can be found at
1993<https://github.com/citation-style-language/styles>.
1994See also <http://zotero.org/styles> for easy browsing.
1996Citations go inside square brackets and are separated by semicolons.
1997Each citation must have a key, composed of '@' + the citation
1998identifier from the database, and may optionally have a prefix,
1999a locator, and a suffix. Here are some examples:
2001 Blah blah [see @doe99, pp. 33-35; also @smith04, ch. 1].
2003 Blah blah [@doe99, pp. 33-35, 38-39 and *passim*].
2005 Blah blah [@smith04; @doe99].
2007A minus sign (`-`) before the `@` will suppress mention of
2008the author in the citation. This can be useful when the
2009author is already mentioned in the text:
2011 Smith says blah [-@smith04].
2013You can also write an in-text citation, as follows:
2015 @smith04 says blah.
2017 @smith04 [p. 33] says blah.
2019If the style calls for a list of works cited, it will be placed
2020at the end of the document. Normally, you will want to end your
2021document with an appropriate header:
2023 last paragraph...
2025 # References
2027The bibliography will be inserted after this header.
2030Producing slide shows with Pandoc
2031=================================
2033You can use Pandoc to produce an HTML + javascript slide presentation
2034that can be viewed via a web browser. There are three ways to do this,
2035using [S5], [DZSlides], or [Slidy]. You can also produce a PDF slide
2036show using LaTeX [beamer].
2038Here's the markdown source for a simple slide show, `habits.txt`:
2040 % Habits
2041 % John Doe
2042 % March 22, 2005
2044 # In the morning
2046 ## Getting up
2048 - Turn off alarm
2049 - Get out of bed
2051 ## Breakfast
2053 - Eat eggs
2054 - Drink coffee
2056 # In the evening
2058 ## Dinner
2060 - Eat spaghetti
2061 - Drink wine
2063 ------------------
2065 ![picture of spaghetti](images/spaghetti.jpg)
2067 ## Going to sleep
2069 - Get in bed
2070 - Count sheep
2072To produce the slide show, simply type
2074 pandoc -t s5 -s habits.txt -o habits.html
2076for S5,
2078 pandoc -t slidy -s habits.txt -o habits.html
2080for Slidy,
2082 pandoc -t dzslides -s habits.txt -o habits.html
2084for DZSlides, or
2086 pandoc -t beamer habits.txt -o habits.pdf
2088for beamer.
2090With all HTML slide formats, the `--self-contained` option can be used to
2091produce a single file that contains all of the data necessary to display the
2092slide show, including linked scripts, stylesheets, images, and videos.
2094Structuring the slide show
2095--------------------------
2097By default, the *slide level* is the highest header level in
2098the hierarchy that is followed immediately by content, and not another
2099header, somewhere in the document. In the example above, level 1 headers
2100are always followed by level 2 headers, which are followed by content,
2101so 2 is the slide level. This default can be overridden using
2102the `--slide-level` option.
2104The document is carved up into slides according to the following
2105rules:
2107 * A horizontal rule always starts a new slide.
2109 * A header at the slide level always starts a new slide.
2111 * Headers *below* the slide level in the hierarchy create
2112 headers *within* a slide.
2114 * Headers *above* the slide level in the hierarchy create
2115 "title slides," which just contain the section title
2116 and help to break the slide show into sections.
2118 * A title page is constructed automatically from the document's title
2119 block, if present. (In the case of beamer, this can be disabled
2120 by commenting out some lines in the default template.)
2122These rules are designed to support many different styles of slide show. If
2123you don't care about structuring your slides into sections and subsections,
2124you can just use level 1 headers for all each slide. (In that case, level 1
2125will be the slide level.) But you can also structure the slide show into
2126sections, as in the example above.
2128For Slidy and S5, the file produced by pandoc with the `-s/--standalone`
2129option embeds a link to javascripts and CSS files, which are assumed to
2130be available at the relative path `s5/default` (for S5) or at the Slidy
2131website at `w3.org` (for Slidy). (These paths can be changed by setting
2132the `slidy-url` or `s5-url` variables; see `--variable`, above.) For DZSlides,
2133the (relatively short) javascript and css are included in the file by default.
2135Incremental lists
2136-----------------
2138By default, these writers produces lists that display "all at once."
2139If you want your lists to display incrementally (one item at a time),
2140use the `-i` option. If you want a particular list to depart from the
2141default (that is, to display incrementally without the `-i` option and
2142all at once with the `-i` option), put it in a block quote:
2144 > - Eat spaghetti
2145 > - Drink wine
2147In this way incremental and nonincremental lists can be mixed in
2148a single document.
2150Styling the slides
2151------------------
2153You can change the style of HTML slides by putting customized CSS files
2154in `$DATADIR/s5/default` (for S5) or `$DATADIR/slidy` (for Slidy),
2155where `$DATADIR` is the user data directory (see `--data-dir`, above).
2156The originals may be found in pandoc's system data directory (generally
2157`$CABALDIR/pandoc-VERSION/s5/default`). Pandoc will look there for any
2158files it does not find in the user data directory.
2160For dzslides, the CSS is included in the HTML file itself, and may
2161be modified there.
2163To style beamer slides, you can specify a beamer "theme" or "colortheme"
2164using the `-V` option:
2166 pandoc -t beamer habits.txt -V theme:Warsaw -o habits.pdf
2168Literate Haskell support
2169========================
2171If you append `+lhs` to an appropriate input or output format (`markdown`,
2172`rst`, or `latex` for input or output; `beamer`, `html` or `html5` for
2173output only), pandoc will treat the document as literate Haskell source.
2174This means that
2176 - In markdown input, "bird track" sections will be parsed as Haskell
2177 code rather than block quotations. Text between `\begin{code}`
2178 and `\end{code}` will also be treated as Haskell code.
2180 - In markdown output, code blocks with classes `haskell` and `literate`
2181 will be rendered using bird tracks, and block quotations will be
2182 indented one space, so they will not be treated as Haskell code.
2183 In addition, headers will be rendered setext-style (with underlines)
2184 rather than atx-style (with '#' characters). (This is because ghc
2185 treats '#' characters in column 1 as introducing line numbers.)
2187 - In restructured text input, "bird track" sections will be parsed
2188 as Haskell code.
2190 - In restructured text output, code blocks with class `haskell` will
2191 be rendered using bird tracks.
2193 - In LaTeX input, text in `code` environments will be parsed as
2194 Haskell code.
2196 - In LaTeX output, code blocks with class `haskell` will be rendered
2197 inside `code` environments.
2199 - In HTML output, code blocks with class `haskell` will be rendered
2200 with class `literatehaskell` and bird tracks.
2202Examples:
2204 pandoc -f markdown+lhs -t html
2206reads literate Haskell source formatted with markdown conventions and writes
2207ordinary HTML (without bird tracks).
2209 pandoc -f markdown+lhs -t html+lhs
2211writes HTML with the Haskell code in bird tracks, so it can be copied
2212and pasted as literate Haskell source.
2214Authors
2215=======
2217© 2006-2011 John MacFarlane (jgm at berkeley dot edu). Released under the
2218[GPL], version 2 or greater. This software carries no warranty of
2219any kind. (See COPYRIGHT for full copyright and warranty notices.)
2220Other contributors include Recai Oktaş, Paulo Tanimoto, Peter Wang,
2221Andrea Rossato, Eric Kow, infinity0x, Luke Plant, shreevatsa.public,
2222Puneeth Chaganti, Paul Rivier, rodja.trappe, Bradley Kuhn, thsutton,
2223Nathan Gass, Jonathan Daugherty, Jérémy Bobbio, Justin Bogner, qerub,
2224Christopher Sawicki, Kelsey Hightower, Masayoshi Takahashi, Antoine
2225Latter, Ralf Stephan, Eric Seidel, B. Scott Michel.
2227[markdown]: http://daringfireball.net/projects/markdown/
2228[reStructuredText]: http://docutils.sourceforge.net/docs/ref/rst/introduction.html
2229[S5]: http://meyerweb.com/eric/tools/s5/
2230[Slidy]: http://www.w3.org/Talks/Tools/Slidy/
2231[HTML]: http://www.w3.org/TR/html40/
2232[HTML 5]: http://www.w3.org/TR/html5/
2233[XHTML]: http://www.w3.org/TR/xhtml1/
2234[LaTeX]: http://www.latex-project.org/
2235[beamer]: http://www.tex.ac.uk/CTAN/macros/latex/contrib/beamer
2236[ConTeXt]: http://www.pragma-ade.nl/
2237[RTF]: http://en.wikipedia.org/wiki/Rich_Text_Format
2238[DocBook XML]: http://www.docbook.org/
2239[OpenDocument XML]: http://opendocument.xml.org/
2240[ODT]: http://en.wikipedia.org/wiki/OpenDocument
2241[Textile]: http://redcloth.org/textile
2242[MediaWiki markup]: http://www.mediawiki.org/wiki/Help:Formatting
2243[groff man]: http://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPages/man7/groff_man.7.html
2244[Haskell]: http://www.haskell.org/
2245[GNU Texinfo]: http://www.gnu.org/software/texinfo/
2246[Emacs Org-Mode]: http://orgmode.org
2247[AsciiDoc]: http://www.methods.co.nz/asciidoc/
2248[EPUB]: http://www.idpf.org/
2249[GPL]: http://www.gnu.org/copyleft/gpl.html "GNU General Public License"
2250[DZSlides]: http://paulrouget.com/dzslides/
2251[ISO 8601 format]: http://www.w3.org/TR/NOTE-datetime
2252[Word docx]: http://www.microsoft.com/interop/openup/openxml/default.aspx
2253[PDF]: http://www.adobe.com/pdf/