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 [markdown], [reStructuredText], [HTML], [LaTeX], [ConTeXt],
9[RTF], [DocBook XML], [groff man] pages, and [S5] HTML slide shows.
10Pandoc's version of markdown contains some enhancements, like footnotes
13In contrast to existing tools for converting markdown to HTML, which
14use regex substitutions, Pandoc has a modular design: it consists of a
15set of readers, which parse text in a given format and produce a native
16representation of the document, and a set of writers, which convert
17this native representation into a target format. Thus, adding an input
18or output format requires only adding a reader or writer.
20[markdown]: http://daringfireball.net/projects/markdown/
21[reStructuredText]: http://docutils.sourceforge.net/docs/ref/rst/introduction.html
22[S5]: http://meyerweb.com/eric/tools/s5/
23[HTML]: http://www.w3.org/TR/html40/
24[LaTeX]: http://www.latex-project.org/
25[ConTeXt]: http://www.pragma-ade.nl/
26[RTF]: http://en.wikipedia.org/wiki/Rich_Text_Format
27[DocBook XML]: http://www.docbook.org/
28[groff man]: http://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPages/man7/groff_man.7.html
29[Haskell]: http://www.haskell.org/
31© 2006-7 John MacFarlane (jgm at berkeley dot edu). Released under the
32[GPL], version 2 or greater. This software carries no warranty of
33any kind. (See COPYRIGHT for full copyright and warranty notices.)
34Recai Oktaş (roktas at debian dot org) deserves credit for the build
35system, the debian package, and the robust wrapper scripts.
37[GPL]: http://www.gnu.org/copyleft/gpl.html "GNU General Public License"
42The `pandoc` program itself does not depend on any external libraries
45The wrapper script `html2markdown` requires
47 - `pandoc` (which must be in the PATH)
48 - a POSIX-compliant shell (installed by default on all linux and unix
49 systems, including Mac OS X, and in [Cygwin] for Windows),
51 - `iconv` (for character encoding conversion). (If `iconv` is absent,
52 `html2markdown` will still work, but it will treat everything as UTF-8.)
54The wrapper script `markdown2pdf` requires
56 - `pandoc` (which must be in the PATH)
57 - a POSIX-compliant shell
58 - `pdflatex`, which should be part of any [LaTeX] distribution
59 - the following LaTeX packages (available from [CTAN], if they
60 are not already included in your LaTeX distribution):
62 + `fancyhdr` (if you have verbatim text in footnotes)
63 + `graphicx` (if you use images)
64 + `array` (if you use tables)
65 + `ulem` (if you use strikeout text)
67The wrapper script `hsmarkdown` requires only a POSIX-compliant shell.
69[Cygwin]: http://www.cygwin.com/
70[HTML Tidy]: http://tidy.sourceforge.net/
71[`iconv`]: http://www.gnu.org/software/libiconv/
72[CTAN]: http://www.ctan.org "Comprehensive TeX Archive Network"
77If you run `pandoc` without arguments, it will accept input from
78STDIN. If you run it with file names as arguments, it will take input
79from those files. By default, `pandoc` writes its output to STDOUT.
80If you want to write to a file, use the `-o` option:
82 pandoc -o hello.html hello.txt
84Note that you can specify multiple input files on the command line.
85`pandoc` will concatenate them all (with blank lines between them)
88 pandoc -s ch1.txt ch2.txt refs.txt > book.html
90(The `-s` option here tells `pandoc` to produce a standalone HTML file,
91with a proper header, rather than a fragment. For more details on this
92and many other command-line options, see below.)
94The format of the input and output can be specified explicitly using
95command-line options. The input format can be specified using the
96`-r/--read` or `-f/--from` options, the output format using the
97`-w/--write` or `-t/--to` options. Thus, to convert `hello.txt` from
98markdown to LaTeX, you could type:
100 pandoc -f markdown -t latex hello.txt
102To convert `hello.html` from html to markdown:
104 pandoc -f html -t markdown hello.html
106Supported output formats include `markdown`, `latex`, `context`
107(ConTeXt), `html`, `rtf` (rich text format), `rst` (reStructuredText),
108`docbook` (DocBook XML), `man` (groff man), and `s5` (which produces an
109HTML file that acts like powerpoint). Supported input formats include
110`markdown`, `html`, `latex`, and `rst`. Note that the `rst` reader only
111parses a subset of reStructuredText syntax. For example, it doesn't
112handle tables, option lists, or footnotes. But for simple documents it
113should be adequate. The `latex` and `html` readers are also limited in
114what they can do. Because the `html` reader is picky about the HTML it
115parses, it is recommended that you pipe HTML through [HTML Tidy] before
116sending it to `pandoc`, or use the `html2markdown` script described
119If you don't specify a reader or writer explicitly, `pandoc` will
120try to determine the input and output format from the extensions of
121the input and output filenames. Thus, for example,
123 pandoc -o hello.tex hello.txt
125will convert `hello.txt` from markdown to LaTeX. If no output file
126is specified (so that output goes to STDOUT), or if the output file's
127extension is unknown, the output format will default to HTML.
128If no input file is specified (so that input comes from STDIN), or
129if the input files' extensions are unknown, the input format will
130be assumed to be markdown unless explicitly specified.
135All input is assumed to be in the UTF-8 encoding, and all output
136is in UTF-8. If your local character encoding is not UTF-8 and you use
137accented or foreign characters, you should pipe the input and output
138through [`iconv`]. For example,
140 iconv -t utf-8 source.txt | pandoc | iconv -f utf-8 > output.html
142will convert `source.txt` from the local encoding to UTF-8, then
143convert it to HTML, then convert back to the local encoding,
144putting the output in `output.html`.
146The shell scripts (described below) automatically convert the input
147from the local encoding to UTF-8 before running them through `pandoc`,
148then convert the output back to the local encoding.
153Three shell scripts, `markdown2pdf`, `html2markdown`, and `hsmarkdown`,
154are included in the standard Pandoc installation. (They are not included
155in the Windows binary package, as they require a POSIX shell, but they
156may be used in Windows under Cygwin.)
1581. `markdown2pdf` produces a PDF file from markdown-formatted
159 text, using `pandoc` and `pdflatex`. The default
160 behavior of `markdown2pdf` is to create a file with the same
161 base name as the first argument and the extension `pdf`; thus,
164 markdown2pdf sample.txt endnotes.txt
166 will produce `sample.pdf`. (If `sample.pdf` exists already,
167 it will be backed up before being overwritten.) An output file
168 name can be specified explicitly using the `-o` option:
170 markdown2pdf -o book.pdf chap1 chap2
172 If no input file is specified, input will be taken from STDIN.
173 All of `pandoc`'s options will work with `markdown2pdf` as well.
1752. `html2markdown` grabs a web page from a file or URL and converts
176 it to markdown-formatted text, using `tidy` and `pandoc`.
178 All of `pandoc`'s options will work with `html2markdown` as well.
179 In addition, the following special options may be used.
180 The special options must be separated from the `html2markdown`
181 command and any regular Pandoc options by the delimiter `--`:
183 html2markdown -o out.txt -- -e latin1 -g curl google.com
185 The `-e` or `--encoding` option specifies the character encoding
186 of the HTML input. If this option is not specified, and input
187 is not from STDIN, `html2markdown` will attempt to determine the
188 page's character encoding from the "Content-type" meta tag.
189 If this is not present, UTF-8 is assumed.
191 The `-g` or `--grabber` option specifies the command to be used to
192 fetch the contents of a URL:
194 html2markdown -g 'curl --user foo:bar' www.mysite.com
196 If this option is not specified, `html2markdown` searches for an
197 available program (`wget`, `curl`, or a text-mode browser) to fetch
198 the contents of a URL.
2003. `hsmarkdown` is designed to be used as a drop-in replacement for
201 `Markdown.pl`. It forces `pandoc` to convert from markdown to
202 HTML, and to use the `--strict` flag for maximal compliance with
203 official markdown syntax. (All of Pandoc's syntax extensions and
204 variants, described below, are disabled.) No other command-line
205 options are allowed. (In fact, options will be interpreted as
208 As an alternative to using the `hsmarkdown` shell script, the
209 user may create a symbolic link to `pandoc` called `hsmarkdown`.
210 When invoked under the name `hsmarkdown`, `pandoc` will behave
211 as if the `--strict` flag had been selected, and no command-line
212 options will be recognized. However, this approach does not work
213 under Cygwin, due to problems with its simulation of symbolic
219Various command-line options can be used to customize the output.
220For further documentation, see the `pandoc(1)` man page.
222`-f`, `--from`, `-r`, or `--read` *format*
223: specifies the input format (the format Pandoc will be converting
224 *from*). *format* can be `native`, `markdown`, `rst`, `html`, or
227`-t`, `--to`, `-w`, or `--write` *format*
228: specifies the output format -- the format Pandoc will
229 be converting *to*. *format* can be `native`, `html`, `s5`,
230 `docbook`, `latex`, `context`, `markdown`, `man`, `rst`, and `rtf`.
232`-s` or `--standalone`
233: indicates that a standalone document is to be produced (with
234 appropriate headers and footers), rather than a fragment.
236`-o` or `--output` *filename*
237: sends output to *filename*. If this option is not specified,
238 or if its argument is `-`, output will be sent to STDOUT.
240`-p` or `--preserve-tabs`
241: causes tabs in the source text to be preserved, rather than converted
242 to spaces (the default).
245: sets the number of spaces per tab to *tabstop* (defaults to 4).
248: specifies that strict markdown syntax is to be used, without
249 pandoc's usual extensions and variants (described below). When the
250 input format is HTML, this means that constructs that have no
251 equivalents in standard markdown (e.g. definition lists or strikeout
252 text) will be parsed as raw HTML.
255: causes reference-style links to be used in markdown
256 and reStructuredText output. By default inline links are used.
259: causes the HTML and LaTeX readers to parse HTML codes and LaTeX
260 environments that it can't translate as raw HTML or LaTeX. Raw HTML can
261 be printed in markdown, reStructuredText, HTML, and S5 output; raw LaTeX
262 can be printed in markdown, reStructuredText, LaTeX, and ConTeXt output.
263 The default is for the readers to omit untranslatable HTML codes and
264 LaTeX environments. (The LaTeX reader does pass through untranslatable
265 LaTeX *commands*, even if `-R` is not specified.)
267`-C` or `--custom-header` *filename*
268: can be used to specify a custom document header. To see the headers
269 used by default, use the `-D` option: for example, `pandoc -D html`
270 prints the default HTML header.
272`--toc` or `--table-of-contents`
273: includes an automatically generated table of contents (or, in the
274 case of `latex`, `context`, and `rst`, an instruction to create
275 one) in the output document. This option has no effect with `man`,
276 `docbook`, or `s5` output formats.
278`-c` or `--css` *filename*
279: allows the user to specify a custom stylesheet that will be linked to
280 in HTML and S5 output.
282`-H` or `--include-in-header` *filename*
283: includes the contents of *filename* (verbatim) at the end of the
284 document header. This can be used, for example, to include special
285 CSS or javascript in HTML documents.
287`-B` or `--include-before-body` *filename*
288: includes the contents of *filename* (verbatim) at the beginning of
289 the document body (e.g. after the `<body>` tag in HTML, or the
290 `\begin{document}` command in LaTeX). This can be used to include
291 navigation bars or banners in HTML documents.
293`-A` or `--include-after-body` *filename*
294: includes the contents of *filename* (verbatim) at the end of
295 the document body (before the `</body>` tag in HTML, or the
296 `\end{document}` command in LaTeX).
298`-T` or `--title-prefix` *string*
299: includes *string* as a prefix at the beginning of the title that
300 appears in the HTML header (but not in the title as it appears at
301 the beginning of the HTML body). (See below on
302 [Title Blocks](#title-blocks).)
305: causes `pandoc` to produce typographically correct output, along the
306 lines of John Gruber's [Smartypants]. Straight quotes are converted
307 to curly quotes, `---` to dashes, and `...` to ellipses. (Note: This
308 option is only significant when the input format is `markdown`.
309 It is selected automatically when the output format is `latex` or
312`-m`*[url]* or `--asciimathml`*[=url]*
313: will cause LaTeX formulas (between $ signs) in HTML or S5 to display
314 as formulas rather than as code. The trick will not work in all
315 browsers, but it works in Firefox. Peter Jipsen's [ASCIIMathML]
316 script is used to do the magic. If a local copy of `ASCIIMathML.js`
317 is available on the webserver where the page will be viewed,
318 provide a *url* and a link will be inserted in the generated
319 HTML or S5. If no *url* is provided, the contents of the script
320 will be inserted directly; this provides portability at the price of
321 efficiency. If you plan to use math on several pages, it is much
322 better to link to a copy of `ASCIIMathML.js`, which can be cached.
324`-i` or `--incremental`
325: causes all lists in S5 output to be displayed incrementally by
326 default (one item at a time). The normal default is for lists to be
327 displayed all at once.
329`-N` or `--number-sections`
330: causes sections to be numbered in LaTeX or ConTeXt output. By default,
331 sections are not numbered.
334: is intended to make it easier to create wrapper scripts that use
335 Pandoc. It causes Pandoc to dump information about the arguments
336 with which it was called to STDOUT, then exit. The first line
337 printed is the name of the output file specified using the `-o`
338 or `--output` option, or `-` if output would go to STDOUT. The
339 remaining lines, if any, list command-line arguments. These will
340 include the names of input files and any special options passed
341 after ` -- ` on the command line. So, for example,
343: pandoc --dump-args -o foo.html -s foo.txt \
344 appendix.txt -- -e latin1
346: will cause the following to be printed to STDOUT:
348: foo.html foo.txt appendix.txt -e latin1
351: causes Pandoc to ignore all command-line arguments.
352 Regular Pandoc options are not ignored. Thus, for example,
354: pandoc --ignore-args -o foo.html -s foo.txt -- -e latin1
358: pandoc -o foo.html -s
361: prints the version number to STDERR.
364: prints a usage message to STDERR.
366[Smartypants]: http://daringfireball.net/projects/smartypants/
367[ASCIIMathML]: http://www1.chapman.edu/~jipsen/mathml/asciimath.html
369Pandoc's markdown vs. standard markdown
370=======================================
372In parsing markdown, Pandoc departs from and extends [standard markdown]
373in a few respects. (To run Pandoc on the official markdown test suite,
374type `make test-markdown`.) Except where noted, these differences can
375be suppressed by specifying the `--strict` command-line option or by
376using the `hsmarkdown` wrapper.
378[standard markdown]: http://daringfireball.net/projects/markdown/syntax
379 "Markdown syntax description"
384Except inside a code block or inline code, any punctuation or space
385character preceded by a backslash will be treated literally, even if it
386would normally indicate formatting. Thus, for example, if one writes
396 <strong>hello</strong>
398This rule is easier to remember than standard markdown's rule,
399which allows only the following characters to be backslash-escaped:
403Subscripts and superscripts
404---------------------------
406Superscripts may be written by surrounding the superscripted text by `^`
407characters; subscripts may be written by surrounding the subscripted
408text by `~` characters. Thus, for example,
410 H~2~O is a liquid. 2^10^ is 1024.
412If the superscripted or subscripted text contains spaces, these spaces
413must be escaped with backslashes. (This is to prevent accidental
414superscripting and subscripting through the ordinary use of `~` and `^`.)
415Thus, if you want the letter P with 'a cat' in subscripts, use
416`P~a\ cat~`, not `P~a cat~`.
421To strikeout a section of text with a horizontal line, begin and end it
422with `~~`. Thus, for example,
424 This ~~is deleted text.~~
429Pandoc behaves differently from standard markdown on some "edge
430cases" involving lists. Consider this source:
440Pandoc transforms this into a "compact list" (with no `<p>` tags around
441"First", "Second", or "Third"), while markdown puts `<p>` tags around
442"Second" and "Third" (but not "First"), because of the blank space
443around "Third". Pandoc follows a simple rule: if the text is followed by
444a blank line, it is treated as a paragraph. Since "Second" is followed
445by a list, and not a blank line, it isn't treated as a paragraph. The
446fact that the list is followed by a blank line is irrelevant. (Note:
447Pandoc works this way even when the `--strict` option is specified. This
448behavior is consistent with the official markdown syntax description,
449even though it is different from that of `Markdown.pl`.)
451Unlike standard markdown, Pandoc allows ordered list items to be marked
452with uppercase and lowercase letters and roman numerals, in addition to
453arabic numerals. (This behavior can be turned off using the `--strict`
454option.) List markers may be enclosed in parentheses or followed by a
455single right-parentheses or period. Pandoc also pays attention to the
456type of list marker used, and to the starting number, and both of these
457are preserved where possible in the output format. Thus, the following
458yields a list with numbers followed by a single parenthesis, starting
459with 9, and a sublist with lowercase roman numerals:
468Note that Pandoc pays attention only to the *starting* number in a list.
469So, the following yields a list numbered sequentially starting from 2:
475If default list markers are desired, use '`#.`':
481If you change list style in mid-list, Pandoc will notice and assume you
482are starting a sublist. So,
490gets treated as if it were
498Note that a list beginning with a single letter will be interpreted as
499an alphabetic list. So you are out of luck if you want a roman-numbered
500list starting with 100 (C).
502Note also that a paragraph starting with a capital letter and a period
503(for example, an initial) or a capital letter in parentheses
504(for example, `(C)`) will be interpreted as a list:
506 B. Russell was an English philosopher.
510To avoid this, use backslash escapes:
512 B\. Russell was an English philosopher.
519Pandoc supports definition lists, using a syntax inspired by
520[PHP Markdown Extra] and [reStructuredText]:
522 [PHP Markdown Extra]: http://www.michelf.com/projects/php-markdown/extra/
530 : Second paragraph of definition 2.
532Each term must fit on one line. The definition must begin on the line
533after the term. The definition consists of one or more block elements
534(paragraph, code block, list, etc.), each beginning with a colon and
535(aside from the colon) indented one tab stop.
537 Term *with inline markup*
538 : Here is the definition. It may contain multiple blocks.
543 : Here is the third paragraph of this definition.
545If you leave space after the definition (as in the first example above),
546the definitions will be considered paragraphs. In some output formats,
547this will mean greater spacing between term/definition pairs. For a
548compact definition list, do not leave space between the definition and
559Pandoc allows implicit reference links with just a single set of
560brackets. So, the following links are equivalent:
563 2. Here's my [link][]
567(Note: Pandoc works this way even if `--strict` is specified, because
568`Markdown.pl` 1.0.2b7 allows single-bracket links.)
573Pandoc's markdown allows footnotes, using the following syntax:
575 Here is a footnote reference,[^1] and another.[^longnote]
577 [^1]: Here is the footnote.
579 [^longnote]: Here's one with multiple blocks.
581 Subsequent paragraphs are indented to show that they
582 belong to the previous footnote.
586 The whole paragraph can be indented, or just the first
587 line. In this way, multi-paragraph footnotes work like
588 multi-paragraph list items.
590 This paragraph won't be part of the note, because it isn't indented.
592The identifiers in footnote references may not contain spaces, tabs,
593or newlines. These identifiers are used only to correlate the
594footnote reference with the note itself; in the output, footnotes
595will be numbered sequentially.
597The footnotes themselves need not be placed at the end of the
598document. They may appear anywhere except inside other block elements
599(lists, block quotes, tables, etc.).
601Inline footnotes are also allowed (though, unlike regular notes,
602they cannot contain multiple paragraphs). The syntax is as follows:
604 Here is an inline note.^[Inlines notes are easier to write, since
605 you don't have to pick an identifier and move down to type the
608Inline and regular footnotes may be mixed freely.
613Two kinds of tables may be used. Both kinds presuppose the use of
614a fixed-width font, such as Courier.
616Simple tables look like this:
618 Right Left Center Default
619 ------- ------ ---------- -------
624 Table: Demonstration of simple table syntax.
626The headers and table rows must each fit on one line. Column
627alignments are determined by the position of the header text relative
628to the dashed line below it:[^1]
630 - If the dashed line is flush with the header text on the right side
631 but extends beyond it on the left, the column is right-aligned.
632 - If the dashed line is flush with the header text on the left side
633 but extends beyond it on the right, the column is left-aligned.
634 - If the dashed line extends beyond the header text on both sides,
635 the column is centered.
636 - If the dashed line is flush with the header text on both sides,
637 the default alignment is used (in most cases, this will be left).
639[^1]: This scheme is due to Michel Fortin, who proposed it on the
640 Markdown discussion list: <http://six.pairlist.net/pipermail/markdown-discuss/2005-March/001097.html>
642The table must end with a blank line. Optionally, a caption may be
643provided (as illustrated in the example above). A caption is a paragraph
644beginning with the string `Table:`, which will be stripped off.
646The table parser pays attention to the widths of the columns, and
647the writers try to reproduce these relative widths in the output.
648So, if you find that one of the columns is too narrow in the output,
649try widening it in the markdown source.
651Multiline tables allow headers and table rows to span multiple lines
652of text. Here is an example:
654 -------------------------------------------------------------
655 Centered Default Right Left
656 Header Aligned Aligned Aligned
657 ----------- ------- --------------- -------------------------
658 First row 12.0 Example of a row that
659 spans multiple lines.
661 Second row 5.0 Here's another one. Note
662 the blank line between
664 -------------------------------------------------------------
666 Table: Here's the caption. It, too, may span
669These work like simple tables, but with the following differences:
671 - They must begin with a row of dashes, before the header text.
672 - They must end with a row of dashes, then a blank line.
673 - The rows must be separated by blank lines.
678If the file begins with a title block
681 % author(s) (separated by commas)
684it will be parsed as bibliographic information, not regular text. (It
685will be used, for example, in the title of standalone LaTeX or HTML
686output.) The block may contain just a title, a title and an author,
687or all three lines. Each must begin with a % and fit on one line.
688The title may contain standard inline formatting. If you want to
689include an author but no title, or a title and a date but no author,
690you need a blank line:
696Titles will be written only when the `--standalone` (`-s`) option is
697chosen. In HTML output, titles will appear twice: once in the
698document head -- this is the title that will appear at the top of the
699window in a browser -- and once at the beginning of the document body.
700The title in the document head can have an optional prefix attached
701(`--title-prefix` or `-T` option). The title in the body appears as
702an H1 element with class "title", so it can be suppressed or
703reformatted with CSS. If a title prefix is specified with `-T` and no
704title block appears in the document, the title prefix will be used by
705itself as the HTML title.
707The man page writer extracts a title, man page section number, and
708other header and footer information from the title line. The title
709is assumed to be the first word on the title line, which may optionally
710end with a (single-digit) section number in parentheses. (There should
711be no space between the title and the parentheses.) Anything after
712this is assumed to be additional footer and header text. A single pipe
713character (`|`) should be used to separate the footer text from the header
718will yield a man page with the title `PANDOC` and section 1.
720 % PANDOC(1) Pandoc User Manuals
722will also have "Pandoc User Manuals" in the footer.
724 % PANDOC(1) Pandoc User Manuals | Version 4.0
726will also have "Version 4.0" in the header.
728Markdown in HTML blocks
729-----------------------
731While standard markdown leaves HTML blocks exactly as they are, Pandoc
732treats text between HTML tags as markdown. Thus, for example, Pandoc
738 <td>[a link](http://google.com)</td>
746 <td><em>one</em></td>
747 <td><a href="http://google.com">a link</a></td>
751whereas `Markdown.pl` will preserve it as is.
753There is one exception to this rule: text between `<script>` and
754`</script>` tags is not interpreted as markdown.
756This departure from standard markdown should make it easier to mix
757markdown with HTML block elements. For example, one can surround
758a block of markdown text with `<div>` tags without preventing it
759from being interpreted as markdown.
761Header identifiers in HTML
762--------------------------
764Each header element in pandoc's HTML output is given a unique
765identifier. This identifier is based on the text of the header. To
766derive the identifier from the header text,
768 - Remove all formatting, links, etc.
769 - Remove all punctuation, except dashes and hyphens.
770 - Replace all spaces, dashes, newlines, and hyphens with hyphens.
771 - Convert all alphabetic characters to lowercase.
773Thus, for example, a heading 'Header identifiers in HTML' will get
774the identifier `header-identifiers-in-html`, a heading
775'*Dogs*?--in *my* house?' will get the identifier `dogs--in-my-house`,
776and a heading '[HTML], [S5], or [RTF]?' will get the identifier
779These rules should, in most cases, allow one to determine the identifier
780from the header text. The exception is when several headers have the
781same text; in this case, the first will get an identifier as described
782above; the second will get the same identifier with `-1` appended; the
783third with `-2`; and so on.
785These identifiers are used to provide link targets in the table of
786contents generated by the `--toc|--table-of-contents` option. They
787also make it easy to provide links from one section of a document to
788another. A link to this section, for example, might look like this:
790 See the section on [header identifiers](#header-identifiers-in-html).
792Note, however, that this method of providing links to sections works
798Pandoc supports emacs-style boxquote block quotes, in addition to
799standard markdown (email-style) block quotes:
802 | They look like this.
805Blank lines before headers and blockquotes
806------------------------------------------
808Standard markdown syntax does not require a blank line before a header
809or blockquote. Pandoc does require this (except, of course, at the
810beginning of the document). The reason for the requirement is that
811it is all too easy for a `>` or `#` to end up at the beginning of a
812line by accident (perhaps through line wrapping). Consider, for
815 I like several of their flavors of ice cream: #22, for example, and
821Anything between two $ characters will be parsed as LaTeX math. The
822opening $ must have a character immediately to its right, while the
823closing $ must have a character immediately to its left. Thus,
824`$20,000 and $30,000` won't parse as math. The $ character can be
825escaped with a backslash if needed.
827Pandoc can use the [ASCIIMathML] script to display LaTeX formulas
828in HTML (at least on better browsers). See above on the
829`-m|--asciimathml` command-line option.
831[ASCIIMathML]: http://www1.chapman.edu/~jipsen/asciimath.html
833Inline LaTeX commands will also be preserved and passed unchanged
834to the LaTeX writer. Thus, for example, you can use LaTeX to
835include BibTeX citations:
837 This result was proved in \cite{jones.1967}.
839Note that in LaTeX environments, like
841 \begin{tabular}{|l|l|}\hline
842 Age & Frequency \\ \hline
845 36--45 & 22 \\ \hline
848the material between the begin and end tags will be interpreted as raw
849LaTeX, not as markdown.
854When run with the "standalone" option (`-s`), `pandoc` creates a
855standalone file, complete with an appropriate header. To see the
856default headers used for html and latex, use the following commands:
862If you want to use a different header, just create a file containing
863it and specify it on the command line as follows:
865 pandoc --header=MyHeaderFile
867Producing S5 with Pandoc
868========================
870Producing an [S5] web-based slide show with Pandoc is easy. A title
871page is constructed automatically from the document's title block (see
872above). Each section (with a level-one header) produces a single slide.
873(Note that if the section is too big, the slide will not fit on the page;
874S5 is not smart enough to produce multiple pages.)
876Here's the markdown source for a simple slide show, `eating.txt`:
892To produce the slide show, simply type
894 pandoc -w s5 -s eating.txt > eating.html
896and open up `eating.html` in a browser. The HTML file embeds
897all the required javascript and CSS, so no other files are necessary.
899Note that by default, the S5 writer produces lists that display
900"all at once." If you want your lists to display incrementally
901(one item at a time), use the `-i` option. If you want a
902particular list to depart from the default (that is, to display
903incrementally without the `-i` option and all at once with the
904`-i` option), put it in a block quote:
909In this way incremental and nonincremental lists can be mixed in
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