2006-12-22 20:16:03 +00:00
|
|
|
.TH PANDOC 1 "December 15, 2006" Pandoc "User Manuals"
|
2006-10-17 14:22:29 +00:00
|
|
|
.SH NAME
|
2006-12-22 20:16:03 +00:00
|
|
|
pandoc, markdown2html, markdown2latex, markdown2rst, markdown2rtf,
|
|
|
|
markdown2s5, html2markdown2, latex2markdown, rst2markdown \- general
|
|
|
|
markup converter
|
2006-10-17 14:22:29 +00:00
|
|
|
.SH SYNOPSIS
|
2006-12-12 07:04:09 +00:00
|
|
|
\fBpandoc\fR [\fIoptions\fR] [\fIinput\-file\fR]...
|
2006-10-17 14:22:29 +00:00
|
|
|
.SH DESCRIPTION
|
2006-12-22 20:16:03 +00:00
|
|
|
\fBPandoc\fR converts files from one markup format to another. It can
|
2006-11-12 01:50:56 +00:00
|
|
|
read markdown and (subsets of) reStructuredText, HTML, and LaTeX, and
|
|
|
|
it can write markdown, reStructuredText, HTML, LaTeX, RTF, and S5 HTML
|
|
|
|
slide shows.
|
2006-11-01 04:32:00 +00:00
|
|
|
.PP
|
2006-12-22 20:16:03 +00:00
|
|
|
If no \fIinput\-file\fR is specified, input is read from STDIN.
|
|
|
|
Otherwise, the \fIinput\-files\fR are concatenated (with a blank
|
|
|
|
line between each) and used as input. Output goes to standard
|
|
|
|
output. If you want output to a file, use the \fB\-o\fR option or
|
|
|
|
shell redirection:
|
|
|
|
.IP
|
|
|
|
.B pandoc \-o output.html input.txt
|
2006-11-01 04:32:00 +00:00
|
|
|
.IP
|
|
|
|
.B pandoc input.txt > output.html
|
|
|
|
.PP
|
2006-11-12 01:50:56 +00:00
|
|
|
The default behavior of \fIPandoc\fR is to convert the input from
|
2006-12-12 07:04:09 +00:00
|
|
|
markdown\-formatted plain text to HTML. Different input and output
|
|
|
|
formats can be specified using command\-line options. For example,
|
2006-11-01 06:32:52 +00:00
|
|
|
.IP
|
2006-12-12 07:04:09 +00:00
|
|
|
.B pandoc \-f latex \-t markdown chap1.tex > chap1.txt
|
2006-11-01 06:32:52 +00:00
|
|
|
.PP
|
2006-12-12 07:04:09 +00:00
|
|
|
converts \fIchap1.tex\fR from LaTeX to markdown\-formatted plain text.
|
|
|
|
See below for a detailed list of command\-line options.
|
2006-11-01 04:32:00 +00:00
|
|
|
.PP
|
2006-12-22 20:16:03 +00:00
|
|
|
For convenience, eight variant programs are available:
|
|
|
|
\fBmarkdown2html\fR (same as \fBpandoc \-w html\fR),
|
|
|
|
\fBmarkdown2latex\fR (same as \fBpandoc \-w latex\fR),
|
|
|
|
\fBmarkdown2rst\fR (same as \fBpandoc \-w rst\fR),
|
|
|
|
\fBmarkdown2rtf\fR (same as \fBpandoc \-w rtf\fR),
|
|
|
|
\fBmarkdown2s5\fR (same as \fBpandoc \-w s5\fR),
|
|
|
|
\fBhtml2markdown\fR (same as \fBpandoc \-r html \-w markdown\fR),
|
|
|
|
\fBlatex2markdown\fR (same as \fBpandoc \-r latex \-w markdown\fR),
|
|
|
|
and \fBrst2markdown\fR (same as \fBpandoc \-r rst \-w markdown\fR).
|
|
|
|
These programs take an appropriately restricted subset of \fBpandoc\fR's
|
|
|
|
options. (Run them with the \fB-h\fR flag for a full list of allowed
|
|
|
|
options.)
|
|
|
|
.PP
|
2006-12-12 07:04:09 +00:00
|
|
|
\fIPandoc\fR uses the UTF\-8 character encoding for both input and output.
|
|
|
|
If your local character encoding is not UTF\-8, you should pipe input
|
2006-11-12 01:50:56 +00:00
|
|
|
and output through \fBiconv\fR:
|
2006-11-01 04:32:00 +00:00
|
|
|
.IP
|
2006-12-12 07:04:09 +00:00
|
|
|
.B iconv \-t utf\-8 input.txt | pandoc | iconv \-f utf\-8
|
2006-11-01 04:32:00 +00:00
|
|
|
|
2006-10-17 14:22:29 +00:00
|
|
|
.SH OPTIONS
|
2006-11-01 04:32:00 +00:00
|
|
|
.TP
|
2006-12-22 20:16:03 +00:00
|
|
|
.B \-f \fIFORMAT\fB, \-r \fIFORMAT\fB, \-\-from=\fIFORMAT\fB, \-\-read=\fIFORMAT\fB
|
2006-11-01 04:32:00 +00:00
|
|
|
Specify input format.
|
|
|
|
.I FORMAT
|
|
|
|
can be
|
2006-12-22 20:16:03 +00:00
|
|
|
.B native
|
2006-11-01 04:32:00 +00:00
|
|
|
(native Haskell),
|
2006-12-22 20:16:03 +00:00
|
|
|
.B markdown
|
2006-11-01 04:32:00 +00:00
|
|
|
(markdown or plain text),
|
2006-12-22 20:16:03 +00:00
|
|
|
.B rst
|
2006-11-01 04:32:00 +00:00
|
|
|
(reStructuredText),
|
2006-12-22 20:16:03 +00:00
|
|
|
.B html
|
2006-11-01 04:32:00 +00:00
|
|
|
(HTML),
|
|
|
|
or
|
2006-12-22 20:16:03 +00:00
|
|
|
.B latex
|
2006-11-01 04:32:00 +00:00
|
|
|
(LaTeX).
|
|
|
|
.TP
|
2006-12-22 20:16:03 +00:00
|
|
|
.B \-t \fIFORMAT\fB, \-w \fIFORMAT\fB, \-\-to=\fIFORMAT\fB, \-\-write=\fIFORMAT\fB
|
2006-11-01 04:32:00 +00:00
|
|
|
Specify output format.
|
|
|
|
.I FORMAT
|
|
|
|
can be
|
2006-12-22 20:16:03 +00:00
|
|
|
.B native
|
2006-11-01 04:32:00 +00:00
|
|
|
(native Haskell),
|
2006-12-22 20:16:03 +00:00
|
|
|
.B markdown
|
2006-11-01 04:32:00 +00:00
|
|
|
(markdown or plain text),
|
2006-12-22 20:16:03 +00:00
|
|
|
.B rst
|
2006-11-01 04:32:00 +00:00
|
|
|
(reStructuredText),
|
2006-12-22 20:16:03 +00:00
|
|
|
.B html
|
2006-11-01 04:32:00 +00:00
|
|
|
(HTML),
|
2006-12-22 20:16:03 +00:00
|
|
|
.B latex
|
2006-11-01 04:32:00 +00:00
|
|
|
(LaTeX),
|
2006-12-22 20:16:03 +00:00
|
|
|
.B s5
|
2006-11-01 04:32:00 +00:00
|
|
|
(S5 HTML and javascript slide show),
|
|
|
|
or
|
2006-12-22 20:16:03 +00:00
|
|
|
.B rtf
|
2006-11-01 04:32:00 +00:00
|
|
|
(rich text format).
|
|
|
|
.TP
|
|
|
|
.B \-s, \-\-standalone
|
|
|
|
Produce output with an appropriate header and footer (e.g. a
|
|
|
|
standalone HTML, LaTeX, or RTF file, not a fragment).
|
|
|
|
.TP
|
2006-12-22 20:16:03 +00:00
|
|
|
.B \-o FILE, \-\-output=FILE
|
|
|
|
Write output to \fIFILE\fR instead of STDOUT.
|
|
|
|
.TP
|
2006-11-01 04:32:00 +00:00
|
|
|
.B \-p, \-\-preserve-tabs
|
|
|
|
Preserve tabs instead of converting them to spaces.
|
|
|
|
.TP
|
2006-12-22 20:16:03 +00:00
|
|
|
.B \-\-tab-stop=\fITABSTOP\fB
|
2006-11-01 04:32:00 +00:00
|
|
|
Specify tab stop (default is 4).
|
|
|
|
.TP
|
|
|
|
.B \-R, \-\-parse-raw
|
2006-12-22 20:16:03 +00:00
|
|
|
Parse untranslatable HTML codes and LaTeX environments as raw HTML
|
|
|
|
or LaTeX, instead of ignoring them.
|
2006-11-01 04:32:00 +00:00
|
|
|
.TP
|
|
|
|
.B \-S, \-\-smartypants
|
|
|
|
Use smart quotes, dashes, and ellipses in HTML output.
|
|
|
|
.TP
|
|
|
|
.B \-m, \-\-asciimathml
|
|
|
|
Use ASCIIMathML to display embedded LaTeX math in HTML output.
|
|
|
|
.TP
|
|
|
|
.B \-i, \-\-incremental
|
|
|
|
Make list items in S5 display incrementally (one by one).
|
|
|
|
.TP
|
|
|
|
.B \-N, \-\-number-sections
|
2006-12-22 20:16:03 +00:00
|
|
|
Number section headings in LaTeX output. (Default is not to number
|
|
|
|
them.)
|
2006-11-01 04:32:00 +00:00
|
|
|
.TP
|
2006-12-22 20:16:03 +00:00
|
|
|
.B \-c \fICSS\fB, \-\-css=\fICSS\fB
|
2006-11-01 04:32:00 +00:00
|
|
|
Link to a CSS style sheet.
|
|
|
|
.I CSS
|
|
|
|
is the pathname of the style sheet.
|
|
|
|
.TP
|
2006-12-22 20:16:03 +00:00
|
|
|
.B \-H \fIFILE\fB, \-\-include-in-header=\fIFILE\fB
|
|
|
|
Include contents of \fIFILE\fR at the end of the header. Implies
|
2006-11-12 01:50:56 +00:00
|
|
|
\fB\-s\fR.
|
2006-11-01 04:32:00 +00:00
|
|
|
.TP
|
2006-12-22 20:16:03 +00:00
|
|
|
.B \-B \fIFILE\fB, \-\-include-before-body=\fIFILE\fB
|
|
|
|
Include contents of \fIFILE\fR at the beginning of the document
|
|
|
|
body.
|
2006-11-01 04:32:00 +00:00
|
|
|
.TP
|
2006-12-22 20:16:03 +00:00
|
|
|
.B \-A \fIFILE\fB, \-\-include-after-body=\fIFILE\fB
|
|
|
|
Include contents of \fIFILE\fR at the end of the document body.
|
2006-11-01 04:32:00 +00:00
|
|
|
.TP
|
2006-12-22 20:16:03 +00:00
|
|
|
.B \-C \fIFILE\fB, \-\-custom-header=\fIFILE\fB
|
|
|
|
Use contents of \fIFILE\fR as the document header (overriding the
|
|
|
|
default header, which can be printed by using the \fB\-D\fR option).
|
|
|
|
Implies \fB-s\fR.
|
2006-11-01 04:32:00 +00:00
|
|
|
.TP
|
2006-12-22 20:16:03 +00:00
|
|
|
.B \-D \fIFORMAT\fB, \-\-print-default-header=\fIFORMAT\fB
|
|
|
|
Print the default header for \fIFORMAT\fR (\fIhtml, s5, latex,
|
|
|
|
markdown, rst, rtf\fR).
|
2006-11-01 04:32:00 +00:00
|
|
|
.TP
|
2006-12-22 20:16:03 +00:00
|
|
|
.B \-T \fISTRING\fB, \-\-title-prefix=\fISTRING\fB
|
2006-11-12 01:50:56 +00:00
|
|
|
Specify \fISTRING\fR as a prefix to the HTML window title.
|
2006-12-22 20:16:03 +00:00
|
|
|
.TP
|
|
|
|
.B \-d, \-\-debug
|
|
|
|
Print debugging information (names of input and output files) to
|
|
|
|
STDERR. Write output to STDOUT, even if an output file was specified
|
|
|
|
using the \fB\-o\fR option.
|
|
|
|
.TP
|
|
|
|
.B \-v, \-\-version
|
|
|
|
Print version.
|
|
|
|
.TP
|
|
|
|
.B \-h, \-\-help
|
|
|
|
Show usage message.
|
2006-11-01 04:32:00 +00:00
|
|
|
|
2006-10-17 14:22:29 +00:00
|
|
|
.SH "SEE ALSO"
|
2006-12-22 20:16:03 +00:00
|
|
|
\fBweb2markdown\fR(1),
|
2006-11-03 07:08:47 +00:00
|
|
|
\fBmarkdown2pdf\fR(1),
|
|
|
|
\fBiconv\fR(1)
|
2006-11-01 04:32:00 +00:00
|
|
|
|
|
|
|
The
|
2006-11-01 06:32:52 +00:00
|
|
|
.I README
|
2006-11-01 04:32:00 +00:00
|
|
|
file distributed with Pandoc contains full documentation.
|
|
|
|
|
|
|
|
The Pandoc source code and all documentation may be downloaded from
|
2006-11-01 06:32:52 +00:00
|
|
|
<http://sophos.berkeley.edu/macfarlane/pandoc/>.
|
2006-11-03 07:08:47 +00:00
|
|
|
.SH AUTHOR
|
|
|
|
John MacFarlane
|