8pandoc [*options*] [*input-file*]...
13Pandoc is a [Haskell] library for converting from one markup format to
14another, and a command-line tool that uses this library. It can read
15[markdown] and (subsets of) [Textile], [reStructuredText], [HTML],
16and [LaTeX]; and it can write plain text, [markdown], [reStructuredText],
17[HTML], [LaTeX], [ConTeXt], [RTF], [DocBook XML], [OpenDocument XML], [ODT],
18[GNU Texinfo], [MediaWiki markup], [EPUB], [Textile], [groff man] pages,
19[Emacs Org-Mode], and [Slidy] or [S5] HTML slide shows.
21Pandoc's enhanced version of markdown includes syntax for footnotes,
22tables, flexible ordered lists, definition lists, delimited code blocks,
23superscript, subscript, strikeout, title blocks, automatic tables of
24contents, embedded LaTeX math, citations, and markdown inside HTML block
25elements. (These enhancements, described below under
26[Pandoc's markdown](#pandocs-markdown), can be disabled using the `--strict`
29In contrast to most existing tools for converting markdown to HTML, which
30use regex substitutions, Pandoc has a modular design: it consists of a
31set of readers, which parse text in a given format and produce a native
32representation of the document, and a set of writers, which convert
33this native representation into a target format. Thus, adding an input
34or output format requires only adding a reader or writer.
39If no *input-file* is specified, input is read from *stdin*.
40Otherwise, the *input-files* are concatenated (with a blank
41line between each) and used as input. Output goes to *stdout* by
42default (though output to *stdout* is disabled for the `odt` and
43`epub` output formats). For output to a file, use the `-o` option:
45 pandoc -o output.html input.txt
47Instead of a file, an absolute URI may be given. In this case
48pandoc will fetch the content using HTTP:
50 pandoc -f html -t markdown http://www.fsf.org
52If multiple input files are given, `pandoc` will concatenate them all (with
53blank lines between them) before parsing.
55The format of the input and output can be specified explicitly using
56command-line options. The input format can be specified using the
57`-r/--read` or `-f/--from` options, the output format using the
58`-w/--write` or `-t/--to` options. Thus, to convert `hello.txt` from
59markdown to LaTeX, you could type:
61 pandoc -f markdown -t latex hello.txt
63To convert `hello.html` from html to markdown:
65 pandoc -f html -t markdown hello.html
67Supported output formats are listed below under the `-t/--to` option.
68Supported input formats are listed below under the `-f/--from` option. Note
69that the `rst`, `textile`, `latex`, and `html` readers are not complete;
70there are some constructs that they do not parse.
72If the input or output format is not specified explicitly, `pandoc`
73will attempt to guess it from the extensions of
74the input and output filenames. Thus, for example,
76 pandoc -o hello.tex hello.txt
78will convert `hello.txt` from markdown to LaTeX. If no output file
79is specified (so that output goes to *stdout*), or if the output file's
80extension is unknown, the output format will default to HTML.
81If no input file is specified (so that input comes from *stdin*), or
82if the input files' extensions are unknown, the input format will
83be assumed to be markdown unless explicitly specified.
85Pandoc uses the UTF-8 character encoding for both input and output.
86If your local character encoding is not UTF-8, you
87should pipe input and output through `iconv`:
89 iconv -t utf-8 input.txt | pandoc | iconv -f utf-8
97The standard Pandoc installation includes `markdown2pdf`, a wrapper
98around `pandoc` and `pdflatex` that produces PDFs directly from markdown
99sources. The default behavior of `markdown2pdf` is to create a file with
100the same base name as the first argument and the extension `pdf`; thus,
103 markdown2pdf sample.txt endnotes.txt
105will produce `sample.pdf`. (If `sample.pdf` exists already,
106it will be backed up before being overwritten.) An output file
107name can be specified explicitly using the `-o` option:
109 markdown2pdf -o book.pdf chap1 chap2
111If no input file is specified, input will be taken from *stdin*.
112All of `pandoc`'s options will work with `markdown2pdf` as well.
114`markdown2pdf` assumes that `pdflatex` is in the path. It also
115assumes that the following LaTeX packages are available:
116`unicode`, `fancyhdr` (if you have verbatim text in footnotes),
117`graphicx` (if you use images), `array` (if you use tables),
118and `ulem` (if you use strikeout text). If they are not already
119included in your LaTeX distribution, you can get them from
120[CTAN]. A full [TeX Live] or [MacTeX] distribution will have all of
126A user who wants a drop-in replacement for `Markdown.pl` may create
127a symbolic link to the `pandoc` executable called `hsmarkdown`. When
128invoked under the name `hsmarkdown`, `pandoc` will behave as if the
129`--strict` flag had been selected, and no command-line options will be
130recognized. However, this approach does not work under Cygwin, due to
131problems with its simulation of symbolic links.
133[Cygwin]: http://www.cygwin.com/
134[`iconv`]: http://www.gnu.org/software/libiconv/
135[CTAN]: http://www.ctan.org "Comprehensive TeX Archive Network"
136[TeX Live]: http://www.tug.org/texlive/
137[MacTeX]: http://www.tug.org/mactex/
142`-f` *FORMAT*, `-r` *FORMAT*, `--from=`*FORMAT*, `--read=`*FORMAT*
143: Specify input format. *FORMAT* can be `native` (native Haskell),
144 `json` (JSON version of native AST), `markdown` (markdown),
145 `textile` (Textile), `rst` (reStructuredText), `html` (HTML),
146 or `latex` (LaTeX). If `+lhs` is appended to `markdown`, `rst`,
147 or `latex`, the input will be treated as literate Haskell source:
148 see [Literate Haskell support](#literate-haskell-support),
151`-t` *FORMAT*, `-w` *FORMAT*, `--to=`*FORMAT*, `--write=`*FORMAT*
152: Specify output format. *FORMAT* can be `native` (native Haskell),
153 `json` (JSON version of native AST), `plain` (plain text),
154 `markdown` (markdown), `rst` (reStructuredText),
155 `html` (HTML), `latex` (LaTeX), `context` (ConTeXt), `man` (groff man),
156 `mediawiki` (MediaWiki markup), `textile` (Textile), `org` (Emacs
157 Org-Mode), `texinfo` (GNU Texinfo), `docbook` (DocBook XML),
158 `opendocument` (OpenDocument XML), `odt` (OpenOffice text document),
159 `epub` (EPUB book), `slidy` (Slidy HTML and javascript slide show),
160 `s5` (S5 HTML and javascript slide show), or `rtf` (rich text
161 format). Note that `odt` and `epub` output will not be directed to
162 *stdout*; an output filename must be specified using the `-o/--output`
163 option. If `+lhs` is appended to `markdown`, `rst`, `latex`, or `html`,
164 the output will be rendered as literate Haskell source:
165 see [Literate Haskell support](#literate-haskell-support),
169: Produce output with an appropriate header and footer (e.g. a
170 standalone HTML, LaTeX, or RTF file, not a fragment).
172`-o` *FILE*, `--output=`*FILE*
173: Write output to *FILE* instead of *stdout*. If *FILE* is
174 `-`, output will go to *stdout*. (Exception: if the output
175 format is `odt` or `epub`, output to stdout is disabled.)
177`-p`, `--preserve-tabs`
178: Preserve tabs instead of converting them to spaces (the default).
181: Specify the number of spaces per tab (default is 4).
184: Use strict markdown syntax, with no pandoc extensions or variants.
185 When the input format is HTML, this means that constructs that have no
186 equivalents in standard markdown (e.g. definition lists or strikeout
187 text) will be parsed as raw HTML.
190: Normalize the document after reading: merge adjacent
191 `Str` or `Emph` elements, for example, and remove repeated `Space`s.
194: Use reference-style links, rather than inline links, in writing markdown
195 or reStructuredText. By default inline links are used.
198: Parse untranslatable HTML codes and LaTeX environments as raw HTML
199 or LaTeX, instead of ignoring them. Affects only HTML and LaTeX
200 input. Raw HTML can be printed in markdown, reStructuredText, HTML, Slidy,
201 and S5 output; raw LaTeX can be printed in markdown, reStructuredText,
202 LaTeX, and ConTeXt output. The default is for the readers to omit
203 untranslatable HTML codes and LaTeX environments. (The LaTeX reader
204 does pass through untranslatable LaTeX *commands*, even if `-R` is not
208: Produce typographically correct output, converting straight quotes
209 to curly quotes, `---` and `--` to dashes, ande `...` to ellipses.
210 Nonbreaking spaces are inserted after certain abbreviations, such
211 as "Mr." (Note: This option is significant only when the input format is
212 `markdown` or `textile`. It is selected automatically when the input
213 format is `textile` or the output format is `latex` or `context`.)
216: Produce HTML5 instead of HTML4. This option has no effect for writers
219`-m` *URL*, `--latexmathml=`*URL*
220: Use the [LaTeXMathML] script to display embedded TeX math in HTML output.
221 To insert a link to a local copy of the `LaTeXMathML.js` script,
222 provide a *URL*. If no *URL* is provided, the contents of the
223 script will be inserted directly into the HTML header, preserving
224 portability at the price of efficiency. If you plan to use math on
225 several pages, it is much better to link to a copy of the script,
229: Convert TeX math to MathML. In standalone mode, a small javascript
230 will be inserted that allows the MathML to be viewed on some browsers.
233: Use [jsMath] to display embedded TeX math in HTML output.
234 The *URL* should point to the jsMath load script (e.g.
235 `jsMath/easy/load.js`); if provided, it will be linked to in
236 the header of standalone HTML documents.
239: Use [MathJax] to display embedded TeX math in HTML output.
240 The *URL* should point to the `MathJax.js` load script.
243: Enclose TeX math in `<eq>` tags in HTML output. These can then
244 be processed by [gladTeX] to produce links to images of the typeset
248: Render TeX math using the [mimeTeX] CGI script. If *URL* is not
249 specified, it is assumed that the script is at `/cgi-bin/mimetex.cgi`.
252: Render TeX formulas using an external script that converts TeX
253 formulas to images. The formula will be concatenated with the URL
254 provided. If *URL* is not specified, the Google Chart API will be used.
257: Make list items in Slidy or S5 display incrementally (one by one).
258 The default is for lists to be displayed all at once.
261: Include all the CSS and javascript needed for a Slidy or S5 slide
262 show in the output, so that the slide show will work even when no
263 internet connection is available.
266: Create LaTeX outut suitable for processing by XeTeX.
269: Treat top-level headers as chapters in LaTeX, ConTeXt, and DocBook
272`-N`, `--number-sections`
273: Number section headings in LaTeX, ConTeXt, or HTML output.
274 By default, sections are not numbered.
277: Use listings package for LaTeX code blocks
280: Wrap sections in `<div>` tags (or `<section>` tags in HTML5),
281 and attach identifiers to the enclosing `<div>` (or `<section>`)
282 rather than the header itself.
283 See [Section identifiers](#header-identifiers-in-html), below.
286: Disable text wrapping in output. By default, text is wrapped
287 appropriately for the output format.
290: Specify length of lines in characters (for text wrapping).
292`--email-obfuscation=`*none|javascript|references*
293: Specify a method for obfuscating `mailto:` links in HTML documents.
294 *none* leaves `mailto:` links as they are. *javascript* obfuscates
295 them using javascript. *references* obfuscates them by printing their
296 letters as decimal or hexadecimal character references.
297 If `--strict` is specified, *references* is used regardless of the
298 presence of this option.
300`--id-prefix`=*STRING*
301: Specify a prefix to be added to all automatically generated identifiers
302 in HTML output. This is useful for preventing duplicate identifiers
303 when generating fragments to be included in other pages.
305`--indented-code-classes=`*CLASSES*
306: Specify classes to use for indented code blocks--for example,
307 `perl,numberLines` or `haskell`. Multiple classes may be separated
310`--toc`, `--table-of-contents`
311: Include an automatically generated table of contents (or, in
312 the case of `latex`, `context`, and `rst`, an instruction to create
313 one) in the output document. This option has no effect on `man`,
314 `docbook`, `slidy`, or `s5` output.
316`--base-header-level=`*NUMBER*
317: Specify the base level for headers (defaults to 1).
320: Use *FILE* as a custom template for the generated document. Implies
321 `--standalone`. See [Templates](#templates) below for a description
322 of template syntax. If this option is not used, a default
323 template appropriate for the output format will be used. See also
324 `-D/--print-default-template`.
326`-V` *KEY=VAL*, `--variable=`*KEY:VAL*
327: Set the template variable *KEY* to the value *VAL* when rendering the
328 document in standalone mode. This is only useful when the
329 `--template` option is used to specify a custom template, since
330 pandoc automatically sets the variables used in the default
333`-c` *URL*, `--css=`*URL*
334: Link to a CSS style sheet.
336`-H` *FILE*, `--include-in-header=`*FILE*
337: Include contents of *FILE*, verbatim, at the end of the header.
338 This can be used, for example, to include special
339 CSS or javascript in HTML documents. This option can be used
340 repeatedly to include multiple files in the header. They will be
341 included in the order specified. Implies `--standalone`.
343`-B` *FILE*, `--include-before-body=`*FILE*
344: Include contents of *FILE*, verbatim, at the beginning of the
345 document body (e.g. after the `<body>` tag in HTML, or the
346 `\begin{document}` command in LaTeX). This can be used to include
347 navigation bars or banners in HTML documents. This option can be
348 used repeatedly to include multiple files. They will be included in
349 the order specified. Implies `--standalone`.
351`-A` *FILE*, `--include-after-body=`*FILE*
352: Include contents of *FILE*, verbatim, at the end of the document
353 body (before the `</body>` tag in HTML, or the
354 `\end{document}` command in LaTeX). This option can be be used
355 repeatedly to include multiple files. They will be included in the
356 order specified. Implies `--standalone`.
358`--reference-odt=`*FILE*
359: Use the specified file as a style reference in producing an ODT.
360 For best results, the reference ODT should be a modified version
361 of an ODT produced using pandoc. The contents of the reference ODT
362 are ignored, but its stylesheets are used in the new ODT. If no
363 reference ODT is specified on the command line, pandoc will look
364 for a file `reference.odt` in the user data directory (see
365 `--data-dir`). If this is not found either, sensible defaults will be
368`--epub-stylesheet=`*FILE*
369: Use the specified CSS file to style the EPUB. If no stylesheet
370 is specified, pandoc will look for a file `epub.css` in the
371 user data directory (see `--data-dir`, below). If it is not
372 found there, sensible defaults will be used.
374`--epub-metadata=`*FILE*
375: Look in the specified XML file for metadata for the EPUB.
376 The file should contain a series of Dublin Core elements,
377 as documented at <http://dublincore.org/documents/dces/>.
380 <dc:rights>Creative Commons</dc:rights>
381 <dc:language>es-AR</dc:language>
383 By default, pandoc will include the following metadata elements:
384 `<dc:title>` (from the document title), `<dc:creator>` (from the
385 document authors), `<dc:language>` (from the locale), and
386 `<dc:identifier id="BookId">` (a randomly generated UUID). Any of
387 these may be overridden by elements in the metadata file.
389`-D` *FORMAT*, `--print-default-template=`*FORMAT*
390: Print the default template for an output *FORMAT*. (See `-t`
391 for a list of possible *FORMAT*s.)
393`-T` *STRING*, `--title-prefix=`*STRING*
394: Specify *STRING* as a prefix at the beginning of the title
395 that appears in the HTML header (but not in the title as it
396 appears at the beginning of the HTML body). Implies
399`--bibliography=`*FILE*
400: Specify bibliography database to be used in resolving
401 citations. The database type will be determined from the
402 extension of *FILE*, which may be `.mods` (MODS format),
403 `.bib` (BibTeX format), `.bbx` (BibLaTeX format),
404 `.ris` (RIS format), `.enl` (EndNote format),
405 `.xml` (EndNote XML format), `.wos` (ISI format),
406 `.medline` (MEDLINE format), `.copac` (Copac format),
407 or `.json` (citeproc JSON). If you want to use multiple
408 bibliographies, just use this option repeatedly.
411: Specify [CSL] style to be used in formatting citations and
412 the bibliography. If *FILE* is not found, pandoc will look
419 C:\Documents And Settings\USERNAME\Application Data\csl
421 in Windows. If the `--csl` option is not specified, pandoc
422 will use a default style: either `default.csl` in the
423 user data directory (see `--data-dir`), or, if that is
424 not present, the Chicago author-date style.
426`--data-dir=`*DIRECTORY*
427: Specify the user data directory to search for pandoc data files.
428 If this option is not specified, the default user data directory
435 C:\Documents And Settings\USERNAME\Application Data\pandoc
437 in Windows. A `reference.odt`, `epub.css`, `templates` directory,
438 or `s5` directory placed in this directory will override pandoc's
442: Print information about command-line arguments to *stdout*, then exit.
443 This option is intended primarily for use in wrapper scripts.
444 The first line of output contains the name of the output file specified
445 with the `-o` option, or `-` (for *stdout*) if no output file was
446 specified. The remaining lines contain the command-line arguments,
447 one per line, in the order they appear. These do not include regular
448 Pandoc options and their arguments, but do include any options appearing
449 after a `--` separator at the end of the line.
452: Ignore command-line arguments (for use in wrapper scripts).
453 Regular Pandoc options are not ignored. Thus, for example,
455 pandoc --ignore-args -o foo.html -s foo.txt -- -e latin1
459 pandoc -o foo.html -s
467[LaTeXMathML]: http://math.etsu.edu/LaTeXMathML/
468[jsMath]: http://www.math.union.edu/~dpvc/jsmath/
469[MathJax]: http://www.mathjax.org/
470[gladTeX]: http://www.math.uio.no/~martingu/gladtex/index.html
471[mimeTeX]: http://www.forkosh.com/mimetex.html
472[CSL]: http://CitationStyles.org
477When the `-s/--standalone` option is used, pandoc uses a template to
478add header and footer material that is needed for a self-standing
479document. To see the default template that is used, just type
483where `FORMAT` is the name of the output format. A custom template
484can be specified using the `--template` option. You can also override
485the system default templates for a given output format `FORMAT`
486by putting a file `templates/FORMAT.template` in the user data
487directory (see `--data-dir`, above).
489Templates may contain *variables*. Variable names are sequences of
490alphanumerics, `-`, and `_`, starting with a letter. A variable name
491surrounded by `$` signs will be replaced by its value. For example,
492the string `$title$` in
494 <title>$title$</title>
496will be replaced by the document title.
498To write a literal `$` in a template, use `$$`.
500Some variables are set automatically by pandoc. These vary somewhat
501depending on the output format, but include:
504: contents specified by `-H/--include-in-header` (may have multiple
507: non-null value if `--toc/--table-of-contents` was specified
509: contents specified by `-B/--include-before-body` (may have
512: contents specified by `-A/--include-after-body` (may have
517: title of document, as specified in title block
519: author of document, as specified in title block (may have
522: date of document, as specified in title block
524: language code for HTML documents
526Variables may be set at the command line using the `-V/--variable`
527option. This allows users to include custom variables in their
530Templates may contain conditionals. The syntax is as follows:
538This will include `X` in the template if `variable` has a non-null
539value; otherwise it will include `Y`. `X` and `Y` are placeholders for
540any valid template text, and may include interpolated variables or other
541conditionals. The `$else$` section may be omitted.
543When variables can have multiple values (for example, `author` in
544a multi-author document), you can use the `$for$` keyword:
547 <meta name="author" content="$author$" />
550You can optionally specify a separator to be used between
553 $for(author)$$author$$sep$, $endfor$
558Pandoc understands an extended and slightly revised version of
559John Gruber's [markdown] syntax. This document explains the syntax,
560noting differences from standard markdown. Except where noted, these
561differences can be suppressed by specifying the `--strict` command-line
567Markdown is designed to be easy to write, and, even more importantly,
570> A Markdown-formatted document should be publishable as-is, as plain
571> text, without looking like it's been marked up with tags or formatting
573> -- [John Gruber](http://daringfireball.net/projects/markdown/syntax#philosophy)
575This principle has guided pandoc's decisions in finding syntax for
576tables, footnotes, and other extensions.
578There is, however, one respect in which pandoc's aims are different
579from the original aims of markdown. Whereas markdown was originally
580designed with HTML generation in mind, pandoc is designed for multiple
581output formats. Thus, while pandoc allows the embedding of raw HTML,
582it discourages it, and provides other, non-HTMLish ways of representing
583important document elements like definition lists, tables, mathematics, and
589A paragraph is one or more lines of text followed by one or more blank line.
590Newlines are treated as spaces, so you can reflow your paragraphs as you like.
591If you need a hard line break, put two or more spaces at the end of a line,
592or or type a backslash followed by a newline.
597There are two kinds of headers, Setext and atx.
599### Setext-style headers ###
601A setext-style header is a line of text "underlined" with a row of `=` signs
602(for a level one header) of `-` signs (for a level two header):
610The header text can contain inline formatting, such as emphasis (see
611[Inline formatting](#inline-formatting), below).
614### Atx-style headers ###
616An Atx-style header consists of one to six `#` signs and a line of
617text, optionally followed by any number of `#` signs. The number of
618`#` signs at the beginning of the line is the header level:
620 ## A level-two header
622 ### A level-three header ###
624As with setext-style headers, the header text can contain formatting:
626 # A level-one header with a [link](/url) and *emphasis*
628Standard markdown syntax does not require a blank line before a header.
629Pandoc does require this (except, of course, at the beginning of the
630document). The reason for the requirement is that it is all too easy for a
631`#` to end up at the beginning of a line by accident (perhaps through line
632wrapping). Consider, for example:
634 I like several of their flavors of ice cream:
635 #22, for example, and #5.
638### Header identifiers in HTML ###
642Each header element in pandoc's HTML output is given a unique
643identifier. This identifier is based on the text of the header. To
644derive the identifier from the header text,
646 - Remove all formatting, links, etc.
647 - Remove all punctuation, except underscores, hyphens, and periods.
648 - Replace all spaces and newlines with hyphens.
649 - Convert all alphabetic characters to lowercase.
650 - Remove everything up to the first letter (identifiers may
651 not begin with a number or punctuation mark).
652 - If nothing is left after this, use the identifier `section`.
657 ------------------------------- ----------------------------
658 Header identifiers in HTML `header-identifiers-in-html`
659 *Dogs*?--in *my* house? `dogs--in-my-house`
660 [HTML], [S5], or [RTF]? `html-s5-or-rtf`
661 3. Applications `applications`
664These rules should, in most cases, allow one to determine the identifier
665from the header text. The exception is when several headers have the
666same text; in this case, the first will get an identifier as described
667above; the second will get the same identifier with `-1` appended; the
668third with `-2`; and so on.
670These identifiers are used to provide link targets in the table of
671contents generated by the `--toc|--table-of-contents` option. They
672also make it easy to provide links from one section of a document to
673another. A link to this section, for example, might look like this:
676 [header identifiers](#header-identifiers-in-html).
678Note, however, that this method of providing links to sections works
681If the `--section-divs` option is specified, then each section will
682be wrapped in a `div` (or a `section`, if `--html5` was specified),
683and the identifier will be attached to the enclosing `<div>`
684(or `<section>`) tag rather than the header itself. This allows entire
685sections to be manipulated using javascript or treated differently in
692Markdown uses email conventions for quoting blocks of text.
693A block quotation is one or more paragraphs or other block elements
694(such as lists or headers), with each line preceded by a `>` character
695and a space. (The `>` need not start at the left margin, but it should
696not be indented more than three spaces.)
698 > This is a block quote. This
699 > paragraph has two lines.
701 > 1. This is a list inside a block quote.
704A "lazy" form, which requires the `>` character only on the first
705line of each block, is also allowed:
707 > This is a block quote. This
708 paragraph has two lines.
710 > 1. This is a list inside a block quote.
713Among the block elements that can be contained in a block quote are
714other block quotes. That is, block quotes can be nested:
716 > This is a block quote.
718 > > A block quote within a block quote.
720Standard markdown syntax does not require a blank line before a block
721quote. Pandoc does require this (except, of course, at the beginning of the
722document). The reason for the requirement is that it is all too easy for a
723`>` to end up at the beginning of a line by accident (perhaps through line
724wrapping). So, unless `--strict` is used, the following does not produce
725a nested block quote in pandoc:
727 > This is a block quote.
731Verbatim (code) blocks
732----------------------
734### Indented code blocks ###
736A block of text indented four spaces (or one tab) is treated as verbatim
737text: that is, special characters do not trigger special formatting,
738and all spaces and line breaks are preserved. For example,
741 moveShip(5 * gravity, DOWN);
744The initial (four space or one tab) indentation is not considered part
745of the verbatim text, and is removed in the output.
747Note: blank lines in the verbatim text need not begin with four spaces.
750### Delimited code blocks ###
754In addition to standard indented code blocks, Pandoc supports
755*delimited* code blocks. These begin with a row of three or more
756tildes (`~`) and end with a row of tildes that must be at least
757as long as the starting row. Everything between the tilde-lines
758is treated as code. No indentation is necessary:
762 moveShip(5 * gravity, DOWN);
766Like regular code blocks, delimited code blocks must be separated
767from surrounding text by blank lines.
769If the code itself contains a row of tildes, just use a longer
770row of tildes at the start and end:
774 code including tildes
778Optionally, you may specify the language of the code block using
781 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.haskell .numberLines}
783 qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
784 qsort (filter (>= x) xs)
785 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
787Some output formats can use this information to do syntax highlighting.
788Currently, the only output format that uses this information is HTML.
790If pandoc has been compiled with syntax highlighting support, then the
791code block above will appear highlighted, with numbered lines. (To see
792which languages are supported, do `pandoc --version`.)
794If pandoc has not been compiled with syntax highlighting support, the
795code block above will appear as follows:
797 <pre class="haskell">
809A bullet list is a list of bulleted list items. A bulleted list
810item begins with a bullet (`*`, `+`, or `-`). Here is a simple
817This will produce a "compact" list. If you want a "loose" list, in which
818each item is formatted as a paragraph, put spaces between the items:
826The bullets need not be flush with the left margin; they may be
827indented one, two, or three spaces. The bullet must be followed
830A list item may contain multiple paragraphs and other block-level
831content. Subsequent paragraphs must be preceded by a blank line
832and indented four spaces or a tab. The list will look better if
833the first paragraph is aligned with the rest:
839 * Second paragraph. With a code block, which must be indented
844List items may include other lists. In this case the preceding blank
845line is optional. The nested list must be indented four spaces or
858Markdown allows you to write list items "lazily," instead of
859indenting continuation lines. However, if there are multiple paragraphs
860or other blocks in a list item, the first line of each must be indented.
865 + Another one; this looks
868 Second paragraph of second
874Ordered lists work just like bulleted lists, except that the items
875begin with enumerators rather than bullets.
877In standard markdown, enumerators are decimal numbers followed
878by a period and a space. The numbers themselves are ignored, so
879there is no difference between this list:
893Unlike standard markdown, Pandoc allows ordered list items to be marked
894with uppercase and lowercase letters and roman numerals, in addition to
895arabic numerals. List markers may be enclosed in parentheses or followed by a
896single right-parentheses or period. They must be separated from the
897text that follows by at least one space, and, if the list marker is a
898capital letter with a period, by at least two spaces.[^2]
900[^2]: The point of this rule is to ensure that normal paragraphs
901 starting with people's initials, like
903 B. Russell was an English philosopher.
905 do not get treated as list items.
907 This rule will not prevent
911 from being interpreted as a list item. In this case, a backslash
916Pandoc also pays attention to the type of list marker used, and to the
917starting number, and both of these are preserved where possible in the
918output format. Thus, the following yields a list with numbers followed
919by a single parenthesis, starting with 9, and a sublist with lowercase
929Note that Pandoc pays attention only to the *starting* marker in a list.
930So, the following yields a list numbered sequentially starting from 2:
937If default list markers are desired, use `#.`:
944### Definition lists ###
948Pandoc supports definition lists, using a syntax inspired by
949[PHP Markdown Extra] and [reStructuredText]:[^3]
955 Term 2 with *inline markup*
959 { some code, part of Definition 2 }
961 Third paragraph of definition 2.
963Each term must fit on one line, which may optionally be followed by
964a blank line, and must be followed by one or more definitions.
965A definition begins with a colon or tilde, which may be indented one
966or two spaces. A term may have multiple definitions, and each definition
967may consist of one or more block elements (paragraph, code block, list,
968etc.), each indented four spaces or one tab stop.
970If you leave space after the definition (as in the example above),
971the blocks of the definitions will be considered paragraphs. In some
972output formats, this will mean greater spacing between term/definition
973pairs. For a compact definition list, do not leave space between the
974definition and the next term:
982[^3]: I have also been influenced by the suggestions of [David Wheeler](http://www.justatheory.com/computers/markup/modest-markdown-proposal.html).
984[PHP Markdown Extra]: http://www.michelf.com/projects/php-markdown/extra/
987### Numbered example lists ###
991The special list marker `@` can be used for sequentially numbered
992examples. The first list item with a `@` marker will be numbered '1',
993the next '2', and so on, throughout the document. The numbered examples
994need not occur in a single list; each new list using `@` will take up
995where the last stopped. So, for example:
997 (@) My first example will be numbered (1).
998 (@) My second example will be numbered (2).
1000 Explanation of examples.
1002 (@) My third example will be numbered (3).
1004Numbered examples can be labeled and referred to elsewhere in the
1007 (@good) This is a good example.
1009 As (@good) illustrates, ...
1011The label can be any string of alphanumeric characters, underscores,
1015### Compact and loose lists ###
1017Pandoc behaves differently from `Markdown.pl` on some "edge
1018cases" involving lists. Consider this source:
1028Pandoc transforms this into a "compact list" (with no `<p>` tags around
1029"First", "Second", or "Third"), while markdown puts `<p>` tags around
1030"Second" and "Third" (but not "First"), because of the blank space
1031around "Third". Pandoc follows a simple rule: if the text is followed by
1032a blank line, it is treated as a paragraph. Since "Second" is followed
1033by a list, and not a blank line, it isn't treated as a paragraph. The
1034fact that the list is followed by a blank line is irrelevant. (Note:
1035Pandoc works this way even when the `--strict` option is specified. This
1036behavior is consistent with the official markdown syntax description,
1037even though it is different from that of `Markdown.pl`.)
1040### Ending a list ###
1042What if you want to put an indented code block after a list?
1049Trouble! Here pandoc (like other markdown implementations) will treat
1050`{ my code block }` as the second paragraph of item two, and not as
1053To "cut off" the list after item two, you can insert some non-indented
1054content, like an HTML comment, which won't produce visible output in
1060 <!-- end of list -->
1064You can use the same trick if you want two consecutive lists instead
1081A line containing a row of three or more `*`, `-`, or `_` characters
1082(optionally separated by spaces) produces a horizontal rule:
1094Three kinds of tables may be used. All three kinds presuppose the use of
1095a fixed-width font, such as Courier.
1097**Simple tables** look like this:
1099 Right Left Center Default
1100 ------- ------ ---------- -------
1105 Table: Demonstration of simple table syntax.
1107The headers and table rows must each fit on one line. Column
1108alignments are determined by the position of the header text relative
1109to the dashed line below it:[^4]
1111 - If the dashed line is flush with the header text on the right side
1112 but extends beyond it on the left, the column is right-aligned.
1113 - If the dashed line is flush with the header text on the left side
1114 but extends beyond it on the right, the column is left-aligned.
1115 - If the dashed line extends beyond the header text on both sides,
1116 the column is centered.
1117 - If the dashed line is flush with the header text on both sides,
1118 the default alignment is used (in most cases, this will be left).
1120[^4]: This scheme is due to Michel Fortin, who proposed it on the
1121 [Markdown discussion list](http://six.pairlist.net/pipermail/markdown-discuss/2005-March/001097.html).
1123The table must end with a blank line, or a line of dashes followed by
1124a blank line. A caption may optionally be provided (as illustrated in
1125the example above). A caption is a paragraph beginning with the string
1126`Table:` (or just `:`), which will be stripped off. It may appear either
1127before or after the table.
1129The column headers may be omitted, provided a dashed line is used
1130to end the table. For example:
1132 ------- ------ ---------- -------
1136 ------- ------ ---------- -------
1138When headers are omitted, column alignments are determined on the basis
1139of the first line of the table body. So, in the tables above, the columns
1140would be right, left, center, and right aligned, respectively.
1142**Multiline tables** allow headers and table rows to span multiple lines
1143of text (but cells that span multiple columns or rows of the table are
1144not supported). Here is an example:
1146 -------------------------------------------------------------
1147 Centered Default Right Left
1148 Header Aligned Aligned Aligned
1149 ----------- ------- --------------- -------------------------
1150 First row 12.0 Example of a row that
1151 spans multiple lines.
1153 Second row 5.0 Here's another one. Note
1154 the blank line between
1156 -------------------------------------------------------------
1158 Table: Here's the caption. It, too, may span
1161These work like simple tables, but with the following differences:
1163 - They must begin with a row of dashes, before the header text
1164 (unless the headers are omitted).
1165 - They must end with a row of dashes, then a blank line.
1166 - The rows must be separated by blank lines.
1168In multiline tables, the table parser pays attention to the widths of
1169the columns, and the writers try to reproduce these relative widths in
1170the output. So, if you find that one of the columns is too narrow in the
1171output, try widening it in the markdown source.
1173Headers may be omitted in multiline tables as well as simple tables:
1175 ----------- ------- --------------- -------------------------
1176 First row 12.0 Example of a row that
1177 spans multiple lines.
1179 Second row 5.0 Here's another one. Note
1180 the blank line between
1182 -------------------------------------------------------------
1184 : Here's a multiline table without headers.
1186It is possible for a multiline table to have just one row, but the row
1187should be followed by a blank line (and then the row of dashes that ends
1188the table), or the table may be interpreted as a simple table.
1190**Grid tables** look like this:
1192 : Sample grid table.
1194 +---------------+---------------+--------------------+
1195 | Fruit | Price | Advantages |
1196 +===============+===============+====================+
1197 | Bananas | $1.34 | - built-in wrapper |
1198 | | | - bright color |
1199 +---------------+---------------+--------------------+
1200 | Oranges | $2.10 | - cures scurvy |
1202 +---------------+---------------+--------------------+
1204The row of `=`s separates the header from the table body, and can be
1205omitted for a headerless table. The cells of grid tables may contain
1206arbitrary block elements (multiple paragraphs, code blocks, lists,
1207etc.). Alignments are not supported, nor are cells that span multiple
1208columns or rows. Grid tables can be created easily using [Emacs table mode].
1210 [Emacs table mode]: http://table.sourceforge.net/
1218If the file begins with a title block
1221 % author(s) (separated by semicolons)
1224it will be parsed as bibliographic information, not regular text. (It
1225will be used, for example, in the title of standalone LaTeX or HTML
1226output.) The block may contain just a title, a title and an author,
1227or all three elements. If you want to include an author but no
1228title, or a title and a date but no author, you need a blank line:
1237The title may occupy multiple lines, but continuation lines must
1238begin with leading space, thus:
1243If a document has multiple authors, the authors may be put on
1244separate lines with leading space, or separated by semicolons, or
1245both. So, all of the following are equivalent:
1250 % Author One; Author Two
1255The date must fit on one line.
1257All three metadata fields may contain standard inline formatting
1258(italics, links, footnotes, etc.).
1260Title blocks will always be parsed, but they will affect the output only
1261when the `--standalone` (`-s`) option is chosen. In HTML output, titles
1262will appear twice: once in the document head -- this is the title that
1263will appear at the top of the window in a browser -- and once at the
1264beginning of the document body. The title in the document head can have
1265an optional prefix attached (`--title-prefix` or `-T` option). The title
1266in the body appears as an H1 element with class "title", so it can be
1267suppressed or reformatted with CSS. If a title prefix is specified with
1268`-T` and no title block appears in the document, the title prefix will
1269be used by itself as the HTML title.
1271The man page writer extracts a title, man page section number, and
1272other header and footer information from the title line. The title
1273is assumed to be the first word on the title line, which may optionally
1274end with a (single-digit) section number in parentheses. (There should
1275be no space between the title and the parentheses.) Anything after
1276this is assumed to be additional footer and header text. A single pipe
1277character (`|`) should be used to separate the footer text from the header
1282will yield a man page with the title `PANDOC` and section 1.
1284 % PANDOC(1) Pandoc User Manuals
1286will also have "Pandoc User Manuals" in the footer.
1288 % PANDOC(1) Pandoc User Manuals | Version 4.0
1290will also have "Version 4.0" in the header.
1296Except inside a code block or inline code, any punctuation or space
1297character preceded by a backslash will be treated literally, even if it
1298would normally indicate formatting. Thus, for example, if one writes
1308 <strong>hello</strong>
1310This rule is easier to remember than standard markdown's rule,
1311which allows only the following characters to be backslash-escaped:
1315(However, if the `--strict` option is supplied, the standard
1316markdown rule will be used.)
1318A backslash-escaped space is parsed as a nonbreaking space. It will
1319appear in TeX output as `~` and in HTML and XML as `\ ` or
1322A backslash-escaped newline (i.e. a backslash occurring at the end of
1323a line) is parsed as a hard line break. It will appear in TeX output as
1324`\\` and in HTML as `<br />`. This is a nice alternative to
1325markdown's "invisible" way of indicating hard line breaks using
1326two trailing spaces on a line.
1328Backslash escapes do not work in verbatim contexts.
1333If the `--smart` option is specified, pandoc will produce typographically
1334correct output, converting straight quotes to curly quotes, `---` and `--`
1335to Em-dashes, and `...` to ellipses. Nonbreaking spaces are inserted after
1336certain abbreviations, such as "Mr."
1343To *emphasize* some text, surround it with `*`s or `_`, like this:
1345 This text is _emphasized with underscores_, and this
1346 is *emphasized with asterisks*.
1348Double `*` or `_` produces **strong emphasis**:
1350 This is **strong emphasis** and __with underscores__.
1352A `*` or `_` character surrounded by spaces, or backslash-escaped,
1353will not trigger emphasis:
1355 This is * not emphasized *, and \*neither is this\*.
1357Because `_` is sometimes used inside words and identifiers,
1358pandoc does not interpret a `_` surrounded by alphanumeric
1359characters as an emphasis marker. If you want to emphasize
1360just part of a word, use `*`:
1362 feas*ible*, not feas*able*.
1369To strikeout a section of text with a horizontal line, begin and end it
1370with `~~`. Thus, for example,
1372 This ~~is deleted text.~~
1375### Superscripts and subscripts ###
1379Superscripts may be written by surrounding the superscripted text by `^`
1380characters; subscripts may be written by surrounding the subscripted
1381text by `~` characters. Thus, for example,
1383 H~2~O is a liquid. 2^10^ is 1024.
1385If the superscripted or subscripted text contains spaces, these spaces
1386must be escaped with backslashes. (This is to prevent accidental
1387superscripting and subscripting through the ordinary use of `~` and `^`.)
1388Thus, if you want the letter P with 'a cat' in subscripts, use
1389`P~a\ cat~`, not `P~a cat~`.
1394To make a short span of text verbatim, put it inside backticks:
1396 What is the difference between `>>=` and `>>`?
1398If the verbatim text includes a backtick, use double backticks:
1400 Here is a literal backtick `` ` ``.
1402(The spaces after the opening backticks and before the closing
1403backticks will be ignored.)
1405The general rule is that a verbatim span starts with a string
1406of consecutive backticks (optionally followed by a space)
1407and ends with a string of the same number of backticks (optionally
1408preceded by a space).
1410Note that backslash-escapes (and other markdown constructs) do not
1411work in verbatim contexts:
1413 This is a backslash followed by an asterisk: `\*`.
1421Anything between two `$` characters will be treated as TeX math. The
1422opening `$` must have a character immediately to its right, while the
1423closing `$` must have a character immediately to its left. Thus,
1424`$20,000 and $30,000` won't parse as math. If for some reason
1425you need to enclose text in literal `$` characters, backslash-escape
1426them and they won't be treated as math delimiters.
1428TeX math will be printed in all output formats. How it is rendered
1429depends on the output format:
1431Markdown, reStructuredText, LaTeX, Org-Mode, ConTeXt
1432 ~ It will appear verbatim between `$` characters.
1435 ~ It will be rendered using an interpreted text role `:math:`, as described
1436 [here](http://www.american.edu/econ/itex2mml/mathhack.rst).
1439 ~ It will be rendered inside a `@math` command.
1442 ~ It will be rendered verbatim without `$`'s.
1445 ~ It will be rendered inside `<math>` tags.
1448 ~ It will be rendered inside `<span class="math">` tags.
1450RTF, Docbook, OpenDocument, ODT
1451 ~ It will be rendered, if possible, using unicode characters,
1452 and will otherwise appear verbatim.
1454HTML, Slidy, S5, EPUB
1455 ~ The way math is rendered in HTML will depend on the
1456 command-line options selected:
1458 1. The default is to render TeX math as far as possible using unicode
1459 characters, as with RTF, Docbook, and OpenDocument output. Formulas
1460 are put inside a `span` with `class="math"`, so that they may be
1461 styled differently from the surrounding text if needed.
1463 2. If the `--latexmathml` option is used, TeX math will be displayed
1464 between $ or $$ characters and put in `<span>` tags with class `LaTeX`.
1465 The [LaTeXMathML] script will be used to render it as formulas.
1466 (This trick does not work in all browsers, but it works in Firefox.
1467 In browsers that do not support LaTeXMathML, TeX math will appear
1468 verbatim between $ characters.)
1470 3. If the `--jsmath` option is used, TeX math will be put inside
1471 `<span>` tags (for inline math) or `<div>` tags (for display math)
1472 with class `math`. The [jsMath] script will be used to render
1475 4. If the `--mimetex` option is used, the [mimeTeX] CGI script will
1476 be called to generate images for each TeX formula. This should
1477 work in all browsers. The `--mimetex` option takes an optional URL
1478 as argument. If no URL is specified, it will be assumed that the
1479 mimeTeX CGI script is at `/cgi-bin/mimetex.cgi`.
1481 5. If the `--gladtex` option is used, TeX formulas will be enclosed
1482 in `<eq>` tags in the HTML output. The resulting `htex` file may then
1483 be processed by [gladTeX], which will produce image files for each
1484 formula and an `html` file with links to these images. So, the
1487 pandoc -s --gladtex myfile.txt -o myfile.htex
1488 gladtex -d myfile-images myfile.htex
1489 # produces myfile.html and images in myfile-images
1491 6. If the `--webtex` option is used, TeX formulas will be converted
1492 to `<img>` tags that link to an external script that converts
1493 formulas to images. The formula will be URL-encoded and concatenated
1494 with the URL provided. If no URL is specified, the Google Chart
1495 API will be used (`http://chart.apis.google.com/chart?cht=tx&chl=`).
1501Markdown allows you to insert raw HTML anywhere in a document
1502(except verbatim contexts, where `<`, `>`, and `&` are interpreted
1505The raw HTML is passed through unchanged in HTML, S5, Slidy, EPUB,
1506Markdown, and Textile output, and suppressed in other formats.
1510Standard markdown allows you to include HTML "blocks": blocks
1511of HTML between balanced tags that are separated from the surrounding text
1512with blank lines, and start and end at the left margin. Within
1513these blocks, everything is interpreted as HTML, not markdown;
1514so (for example), `*` does not signify emphasis.
1516Pandoc behaves this way when `--strict` is specified; but by default,
1517pandoc interprets material between HTML block tags as markdown.
1518Thus, for example, Pandoc will turn
1523 <td>[a link](http://google.com)</td>
1531 <td><em>one</em></td>
1532 <td><a href="http://google.com">a link</a></td>
1536whereas `Markdown.pl` will preserve it as is.
1538There is one exception to this rule: text between `<script>` and
1539`<style>` tags is not interpreted as markdown.
1541This departure from standard markdown should make it easier to mix
1542markdown with HTML block elements. For example, one can surround
1543a block of markdown text with `<div>` tags without preventing it
1544from being interpreted as markdown.
1552In addition to raw HTML, pandoc allows raw LaTeX, TeX, and ConTeXt to be
1553included in a document. Inline TeX commands will be preserved and passed
1554unchanged to the LaTeX and ConTeXt writers. Thus, for example, you can use
1555LaTeX to include BibTeX citations:
1557 This result was proved in \cite{jones.1967}.
1559Note that in LaTeX environments, like
1561 \begin{tabular}{|l|l|}\hline
1562 Age & Frequency \\ \hline
1565 36--45 & 22 \\ \hline
1568the material between the begin and end tags will be interpreted as raw
1569LaTeX, not as markdown.
1571Inline LaTeX is ignored in output formats other than Markdown, LaTeX,
1576For output formats other than LaTeX, pandoc will parse LaTeX `\newcommand` and
1577`\renewcommand` definitions and apply the resulting macros to all LaTeX
1578math. So, for example, the following will work in all output formats,
1581 \newcommand{\tuple}[1]{\langle #1 \rangle}
1585In LaTeX output, the `\newcommand` definition will simply be passed
1586unchanged to the output.
1592Markdown allows links to be specified in several ways.
1594### Automatic links ###
1596If you enclose a URL or email address in pointy brackets, it
1600 <sam@green.eggs.ham>
1605An inline link consists of the link text in square brackets,
1606followed by the URL in parentheses. (Optionally, the URL can
1607be followed by a link title, in quotes.)
1609 This is an [inline link](/url), and here's [one with
1610 a title](http://fsf.org "click here for a good time!").
1612There can be no space between the bracketed part and the parenthesized part.
1613The link text can contain formatting (such as emphasis), but the title cannot.
1616### Reference links ###
1618An *explicit* reference link has two parts, the link itself and the link
1619definition, which may occur elsewhere in the document (either
1620before or after the link).
1622The link consists of link text in square brackets, followed by a label in
1623square brackets. (There can be space between the two.) The link definition
1624must begin at the left margin or indented no more than three spaces. It
1625consists of the bracketed label, followed by a colon and a space, followed by
1626the URL, and optionally (after a space) a link title either in quotes or in
1629Here are some examples:
1631 [my label 1]: /foo/bar.html "My title, optional"
1633 [my label 3]: http://fsf.org (The free software foundation)
1634 [my label 4]: /bar#special 'A title in single quotes'
1636The URL may optionally be surrounded by angle brackets:
1638 [my label 5]: <http://foo.bar.baz>
1640The title may go on the next line:
1642 [my label 3]: http://fsf.org
1643 "The free software foundation"
1645Note that link labels are not case sensitive. So, this will work:
1647 Here is [my link][FOO]
1651In an *implicit* reference link, the second pair of brackets is
1652empty, or omitted entirely:
1654 See [my website][], or [my website].
1656 [my website]: http://foo.bar.baz
1662A link immediately preceded by a `!` will be treated as an image.
1663The link text will be used as the image's alt text:
1665 
1669 [movie reel]: movie.gif
1671### Pictures with captions ###
1675An image occurring by itself in a paragraph will be rendered as
1676a figure with a caption.[^5] (In LaTeX, a figure environment will be
1677used; in HTML, the image will be placed in a `div` with class
1678`figure`, together with a caption in a `p` with class `caption`.)
1679The image's alt text will be used as the caption.
1681 
1683[^5]: This feature is not yet implemented for RTF, OpenDocument, or
1684 ODT. In those formats, you'll just get an image in a paragraph by
1685 itself, with no caption.
1687If you just want a regular inline image, just make sure it is not
1688the only thing in the paragraph. One way to do this is to insert a
1689nonbreaking space after the image:
1691 \
1699Pandoc's markdown allows footnotes, using the following syntax:
1701 Here is a footnote reference,[^1] and another.[^longnote]
1703 [^1]: Here is the footnote.
1705 [^longnote]: Here's one with multiple blocks.
1707 Subsequent paragraphs are indented to show that they
1708 belong to the previous footnote.
1712 The whole paragraph can be indented, or just the first
1713 line. In this way, multi-paragraph footnotes work like
1714 multi-paragraph list items.
1716 This paragraph won't be part of the note, because it
1719The identifiers in footnote references may not contain spaces, tabs,
1720or newlines. These identifiers are used only to correlate the
1721footnote reference with the note itself; in the output, footnotes
1722will be numbered sequentially.
1724The footnotes themselves need not be placed at the end of the
1725document. They may appear anywhere except inside other block elements
1726(lists, block quotes, tables, etc.).
1728Inline footnotes are also allowed (though, unlike regular notes,
1729they cannot contain multiple paragraphs). The syntax is as follows:
1731 Here is an inline note.^[Inlines notes are easier to write, since
1732 you don't have to pick an identifier and move down to type the
1735Inline and regular footnotes may be mixed freely.
1743Pandoc can automatically generate citations and a bibliography in a number of
1744styles (using Andrea Rossato's `hs-citeproc`). In order to use this feature,
1745you will need a bibliographic database in one of the following formats:
1747 Format File extension
1748 ------------ --------------
1760You will need to specify the bibliography file using the `--bibliography`
1761command-line option (which may be repeated if you have several
1764By default, pandoc will use a Chicago author-date format for citations
1765and references. To use another style, you will need to use the
1766`--csl` option to specify a [CSL] 1.0 style file. A primer on
1767creating and modifying CSL styles can be found at
1768<http://citationstyles.org/downloads/primer.html>.
1769A repository of CSL styles can be found at
1770<https://github.com/citation-style-language/styles>.
1772Citations go inside square brackets and are separated by semicolons.
1773Each citation must have a key, composed of '@' + the citation
1774identifier from the database, and may optionally have a prefix,
1775a locator, and a suffix. Here are some examples:
1777 Blah blah [see @doe99, pp. 33-35; also @smith04, ch. 1].
1779 Blah blah [@doe99, pp. 33-35, 38-39 and *passim*].
1781 Blah blah [@smith04; @doe99].
1783A minus sign (`-`) before the `@` will suppress mention of
1784the author in the citation. This can be useful when the
1785author is already mentioned in the text:
1787 Smith says blah [-@smith04].
1789You can also write an in-text citation, as follows:
1793 @smith04 [p. 33] says blah.
1795If the style calls for a list of works cited, it will be placed
1796at the end of the document. Normally, you will want to end your
1797document with an appropriate header:
1803The bibliography will be inserted after this header.
1806Producing HTML slide shows with Pandoc
1807======================================
1809You can use Pandoc to produce an HTML + javascript slide presentation
1810that can be viewed via a web browser. There are two ways to do this,
1811using [S5] or [Slidy].
1813Here's the markdown source for a simple slide show, `eating.txt`:
1829 --------------------------
1831 
1833To produce the slide show, simply type
1835 pandoc -w s5 -s eating.txt > eating.html
1839 pandoc -w slidy -s eating.txt > eating.html
1843A title page is constructed automatically from the document's title
1844block. Each level-one header and horizontal rule begins a new slide.
1846The file produced by pandoc with the `-s/--standalone` option embeds a
1847link to javascripts and CSS files, which are assumed to be available at
1848the relative path `ui/default` (for S5) or at the Slidy website at
1849`w3.org` (for Slidy). If the `--offline` option is specified, the
1850scripts and CSS will be included directly in the generated file, so that
1851it may be used offline.
1853You can change the style of the slides by putting customized CSS files
1854in `$DATADIR/s5/default` (for S5) or `$DATADIR/slidy` (for Slidy),
1855where `$DATADIR` is the user data directory (see `--data-dir`, above).
1856The originals may be found in pandoc's system data directory (generally
1857`$CABALDIR/pandoc-VERSION/s5/default`). Pandoc will look there for any
1858files it does not find in the user data directory.
1863By default, these writers produces lists that display "all at once."
1864If you want your lists to display incrementally (one item at a time),
1865use the `-i` option. If you want a particular list to depart from the
1866default (that is, to display incrementally without the `-i` option and
1867all at once with the `-i` option), put it in a block quote:
1872In this way incremental and nonincremental lists can be mixed in
1875Literate Haskell support
1876========================
1878If you append `+lhs` to an appropriate input or output format (`markdown`,
1879`rst`, or `latex` for input or output; `html` for output only), pandoc
1880will treat the document as literate Haskell source. This means that
1882 - In markdown input, "bird track" sections will be parsed as Haskell
1883 code rather than block quotations. Text between `\begin{code}`
1884 and `\end{code}` will also be treated as Haskell code.
1886 - In markdown output, code blocks with class `haskell` will be
1887 rendered using bird tracks, and block quotations will be
1888 indented one space, so they will not be treated as Haskell code.
1889 In addition, headers will be rendered setext-style (with underlines)
1890 rather than atx-style (with '#' characters). (This is because ghc
1891 treats '#' characters in column 1 as introducing line numbers.)
1893 - In restructured text input, "bird track" sections will be parsed
1896 - In restructured text output, code blocks with class `haskell` will
1897 be rendered using bird tracks.
1899 - In LaTeX input, text in `code` environments will be parsed as
1902 - In LaTeX output, code blocks with class `haskell` will be rendered
1903 inside `code` environments.
1905 - In HTML output, code blocks with class `haskell` will be rendered
1906 with class `literatehaskell` and bird tracks.
1910 pandoc -f markdown+lhs -t html
1912reads literate Haskell source formatted with markdown conventions and writes
1913ordinary HTML (without bird tracks).
1915 pandoc -f markdown+lhs -t html+lhs
1917writes HTML with the Haskell code in bird tracks, so it can be copied
1918and pasted as literate Haskell source.
1923© 2006-2011 John MacFarlane (jgm at berkeley dot edu). Released under the
1924[GPL], version 2 or greater. This software carries no warranty of
1925any kind. (See COPYRIGHT for full copyright and warranty notices.)
1926Other contributors include Recai Oktaş, Paulo Tanimoto, Peter Wang,
1927Andrea Rossato, Eric Kow, infinity0x, Luke Plant, shreevatsa.public,
1928Puneeth Chaganti, Paul Rivier, rodja.trappe, Bradley Kuhn, thsutton,
1929Nathan Gass, Jonathan Daugherty, Jérémy Bobbio, Justin Bogner.
1931[markdown]: http://daringfireball.net/projects/markdown/
1932[reStructuredText]: http://docutils.sourceforge.net/docs/ref/rst/introduction.html
1933[S5]: http://meyerweb.com/eric/tools/s5/
1934[Slidy]: http://www.w3.org/Talks/Tools/Slidy/
1935[HTML]: http://www.w3.org/TR/html40/
1936[LaTeX]: http://www.latex-project.org/
1937[ConTeXt]: http://www.pragma-ade.nl/
1938[RTF]: http://en.wikipedia.org/wiki/Rich_Text_Format
1939[DocBook XML]: http://www.docbook.org/
1940[OpenDocument XML]: http://opendocument.xml.org/
1941[ODT]: http://en.wikipedia.org/wiki/OpenDocument
1942[Textile]: http://redcloth.org/textile
1943[MediaWiki markup]: http://www.mediawiki.org/wiki/Help:Formatting
1944[groff man]: http://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPages/man7/groff_man.7.html
1945[Haskell]: http://www.haskell.org/
1946[GNU Texinfo]: http://www.gnu.org/software/texinfo/
1947[Emacs Org-Mode]: http://org-mode.org
1948[EPUB]: http://www.idpf.org/
1949[GPL]: http://www.gnu.org/copyleft/gpl.html "GNU General Public License"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list