@@ -14,11 +14,11 @@ Pandoc is a [Haskell] library for converting from one markup format to
1414another, and a command-line tool that uses this library. It can read
1515[markdown] and (subsets of) [Textile], [reStructuredText], [HTML],
1616and [LaTeX]; and it can write plain text, [markdown], [reStructuredText],
17−[XHTML], [HTML 5], [LaTeX], [ConTeXt], [RTF], [DocBook XML],
18−[OpenDocument XML], [ODT], [Word docx], [GNU Texinfo], [MediaWiki markup], [EPUB],
19−[Textile], [groff man] pages, [Emacs Org-Mode], [AsciiDoc], and [Slidy],
20−[DZSlides], or [S5] HTML slide shows. It can also produce [PDF] output
21−on systems where LaTeX is installed.
17+[XHTML], [HTML 5], [LaTeX] (including [beamer] slide shows),
18+[ConTeXt], [RTF], [DocBook XML], [OpenDocument XML], [ODT], [Word docx], [GNU
19+Texinfo], [MediaWiki markup], [EPUB], [Textile], [groff man] pages, [Emacs
20+Org-Mode], [AsciiDoc], and [Slidy], [DZSlides], or [S5] HTML slide shows. It
21+can also produce [PDF] output on systems where LaTeX is installed.
2222
2323Pandoc's enhanced version of markdown includes syntax for footnotes,
2424tables, flexible ordered lists, definition lists, delimited code blocks,
@@ -42,7 +42,7 @@ If no *input-file* is specified, input is read from *stdin*.
4242Otherwise, the *input-files* are concatenated (with a blank
4343line between each) and used as input. Output goes to *stdout* by
4444default (though output to *stdout* is disabled for the `odt`, `docx`,
45−`pdf`, and `epub` output formats). For output to a file, use the
45+and `epub` output formats). For output to a file, use the
4646`-o` option:
4747
4848 pandoc -o output.html input.txt
@@ -91,23 +91,25 @@ should pipe input and output through `iconv`:
9191
9292 iconv -t utf-8 input.txt | pandoc | iconv -f utf-8
9393
94−`markdown2pdf`
94+Creating a PDF
9595--------------
9696
9797Earlier versions of pandoc came with a program, `markdown2pdf`, that
9898used pandoc and pdflatex to produce a PDF. This is no longer needed,
99−since `pandoc` now has a `pdf` output format, and there is no reason
100−to limit input to markdown. Note that whereas `markdown2pdf` would
101−create an ouput file based on the input file name, `pandoc` requires
102−that you specify the output filename explicitly. So,
99+since `pandoc` can now produce `pdf` output itself. To produce a PDF, simply
100+specify an output file with a `.pdf` extension. Pandoc will create a latex
101+file and use pdflatex (or another engine, see `--latex-engine`) to convert it
102+to PDF:
103103
104− pandoc input.txt -o input.pdf --latex-engine=xelatex
104+ pandoc test.txt -o test.pdf
105105
106−does the same thing
107−
108− markdown2pdf --xetex input.txt
109−
110−used to do.
106+Production of a PDF requires that a LaTeX engine be installed (see
107+`--latex-engine`, below), and assumes that the following LaTeX packages are
108+available: `amssymb`, `amsmath`, `ifxetex`, `ifluatex`, `listings` (if the
109+`--listings` option is used), `fancyvrb`, `enumerate`, `ctable`, `url`,
110+`graphicx`, `hyperref`, `ulem`, `babel` (if the `lang` variable is set),
111+`fontspec` (if `xelatex` or `lualatex` is used as the LaTeX engine), `xltxtra`
112+and `xunicode` (if `xelatex` is used).
111113
112114`hsmarkdown`
113115------------
@@ -144,32 +146,24 @@ General options
144146: Specify output format. *FORMAT* can be `native` (native Haskell),
145147 `json` (JSON version of native AST), `plain` (plain text),
146148 `markdown` (markdown), `rst` (reStructuredText), `html` (XHTML 1),
147− `html5` (HTML 5), `latex` (LaTeX), `context` (ConTeXt),
148− `man` (groff man), `mediawiki` (MediaWiki markup), `textile`
149− (Textile), `org` (Emacs Org-Mode), `texinfo` (GNU Texinfo), `docbook`
150− (DocBook XML), `opendocument` (OpenDocument XML), `odt` (OpenOffice text
151− document), `docx` (Word docx), `epub` (EPUB book), `asciidoc` (AsciiDoc),
152− `slidy` (Slidy HTML and javascript slide show), `dzslides` (HTML5 +
153− javascript slide show), `s5` (S5 HTML and javascript slide show),
154− `rtf` (rich text format), or `pdf` (PDF). Note that `odt` and `epub` output
155− will not be directed to *stdout*; an output filename must be specified
156− using the `-o/--output` option. If `+lhs` is appended to `markdown`, `rst`,
157− `latex`, `html`, or `html5`, the output will be rendered as literate Haskell
158− source: see [Literate Haskell support](#literate-haskell-support), below.
159−
160− Production of `pdf` output requires that a LaTeX engine be installed
161− (see `--latex-engine`, below), and assumes that the following LaTeX
162− packages are available: `amssymb`, `amsmath`, `ifxetex`, `ifluatex`,
163− `listings` (if the `--listings` option is used), `fancyvrb`,
164− `enumerate`, `ctable`, `url`, `graphicx`, `hyperref`, `ulem`,
165− `babel` (if the `lang` variable is set), `fontspec` (if `xelatex`
166− or `lualatex` is used as the LaTeX engine), `xltxtra` and
167− `xunicode` (if `xelatex` is used).
149+ `html5` (HTML 5), `latex` (LaTeX), `beamer` (LaTeX beamer slide show),
150+ `context` (ConTeXt), `man` (groff man), `mediawiki` (MediaWiki markup),
151+ `textile` (Textile), `org` (Emacs Org-Mode), `texinfo` (GNU Texinfo),
152+ `docbook` (DocBook XML), `opendocument` (OpenDocument XML), `odt`
153+ (OpenOffice text document), `docx` (Word docx), `epub` (EPUB book),
154+ `asciidoc` (AsciiDoc), `slidy` (Slidy HTML and javascript slide show),
155+ `dzslides` (HTML5 + javascript slide show), `s5` (S5 HTML and javascript
156+ slide show), or `rtf` (rich text format). Note that `odt` and `epub`
157+ output will not be directed to *stdout*; an output filename must
158+ be specified using the `-o/--output` option. If `+lhs` is appended
159+ to `markdown`, `rst`, `latex`, `html`, or `html5`, the output will
160+ be rendered as literate Haskell source: see [Literate Haskell
161+ support](#literate-haskell-support), below.
168162
169163`-o` *FILE*, `--output=`*FILE*
170164: Write output to *FILE* instead of *stdout*. If *FILE* is
171165 `-`, output will go to *stdout*. (Exception: if the output
172− format is `odt`, `docx`, `pdf`, or `epub`, output to stdout is disabled.)
166+ format is `odt`, `docx`, or `epub`, output to stdout is disabled.)
173167
174168`--data-dir=`*DIRECTORY*
175169: Specify the user data directory to search for pandoc data files.
@@ -248,7 +242,8 @@ General writer options
248242
249243`-s`, `--standalone`
250244: Produce output with an appropriate header and footer (e.g. a
251− standalone HTML, LaTeX, or RTF file, not a fragment).
245+ standalone HTML, LaTeX, or RTF file, not a fragment). This option
246+ is set automatically for `pdf`, `epub`, `docx`, and `odt` output.
252247
253248`--template=`*FILE*
254249: Use *FILE* as a custom template for the generated document. Implies
@@ -359,10 +354,6 @@ Options affecting specific writers
359354`--listings`
360355: Use listings package for LaTeX code blocks
361356
362−`--beamer`
363−: Produce LaTeX output for the `beamer` document class.
364− This has an effect only for `latex` or `pdf` output.
365−
366357`-i`, `--incremental`
367358: Make list items in slide shows display incrementally (one by one).
368359 The default is for lists to be displayed all at once.
@@ -1979,8 +1970,7 @@ Producing slide shows with Pandoc
19791970You can use Pandoc to produce an HTML + javascript slide presentation
19801971that can be viewed via a web browser. There are three ways to do this,
19811972using [S5], [DZSlides], or [Slidy]. You can also produce a PDF slide
1982−show using [LaTeX beamer]: just use the `--beamer` option with `pdf`
1983−output.
1973+show using LaTeX [beamer].
19841974
19851975Here's the markdown source for a simple slide show, `habits.txt`:
19861976
@@ -2030,7 +2020,7 @@ for Slidy,
20302020
20312021for DZSlides, or
20322022
2033− pandoc --beamer habits.txt -o habits.pdf
2023+ pandoc -t beamer habits.txt -o habits.pdf
20342024
20352025for beamer.
20362026
@@ -2110,7 +2100,7 @@ be modified there.
21102100To style beamer slides, you can specify a beamer "theme" or "colortheme"
21112101using the `-V` option:
21122102
2113− pandoc --beamer habits.txt -V theme:Warsaw -o habits.pdf
2103+ pandoc -t beamer habits.txt -V theme:Warsaw -o habits.pdf
21142104
21152105Literate Haskell support
21162106========================
@@ -2177,7 +2167,7 @@ Christopher Sawicki, Kelsey Hightower.
21772167[HTML 5]: http://www.w3.org/TR/html5/
21782168[XHTML]: http://www.w3.org/TR/xhtml1/
21792169[LaTeX]: http://www.latex-project.org/
2180−[LaTeX beamer]: http://www.tex.ac.uk/CTAN/macros/latex/contrib/beamer
2170+[beamer]: http://www.tex.ac.uk/CTAN/macros/latex/contrib/beamer
21812171[ConTeXt]: http://www.pragma-ade.nl/
21822172[RTF]: http://en.wikipedia.org/wiki/Rich_Text_Format
21832173[DocBook XML]: http://www.docbook.org/