git.iko.soy/typeable/pandoc
on 1.9.0.3 help sign in
2246 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 or `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`, `html`, or `html5`, the output will
160 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.
266`-D` *FORMAT*, `--print-default-template=`*FORMAT*
267: Print the default template for an output *FORMAT*. (See `-t`
268 for a list of possible *FORMAT*s.)
270`--no-wrap`
271: Disable text wrapping in output. By default, text is wrapped
272 appropriately for the output format.
274`--columns`=*NUMBER*
275: Specify length of lines in characters (for text wrapping).
277`--toc`, `--table-of-contents`
278: Include an automatically generated table of contents (or, in
279 the case of `latex`, `context`, and `rst`, an instruction to create
280 one) in the output document. This option has no effect on `man`,
281 `docbook`, `slidy`, or `s5` output.
283`--no-highlight`
284: Disables syntax highlighting for code blocks and inlines, even when
285 a language attribute is given.
287`--highlight-style`=*STYLE*
288: Specifies the coloring style to be used in highlighted source code.
289 Options are `pygments` (the default), `kate`, `monochrome`,
290 `espresso`, `haddock`, and `tango`.
292`-H` *FILE*, `--include-in-header=`*FILE*
293: Include contents of *FILE*, verbatim, at the end of the header.
294 This can be used, for example, to include special
295 CSS or javascript in HTML documents. This option can be used
296 repeatedly to include multiple files in the header. They will be
297 included in the order specified. Implies `--standalone`.
299`-B` *FILE*, `--include-before-body=`*FILE*
300: Include contents of *FILE*, verbatim, at the beginning of the
301 document body (e.g. after the `<body>` tag in HTML, or the
302 `\begin{document}` command in LaTeX). This can be used to include
303 navigation bars or banners in HTML documents. This option can be
304 used repeatedly to include multiple files. They will be included in
305 the order specified. Implies `--standalone`.
307`-A` *FILE*, `--include-after-body=`*FILE*
308: Include contents of *FILE*, verbatim, at the end of the document
309 body (before the `</body>` tag in HTML, or the
310 `\end{document}` command in LaTeX). This option can be be used
311 repeatedly to include multiple files. They will be included in the
312 order specified. Implies `--standalone`.
314Options affecting specific writers
315----------------------------------
317`--self-contained`
318: Produce a standalone HTML file with no external dependencies, using
319 `data:` URIs to incorporate the contents of linked scripts, stylesheets,
320 images, and videos. The resulting file should be "self-contained,"
321 in the sense that it needs no external files and no net access to be
322 displayed properly by a browser. This option works only with HTML output
323 formats, including `html`, `html5`, `html+lhs`, `html5+lhs`, `s5`,
324 `slidy`, and `dzslides`. Scripts, images, and stylesheets at absolute URLs
325 will be downloaded; those at relative URLs will be sought first relative
326 to the working directory, then relative to the user data directory (see
327 `--data-dir`), and finally relative to pandoc's default data directory.
329`--offline`
330: Deprecated synonym for `--self-contained`.
332`-5`, `--html5`
333: Produce HTML5 instead of HTML4. This option has no effect for writers
334 other than `html`. (*Deprecated:* Use the `html5` output format instead.)
336`--ascii`
337: Use only ascii characters in output. Currently supported only
338 for HTML output (which uses numerical entities instead of
339 UTF-8 when this option is selected).
341`--reference-links`
342: Use reference-style links, rather than inline links, in writing markdown
343 or reStructuredText. By default inline links are used.
345`--atx-headers`
346: Use ATX style headers in markdown output. The default is to use
347 setext-style headers for levels 1-2, and then ATX headers.
349`--chapters`
350: Treat top-level headers as chapters in LaTeX, ConTeXt, and DocBook
351 output. When the LaTeX template uses the report, book, or
352 memoir class, this option is implied. If `--beamer` is used,
353 top-level headers will become `\part{..}`.
355`-N`, `--number-sections`
356: Number section headings in LaTeX, ConTeXt, or HTML output.
357 By default, sections are not numbered.
359`--listings`
360: Use listings package for LaTeX code blocks
362`-i`, `--incremental`
363: Make list items in slide shows display incrementally (one by one).
364 The default is for lists to be displayed all at once.
366`--slide-level`=*NUMBER*
367: Specifies that headers with the specified level create
368 slides (for `beamer`, `s5`, `slidy`, `dzslides`). Headers
369 above this level in the hierarchy are used to divide the
370 slide show into sections; headers below this level create
371 subheads within a slide. The default is to set the slide level
372 based on the contents of the document; see
373 [Structuring the slide show](#structuring-the-slide-show), below.
375`--section-divs`
376: Wrap sections in `<div>` tags (or `<section>` tags in HTML5),
377 and attach identifiers to the enclosing `<div>` (or `<section>`)
378 rather than the header itself.
379 See [Section identifiers](#header-identifiers-in-html-latex-and-context), below.
381`--email-obfuscation=`*none|javascript|references*
382: Specify a method for obfuscating `mailto:` links in HTML documents.
383 *none* leaves `mailto:` links as they are. *javascript* obfuscates
384 them using javascript. *references* obfuscates them by printing their
385 letters as decimal or hexadecimal character references.
386 If `--strict` is specified, *references* is used regardless of the
387 presence of this option.
389`--id-prefix`=*STRING*
390: Specify a prefix to be added to all automatically generated identifiers
391 in HTML output. This is useful for preventing duplicate identifiers
392 when generating fragments to be included in other pages.
394`-T` *STRING*, `--title-prefix=`*STRING*
395: Specify *STRING* as a prefix at the beginning of the title
396 that appears in the HTML header (but not in the title as it
397 appears at the beginning of the HTML body). Implies
398 `--standalone`.
400`-c` *URL*, `--css=`*URL*
401: Link to a CSS style sheet.
403`--reference-odt=`*FILE*
404: Use the specified file as a style reference in producing an ODT.
405 For best results, the reference ODT should be a modified version
406 of an ODT produced using pandoc. The contents of the reference ODT
407 are ignored, but its stylesheets are used in the new ODT. If no
408 reference ODT is specified on the command line, pandoc will look
409 for a file `reference.odt` in the user data directory (see
410 `--data-dir`). If this is not found either, sensible defaults will be
411 used.
413`--reference-docx=`*FILE*
414: Use the specified file as a style reference in producing a docx file.
415 For best results, the reference docx should be a modified version
416 of a docx file produced using pandoc. The contents of the reference docx
417 are ignored, but its stylesheets are used in the new docx. If no
418 reference docx is specified on the command line, pandoc will look
419 for a file `reference.docx` in the user data directory (see
420 `--data-dir`). If this is not found either, sensible defaults will be
421 used.
423`--epub-stylesheet=`*FILE*
424: Use the specified CSS file to style the EPUB. If no stylesheet
425 is specified, pandoc will look for a file `epub.css` in the
426 user data directory (see `--data-dir`). If it is not
427 found there, sensible defaults will be used.
429`--epub-cover-image=`*FILE*
430: Use the specified image as the EPUB cover. It is recommended
431 that the image be less than 1000px in width and height.
433`--epub-metadata=`*FILE*
434: Look in the specified XML file for metadata for the EPUB.
435 The file should contain a series of Dublin Core elements,
436 as documented at <http://dublincore.org/documents/dces/>.
437 For example:
439 <dc:rights>Creative Commons</dc:rights>
440 <dc:language>es-AR</dc:language>
442 By default, pandoc will include the following metadata elements:
443 `<dc:title>` (from the document title), `<dc:creator>` (from the
444 document authors), `<dc:date>` (from the document date, which should
445 be is in [ISO 8601 format]), `<dc:language>` (from the `lang`
446 variable, or, if is not set, the locale), and `<dc:identifier
447 id="BookId">` (a randomly generated UUID). Any of these may be
448 overridden by elements in the metadata file.
450`--epub-embed-font=`*FILE*
451: Embed the specified font in the EPUB. This option can be repeated
452 to embed multiple fonts. To use embedded fonts, you
453 will need to add declarations like the following to your CSS (see
454 ``--epub-stylesheet`):
456 @font-face {
457 font-family: DejaVuSans;
458 font-style: normal;
459 font-weight: normal;
460 src:url("DejaVuSans-Regular.ttf");
461 }
462 @font-face {
463 font-family: DejaVuSans;
464 font-style: normal;
465 font-weight: bold;
466 src:url("DejaVuSans-Bold.ttf");
467 }
468 @font-face {
469 font-family: DejaVuSans;
470 font-style: italic;
471 font-weight: normal;
472 src:url("DejaVuSans-Oblique.ttf");
473 }
474 @font-face {
475 font-family: DejaVuSans;
476 font-style: italic;
477 font-weight: bold;
478 src:url("DejaVuSans-BoldOblique.ttf");
479 }
480 body { font-family: "DejaVuSans"; }
482`--latex-engine=`*pdflatex|lualatex|xelatex*
483: Use the specified LaTeX engine when producing PDF output.
484 The default is `pdflatex`. If the engine is not in your PATH,
485 the full path of the engine may be specified here.
487Citations
488---------
490`--bibliography=`*FILE*
491: Specify bibliography database to be used in resolving
492 citations. The database type will be determined from the
493 extension of *FILE*, which may be `.mods` (MODS format),
494 `.bib` (BibTeX/BibLaTeX format),
495 `.ris` (RIS format), `.enl` (EndNote format),
496 `.xml` (EndNote XML format), `.wos` (ISI format),
497 `.medline` (MEDLINE format), `.copac` (Copac format),
498 or `.json` (citeproc JSON). If you want to use multiple
499 bibliographies, just use this option repeatedly.
501`--csl=`*FILE*
502: Specify [CSL] style to be used in formatting citations and
503 the bibliography. If *FILE* is not found, pandoc will look
504 for it in
506 $HOME/.csl
508 in unix and
510 C:\Documents And Settings\USERNAME\Application Data\csl
512 in Windows. If the `--csl` option is not specified, pandoc
513 will use a default style: either `default.csl` in the
514 user data directory (see `--data-dir`), or, if that is
515 not present, the Chicago author-date style.
517`--citation-abbreviations=`*FILE*
518: Specify a file containing abbreviations for journal titles and
519 other bibliographic fields (indicated by setting `form="short"`
520 in the CSL node for the field). The format is described at
521 <http://citationstylist.org/2011/10/19/abbreviations-for-zotero-test-release/>.
522 Here is a short example:
524 { "default": {
525 "container-title": {
526 "Lloyd's Law Reports": "Lloyd's Rep",
527 "Estates Gazette": "EG",
528 "Scots Law Times": "SLT"
529 }
530 }
531 }
533`--natbib`
534: Use natbib for citations in LaTeX output.
536`--biblatex`
537: Use biblatex for citations in LaTeX output.
539Math rendering in HTML
540----------------------
542`-m` [*URL*], `--latexmathml`[=*URL*]
543: Use the [LaTeXMathML] script to display embedded TeX math in HTML output.
544 To insert a link to a local copy of the `LaTeXMathML.js` script,
545 provide a *URL*. If no *URL* is provided, the contents of the
546 script will be inserted directly into the HTML header, preserving
547 portability at the price of efficiency. If you plan to use math on
548 several pages, it is much better to link to a copy of the script,
549 so it can be cached.
551`--mathml`[=*URL*]
552: Convert TeX math to MathML (in `docbook` as well as `html` and `html5`).
553 In standalone `html` output, a small javascript (or a link to such a
554 script if a *URL* is supplied) will be inserted that allows the MathML to
555 be viewed on some browsers.
557`--jsmath`[=*URL*]
558: Use [jsMath] to display embedded TeX math in HTML output.
559 The *URL* should point to the jsMath load script (e.g.
560 `jsMath/easy/load.js`); if provided, it will be linked to in
561 the header of standalone HTML documents. If a *URL* is not provided,
562 no link to the jsMath load script will be inserted; it is then
563 up to the author to provide such a link in the HTML template.
565`--mathjax`[=*URL*]
566: Use [MathJax] to display embedded TeX math in HTML output.
567 The *URL* should point to the `MathJax.js` load script.
568 If a *URL* is not provided, a link to the MathJax CDN will
569 be inserted.
571`--gladtex`
572: Enclose TeX math in `<eq>` tags in HTML output. These can then
573 be processed by [gladTeX] to produce links to images of the typeset
574 formulas.
576`--mimetex`[=*URL*]
577: Render TeX math using the [mimeTeX] CGI script. If *URL* is not
578 specified, it is assumed that the script is at `/cgi-bin/mimetex.cgi`.
580`--webtex`[=*URL*]
581: Render TeX formulas using an external script that converts TeX
582 formulas to images. The formula will be concatenated with the URL
583 provided. If *URL* is not specified, the Google Chart API will be used.
585Options for wrapper scripts
586---------------------------
588`--dump-args`
589: Print information about command-line arguments to *stdout*, then exit.
590 This option is intended primarily for use in wrapper scripts.
591 The first line of output contains the name of the output file specified
592 with the `-o` option, or `-` (for *stdout*) if no output file was
593 specified. The remaining lines contain the command-line arguments,
594 one per line, in the order they appear. These do not include regular
595 Pandoc options and their arguments, but do include any options appearing
596 after a `--` separator at the end of the line.
598`--ignore-args`
599: Ignore command-line arguments (for use in wrapper scripts).
600 Regular Pandoc options are not ignored. Thus, for example,
602 pandoc --ignore-args -o foo.html -s foo.txt -- -e latin1
604 is equivalent to
606 pandoc -o foo.html -s
608[LaTeXMathML]: http://math.etsu.edu/LaTeXMathML/
609[jsMath]: http://www.math.union.edu/~dpvc/jsmath/
610[MathJax]: http://www.mathjax.org/
611[gladTeX]: http://www.math.uio.no/~martingu/gladtex/index.html
612[mimeTeX]: http://www.forkosh.com/mimetex.html
613[CSL]: http://CitationStyles.org
615Templates
616=========
618When the `-s/--standalone` option is used, pandoc uses a template to
619add header and footer material that is needed for a self-standing
620document. To see the default template that is used, just type
622 pandoc -D FORMAT
624where `FORMAT` is the name of the output format. A custom template
625can be specified using the `--template` option. You can also override
626the system default templates for a given output format `FORMAT`
627by putting a file `templates/default.FORMAT` in the user data
628directory (see `--data-dir`, above).
630Templates may contain *variables*. Variable names are sequences of
631alphanumerics, `-`, and `_`, starting with a letter. A variable name
632surrounded by `$` signs will be replaced by its value. For example,
633the string `$title$` in
635 <title>$title$</title>
637will be replaced by the document title.
639To write a literal `$` in a template, use `$$`.
641Some variables are set automatically by pandoc. These vary somewhat
642depending on the output format, but include:
644`header-includes`
645: contents specified by `-H/--include-in-header` (may have multiple
646 values)
647`toc`
648: non-null value if `--toc/--table-of-contents` was specified
649`include-before`
650: contents specified by `-B/--include-before-body` (may have
651 multiple values)
652`include-after`
653: contents specified by `-A/--include-after-body` (may have
654 multiple values)
655`body`
656: body of document
657`title`
658: title of document, as specified in title block
659`author`
660: author of document, as specified in title block (may have
661 multiple values)
662`date`
663: date of document, as specified in title block
664`lang`
665: language code for HTML or LaTeX documents
666`slidy-url`
667: base URL for Slidy documents (defaults to
668 `http://www.w3.org/Talks/Tools/Slidy2`)
669`s5-url`
670: base URL for S5 documents (defaults to `ui/default`)
671`font-size`
672: font size (10pt, 11pt, 12pt) for LaTeX documents
673`documentclass`
674: document class for LaTeX documents
675`theme`
676: theme for LaTeX beamer documents
677`colortheme`
678: colortheme for LaTeX beamer documents
680Variables may be set at the command line using the `-V/--variable`
681option. This allows users to include custom variables in their
682templates.
684Templates may contain conditionals. The syntax is as follows:
686 $if(variable)$
687 X
688 $else$
689 Y
690 $endif$
692This will include `X` in the template if `variable` has a non-null
693value; otherwise it will include `Y`. `X` and `Y` are placeholders for
694any valid template text, and may include interpolated variables or other
695conditionals. The `$else$` section may be omitted.
697When variables can have multiple values (for example, `author` in
698a multi-author document), you can use the `$for$` keyword:
700 $for(author)$
701 <meta name="author" content="$author$" />
702 $endfor$
704You can optionally specify a separator to be used between
705consecutive items:
707 $for(author)$$author$$sep$, $endfor$
709If you use custom templates, you may need to revise them as pandoc
710changes. We recommend tracking the changes in the default templates,
711and modifying your custom templates accordingly. An easy way to do this
712is to fork the pandoc-templates repository
713(<http://github.com/jgm/pandoc-templates>) and merge in changes after each
714pandoc release.
716Pandoc's markdown
717=================
719Pandoc understands an extended and slightly revised version of
720John Gruber's [markdown] syntax. This document explains the syntax,
721noting differences from standard markdown. Except where noted, these
722differences can be suppressed by specifying the `--strict` command-line
723option.
725Philosophy
726----------
728Markdown is designed to be easy to write, and, even more importantly,
729easy to read:
731> A Markdown-formatted document should be publishable as-is, as plain
732> text, without looking like it's been marked up with tags or formatting
733> instructions.
734> -- [John Gruber](http://daringfireball.net/projects/markdown/syntax#philosophy)
736This principle has guided pandoc's decisions in finding syntax for
737tables, footnotes, and other extensions.
739There is, however, one respect in which pandoc's aims are different
740from the original aims of markdown. Whereas markdown was originally
741designed with HTML generation in mind, pandoc is designed for multiple
742output formats. Thus, while pandoc allows the embedding of raw HTML,
743it discourages it, and provides other, non-HTMLish ways of representing
744important document elements like definition lists, tables, mathematics, and
745footnotes.
747Paragraphs
748----------
750A paragraph is one or more lines of text followed by one or more blank line.
751Newlines are treated as spaces, so you can reflow your paragraphs as you like.
752If you need a hard line break, put two or more spaces at the end of a line,
753or type a backslash followed by a newline.
755Headers
756-------
758There are two kinds of headers, Setext and atx.
760### Setext-style headers ###
762A setext-style header is a line of text "underlined" with a row of `=` signs
763(for a level one header) of `-` signs (for a level two header):
765 A level-one header
766 ==================
768 A level-two header
769 ------------------
771The header text can contain inline formatting, such as emphasis (see
772[Inline formatting](#inline-formatting), below).
775### Atx-style headers ###
777An Atx-style header consists of one to six `#` signs and a line of
778text, optionally followed by any number of `#` signs. The number of
779`#` signs at the beginning of the line is the header level:
781 ## A level-two header
783 ### A level-three header ###
785As with setext-style headers, the header text can contain formatting:
787 # A level-one header with a [link](/url) and *emphasis*
789Standard markdown syntax does not require a blank line before a header.
790Pandoc does require this (except, of course, at the beginning of the
791document). The reason for the requirement is that it is all too easy for a
792`#` to end up at the beginning of a line by accident (perhaps through line
793wrapping). Consider, for example:
795 I like several of their flavors of ice cream:
796 #22, for example, and #5.
799### Header identifiers in HTML, LaTeX, and ConTeXt ###
801*Pandoc extension*.
803Each header element in pandoc's HTML and ConTeXt output is given a
804unique identifier. This identifier is based on the text of the header.
805To derive the identifier from the header text,
807 - Remove all formatting, links, etc.
808 - Remove all punctuation, except underscores, hyphens, and periods.
809 - Replace all spaces and newlines with hyphens.
810 - Convert all alphabetic characters to lowercase.
811 - Remove everything up to the first letter (identifiers may
812 not begin with a number or punctuation mark).
813 - If nothing is left after this, use the identifier `section`.
815Thus, for example,
817 Header Identifier
818 ------------------------------- ----------------------------
819 Header identifiers in HTML `header-identifiers-in-html`
820 *Dogs*?--in *my* house? `dogs--in-my-house`
821 [HTML], [S5], or [RTF]? `html-s5-or-rtf`
822 3. Applications `applications`
823 33 `section`
825These rules should, in most cases, allow one to determine the identifier
826from the header text. The exception is when several headers have the
827same text; in this case, the first will get an identifier as described
828above; the second will get the same identifier with `-1` appended; the
829third with `-2`; and so on.
831These identifiers are used to provide link targets in the table of
832contents generated by the `--toc|--table-of-contents` option. They
833also make it easy to provide links from one section of a document to
834another. A link to this section, for example, might look like this:
836 See the section on
837 [header identifiers][#header-identifiers-in-html].
839Note, however, that this method of providing links to sections works
840only in HTML, LaTeX, and ConTeXt formats.
842If the `--section-divs` option is specified, then each section will
843be wrapped in a `div` (or a `section`, if `--html5` was specified),
844and the identifier will be attached to the enclosing `<div>`
845(or `<section>`) tag rather than the header itself. This allows entire
846sections to be manipulated using javascript or treated differently in
847CSS.
850Block quotations
851----------------
853Markdown uses email conventions for quoting blocks of text.
854A block quotation is one or more paragraphs or other block elements
855(such as lists or headers), with each line preceded by a `>` character
856and a space. (The `>` need not start at the left margin, but it should
857not be indented more than three spaces.)
859 > This is a block quote. This
860 > paragraph has two lines.
861 >
862 > 1. This is a list inside a block quote.
863 > 2. Second item.
865A "lazy" form, which requires the `>` character only on the first
866line of each block, is also allowed:
868 > This is a block quote. This
869 paragraph has two lines.
871 > 1. This is a list inside a block quote.
872 2. Second item.
874Among the block elements that can be contained in a block quote are
875other block quotes. That is, block quotes can be nested:
877 > This is a block quote.
878 >
879 > > A block quote within a block quote.
881Standard markdown syntax does not require a blank line before a block
882quote. Pandoc does require this (except, of course, at the beginning of the
883document). The reason for the requirement is that it is all too easy for a
884`>` to end up at the beginning of a line by accident (perhaps through line
885wrapping). So, unless `--strict` is used, the following does not produce
886a nested block quote in pandoc:
888 > This is a block quote.
889 >> Nested.
892Verbatim (code) blocks
893----------------------
895### Indented code blocks ###
897A block of text indented four spaces (or one tab) is treated as verbatim
898text: that is, special characters do not trigger special formatting,
899and all spaces and line breaks are preserved. For example,
901 if (a > 3) {
902 moveShip(5 * gravity, DOWN);
903 }
905The initial (four space or one tab) indentation is not considered part
906of the verbatim text, and is removed in the output.
908Note: blank lines in the verbatim text need not begin with four spaces.
911### Delimited code blocks ###
913*Pandoc extension*.
915In addition to standard indented code blocks, Pandoc supports
916*delimited* code blocks. These begin with a row of three or more
917tildes (`~`) or backticks (`` ` ``) and end with a row of tildes or
918backticks that must be at least as long as the starting row. Everything
919between these lines is treated as code. No indentation is necessary:
921 ~~~~~~~
922 if (a > 3) {
923 moveShip(5 * gravity, DOWN);
924 }
925 ~~~~~~~
927Like regular code blocks, delimited code blocks must be separated
928from surrounding text by blank lines.
930If the code itself contains a row of tildes or backticks, just use a longer
931row of tildes or backticks at the start and end:
933 ~~~~~~~~~~~~~~~~
934 ~~~~~~~~~~
935 code including tildes
936 ~~~~~~~~~~
937 ~~~~~~~~~~~~~~~~
939Optionally, you may attach attributes to the code block using
940this syntax:
942 ~~~~ {#mycode .haskell .numberLines startFrom="100"}
943 qsort [] = []
944 qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
945 qsort (filter (>= x) xs)
946 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
948Here `mycode` is an identifier, `haskell` and `numberLines` are classes, and
949`startFrom` is an attribute with value `100`. Some output formats can use this
950information to do syntax highlighting. Currently, the only output formats
951that uses this information are HTML and LaTeX. If highlighting is supported
952for your output format and language, then the code block above will appear
953highlighted, with numbered lines. (To see which languages are supported, do
954`pandoc --version`.) Otherwise, the code block above will appear as follows:
956 <pre id="mycode" class="haskell numberLines" startFrom="100">
957 <code>
958 ...
959 </code>
960 </pre>
962A shortcut form can also be used for specifying the language of
963the code block:
965 ```haskell
966 qsort [] = []
967 ```
969This is equivalent to:
971 ``` {.haskell}
972 qsort [] = []
973 ```
975To prevent all highlighting, use the `--no-highlight` flag.
976To set the highlighting style, use `--highlight-style`.
978Lists
979-----
981### Bullet lists ###
983A bullet list is a list of bulleted list items. A bulleted list
984item begins with a bullet (`*`, `+`, or `-`). Here is a simple
985example:
987 * one
988 * two
989 * three
991This will produce a "compact" list. If you want a "loose" list, in which
992each item is formatted as a paragraph, put spaces between the items:
994 * one
996 * two
998 * three
1000The bullets need not be flush with the left margin; they may be
1001indented one, two, or three spaces. The bullet must be followed
1002by whitespace.
1004List items look best if subsequent lines are flush with the first
1005line (after the bullet):
1007 * here is my first
1008 list item.
1009 * and my second.
1011But markdown also allows a "lazy" format:
1013 * here is my first
1014 list item.
1015 * and my second.
1017### The four-space rule ###
1019A list item may contain multiple paragraphs and other block-level
1020content. However, subsequent paragraphs must be preceded by a blank line
1021and indented four spaces or a tab. The list will look better if the first
1022paragraph is aligned with the rest:
1024 * First paragraph.
1026 Continued.
1028 * Second paragraph. With a code block, which must be indented
1029 eight spaces:
1031 { code }
1033List items may include other lists. In this case the preceding blank
1034line is optional. The nested list must be indented four spaces or
1035one tab:
1037 * fruits
1038 + apples
1039 - macintosh
1040 - red delicious
1041 + pears
1042 + peaches
1043 * vegetables
1044 + brocolli
1045 + chard
1047As noted above, markdown allows you to write list items "lazily," instead of
1048indenting continuation lines. However, if there are multiple paragraphs or
1049other blocks in a list item, the first line of each must be indented.
1051 + A lazy, lazy, list
1052 item.
1054 + Another one; this looks
1055 bad but is legal.
1057 Second paragraph of second
1058 list item.
1060**Note:** Although the four-space rule for continuation paragraphs
1061comes from the official [markdown syntax guide], the reference implementation,
1062`Markdown.pl`, does not follow it. So pandoc will give different results than
1063`Markdown.pl` when authors have indented continuation paragraphs fewer than
1064four spaces.
1066The [markdown syntax guide] is not explicit whether the four-space
1067rule applies to *all* block-level content in a list item; it only
1068mentions paragraphs and code blocks. But it implies that the rule
1069applies to all block-level content (including nested lists), and
1070pandoc interprets it that way.
1072 [markdown syntax guide]:
1073 http://daringfireball.net/projects/markdown/syntax#list
1075### Ordered lists ###
1077Ordered lists work just like bulleted lists, except that the items
1078begin with enumerators rather than bullets.
1080In standard markdown, enumerators are decimal numbers followed
1081by a period and a space. The numbers themselves are ignored, so
1082there is no difference between this list:
1084 1. one
1085 2. two
1086 3. three
1088and this one:
1090 5. one
1091 7. two
1092 1. three
1094*Pandoc extension*.
1096Unlike standard markdown, Pandoc allows ordered list items to be marked
1097with uppercase and lowercase letters and roman numerals, in addition to
1098arabic numerals. List markers may be enclosed in parentheses or followed by a
1099single right-parentheses or period. They must be separated from the
1100text that follows by at least one space, and, if the list marker is a
1101capital letter with a period, by at least two spaces.[^2]
1103[^2]: The point of this rule is to ensure that normal paragraphs
1104 starting with people's initials, like
1106 B. Russell was an English philosopher.
1108 do not get treated as list items.
1110 This rule will not prevent
1112 (C) 2007 Joe Smith
1114 from being interpreted as a list item. In this case, a backslash
1115 escape can be used:
1117 (C\) 2007 Joe Smith
1119Pandoc also pays attention to the type of list marker used, and to the
1120starting number, and both of these are preserved where possible in the
1121output format. Thus, the following yields a list with numbers followed
1122by a single parenthesis, starting with 9, and a sublist with lowercase
1123roman numerals:
1125 9) Ninth
1126 10) Tenth
1127 11) Eleventh
1128 i. subone
1129 ii. subtwo
1130 iii. subthree
1132Note that Pandoc pays attention only to the *starting* marker in a list.
1133So, the following yields a list numbered sequentially starting from 2:
1135 (2) Two
1136 (5) Three
1137 1. Four
1138 * Five
1140If default list markers are desired, use `#.`:
1142 #. one
1143 #. two
1144 #. three
1147### Definition lists ###
1149*Pandoc extension*.
1151Pandoc supports definition lists, using a syntax inspired by
1152[PHP Markdown Extra] and [reStructuredText]:[^3]
1154 Term 1
1156 : Definition 1
1158 Term 2 with *inline markup*
1160 : Definition 2
1162 { some code, part of Definition 2 }
1164 Third paragraph of definition 2.
1166Each term must fit on one line, which may optionally be followed by
1167a blank line, and must be followed by one or more definitions.
1168A definition begins with a colon or tilde, which may be indented one
1169or two spaces. The body of the definition (including the first line,
1170aside from the colon or tilde) should be indented four spaces. A term may have
1171multiple definitions, and each definition may consist of one or more block
1172elements (paragraph, code block, list, etc.), each indented four spaces or one
1173tab stop.
1175If you leave space after the definition (as in the example above),
1176the blocks of the definitions will be considered paragraphs. In some
1177output formats, this will mean greater spacing between term/definition
1178pairs. For a compact definition list, do not leave space between the
1179definition and the next term:
1181 Term 1
1182 ~ Definition 1
1183 Term 2
1184 ~ Definition 2a
1185 ~ Definition 2b
1187[^3]: I have also been influenced by the suggestions of [David Wheeler](http://www.justatheory.com/computers/markup/modest-markdown-proposal.html).
1189[PHP Markdown Extra]: http://www.michelf.com/projects/php-markdown/extra/
1192### Numbered example lists ###
1194*Pandoc extension*.
1196The special list marker `@` can be used for sequentially numbered
1197examples. The first list item with a `@` marker will be numbered '1',
1198the next '2', and so on, throughout the document. The numbered examples
1199need not occur in a single list; each new list using `@` will take up
1200where the last stopped. So, for example:
1202 (@) My first example will be numbered (1).
1203 (@) My second example will be numbered (2).
1205 Explanation of examples.
1207 (@) My third example will be numbered (3).
1209Numbered examples can be labeled and referred to elsewhere in the
1210document:
1212 (@good) This is a good example.
1214 As (@good) illustrates, ...
1216The label can be any string of alphanumeric characters, underscores,
1217or hyphens.
1220### Compact and loose lists ###
1222Pandoc behaves differently from `Markdown.pl` on some "edge
1223cases" involving lists. Consider this source:
1225 + First
1226 + Second:
1227 - Fee
1228 - Fie
1229 - Foe
1231 + Third
1233Pandoc transforms this into a "compact list" (with no `<p>` tags around
1234"First", "Second", or "Third"), while markdown puts `<p>` tags around
1235"Second" and "Third" (but not "First"), because of the blank space
1236around "Third". Pandoc follows a simple rule: if the text is followed by
1237a blank line, it is treated as a paragraph. Since "Second" is followed
1238by a list, and not a blank line, it isn't treated as a paragraph. The
1239fact that the list is followed by a blank line is irrelevant. (Note:
1240Pandoc works this way even when the `--strict` option is specified. This
1241behavior is consistent with the official markdown syntax description,
1242even though it is different from that of `Markdown.pl`.)
1245### Ending a list ###
1247What if you want to put an indented code block after a list?
1249 - item one
1250 - item two
1252 { my code block }
1254Trouble! Here pandoc (like other markdown implementations) will treat
1255`{ my code block }` as the second paragraph of item two, and not as
1256a code block.
1258To "cut off" the list after item two, you can insert some non-indented
1259content, like an HTML comment, which won't produce visible output in
1260any format:
1262 - item one
1263 - item two
1265 <!-- end of list -->
1267 { my code block }
1269You can use the same trick if you want two consecutive lists instead
1270of one big list:
1272 1. one
1273 2. two
1274 3. three
1276 <!-- -->
1278 a. uno
1279 b. dos
1280 c. tres
1283Horizontal rules
1284----------------
1286A line containing a row of three or more `*`, `-`, or `_` characters
1287(optionally separated by spaces) produces a horizontal rule:
1289 * * * *
1291 ---------------
1294Tables
1295------
1297*Pandoc extension*.
1299Three kinds of tables may be used. All three kinds presuppose the use of
1300a fixed-width font, such as Courier.
1302**Simple tables** look like this:
1304 Right Left Center Default
1305 ------- ------ ---------- -------
1306 12 12 12 12
1307 123 123 123 123
1308 1 1 1 1
1310 Table: Demonstration of simple table syntax.
1312The headers and table rows must each fit on one line. Column
1313alignments are determined by the position of the header text relative
1314to the dashed line below it:[^4]
1316 - If the dashed line is flush with the header text on the right side
1317 but extends beyond it on the left, the column is right-aligned.
1318 - If the dashed line is flush with the header text on the left side
1319 but extends beyond it on the right, the column is left-aligned.
1320 - If the dashed line extends beyond the header text on both sides,
1321 the column is centered.
1322 - If the dashed line is flush with the header text on both sides,
1323 the default alignment is used (in most cases, this will be left).
1325[^4]: This scheme is due to Michel Fortin, who proposed it on the
1326 [Markdown discussion list](http://six.pairlist.net/pipermail/markdown-discuss/2005-March/001097.html).
1328The table must end with a blank line, or a line of dashes followed by
1329a blank line. A caption may optionally be provided (as illustrated in
1330the example above). A caption is a paragraph beginning with the string
1331`Table:` (or just `:`), which will be stripped off. It may appear either
1332before or after the table.
1334The column headers may be omitted, provided a dashed line is used
1335to end the table. For example:
1337 ------- ------ ---------- -------
1338 12 12 12 12
1339 123 123 123 123
1340 1 1 1 1
1341 ------- ------ ---------- -------
1343When headers are omitted, column alignments are determined on the basis
1344of the first line of the table body. So, in the tables above, the columns
1345would be right, left, center, and right aligned, respectively.
1347**Multiline tables** allow headers and table rows to span multiple lines
1348of text (but cells that span multiple columns or rows of the table are
1349not supported). Here is an example:
1351 -------------------------------------------------------------
1352 Centered Default Right Left
1353 Header Aligned Aligned Aligned
1354 ----------- ------- --------------- -------------------------
1355 First row 12.0 Example of a row that
1356 spans multiple lines.
1358 Second row 5.0 Here's another one. Note
1359 the blank line between
1360 rows.
1361 -------------------------------------------------------------
1363 Table: Here's the caption. It, too, may span
1364 multiple lines.
1366These work like simple tables, but with the following differences:
1368 - They must begin with a row of dashes, before the header text
1369 (unless the headers are omitted).
1370 - They must end with a row of dashes, then a blank line.
1371 - The rows must be separated by blank lines.
1373In multiline tables, the table parser pays attention to the widths of
1374the columns, and the writers try to reproduce these relative widths in
1375the output. So, if you find that one of the columns is too narrow in the
1376output, try widening it in the markdown source.
1378Headers may be omitted in multiline tables as well as simple tables:
1380 ----------- ------- --------------- -------------------------
1381 First row 12.0 Example of a row that
1382 spans multiple lines.
1384 Second row 5.0 Here's another one. Note
1385 the blank line between
1386 rows.
1387 -------------------------------------------------------------
1389 : Here's a multiline table without headers.
1391It is possible for a multiline table to have just one row, but the row
1392should be followed by a blank line (and then the row of dashes that ends
1393the table), or the table may be interpreted as a simple table.
1395**Grid tables** look like this:
1397 : Sample grid table.
1399 +---------------+---------------+--------------------+
1400 | Fruit | Price | Advantages |
1401 +===============+===============+====================+
1402 | Bananas | $1.34 | - built-in wrapper |
1403 | | | - bright color |
1404 +---------------+---------------+--------------------+
1405 | Oranges | $2.10 | - cures scurvy |
1406 | | | - tasty |
1407 +---------------+---------------+--------------------+
1409The row of `=`s separates the header from the table body, and can be
1410omitted for a headerless table. The cells of grid tables may contain
1411arbitrary block elements (multiple paragraphs, code blocks, lists,
1412etc.). Alignments are not supported, nor are cells that span multiple
1413columns or rows. Grid tables can be created easily using [Emacs table mode].
1415 [Emacs table mode]: http://table.sourceforge.net/
1418Title block
1419-----------
1421*Pandoc extension*.
1423If the file begins with a title block
1425 % title
1426 % author(s) (separated by semicolons)
1427 % date
1429it will be parsed as bibliographic information, not regular text. (It
1430will be used, for example, in the title of standalone LaTeX or HTML
1431output.) The block may contain just a title, a title and an author,
1432or all three elements. If you want to include an author but no
1433title, or a title and a date but no author, you need a blank line:
1436 % Author
1438 % My title
1440 % June 15, 2006
1442The title may occupy multiple lines, but continuation lines must
1443begin with leading space, thus:
1445 % My title
1446 on multiple lines
1448If a document has multiple authors, the authors may be put on
1449separate lines with leading space, or separated by semicolons, or
1450both. So, all of the following are equivalent:
1452 % Author One
1453 Author Two
1455 % Author One; Author Two
1457 % Author One;
1458 Author Two
1460The date must fit on one line.
1462All three metadata fields may contain standard inline formatting
1463(italics, links, footnotes, etc.).
1465Title blocks will always be parsed, but they will affect the output only
1466when the `--standalone` (`-s`) option is chosen. In HTML output, titles
1467will appear twice: once in the document head -- this is the title that
1468will appear at the top of the window in a browser -- and once at the
1469beginning of the document body. The title in the document head can have
1470an optional prefix attached (`--title-prefix` or `-T` option). The title
1471in the body appears as an H1 element with class "title", so it can be
1472suppressed or reformatted with CSS. If a title prefix is specified with
1473`-T` and no title block appears in the document, the title prefix will
1474be used by itself as the HTML title.
1476The man page writer extracts a title, man page section number, and
1477other header and footer information from the title line. The title
1478is assumed to be the first word on the title line, which may optionally
1479end with a (single-digit) section number in parentheses. (There should
1480be no space between the title and the parentheses.) Anything after
1481this is assumed to be additional footer and header text. A single pipe
1482character (`|`) should be used to separate the footer text from the header
1483text. Thus,
1485 % PANDOC(1)
1487will yield a man page with the title `PANDOC` and section 1.
1489 % PANDOC(1) Pandoc User Manuals
1491will also have "Pandoc User Manuals" in the footer.
1493 % PANDOC(1) Pandoc User Manuals | Version 4.0
1495will also have "Version 4.0" in the header.
1498Backslash escapes
1499-----------------
1501Except inside a code block or inline code, any punctuation or space
1502character preceded by a backslash will be treated literally, even if it
1503would normally indicate formatting. Thus, for example, if one writes
1505 *\*hello\**
1507one will get
1509 <em>*hello*</em>
1511instead of
1513 <strong>hello</strong>
1515This rule is easier to remember than standard markdown's rule,
1516which allows only the following characters to be backslash-escaped:
1518 \`*_{}[]()>#+-.!
1520(However, if the `--strict` option is supplied, the standard
1521markdown rule will be used.)
1523A backslash-escaped space is parsed as a nonbreaking space. It will
1524appear in TeX output as `~` and in HTML and XML as `\&#160;` or
1525`\&nbsp;`.
1527A backslash-escaped newline (i.e. a backslash occurring at the end of
1528a line) is parsed as a hard line break. It will appear in TeX output as
1529`\\` and in HTML as `<br />`. This is a nice alternative to
1530markdown's "invisible" way of indicating hard line breaks using
1531two trailing spaces on a line.
1533Backslash escapes do not work in verbatim contexts.
1535Smart punctuation
1536-----------------
1538If the `--smart` option is specified, pandoc will produce typographically
1539correct output, converting straight quotes to curly quotes, `---` and `--`
1540to Em-dashes, and `...` to ellipses. Nonbreaking spaces are inserted after
1541certain abbreviations, such as "Mr."
1543Note: if your LaTeX template uses the `csquotes` package, pandoc will
1544detect automatically this and use `\enquote{...}` for quoted text.
1546Inline formatting
1547-----------------
1549### Emphasis ###
1551To *emphasize* some text, surround it with `*`s or `_`, like this:
1553 This text is _emphasized with underscores_, and this
1554 is *emphasized with asterisks*.
1556Double `*` or `_` produces **strong emphasis**:
1558 This is **strong emphasis** and __with underscores__.
1560A `*` or `_` character surrounded by spaces, or backslash-escaped,
1561will not trigger emphasis:
1563 This is * not emphasized *, and \*neither is this\*.
1565Because `_` is sometimes used inside words and identifiers,
1566pandoc does not interpret a `_` surrounded by alphanumeric
1567characters as an emphasis marker. If you want to emphasize
1568just part of a word, use `*`:
1570 feas*ible*, not feas*able*.
1573### Strikeout ###
1575*Pandoc extension*.
1577To strikeout a section of text with a horizontal line, begin and end it
1578with `~~`. Thus, for example,
1580 This ~~is deleted text.~~
1583### Superscripts and subscripts ###
1585*Pandoc extension*.
1587Superscripts may be written by surrounding the superscripted text by `^`
1588characters; subscripts may be written by surrounding the subscripted
1589text by `~` characters. Thus, for example,
1591 H~2~O is a liquid. 2^10^ is 1024.
1593If the superscripted or subscripted text contains spaces, these spaces
1594must be escaped with backslashes. (This is to prevent accidental
1595superscripting and subscripting through the ordinary use of `~` and `^`.)
1596Thus, if you want the letter P with 'a cat' in subscripts, use
1597`P~a\ cat~`, not `P~a cat~`.
1600### Verbatim ###
1602To make a short span of text verbatim, put it inside backticks:
1604 What is the difference between `>>=` and `>>`?
1606If the verbatim text includes a backtick, use double backticks:
1608 Here is a literal backtick `` ` ``.
1610(The spaces after the opening backticks and before the closing
1611backticks will be ignored.)
1613The general rule is that a verbatim span starts with a string
1614of consecutive backticks (optionally followed by a space)
1615and ends with a string of the same number of backticks (optionally
1616preceded by a space).
1618Note that backslash-escapes (and other markdown constructs) do not
1619work in verbatim contexts:
1621 This is a backslash followed by an asterisk: `\*`.
1624Math
1625----
1627*Pandoc extension*.
1629Anything between two `$` characters will be treated as TeX math. The
1630opening `$` must have a character immediately to its right, while the
1631closing `$` must have a character immediately to its left. Thus,
1632`$20,000 and $30,000` won't parse as math. If for some reason
1633you need to enclose text in literal `$` characters, backslash-escape
1634them and they won't be treated as math delimiters.
1636TeX math will be printed in all output formats. How it is rendered
1637depends on the output format:
1639Markdown, reStructuredText, LaTeX, Org-Mode, ConTeXt
1640 ~ It will appear verbatim between `$` characters.
1642reStructuredText
1643 ~ It will be rendered using an interpreted text role `:math:`, as described
1644 [here](http://www.american.edu/econ/itex2mml/mathhack.rst).
1646AsciiDoc
1647 ~ It will be rendered as `latexmath:[...]`.
1649Texinfo
1650 ~ It will be rendered inside a `@math` command.
1652groff man
1653 ~ It will be rendered verbatim without `$`'s.
1655MediaWiki
1656 ~ It will be rendered inside `<math>` tags.
1658Textile
1659 ~ It will be rendered inside `<span class="math">` tags.
1661RTF, OpenDocument, ODT
1662 ~ It will be rendered, if possible, using unicode characters,
1663 and will otherwise appear verbatim.
1665Docbook
1666 ~ If the `--mathml` flag is used, it will be rendered using mathml
1667 in an `inlineequation` or `informalequation` tag. Otherwise it
1668 will be rendered, if possible, using unicode characters.
1670Docx
1671 ~ It will be rendered using OMML math markup.
1673HTML, Slidy, DZSlides, S5, EPUB
1674 ~ The way math is rendered in HTML will depend on the
1675 command-line options selected:
1677 1. The default is to render TeX math as far as possible using unicode
1678 characters, as with RTF, DocBook, and OpenDocument output. Formulas
1679 are put inside a `span` with `class="math"`, so that they may be
1680 styled differently from the surrounding text if needed.
1682 2. If the `--latexmathml` option is used, TeX math will be displayed
1683 between $ or $$ characters and put in `<span>` tags with class `LaTeX`.
1684 The [LaTeXMathML] script will be used to render it as formulas.
1685 (This trick does not work in all browsers, but it works in Firefox.
1686 In browsers that do not support LaTeXMathML, TeX math will appear
1687 verbatim between $ characters.)
1689 3. If the `--jsmath` option is used, TeX math will be put inside
1690 `<span>` tags (for inline math) or `<div>` tags (for display math)
1691 with class `math`. The [jsMath] script will be used to render
1692 it.
1694 4. If the `--mimetex` option is used, the [mimeTeX] CGI script will
1695 be called to generate images for each TeX formula. This should
1696 work in all browsers. The `--mimetex` option takes an optional URL
1697 as argument. If no URL is specified, it will be assumed that the
1698 mimeTeX CGI script is at `/cgi-bin/mimetex.cgi`.
1700 5. If the `--gladtex` option is used, TeX formulas will be enclosed
1701 in `<eq>` tags in the HTML output. The resulting `htex` file may then
1702 be processed by [gladTeX], which will produce image files for each
1703 formula and an `html` file with links to these images. So, the
1704 procedure is:
1706 pandoc -s --gladtex myfile.txt -o myfile.htex
1707 gladtex -d myfile-images myfile.htex
1708 # produces myfile.html and images in myfile-images
1710 6. If the `--webtex` option is used, TeX formulas will be converted
1711 to `<img>` tags that link to an external script that converts
1712 formulas to images. The formula will be URL-encoded and concatenated
1713 with the URL provided. If no URL is specified, the Google Chart
1714 API will be used (`http://chart.apis.google.com/chart?cht=tx&chl=`).
1717Raw HTML
1718--------
1720Markdown allows you to insert raw HTML (or DocBook) anywhere in a document
1721(except verbatim contexts, where `<`, `>`, and `&` are interpreted
1722literally).
1724The raw HTML is passed through unchanged in HTML, S5, Slidy, DZSlides, EPUB,
1725Markdown, and Textile output, and suppressed in other formats.
1727*Pandoc extension*.
1729Standard markdown allows you to include HTML "blocks": blocks
1730of HTML between balanced tags that are separated from the surrounding text
1731with blank lines, and start and end at the left margin. Within
1732these blocks, everything is interpreted as HTML, not markdown;
1733so (for example), `*` does not signify emphasis.
1735Pandoc behaves this way when `--strict` is specified; but by default,
1736pandoc interprets material between HTML block tags as markdown.
1737Thus, for example, Pandoc will turn
1739 <table>
1740 <tr>
1741 <td>*one*</td>
1742 <td>[a link](http://google.com)</td>
1743 </tr>
1744 </table>
1746into
1748 <table>
1749 <tr>
1750 <td><em>one</em></td>
1751 <td><a href="http://google.com">a link</a></td>
1752 </tr>
1753 </table>
1755whereas `Markdown.pl` will preserve it as is.
1757There is one exception to this rule: text between `<script>` and
1758`<style>` tags is not interpreted as markdown.
1760This departure from standard markdown should make it easier to mix
1761markdown with HTML block elements. For example, one can surround
1762a block of markdown text with `<div>` tags without preventing it
1763from being interpreted as markdown.
1765Raw TeX
1766-------
1768*Pandoc extension*.
1770In addition to raw HTML, pandoc allows raw LaTeX, TeX, and ConTeXt to be
1771included in a document. Inline TeX commands will be preserved and passed
1772unchanged to the LaTeX and ConTeXt writers. Thus, for example, you can use
1773LaTeX to include BibTeX citations:
1775 This result was proved in \cite{jones.1967}.
1777Note that in LaTeX environments, like
1779 \begin{tabular}{|l|l|}\hline
1780 Age & Frequency \\ \hline
1781 18--25 & 15 \\
1782 26--35 & 33 \\
1783 36--45 & 22 \\ \hline
1784 \end{tabular}
1786the material between the begin and end tags will be interpreted as raw
1787LaTeX, not as markdown.
1789Inline LaTeX is ignored in output formats other than Markdown, LaTeX,
1790and ConTeXt.
1792### Macros ###
1794For output formats other than LaTeX, pandoc will parse LaTeX `\newcommand` and
1795`\renewcommand` definitions and apply the resulting macros to all LaTeX
1796math. So, for example, the following will work in all output formats,
1797not just LaTeX:
1799 \newcommand{\tuple}[1]{\langle #1 \rangle}
1801 $\tuple{a, b, c}$
1803In LaTeX output, the `\newcommand` definition will simply be passed
1804unchanged to the output.
1807Links
1808-----
1810Markdown allows links to be specified in several ways.
1812### Automatic links ###
1814If you enclose a URL or email address in pointy brackets, it
1815will become a link:
1817 <http://google.com>
1818 <sam@green.eggs.ham>
1821### Inline links ###
1823An inline link consists of the link text in square brackets,
1824followed by the URL in parentheses. (Optionally, the URL can
1825be followed by a link title, in quotes.)
1827 This is an [inline link](/url), and here's [one with
1828 a title](http://fsf.org "click here for a good time!").
1830There can be no space between the bracketed part and the parenthesized part.
1831The link text can contain formatting (such as emphasis), but the title cannot.
1834### Reference links ###
1836An *explicit* reference link has two parts, the link itself and the link
1837definition, which may occur elsewhere in the document (either
1838before or after the link).
1840The link consists of link text in square brackets, followed by a label in
1841square brackets. (There can be space between the two.) The link definition
1842must begin at the left margin or indented no more than three spaces. It
1843consists of the bracketed label, followed by a colon and a space, followed by
1844the URL, and optionally (after a space) a link title either in quotes or in
1845parentheses.
1847Here are some examples:
1849 [my label 1]: /foo/bar.html "My title, optional"
1850 [my label 2]: /foo
1851 [my label 3]: http://fsf.org (The free software foundation)
1852 [my label 4]: /bar#special 'A title in single quotes'
1854The URL may optionally be surrounded by angle brackets:
1856 [my label 5]: <http://foo.bar.baz>
1858The title may go on the next line:
1860 [my label 3]: http://fsf.org
1861 "The free software foundation"
1863Note that link labels are not case sensitive. So, this will work:
1865 Here is [my link][FOO]
1867 [Foo]: /bar/baz
1869In an *implicit* reference link, the second pair of brackets is
1870empty, or omitted entirely:
1872 See [my website][], or [my website].
1874 [my website]: http://foo.bar.baz
1877Images
1878------
1880A link immediately preceded by a `!` will be treated as an image.
1881The link text will be used as the image's alt text:
1883 ![la lune](lalune.jpg "Voyage to the moon")
1885 ![movie reel]
1887 [movie reel]: movie.gif
1889### Pictures with captions ###
1891*Pandoc extension*.
1893An image occurring by itself in a paragraph will be rendered as
1894a figure with a caption.[^5] (In LaTeX, a figure environment will be
1895used; in HTML, the image will be placed in a `div` with class
1896`figure`, together with a caption in a `p` with class `caption`.)
1897The image's alt text will be used as the caption.
1899 ![This is the caption](/url/of/image.png)
1901[^5]: This feature is not yet implemented for RTF, OpenDocument, or
1902 ODT. In those formats, you'll just get an image in a paragraph by
1903 itself, with no caption.
1905If you just want a regular inline image, just make sure it is not
1906the only thing in the paragraph. One way to do this is to insert a
1907nonbreaking space after the image:
1909 ![This image won't be a figure](/url/of/image.png)\
1912Footnotes
1913---------
1915*Pandoc extension*.
1917Pandoc's markdown allows footnotes, using the following syntax:
1919 Here is a footnote reference,[^1] and another.[^longnote]
1921 [^1]: Here is the footnote.
1923 [^longnote]: Here's one with multiple blocks.
1925 Subsequent paragraphs are indented to show that they
1926 belong to the previous footnote.
1928 { some.code }
1930 The whole paragraph can be indented, or just the first
1931 line. In this way, multi-paragraph footnotes work like
1932 multi-paragraph list items.
1934 This paragraph won't be part of the note, because it
1935 isn't indented.
1937The identifiers in footnote references may not contain spaces, tabs,
1938or newlines. These identifiers are used only to correlate the
1939footnote reference with the note itself; in the output, footnotes
1940will be numbered sequentially.
1942The footnotes themselves need not be placed at the end of the
1943document. They may appear anywhere except inside other block elements
1944(lists, block quotes, tables, etc.).
1946Inline footnotes are also allowed (though, unlike regular notes,
1947they cannot contain multiple paragraphs). The syntax is as follows:
1949 Here is an inline note.^[Inlines notes are easier to write, since
1950 you don't have to pick an identifier and move down to type the
1951 note.]
1953Inline and regular footnotes may be mixed freely.
1956Citations
1957---------
1959*Pandoc extension*.
1961Pandoc can automatically generate citations and a bibliography in a number of
1962styles (using Andrea Rossato's `hs-citeproc`). In order to use this feature,
1963you will need a bibliographic database in one of the following formats:
1965 Format File extension
1966 ------------ --------------
1967 MODS .mods
1968 BibTeX/BibLaTeX .bib
1969 RIS .ris
1970 EndNote .enl
1971 EndNote XML .xml
1972 ISI .wos
1973 MEDLINE .medline
1974 Copac .copac
1975 JSON citeproc .json
1977You will need to specify the bibliography file using the `--bibliography`
1978command-line option (which may be repeated if you have several
1979bibliographies).
1981By default, pandoc will use a Chicago author-date format for citations
1982and references. To use another style, you will need to use the
1983`--csl` option to specify a [CSL] 1.0 style file. A primer on
1984creating and modifying CSL styles can be found at
1985<http://citationstyles.org/downloads/primer.html>.
1986A repository of CSL styles can be found at
1987<https://github.com/citation-style-language/styles>.
1988See also <http://zotero.org/styles> for easy browsing.
1990Citations go inside square brackets and are separated by semicolons.
1991Each citation must have a key, composed of '@' + the citation
1992identifier from the database, and may optionally have a prefix,
1993a locator, and a suffix. Here are some examples:
1995 Blah blah [see @doe99, pp. 33-35; also @smith04, ch. 1].
1997 Blah blah [@doe99, pp. 33-35, 38-39 and *passim*].
1999 Blah blah [@smith04; @doe99].
2001A minus sign (`-`) before the `@` will suppress mention of
2002the author in the citation. This can be useful when the
2003author is already mentioned in the text:
2005 Smith says blah [-@smith04].
2007You can also write an in-text citation, as follows:
2009 @smith04 says blah.
2011 @smith04 [p. 33] says blah.
2013If the style calls for a list of works cited, it will be placed
2014at the end of the document. Normally, you will want to end your
2015document with an appropriate header:
2017 last paragraph...
2019 # References
2021The bibliography will be inserted after this header.
2024Producing slide shows with Pandoc
2025=================================
2027You can use Pandoc to produce an HTML + javascript slide presentation
2028that can be viewed via a web browser. There are three ways to do this,
2029using [S5], [DZSlides], or [Slidy]. You can also produce a PDF slide
2030show using LaTeX [beamer].
2032Here's the markdown source for a simple slide show, `habits.txt`:
2034 % Habits
2035 % John Doe
2036 % March 22, 2005
2038 # In the morning
2040 ## Getting up
2042 - Turn off alarm
2043 - Get out of bed
2045 ## Breakfast
2047 - Eat eggs
2048 - Drink coffee
2050 # In the evening
2052 ## Dinner
2054 - Eat spaghetti
2055 - Drink wine
2057 ------------------
2059 ![picture of spaghetti](images/spaghetti.jpg)
2061 ## Going to sleep
2063 - Get in bed
2064 - Count sheep
2066To produce the slide show, simply type
2068 pandoc -t s5 -s habits.txt -o habits.html
2070for S5,
2072 pandoc -t slidy -s habits.txt -o habits.html
2074for Slidy,
2076 pandoc -t dzslides -s habits.txt -o habits.html
2078for DZSlides, or
2080 pandoc -t beamer habits.txt -o habits.pdf
2082for beamer.
2084With all HTML slide formats, the `--self-contained` option can be used to
2085produce a single file that contains all of the data necessary to display the
2086slide show, including linked scripts, stylesheets, images, and videos.
2088Structuring the slide show
2089--------------------------
2091By default, the *slide level* is the highest header level in
2092the hierarchy that is followed immediately by content, and not another
2093header, somewhere in the document. In the example above, level 1 headers
2094are always followed by level 2 headers, which are followed by content,
2095so 2 is the slide level. This default can be overridden using
2096the `--slide-level` option.
2098The document is carved up into slides according to the following
2099rules:
2101 * A horizontal rule always starts a new slide.
2103 * A header at the slide level always starts a new slide.
2105 * Headers *below* the slide level in the hierarchy create
2106 headers *within* a slide.
2108 * Headers *above* the slide level in the hierarchy create
2109 "title slides," which just contain the section title
2110 and help to break the slide show into sections.
2112 * A title page is constructed automatically from the document's title
2113 block, if present. (In the case of beamer, this can be disabled
2114 by commenting out some lines in the default template.)
2116These rules are designed to support many different styles of slide show. If
2117you don't care about structuring your slides into sections and subsections,
2118you can just use level 1 headers for all each slide. (In that case, level 1
2119will be the slide level.) But you can also structure the slide show into
2120sections, as in the example above.
2122For Slidy and S5, the file produced by pandoc with the `-s/--standalone`
2123option embeds a link to javascripts and CSS files, which are assumed to
2124be available at the relative path `s5/default` (for S5) or at the Slidy
2125website at `w3.org` (for Slidy). (These paths can be changed by setting
2126the `slidy-url` or `s5-url` variables; see `--variable`, above.) For DZSlides,
2127the (relatively short) javascript and css are included in the file by default.
2129Incremental lists
2130-----------------
2132By default, these writers produces lists that display "all at once."
2133If you want your lists to display incrementally (one item at a time),
2134use the `-i` option. If you want a particular list to depart from the
2135default (that is, to display incrementally without the `-i` option and
2136all at once with the `-i` option), put it in a block quote:
2138 > - Eat spaghetti
2139 > - Drink wine
2141In this way incremental and nonincremental lists can be mixed in
2142a single document.
2144Styling the slides
2145------------------
2147You can change the style of HTML slides by putting customized CSS files
2148in `$DATADIR/s5/default` (for S5) or `$DATADIR/slidy` (for Slidy),
2149where `$DATADIR` is the user data directory (see `--data-dir`, above).
2150The originals may be found in pandoc's system data directory (generally
2151`$CABALDIR/pandoc-VERSION/s5/default`). Pandoc will look there for any
2152files it does not find in the user data directory.
2154For dzslides, the CSS is included in the HTML file itself, and may
2155be modified there.
2157To style beamer slides, you can specify a beamer "theme" or "colortheme"
2158using the `-V` option:
2160 pandoc -t beamer habits.txt -V theme:Warsaw -o habits.pdf
2162Literate Haskell support
2163========================
2165If you append `+lhs` to an appropriate input or output format (`markdown`,
2166`rst`, or `latex` for input or output; `html` or `html5` for output only),
2167pandoc will treat the document as literate Haskell source. This means that
2169 - In markdown input, "bird track" sections will be parsed as Haskell
2170 code rather than block quotations. Text between `\begin{code}`
2171 and `\end{code}` will also be treated as Haskell code.
2173 - In markdown output, code blocks with class `haskell` will be
2174 rendered using bird tracks, and block quotations will be
2175 indented one space, so they will not be treated as Haskell code.
2176 In addition, headers will be rendered setext-style (with underlines)
2177 rather than atx-style (with '#' characters). (This is because ghc
2178 treats '#' characters in column 1 as introducing line numbers.)
2180 - In restructured text input, "bird track" sections will be parsed
2181 as Haskell code.
2183 - In restructured text output, code blocks with class `haskell` will
2184 be rendered using bird tracks.
2186 - In LaTeX input, text in `code` environments will be parsed as
2187 Haskell code.
2189 - In LaTeX output, code blocks with class `haskell` will be rendered
2190 inside `code` environments.
2192 - In HTML output, code blocks with class `haskell` will be rendered
2193 with class `literatehaskell` and bird tracks.
2195Examples:
2197 pandoc -f markdown+lhs -t html
2199reads literate Haskell source formatted with markdown conventions and writes
2200ordinary HTML (without bird tracks).
2202 pandoc -f markdown+lhs -t html+lhs
2204writes HTML with the Haskell code in bird tracks, so it can be copied
2205and pasted as literate Haskell source.
2207Authors
2208=======
2210© 2006-2011 John MacFarlane (jgm at berkeley dot edu). Released under the
2211[GPL], version 2 or greater. This software carries no warranty of
2212any kind. (See COPYRIGHT for full copyright and warranty notices.)
2213Other contributors include Recai Oktaş, Paulo Tanimoto, Peter Wang,
2214Andrea Rossato, Eric Kow, infinity0x, Luke Plant, shreevatsa.public,
2215Puneeth Chaganti, Paul Rivier, rodja.trappe, Bradley Kuhn, thsutton,
2216Nathan Gass, Jonathan Daugherty, Jérémy Bobbio, Justin Bogner, qerub,
2217Christopher Sawicki, Kelsey Hightower, Masayoshi Takahashi, Antoine
2218Latter, Ralf Stephan, Eric Seidel, B. Scott Michel.
2220[markdown]: http://daringfireball.net/projects/markdown/
2221[reStructuredText]: http://docutils.sourceforge.net/docs/ref/rst/introduction.html
2222[S5]: http://meyerweb.com/eric/tools/s5/
2223[Slidy]: http://www.w3.org/Talks/Tools/Slidy/
2224[HTML]: http://www.w3.org/TR/html40/
2225[HTML 5]: http://www.w3.org/TR/html5/
2226[XHTML]: http://www.w3.org/TR/xhtml1/
2227[LaTeX]: http://www.latex-project.org/
2228[beamer]: http://www.tex.ac.uk/CTAN/macros/latex/contrib/beamer
2229[ConTeXt]: http://www.pragma-ade.nl/
2230[RTF]: http://en.wikipedia.org/wiki/Rich_Text_Format
2231[DocBook XML]: http://www.docbook.org/
2232[OpenDocument XML]: http://opendocument.xml.org/
2233[ODT]: http://en.wikipedia.org/wiki/OpenDocument
2234[Textile]: http://redcloth.org/textile
2235[MediaWiki markup]: http://www.mediawiki.org/wiki/Help:Formatting
2236[groff man]: http://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPages/man7/groff_man.7.html
2237[Haskell]: http://www.haskell.org/
2238[GNU Texinfo]: http://www.gnu.org/software/texinfo/
2239[Emacs Org-Mode]: http://orgmode.org
2240[AsciiDoc]: http://www.methods.co.nz/asciidoc/
2241[EPUB]: http://www.idpf.org/
2242[GPL]: http://www.gnu.org/copyleft/gpl.html "GNU General Public License"
2243[DZSlides]: http://paulrouget.com/dzslides/
2244[ISO 8601 format]: http://www.w3.org/TR/NOTE-datetime
2245[Word docx]: http://www.microsoft.com/interop/openup/openxml/default.aspx
2246[PDF]: http://www.adobe.com/pdf/