1% PANDOC(1) Pandoc User Manuals
7pandoc - general markup converter
11pandoc [*options*] [*input-file*]...
15Pandoc converts files from one markup format to another. It can
16read markdown and (subsets of) reStructuredText, HTML, and LaTeX, and
17it can write markdown, reStructuredText, HTML, LaTeX, ConTeXt, Texinfo,
18groff man, MediaWiki markup, RTF, OpenDocument XML, ODT, DocBook XML,
19and S5 HTML slide shows.
21If no *input-file* is specified, input is read from *stdin*.
22Otherwise, the *input-files* are concatenated (with a blank
23line between each) and used as input. Output goes to *stdout* by
24default (though output to *stdout* is disabled for the `odt` output
25format). For output to a file, use the `-o` option:
27 pandoc -o output.html input.txt
29The input and output formats may be specified using command-line options
30(see **OPTIONS**, below, for details). If these formats are not
31specified explicitly, Pandoc will attempt to determine them
32from the extensions of the input and output filenames. If input comes
33from *stdin* or from a file with an unknown extension, the input is assumed
34to be markdown. If no output filename is specified using the `-o`
35option, or if a filename is specified but its extension is unknown,
36the output will default to HTML. Thus, for example,
38 pandoc -o chap1.tex chap1.txt
40converts *chap1.txt* from markdown to LaTeX. And
44converts *README* from markdown to HTML.
46Pandoc's version of markdown is an extended variant of standard
47markdown: the differences are described in the *README* file in
48the user documentation. If standard markdown syntax is desired, the
49`--strict` option may be used.
51Pandoc uses the UTF-8 character encoding for both input and output.
52If your local character encoding is not UTF-8, you should pipe input
53and output through `iconv`:
55 iconv -t utf-8 input.txt | pandoc | iconv -f utf-8
57Pandoc's HTML parser is not very forgiving. If your input is
58HTML, consider running it through `tidy`(1) before passing it
59to Pandoc. Or use `html2markdown`(1), a wrapper around `pandoc`.
63-f *FORMAT*, -r *FORMAT*, \--from=*FORMAT*, \--read=*FORMAT*
64: Specify input format. *FORMAT* can be
65 `native` (native Haskell), `markdown` (markdown or plain text),
66 `rst` (reStructuredText), `html` (HTML), or `latex` (LaTeX).
68-t *FORMAT*, -w *FORMAT*, \--to=*FORMAT*, \--write=*FORMAT*
69: Specify output format. *FORMAT* can be `native` (native Haskell),
70 `markdown` (markdown or plain text), `rst` (reStructuredText),
71 `html` (HTML), `latex` (LaTeX), `context` (ConTeXt), `man` (groff man),
72 `mediawiki` (MediaWiki markup), `texinfo` (GNU Texinfo),
73 `docbook` (DocBook XML), `opendocument` (OpenDocument XML),
74 `odt` (OpenOffice text document), `s5` (S5 HTML and javascript slide
75 show), `pdf` (Portable Document Format), or `rtf` (rich text
76 format). Note that for `odt` and `pdf` output, output will not be
77 directed to *stdout*; an output filename must be specified using the
81: Produce output with an appropriate header and footer (e.g. a
82 standalone HTML, LaTeX, or RTF file, not a fragment).
84-o *FILE*, \--output=*FILE*
85: Write output to *FILE* instead of *stdout*. If *FILE* is
86 \``-`', output will go to *stdout*.
89: Preserve tabs instead of converting them to spaces.
92: Specify tab stop (default is 4).
95: Use strict markdown syntax, with no extensions or variants.
98: Use reference-style links, rather than inline links, in writing markdown
102: Parse untranslatable HTML codes and LaTeX environments as raw HTML
103 or LaTeX, instead of ignoring them.
106: Use smart quotes, dashes, and ellipses. (This option is significant
107 only when the input format is `markdown`. It is selected automatically
108 when the output format is `latex` or `context`.)
110-m*URL*, \--latexmathml=*URL*
111: Use LaTeXMathML to display embedded TeX math in HTML output.
112 To insert a link to a local copy of the `LaTeXMathML.js` script,
113 provide a *URL*. If no *URL* is provided, the contents of the
114 script will be inserted directly into the HTML header.
117: Enclose TeX math in `<eq>` tags in HTML output. These can then
118 be processed by gladTeX to produce links to images of the typeset
122: Render TeX math using the mimeTeX CGI script. If *URL* is not specified,
123 it is assumed that the script is at `/cgi-bin/mimetex.cgi`.
126: Make list items in S5 display incrementally (one by one).
128-N, \--number-sections
129: Number section headings in LaTeX output. (Default is not to number
133: Disable text wrapping in output. (Default is to wrap text.)
136: Sanitizes HTML (in markdown or HTML input) using a whitelist.
137 Unsafe tags are replaced by HTML comments; unsafe attributes
138 are omitted. URIs in links and images are also checked against a
139 whitelist of URI schemes.
141\--toc, \--table-of-contents
142: Include an automatically generated table of contents (HTML, markdown,
143 RTF) or an instruction to create one (LaTeX, reStructuredText).
144 This option has no effect on man, DocBook, or S5 output.
146-c *CSS*, \--css=*CSS*
147: Link to a CSS style sheet. *CSS* is the pathname of the style sheet.
149-H *FILE*, \--include-in-header=*FILE*
150: Include contents of *FILE* at the end of the header. Implies `-s`.
152-B *FILE*, \--include-before-body=*FILE*
153: Include contents of *FILE* at the beginning of the document body.
155-A *FILE*, \--include-after-body=*FILE*
156: Include contents of *FILE* at the end of the document body.
158-C *FILE*, \--custom-header=*FILE*
159: Use contents of *FILE* as the document header (overriding the
160 default header, which can be printed by using the `-D` option).
163-D *FORMAT*, \--print-default-header=*FORMAT*
164: Print the default header for *FORMAT* (`html`, `s5`, `latex`,
165 `context`, `docbook`, `man`, `markdown`, `opendocument`,
168-T *STRING*, \--title-prefix=*STRING*
169: Specify *STRING* as a prefix to the HTML window title.
172: Print information about command-line arguments to *stdout*, then exit.
173 The first line of output contains the name of the output file specified
174 with the `-o` option, or \``-`' (for *stdout*) if no output file was
175 specified. The remaining lines contain the command-line arguments,
176 one per line, in the order they appear. These do not include regular
177 Pandoc options and their arguments, but do include any options appearing
178 after a \``--`' separator at the end of the line.
179 This option is intended primarily for use in wrapper scripts.
182: Ignore command-line arguments (for use in wrapper scripts).
183 Regular Pandoc options are not ignored. Thus, for example,
185: pandoc --ignore-args -o foo.html -s foo.txt -- -e latin1
189: pandoc -o foo.html -s
202The *README* file distributed with Pandoc contains full documentation.
204The Pandoc source code and all documentation may be downloaded from
205<http://johnmacfarlane.net/pandoc/>.
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