git.iko.soy/typeable/pandoc
on eac4abe help sign in
1424 lines 54 kB history raw
1% Pandoc User's Guide
2% John MacFarlane
3% March 20, 2010
5Pandoc is a [Haskell] library for converting from one markup format to
6another, and a command-line tool that uses this library. It can read
7[markdown] and (subsets of) [reStructuredText], [HTML], and [LaTeX]; and
8it can write plain text, [markdown], [reStructuredText], [HTML], [LaTeX],
9[ConTeXt], [RTF], [DocBook XML], [OpenDocument XML], [ODT], [GNU Texinfo],
10[MediaWiki markup], [EPUB], [Textile], [groff man] pages, and [Slidy]
11or [S5] HTML slide shows.
13Pandoc's enhanced version of markdown includes syntax for footnotes,
14tables, flexible ordered lists, definition lists, delimited code blocks,
15superscript, subscript, strikeout, title blocks, automatic tables of
16contents, embedded LaTeX math, and markdown inside HTML block elements.
17(These enhancements can be disabled if a drop-in replacement for
18`Markdown.pl` is desired.)
20In contrast to most existing tools for converting markdown to HTML, which
21use regex substitutions, Pandoc has a modular design: it consists of a
22set of readers, which parse text in a given format and produce a native
23representation of the document, and a set of writers, which convert
24this native representation into a target format. Thus, adding an input
25or output format requires only adding a reader or writer.
27© 2006-2010 John MacFarlane (jgm at berkeley dot edu). Released under the
28[GPL], version 2 or greater. This software carries no warranty of
29any kind. (See COPYRIGHT for full copyright and warranty notices.)
30Other contributors include Recai Oktaş, Paulo Tanimoto, Peter Wang,
31Andrea Rossato, Eric Kow, infinity0x, Luke Plant, shreevatsa.public,
32rodja.trappe, Bradley Kuhn, thsutton, Justin Bogner.
34Using Pandoc
35============
37If you run `pandoc` without arguments, it will accept input from
38stdin. If you run it with file names as arguments, it will take input
39from those files. By default, `pandoc` writes its output to stdout.[^1]
40If you want to write to a file, use the `-o` option:
42 pandoc -o hello.html hello.txt
44[^1]: The exceptions are for `odt` and `epub`. Since these are
45 a binary output formats, an output file must be specified explicitly.
47Note that you can specify multiple input files on the command line.
48`pandoc` will concatenate them all (with blank lines between them)
49before parsing:
51 pandoc -s ch1.txt ch2.txt refs.txt > book.html
53(The `-s` option here tells `pandoc` to produce a standalone HTML file,
54with a proper header, rather than a fragment. For more details on this
55and many other command-line options, see below.)
57Instead of a filename, you can specify an absolute URI. In this
58case pandoc will attempt to download the content via HTTP:
60 pandoc -f html -t markdown http://www.fsf.org
62The format of the input and output can be specified explicitly using
63command-line options. The input format can be specified using the
64`-r/--read` or `-f/--from` options, the output format using the
65`-w/--write` or `-t/--to` options. Thus, to convert `hello.txt` from
66markdown to LaTeX, you could type:
68 pandoc -f markdown -t latex hello.txt
70To convert `hello.html` from html to markdown:
72 pandoc -f html -t markdown hello.html
74Supported output formats include `markdown`, `latex`, `context`
75(ConTeXt), `html`, `rtf` (rich text format), `rst`
76(reStructuredText), `docbook` (DocBook XML), `opendocument`
77(OpenDocument XML), `odt` (OpenOffice text document), `texinfo`, (GNU
78Texinfo), `mediawiki` (MediaWiki markup), `textile` (Textile),
79`epub` (EPUB ebook), `man` (groff man), `slidy` (slidy HTML and
80javascript slide show), or `s5` (S5 HTML and javascript slide show).
82Supported input formats include `markdown`, `html`, `latex`, and `rst`.
83Note that the `rst` reader only parses a subset of reStructuredText
84syntax. For example, it doesn't handle tables, option lists, or
85footnotes. But for simple documents it should be adequate. The `latex`
86and `html` readers are also limited in what they can do.
88If you don't specify a reader or writer explicitly, `pandoc` will
89try to determine the input and output format from the extensions of
90the input and output filenames. Thus, for example,
92 pandoc -o hello.tex hello.txt
94will convert `hello.txt` from markdown to LaTeX. If no output file
95is specified (so that output goes to stdout), or if the output file's
96extension is unknown, the output format will default to HTML.
97If no input file is specified (so that input comes from stdin), or
98if the input files' extensions are unknown, the input format will
99be assumed to be markdown unless explicitly specified.
101Character encodings
102-------------------
104All input is assumed to be in the UTF-8 encoding, and all output
105is in UTF-8. If your local character encoding is not UTF-8 and you use
106accented or foreign characters, you should pipe the input and output
107through [`iconv`]. For example,
109 iconv -t utf-8 source.txt | pandoc | iconv -f utf-8 > output.html
111will convert `source.txt` from the local encoding to UTF-8, then
112convert it to HTML, then convert back to the local encoding,
113putting the output in `output.html`.
115Wrappers
116========
118`markdown2pdf`
119--------------
121The standard Pandoc installation includes `markdown2pdf`, a wrapper
122around `pandoc` and `pdflatex` that produces PDFs directly from markdown
123sources. The default behavior of `markdown2pdf` is to create a file with
124the same base name as the first argument and the extension `pdf`; thus,
125for example,
127 markdown2pdf sample.txt endnotes.txt
129will produce `sample.pdf`. (If `sample.pdf` exists already,
130it will be backed up before being overwritten.) An output file
131name can be specified explicitly using the `-o` option:
133 markdown2pdf -o book.pdf chap1 chap2
135If no input file is specified, input will be taken from stdin.
136All of `pandoc`'s options will work with `markdown2pdf` as well.
138`markdown2pdf` assumes that `pdflatex` is in the path. It also
139assumes that the following LaTeX packages are available:
140`unicode`, `fancyhdr` (if you have verbatim text in footnotes),
141`graphicx` (if you use images), `array` (if you use tables),
142and `ulem` (if you use strikeout text). If they are not already
143included in your LaTeX distribution, you can get them from
144[CTAN]. A full [TeX Live] or [MacTeX] distribution will have all of
145these packages.
147`hsmarkdown`
148------------
150A user who wants a drop-in replacement for `Markdown.pl` may create
151a symbolic link to the `pandoc` executable called `hsmarkdown`. When
152invoked under the name `hsmarkdown`, `pandoc` will behave as if the
153`--strict` flag had been selected, and no command-line options will be
154recognized. However, this approach does not work under Cygwin, due to
155problems with its simulation of symbolic links.
157[Cygwin]: http://www.cygwin.com/
158[`iconv`]: http://www.gnu.org/software/libiconv/
159[CTAN]: http://www.ctan.org "Comprehensive TeX Archive Network"
160[TeX Live]: http://www.tug.org/texlive/
161[MacTeX]: http://www.tug.org/mactex/
163Command-line options
164====================
166Various command-line options can be used to customize the output.
167For further documentation, see the `pandoc(1)` man page.
169`-f`, `--from`, `-r`, or `--read` *format*
170: specifies the input format (the format Pandoc will be converting
171 *from*). *format* can be `native`, `markdown`, `rst`, `html`, or
172 `latex`. (`+lhs` can be appended to indicate that the input should
173 be treated as literate Haskell source. See
174 [Literate Haskell support](#literate-haskell-support), below.)
176`-t`, `--to`, `-w`, or `--write` *format*
177: specifies the output format -- the format Pandoc will
178 be converting *to*. *format* can be `native`, `html`, `slidy`, `s5`,
179 `docbook`, `opendocument`, `latex`, `context`, `markdown`, `man`,
180 `plain`, `rst`, and `rtf`. (`+lhs` can be appended to indicate that
181 the output should be treated as literate Haskell source. See
182 [Literate Haskell support](#literate-haskell-support), below.)
184`-s` or `--standalone`
185: indicates that a standalone document is to be produced (with
186 appropriate headers and footers), rather than a fragment.
188`-o` or `--output` *filename*
189: sends output to *filename*. If this option is not specified,
190 or if its argument is `-`, output will be sent to stdout.
191 (Exception: if the output format is `odt` or `epub`, output to
192 stdout is disabled.)
194`-p` or `--preserve-tabs`
195: causes tabs in the source text to be preserved, rather than converted
196 to spaces (the default).
198`--tab-stop` *tabstop*
199: sets the number of spaces per tab to *tabstop* (defaults to 4).
201`--strict`
202: specifies that strict markdown syntax is to be used, without
203 pandoc's usual extensions and variants (described below). When the
204 input format is HTML, this means that constructs that have no
205 equivalents in standard markdown (e.g. definition lists or strikeout
206 text) will be parsed as raw HTML.
208`--reference-links`
209: causes reference-style links to be used in markdown
210 and reStructuredText output. By default inline links are used.
212`-R` or `--parse-raw`
213: causes the HTML and LaTeX readers to parse HTML codes and LaTeX
214 environments that it can't translate as raw HTML or LaTeX. Raw HTML can
215 be printed in markdown, reStructuredText, HTML, Slidy, and S5
216 output; raw LaTeX can be printed in markdown, reStructuredText,
217 LaTeX, and ConTeXt output. The default is for the readers to omit
218 untranslatable HTML codes and LaTeX environments. (The LaTeX reader
219 does pass through untranslatable LaTeX *commands*, even if `-R` is
220 not specified.)
222`-C` or `--custom-header` *filename*
223: can be used to specify a custom document header. Implies `--standalone`.
224 *Note: this option is deprecated. Use of `--template` is preferred.*
226`--toc` or `--table-of-contents`
227: includes an automatically generated table of contents (or, in the
228 case of `latex`, `context`, and `rst`, an instruction to create
229 one) in the output document. This option has no effect with `man`,
230 `docbook`, `slidy`, or `s5` output formats.
232`--base-header-level` *level*
233: specifies the base level for headers (defaults to 1).
235`--template=`*file*
236: uses *file* as a custom template for the generated document. Implies
237 `-s`. See [Templates](#templates) below for a description
238 of template syntax. If this option is not used, a default
239 template appropriate for the output format will be used. See also
240 `-D/--print-default-template`.
242`-V` *key=val*, `--variable=`*key:val*
243: sets the template variable *key* to the value *val* when rendering the
244 document in standalone mode. This is only useful when the
245 `--template` option is used to specify a custom template, since
246 pandoc automatically sets the variables used in the default
247 templates.
249`-c` or `--css` *filename*
250: allows the user to specify a custom stylesheet that will be linked to
251 in HTML, Slidy, and S5 output. This option can be used repeatedly
252 to include multiple stylesheets. They will be included in the order
253 specified. Implies `--standalone`.
255`-H` or `--include-in-header` *filename*
256: includes the contents of *filename* (verbatim) at the end of the
257 document header. This can be used, for example, to include special
258 CSS or javascript in HTML documents. This option can be used
259 repeatedly to include multiple files in the header. They will be
260 included in the order specified. Implies `--standalone`.
262`-B` or `--include-before-body` *filename*
263: includes the contents of *filename* (verbatim) at the beginning of
264 the document body (e.g. after the `<body>` tag in HTML, or the
265 `\begin{document}` command in LaTeX). This can be used to include
266 navigation bars or banners in HTML documents. This option can be
267 used repeatedly to include multiple files. They will be included in
268 the order specified. Implies `--standalone`.
270`-A` or `--include-after-body` *filename*
271: includes the contents of *filename* (verbatim) at the end of
272 the document body (before the `</body>` tag in HTML, or the
273 `\end{document}` command in LaTeX). This option can be be used
274 repeatedly to include multiple files. They will be included in the
275 order specified. Implies `--standalone`.
277`--reference-odt` *filename*
278: uses the specified file as a style reference in producing an ODT.
279 For best results, the reference ODT should be a modified version
280 of an ODT produced using pandoc. The contents of the reference ODT
281 are ignored, but its stylesheets are used in the new ODT. If no
282 reference ODT is specified on the command line, pandoc will look
283 for a file `reference.odt` in the user data directory (see
284 `--data-dir`, below). If it is not found there, sensible defaults
285 will be used.
287`--epub-stylesheet` *filename*
288: uses the specified CSS file to style the EPUB. If no stylesheet
289 is specified, pandoc will look for a file `epub.css` in the
290 user data directory (see `--data-dir`, below). If it is not
291 found there, sensible defaults will be used.
293`--epub-metadata` *filename*
294: looks in the specified XML file for metadata for the EPUB.
295 The file should contain a series of [Dublin Core elements],
296 for example:
298 <dc:rights>Creative Commons</dc:rights>
299 <dc:language>es-AR</dc:language>
301 By default, pandoc will include the following metadata elements:
302 `<dc:title>` (from the document title), `<dc:creator>` (from the
303 document authors), `<dc:language>` (from the locale), and
304 `<dc:identifier id="BookId">` (a randomly generated UUID). Any of
305 these may be overridden by elements in the metadata file.
307`-D` or `--print-default-template` *format*
308: prints the default template for an output *format*. (See `-t`
309 for a list of possible *format*s.)
311`-T` or `--title-prefix` *string*
312: includes *string* as a prefix at the beginning of the title that
313 appears in the HTML header (but not in the title as it appears at
314 the beginning of the HTML body). (See below on
315 [Title Blocks](#title-blocks).) Implies `--standalone`.
317`-S` or `--smart`
318: causes `pandoc` to produce typographically correct output, along the
319 lines of John Gruber's [Smartypants]. Straight quotes are converted
320 to curly quotes, `---` to dashes, and `...` to ellipses. Nonbreaking
321 spaces are inserted after certain abbreviations, such as "Mr."
322 (Note: This option is only significant when the input format is
323 `markdown`. It is selected automatically when the output format is
324 `latex` or `context`.)
326`-m`*[url]* or `--latexmathml`*[=url]*
327: causes `pandoc` to use the [LaTeXMathML] script to display
328 TeX math in HTML, Slidy, or S5. If a local copy of `LaTeXMathML.js`
329 is available on the webserver where the page will be viewed, provide
330 a *url* and a link will be inserted in the generated HTML. If
331 no *url* is provided, the contents of the script will be inserted
332 directly; this provides portability at the price of efficiency. If
333 you plan to use math on several pages, it is much better to link to
334 a copy of `LaTeXMathML.js`, which can be cached.
336`--mathml`
337: causes `pandoc` to convert all TeX math to MathML.
338 In standalone mode, a small javascript will be inserted that allows
339 the MathML to be viewed on some browsers.
341`--jsmath`*=[url]*
342: causes `pandoc` to use the [jsMath] script to display
343 TeX math in HTML, Slidy, or S5. The *url* should point to the jsMath
344 load script (e.g. `jsMath/easy/load.js`). If it is provided, a link
345 to it will be included in the header of standalone HTML documents.
347\--mathjax=*URL*
348: causes `pandoc` to use [MathJax] to display embedded TeX math in HTML
349 output. The *URL* should point to the `MathJax.js` load script.
351`--gladtex`*[=url]*
352: causes TeX formulas to be enclosed in `<eq>` tags in HTML, Slidy, or
353 S5 output. This output can then be processed by [gladTeX] to produce
354 links to images with the typeset formulas.
356`--mimetex`*[=url]*
357: causes TeX formulas to be replaced by `<img>` tags linking to the
358 [mimeTeX] CGI script, which will produce images with the typeset
359 formulas.
361`--webtex`*[=url]*
362: causes TeX formulas to be replaced by `<img>` tags linking to an
363 external service that converts TeX formulas to images. The formula
364 will be concatenated with the URL provided. If no URL
365 is specified, the Google Chart API is used.
367`-i` or `--incremental`
368: causes all lists in Slidy or S5 output to be displayed incrementally by
369 default (one item at a time). The normal default is for lists to be
370 displayed all at once.
372`--offline`
373: causes all the CSS and javascript needed for a Slidy or S5 slide show
374 to be included in the output, so that the slide show will work even
375 when no internet connection is available.
377`--xetex`
378: creates LaTeX outut suitable for processing by XeTeX.
380`-N` or `--number-sections`
381: causes sections to be numbered in LaTeX, ConTeXt, or HTML output.
382 By default, sections are not numbered.
384`--section-divs`
385: causes sections to be wrapped in `<div>` tags. In this case,
386 [section identifiers](#header-identifiers-in-html)
387 are attached to the enclosing `<div>` rather than the header itself.
389`--no-wrap`
390: disables text-wrapping in output. By default, text is wrapped
391 appropriately for the output format.
393`--sanitize-html`
394: sanitizes HTML (in markdown or HTML input) using a whitelist.
395 Unsafe tags are replaced by HTML comments; unsafe attributes
396 are omitted. URIs in links and images are also checked against a
397 whitelist of URI schemes.
399`--email-obfuscation`*=none|javascript|references*
400: specifies a method for obfuscating `mailto:` links in HTML documents.
401 *none* leaves `mailto:` links as they are. *javascript* obfuscates
402 them using javascript. *references* obfuscates them by printing their
403 letters as decimal or hexadecimal character references. If `--strict`
404 is specified, *references* is used regardless of the presence
405 of this option.
407`--id-prefix`*=string*
408: specifies a prefix to be added to all automatically generated identifiers
409 in HTML output. This is useful for preventing duplicate identifiers
410 when generating fragments to be included in other pages.
412`--indented-code-classes`*=classes*
413: specifies classes to use for indented code blocks--for example,
414 `perl,numberLines` or `haskell`. Multiple classes may be separated
415 by spaces or commas.
417`--data-dir`*=directory*
418: specifies the user data directory to search for pandoc data files.
419 If this option is not specified, the default user data directory
420 will be used:
422 $HOME/.pandoc
424 in unix and
426 C:\Documents And Settings\USERNAME\Application Data\pandoc
428 in Windows. A `reference.odt`, `epub.css`, `templates` directory,
429 or `s5` directory placed in this directory will override pandoc's
430 normal defaults.
432`--dump-args`
433: is intended to make it easier to create wrapper scripts that use
434 Pandoc. It causes Pandoc to dump information about the arguments
435 with which it was called to stdout, then exit. The first line
436 printed is the name of the output file specified using the `-o`
437 or `--output` option, or `-` if output would go to stdout. The
438 remaining lines, if any, list command-line arguments. These will
439 include the names of input files and any special options passed
440 after ` -- ` on the command line. So, for example,
442 pandoc --dump-args -o foo.html -s foo.txt \
443 appendix.txt -- -e latin1
445 will cause the following to be printed to stdout:
447 foo.html foo.txt appendix.txt -e latin1
449`--ignore-args`
450: causes Pandoc to ignore all command-line arguments.
451 Regular Pandoc options are not ignored. Thus, for example,
453 pandoc --ignore-args -o foo.html -s foo.txt -- -e latin1
455 is equivalent to
457 pandoc -o foo.html -s
459`-v` or `--version`
460: prints the version number to STDERR.
462`-h` or `--help`
463: prints a usage message to STDERR.
465[Smartypants]: http://daringfireball.net/projects/smartypants/
466[LaTeXMathML]: http://math.etsu.edu/LaTeXMathML/
467[jsMath]: http://www.math.union.edu/~dpvc/jsmath/
468[MathJax]: http://www.mathjax.org/
469[gladTeX]: http://www.math.uio.no/~martingu/gladtex/index.html
470[mimeTeX]: http://www.forkosh.com/mimetex.html
471[Dublin Core elements]: http://dublincore.org/documents/dces/
473Templates
474=========
476When the `-s/--standalone` option is used, pandoc uses a template to
477add header and footer material that is needed for a self-standing
478document. To see the default template that is used, just type
480 pandoc -D FORMAT
482where `FORMAT` is the name of the output format. A custom template
483can be specified using the `--template` option. You can also override
484the system default templates for a given output format `FORMAT`
485by putting a file `templates/FORMAT.template` in the user data
486directory (see `--data-dir`, above).
488Templates may contain *variables*. Variable names are sequences of
489alphanumerics, `-`, and `_`, starting with a letter. A variable name
490surrounded by `$` signs will be replaced by its value. For example,
491the string `$title$` in
493 <title>$title$</title>
495will be replaced by the document title.
497To write a literal `$` in a template, use `$$`.
499Some variables are set automatically by pandoc. These vary somewhat
500depending on the output format, but include:
502`legacy-header`
503: contents specified by `-C/--custom-header`
504`header-includes`
505: contents specified by `-H/--include-in-header` (may have multiple
506 values)
507`toc`
508: non-null value if `--toc/--table-of-contents` was specified
509`include-before`
510: contents specified by `-B/--include-before-body` (may have
511 multiple values)
512`include-after`
513: contents specified by `-A/--include-after-body` (may have
514 multiple values)
515`body`
516: body of document
517`title`
518: title of document, as specified in title block
519`author`
520: author of document, as specified in title block (may have
521 multiple values)
522`date`
523: date of document, as specified in title block
525Variables may be set at the command line using the `-V/--variable`
526option. This allows users to include custom variables in their
527templates.
529Templates may contain conditionals. The syntax is as follows:
531 $if(variable)$
532 X
533 $else$
534 Y
535 $endif$
537This will include `X` in the template if `variable` has a non-null
538value; otherwise it will include `Y`. `X` and `Y` are placeholders for
539any valid template text, and may include interpolated variables or other
540conditionals. The `$else$` section may be omitted.
542When variables can have multiple values (for example, `author` in
543a multi-author document), you can use the `$for$` keyword:
545 $for(author)$
546 <meta name="author" content="$author$" />
547 $endfor$
549You can optionally specify a separator to be used between
550consecutive items:
552 $for(author)$$author$$sep$, $endfor$
554Pandoc's markdown vs. standard markdown
555=======================================
557In parsing markdown, Pandoc departs from and extends [standard markdown]
558in a few respects. Except where noted, these differences can
559be suppressed by specifying the `--strict` command-line option.
561[standard markdown]: http://daringfireball.net/projects/markdown/syntax
562 "Markdown syntax description"
564Backslash escapes
565-----------------
567Except inside a code block or inline code, any punctuation or space
568character preceded by a backslash will be treated literally, even if it
569would normally indicate formatting. Thus, for example, if one writes
571 *\*hello\**
573one will get
575 <em>*hello*</em>
577instead of
579 <strong>hello</strong>
581This rule is easier to remember than standard markdown's rule,
582which allows only the following characters to be backslash-escaped:
584 \`*_{}[]()>#+-.!
586A backslash-escaped space is parsed as a nonbreaking space. It will
587appear in TeX output as `~` and in HTML and XML as `\&#160;` or
588`\&nbsp;`.
590A backslash-escaped newline (i.e. a backslash occurring at the end of
591a line) is parsed as a hard line break. It will appear in TeX output as
592`\\` and in HTML as `<br />`. This is a nice alternative to
593markdown's "invisible" way of indicating hard line breaks using
594two trailing spaces on a line.
596Subscripts and superscripts
597---------------------------
599Superscripts may be written by surrounding the superscripted text by `^`
600characters; subscripts may be written by surrounding the subscripted
601text by `~` characters. Thus, for example,
603 H~2~O is a liquid. 2^10^ is 1024.
605If the superscripted or subscripted text contains spaces, these spaces
606must be escaped with backslashes. (This is to prevent accidental
607superscripting and subscripting through the ordinary use of `~` and `^`.)
608Thus, if you want the letter P with 'a cat' in subscripts, use
609`P~a\ cat~`, not `P~a cat~`.
611Strikeout
612---------
614To strikeout a section of text with a horizontal line, begin and end it
615with `~~`. Thus, for example,
617 This ~~is deleted text.~~
619Nested Lists
620------------
622Pandoc behaves differently from standard markdown on some "edge
623cases" involving lists. Consider this source:
625 1. First
626 2. Second:
627 - Fee
628 - Fie
629 - Foe
631 3. Third
633Pandoc transforms this into a "compact list" (with no `<p>` tags around
634"First", "Second", or "Third"), while markdown puts `<p>` tags around
635"Second" and "Third" (but not "First"), because of the blank space
636around "Third". Pandoc follows a simple rule: if the text is followed by
637a blank line, it is treated as a paragraph. Since "Second" is followed
638by a list, and not a blank line, it isn't treated as a paragraph. The
639fact that the list is followed by a blank line is irrelevant. (Note:
640Pandoc works this way even when the `--strict` option is specified. This
641behavior is consistent with the official markdown syntax description,
642even though it is different from that of `Markdown.pl`.)
644Ordered Lists
645-------------
647Unlike standard markdown, Pandoc allows ordered list items to be marked
648with uppercase and lowercase letters and roman numerals, in addition to
649arabic numerals. (This behavior can be turned off using the `--strict`
650option.) List markers may be enclosed in parentheses or followed by a
651single right-parentheses or period. They must be separated from the
652text that follows by at least one space, and, if the list marker is a
653capital letter with a period, by at least two spaces.[^2]
655[^2]: The point of this rule is to ensure that normal paragraphs
656 starting with people's initials, like
658 B. Russell was an English philosopher.
660 do not get treated as list items.
662 This rule will not prevent
664 (C) 2007 Joe Smith
666 from being interpreted as a list item. In this case, a backslash
667 escape can be used:
669 (C\) 2007 Joe Smith
671Pandoc also pays attention to the type of list marker used, and to the
672starting number, and both of these are preserved where possible in the
673output format. Thus, the following yields a list with numbers followed
674by a single parenthesis, starting with 9, and a sublist with lowercase
675roman numerals:
677 9) Ninth
678 10) Tenth
679 11) Eleventh
680 i. subone
681 ii. subtwo
682 iii. subthree
684Note that Pandoc pays attention only to the *starting* marker in a list.
685So, the following yields a list numbered sequentially starting from 2:
687 (2) Two
688 (5) Three
689 1. Four
690 * Five
692If default list markers are desired, use `#.`:
694 #. one
695 #. two
696 #. three
698Numbered examples
699-----------------
701The special list marker `@` can be used for sequentially numbered
702examples. The first list item with a `@` marker will be numbered '1',
703the next '2', and so on, throughout the document. The numbered examples
704need not occur in a single list; each new list using `@` will take up
705where the last stopped. So, for example:
707 (@) My first example will be numbered (1).
708 (@) My second example will be numbered (2).
710 Explanation of examples.
712 (@) My third example will be numbered (3).
714Numbered examples can be labeled and referred to elsewhere in the
715document:
717 (@good) This is a good example.
719 As (@good) illustrates, ...
721The label can be any string of alphanumeric characters, underscores,
722or hyphens.
724Definition lists
725----------------
727Pandoc supports definition lists, using a syntax inspired by
728[PHP Markdown Extra] and [reStructuredText]:[^3]
730 Term 1
732 : Definition 1
734 Term 2 with *inline markup*
736 : Definition 2
738 { some code, part of Definition 2 }
740 Third paragraph of definition 2.
742Each term must fit on one line, which may optionally be followed by
743a blank line, and must be followed by one or more definitions.
744A definition begins with a colon or tilde, which may be indented one
745or two spaces. A term may have multiple definitions, and each definition
746may consist of one or more block elements (paragraph, code block, list,
747etc.), each indented four spaces or one tab stop.
749If you leave space after the definition (as in the example above),
750the blocks of the definitions will be considered paragraphs. In some
751output formats, this will mean greater spacing between term/definition
752pairs. For a compact definition list, do not leave space between the
753definition and the next term:
755 Term 1
756 ~ Definition 1
757 Term 2
758 ~ Definition 2a
759 ~ Definition 2b
761[^3]: I have also been influenced by the suggestions of [David Wheeler](http://www.justatheory.com/computers/markup/modest-markdown-proposal.html).
763[PHP Markdown Extra]: http://www.michelf.com/projects/php-markdown/extra/
765Reference links
766---------------
768Pandoc allows implicit reference links with just a single set of
769brackets. So, the following links are equivalent:
771 1. Here's my [link]
772 2. Here's my [link][]
774 [link]: linky.com
776(Note: Pandoc works this way even if `--strict` is specified, because
777`Markdown.pl` 1.0.2b7 allows single-bracket links.)
779Footnotes
780---------
782Pandoc's markdown allows footnotes, using the following syntax:
784 Here is a footnote reference,[^1] and another.[^longnote]
786 [^1]: Here is the footnote.
788 [^longnote]: Here's one with multiple blocks.
790 Subsequent paragraphs are indented to show that they
791 belong to the previous footnote.
793 { some.code }
795 The whole paragraph can be indented, or just the first
796 line. In this way, multi-paragraph footnotes work like
797 multi-paragraph list items.
799 This paragraph won't be part of the note, because it isn't indented.
801The identifiers in footnote references may not contain spaces, tabs,
802or newlines. These identifiers are used only to correlate the
803footnote reference with the note itself; in the output, footnotes
804will be numbered sequentially.
806The footnotes themselves need not be placed at the end of the
807document. They may appear anywhere except inside other block elements
808(lists, block quotes, tables, etc.).
810Inline footnotes are also allowed (though, unlike regular notes,
811they cannot contain multiple paragraphs). The syntax is as follows:
813 Here is an inline note.^[Inlines notes are easier to write, since
814 you don't have to pick an identifier and move down to type the
815 note.]
817Inline and regular footnotes may be mixed freely.
819Tables
820------
822Three kinds of tables may be used. All three kinds presuppose the use of
823a fixed-width font, such as Courier.
825**Simple tables** look like this:
827 Right Left Center Default
828 ------- ------ ---------- -------
829 12 12 12 12
830 123 123 123 123
831 1 1 1 1
833 Table: Demonstration of simple table syntax.
835The headers and table rows must each fit on one line. Column
836alignments are determined by the position of the header text relative
837to the dashed line below it:[^4]
839 - If the dashed line is flush with the header text on the right side
840 but extends beyond it on the left, the column is right-aligned.
841 - If the dashed line is flush with the header text on the left side
842 but extends beyond it on the right, the column is left-aligned.
843 - If the dashed line extends beyond the header text on both sides,
844 the column is centered.
845 - If the dashed line is flush with the header text on both sides,
846 the default alignment is used (in most cases, this will be left).
848[^4]: This scheme is due to Michel Fortin, who proposed it on the
849 [Markdown discussion list](http://six.pairlist.net/pipermail/markdown-discuss/2005-March/001097.html).
851The table must end with a blank line, or a line of dashes followed by
852a blank line. A caption may optionally be provided (as illustrated in
853the example above). A caption is a paragraph beginning with the string
854`Table:` (or just `:`), which will be stripped off. It may appear either
855before or after the table.
857The column headers may be omitted, provided a dashed line is used
858to end the table. For example:
860 ------- ------ ---------- -------
861 12 12 12 12
862 123 123 123 123
863 1 1 1 1
864 ------- ------ ---------- -------
866When headers are omitted, column alignments are determined on the basis
867of the first line of the table body. So, in the tables above, the columns
868would be right, left, center, and right aligned, respectively.
870**Multiline tables** allow headers and table rows to span multiple lines
871of text (but cells that span multiple columns or rows of the table are
872not supported). Here is an example:
874 -------------------------------------------------------------
875 Centered Default Right Left
876 Header Aligned Aligned Aligned
877 ----------- ------- --------------- -------------------------
878 First row 12.0 Example of a row that
879 spans multiple lines.
881 Second row 5.0 Here's another one. Note
882 the blank line between
883 rows.
884 -------------------------------------------------------------
886 Table: Here's the caption. It, too, may span
887 multiple lines.
889These work like simple tables, but with the following differences:
891 - They must begin with a row of dashes, before the header text
892 (unless the headers are omitted).
893 - They must end with a row of dashes, then a blank line.
894 - The rows must be separated by blank lines.
896In multiline tables, the table parser pays attention to the widths of
897the columns, and the writers try to reproduce these relative widths in
898the output. So, if you find that one of the columns is too narrow in the
899output, try widening it in the markdown source.
901Headers may be omitted in multiline tables as well as simple tables:
903 ----------- ------- --------------- -------------------------
904 First row 12.0 Example of a row that
905 spans multiple lines.
907 Second row 5.0 Here's another one. Note
908 the blank line between
909 rows.
910 -------------------------------------------------------------
912 : Here's a multiline table without headers.
914It is possible for a multiline table to have just one row, but the row
915should be followed by a blank line (and then the row of dashes that ends
916the table), or the table may be interpreted as a simple table.
918**Grid tables** look like this:
920 : Sample grid table.
922 +---------------+---------------+--------------------+
923 | Fruit | Price | Advantages |
924 +===============+===============+====================+
925 | Bananas | $1.34 | - built-in wrapper |
926 | | | - bright color |
927 +---------------+---------------+--------------------+
928 | Oranges | $2.10 | - cures scurvy |
929 | | | - tasty |
930 +---------------+---------------+--------------------+
932The row of `=`s separates the header from the table body, and can be
933omitted for a headerless table. The cells of grid tables may contain
934arbitrary block elements (multiple paragraphs, code blocks, lists,
935etc.). Alignments are not supported, nor are cells that span multiple
936columns or rows. Grid tables can be created easily using [Emacs table mode].
938 [Emacs table mode]: http://table.sourceforge.net/
940Delimited Code blocks
941---------------------
943In addition to standard indented code blocks, Pandoc supports
944*delimited* code blocks. These begin with a row of three or more
945tildes (`~`) and end with a row of tildes that must be at least
946as long as the starting row. Everything between the tilde-lines
947is treated as code. No indentation is necessary:
949 ~~~~~~~
950 {code here}
951 ~~~~~~~
953Like regular code blocks, delimited code blocks must be separated
954from surrounding text by blank lines.
956If the code itself contains a row of tildes, just use a longer
957row of tildes at the start and end:
959 ~~~~~~~~~~~~~~~~
960 ~~~~~~~~~~
961 code including tildes
962 ~~~~~~~~~~
963 ~~~~~~~~~~~~~~~~
965Optionally, you may specify the language of the code block using
966this syntax:
968 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.haskell .numberLines}
969 qsort [] = []
970 qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
971 qsort (filter (>= x) xs)
972 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
974Some output formats can use this information to do syntax highlighting.
975Currently, the only output format that uses this information is HTML.
977If pandoc has been compiled with syntax highlighting support, then the
978code block above will appear highlighted, with numbered lines. (To see
979which languages are supported, do `pandoc --version`.)
981If pandoc has not been compiled with syntax highlighting support, the
982code block above will appear as follows:
984 <pre class="haskell">
985 <code>
986 ...
987 </code>
988 </pre>
990Images with captions
991--------------------
993An image occurring by itself in a paragraph will be rendered as
994a figure with a caption.[^5] (In LaTeX, a figure environment will be
995used; in HTML, the image will be placed in a `div` with class
996`figure`, together with a caption in a `p` with class `caption`.)
997The image's alt text will be used as the caption.
999 ![This is the caption](/url/of/image.png)
1001[^5]: This feature is not yet implemented for RTF, OpenDocument, or
1002 ODT. In those formats, you'll just get an image in a paragraph by
1003 itself, with no caption.
1005If you just want a regular inline image, just make sure it is not
1006the only thing in the paragraph. One way to do this is to insert a
1007nonbreaking space after the image:
1009 ![This image won't be a figure](/url/of/image.png)\
1011Title blocks
1012------------
1014If the file begins with a title block
1016 % title
1017 % author(s) (separated by semicolons)
1018 % date
1020it will be parsed as bibliographic information, not regular text. (It
1021will be used, for example, in the title of standalone LaTeX or HTML
1022output.) The block may contain just a title, a title and an author,
1023or all three elements. If you want to include an author but no
1024title, or a title and a date but no author, you need a blank line:
1027 % Author
1029 % My title
1031 % June 15, 2006
1033The title may occupy multiple lines, but continuation lines must
1034begin with leading space, thus:
1036 % My title
1037 on multiple lines
1039If a document has multiple authors, the authors may be put on
1040separate lines with leading space, or separated by semicolons, or
1041both. So, all of the following are equivalent:
1043 % Author One
1044 Author Two
1046 % Author One; Author Two
1048 % Author One;
1049 Author Two
1051The date must fit on one line.
1053All three metadata fields may contain standard inline formatting
1054(italics, links, footnotes, etc.).
1056Title blocks will always be parsed, but they will affect the output only
1057when the `--standalone` (`-s`) option is chosen. In HTML output, titles
1058will appear twice: once in the document head -- this is the title that
1059will appear at the top of the window in a browser -- and once at the
1060beginning of the document body. The title in the document head can have
1061an optional prefix attached (`--title-prefix` or `-T` option). The title
1062in the body appears as an H1 element with class "title", so it can be
1063suppressed or reformatted with CSS. If a title prefix is specified with
1064`-T` and no title block appears in the document, the title prefix will
1065be used by itself as the HTML title.
1067The man page writer extracts a title, man page section number, and
1068other header and footer information from the title line. The title
1069is assumed to be the first word on the title line, which may optionally
1070end with a (single-digit) section number in parentheses. (There should
1071be no space between the title and the parentheses.) Anything after
1072this is assumed to be additional footer and header text. A single pipe
1073character (`|`) should be used to separate the footer text from the header
1074text. Thus,
1076 % PANDOC(1)
1078will yield a man page with the title `PANDOC` and section 1.
1080 % PANDOC(1) Pandoc User Manuals
1082will also have "Pandoc User Manuals" in the footer.
1084 % PANDOC(1) Pandoc User Manuals | Version 4.0
1086will also have "Version 4.0" in the header.
1088Markdown in HTML blocks
1089-----------------------
1091While standard markdown leaves HTML blocks exactly as they are, Pandoc
1092treats text between HTML tags as markdown. Thus, for example, Pandoc
1093will turn
1095 <table>
1096 <tr>
1097 <td>*one*</td>
1098 <td>[a link](http://google.com)</td>
1099 </tr>
1100 </table>
1102into
1104 <table>
1105 <tr>
1106 <td><em>one</em></td>
1107 <td><a href="http://google.com">a link</a></td>
1108 </tr>
1109 </table>
1111whereas `Markdown.pl` will preserve it as is.
1113There is one exception to this rule: text between `<script>` and
1114`</script>` tags is not interpreted as markdown.
1116This departure from standard markdown should make it easier to mix
1117markdown with HTML block elements. For example, one can surround
1118a block of markdown text with `<div>` tags without preventing it
1119from being interpreted as markdown.
1121Header identifiers in HTML
1122--------------------------
1124Each header element in pandoc's HTML output is given a unique
1125identifier. This identifier is based on the text of the header. To
1126derive the identifier from the header text,
1128 - Remove all formatting, links, etc.
1129 - Remove all punctuation, except underscores, hyphens, and periods.
1130 - Replace all spaces and newlines with hyphens.
1131 - Convert all alphabetic characters to lowercase.
1132 - Remove everything up to the first letter (identifiers may
1133 not begin with a number or punctuation mark).
1134 - If nothing is left after this, use the identifier `section`.
1136Thus, for example,
1138 Header Identifier
1139 ------------------------------------- ---------------------------
1140 Header identifiers in HTML `header-identifiers-in-html`
1141 *Dogs*?--in *my* house? `dogs--in-my-house`
1142 [HTML], [S5], or [RTF]? `html-s5-or-rtf`
1143 3. Applications `applications`
1144 33 `section`
1146These rules should, in most cases, allow one to determine the identifier
1147from the header text. The exception is when several headers have the
1148same text; in this case, the first will get an identifier as described
1149above; the second will get the same identifier with `-1` appended; the
1150third with `-2`; and so on.
1152These identifiers are used to provide link targets in the table of
1153contents generated by the `--toc|--table-of-contents` option. They
1154also make it easy to provide links from one section of a document to
1155another. A link to this section, for example, might look like this:
1157 See the section on [header identifiers](#header-identifiers-in-html).
1159Note, however, that this method of providing links to sections works
1160only in HTML.
1162If the `--section-divs` option is specified, then each section will
1163be wrapped in a `div`, and the identifier will be attached to the
1164enclosing `<div>` tag rather than the header itself. This allows entire
1165sections to be manipulated using javascript or treated differently in
1166CSS.
1168Blank lines before headers and blockquotes
1169------------------------------------------
1171Standard markdown syntax does not require a blank line before a header
1172or blockquote. Pandoc does require this (except, of course, at the
1173beginning of the document). The reason for the requirement is that
1174it is all too easy for a `>` or `#` to end up at the beginning of a
1175line by accident (perhaps through line wrapping). Consider, for
1176example:
1178 I like several of their flavors of ice cream: #22, for example, and
1179 #5.
1181Math
1182----
1184Anything between two $ characters will be treated as TeX math. The
1185opening $ must have a character immediately to its right, while the
1186closing $ must have a character immediately to its left. Thus,
1187`$20,000 and $30,000` won't parse as math. If for some reason
1188you need to enclose text in literal $ characters, backslash-escape
1189them and they won't be treated as math delimiters.
1191TeX math will be printed in all output formats. In Markdown,
1192reStructuredText, LaTeX, and ConTeXt output, it will appear verbatim
1193between $ characters.
1195In reStructuredText output, it will be rendered using an interpreted
1196text role `:math:`, as described
1197[here](http://www.american.edu/econ/itex2mml/mathhack.rst).
1199In Texinfo output, it will be rendered inside a `@math` command.
1201In groff man output, it will be rendered verbatim without $'s.
1203In MediaWiki output, it will be rendered inside `<math>` tags.
1205In Textile output, it will be rendered inside `<span class="math">` tags.
1207In RTF, Docbook, and OpenDocument output, it will be rendered, as far as
1208possible, using unicode characters, and will otherwise appear verbatim.
1209Unknown commands and symbols, and commands that cannot be dealt with
1210this way (like `\frac`), will be rendered verbatim. So the results may
1211be a mix of raw TeX code and properly rendered unicode math.
1213In HTML, Slidy, and S5 output, the way math is rendered will depend on the
1214command-line options selected:
12161. The default is to render TeX math as far as possible using unicode
1217 characters, as with RTF, Docbook, and OpenDocument output. Formulas
1218 are put inside a `span` with `class="math"`, so that they may be
1219 styled differently from the surrounding text if needed.
12212. If the `--latexmathml` option is used, TeX math will be displayed
1222 between $ or $$ characters and put in `<span>` tags with class `LaTeX`.
1223 The [LaTeXMathML] script will be used to render it as formulas.
1224 (This trick does not work in all browsers, but it works in Firefox.
1225 In browsers that do not support LaTeXMathML, TeX math will appear
1226 verbatim between $ characters.)
12283. If the `--jsmath` option is used, TeX math will be put inside
1229 `<span>` tags (for inline math) or `<div>` tags (for display math)
1230 with class `math`. The [jsMath] script will be used to render
1231 it.
12334. If the `--mimetex` option is used, the [mimeTeX] CGI script will
1234 be called to generate images for each TeX formula. This should
1235 work in all browsers. The `--mimetex` option takes an optional URL
1236 as argument. If no URL is specified, it will be assumed that the
1237 mimeTeX CGI script is at `/cgi-bin/mimetex.cgi`.
12395. If the `--gladtex` option is used, TeX formulas will be enclosed
1240 in `<eq>` tags in the HTML output. The resulting `htex` file may then
1241 be processed by [gladTeX], which will produce image files for each
1242 formula and an `html` file with links to these images. So, the
1243 procedure is:
1245 pandoc -s --gladtex myfile.txt -o myfile.htex
1246 gladtex -d myfile-images myfile.htex
1247 # produces myfile.html and images in myfile-images
12496. If the `--webtex` option is used, TeX formulas will be converted
1250 to `<img>` tags that link to an external script that converts
1251 formulas to images. The formula will be URL-encoded and concatenated
1252 with the URL provided. If no URL is specified, the Google Chart
1253 API will be used (`http://chart.apis.google.com/chart?cht=tx&chl=`).
1255LaTeX Macros
1256------------
1258For output formats other than LaTeX, pandoc will parse LaTeX `\newcommand` and
1259`\renewcommand` definitions and apply the resulting macros to all LaTeX
1260math. So, for example, the following will work in all output formats,
1261not just LaTeX:
1263 \newcommand{\tuple}[1]{\langle #1 \rangle}
1265 $\tuple{a, b, c}$
1267Inline TeX
1268----------
1270Inline TeX commands will be preserved and passed unchanged to the
1271LaTeX and ConTeXt writers. Thus, for example, you can use LaTeX to
1272include BibTeX citations:
1274 This result was proved in \cite{jones.1967}.
1276Note that in LaTeX environments, like
1278 \begin{tabular}{|l|l|}\hline
1279 Age & Frequency \\ \hline
1280 18--25 & 15 \\
1281 26--35 & 33 \\
1282 36--45 & 22 \\ \hline
1283 \end{tabular}
1285the material between the begin and end tags will be interpreted as raw
1286LaTeX, not as markdown.
1288Inline LaTeX is ignored in output formats other than Markdown, LaTeX,
1289and ConTeXt.
1291Producing HTML slide shows with Pandoc
1292======================================
1294You can use Pandoc to produce an HTML + javascript slide presentation
1295that can be viewed via a web browser. There are two ways to do this,
1296using [S5] or [Slidy].
1298Here's the markdown source for a simple slide show, `eating.txt`:
1300 % Eating Habits
1301 % John Doe
1302 % March 22, 2005
1304 # In the morning
1306 - Eat eggs
1307 - Drink coffee
1309 # In the evening
1311 - Eat spaghetti
1312 - Drink wine
1314 --------------------------
1316 ![picture of spaghetti](images/spaghetti.jpg)
1318To produce the slide show, simply type
1320 pandoc -w s5 -s eating.txt > eating.html
1322for S5, or
1324 pandoc -w slidy -s eating.txt > eating.html
1326for Slidy.
1328A title page is constructed automatically from the document's title
1329block. Each level-one header and horizontal rule begins a new slide.
1331The file produced by pandoc with the `-s/--standalone` option embeds a
1332link to javascripts and CSS files, which are assumed to be available at
1333the relative path `ui/default` (for S5) or at the Slidy website at
1334`w3.org` (for Slidy). If the `--offline` option is specified, the
1335scripts and CSS will be included directly in the generated file, so that
1336it may be used offline.
1338You can change the style of the slides by putting customized CSS files
1339in `$DATADIR/s5/default` (for S5) or `$DATADIR/slidy` (for Slidy),
1340where `$DATADIR` is the user data directory (see `--data-dir`, above).
1341The originals may be found in pandoc's system data directory (generally
1342`$CABALDIR/pandoc-VERSION/s5/default`). Pandoc will look there for any
1343files it does not find in the user data directory.
1345Incremental lists
1346-----------------
1348By default, these writers produces lists that display "all at once."
1349If you want your lists to display incrementally (one item at a time),
1350use the `-i` option. If you want a particular list to depart from the
1351default (that is, to display incrementally without the `-i` option and
1352all at once with the `-i` option), put it in a block quote:
1354 > - Eat spaghetti
1355 > - Drink wine
1357In this way incremental and nonincremental lists can be mixed in
1358a single document.
1360Literate Haskell support
1361========================
1363If you append `+lhs` to an appropriate input or output format (`markdown`,
1364`rst`, or `latex` for input or output; `html` for output only), pandoc
1365will treat the document as literate Haskell source. This means that
1367 - In markdown input, "bird track" sections will be parsed as Haskell
1368 code rather than block quotations. Text between `\begin{code}`
1369 and `\end{code}` will also be treated as Haskell code.
1371 - In markdown output, code blocks with class `haskell` will be
1372 rendered using bird tracks, and block quotations will be
1373 indented one space, so they will not be treated as Haskell code.
1374 In addition, headers will be rendered setext-style (with underlines)
1375 rather than atx-style (with '#' characters). (This is because ghc
1376 treats '#' characters in column 1 as introducing line numbers.)
1378 - In restructured text input, "bird track" sections will be parsed
1379 as Haskell code.
1381 - In restructured text output, code blocks with class `haskell` will
1382 be rendered using bird tracks.
1384 - In LaTeX input, text in `code` environments will be parsed as
1385 Haskell code.
1387 - In LaTeX output, code blocks with class `haskell` will be rendered
1388 inside `code` environments.
1390 - In HTML output, code blocks with class `haskell` will be rendered
1391 with class `literatehaskell` and bird tracks.
1393Examples:
1395 pandoc -f markdown+lhs -t html
1397reads literate Haskell source formatted with markdown conventions and writes
1398ordinary HTML (without bird tracks).
1400 pandoc -f markdown+lhs -t html+lhs
1402writes HTML with the Haskell code in bird tracks, so it can be copied
1403and pasted as literate Haskell source.
1406[markdown]: http://daringfireball.net/projects/markdown/
1407[reStructuredText]: http://docutils.sourceforge.net/docs/ref/rst/introduction.html
1408[S5]: http://meyerweb.com/eric/tools/s5/
1409[Slidy]: http://www.w3.org/Talks/Tools/Slidy/
1410[HTML]: http://www.w3.org/TR/html40/
1411[LaTeX]: http://www.latex-project.org/
1412[ConTeXt]: http://www.pragma-ade.nl/
1413[RTF]: http://en.wikipedia.org/wiki/Rich_Text_Format
1414[DocBook XML]: http://www.docbook.org/
1415[OpenDocument XML]: http://opendocument.xml.org/
1416[ODT]: http://en.wikipedia.org/wiki/OpenDocument
1417[Textile]: http://redcloth.org/textile
1418[MediaWiki markup]: http://www.mediawiki.org/wiki/Help:Formatting
1419[groff man]: http://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPages/man7/groff_man.7.html
1420[Haskell]: http://www.haskell.org/
1421[GNU Texinfo]: http://www.gnu.org/software/texinfo/
1422[EPUB]: http://www.idpf.org/
1423[GPL]: http://www.gnu.org/copyleft/gpl.html "GNU General Public License"