1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
.TH PANDOC 1 "November 1, 2006" Linux "User Manuals"
.SH NAME
pandoc \- general markup converter
.SH SYNOPSIS
.B pandoc
[
.I options
] [
.I input-files
]
.SH DESCRIPTION
.I Pandoc
converts files from one markup format to another. It can read markdown
and (subsets of) reStructuredText, HTML, and LaTeX, and it can write
markdown, reStructuredText, HTML, LaTeX, RTF, and S5 HTML slide shows.
.PP
If no
.I input-files
are specified, input is read from STDIN. Otherwise, the
.I input-files
are concatenated (with a blank line between each) and used
as input. Output goes to STDOUT. If you want output to a file,
use shell redirection:
.IP
.B pandoc input.txt > output.html
.PP
The default behavior of
.I Pandoc
is to convert the
input from markdown-formatted plain text to HTML. Different
input and output formats can be specified using command-line
options. For example,
.IP
.B pandoc -f latex -t markdown chap1.tex > chap1.txt
.PP
converts
.I chap1.tex
from LaTeX to markdown-formatted plain text.
See below for a detailed list of command-line options.
.PP
.I Pandoc
uses the UTF-8 character encoding for both input and output.
If your local character encoding is not UTF-8, you should pipe
input and output through
.BR iconv :
.IP
.B iconv -t utf-8 input.txt | pandoc | iconv -f utf-8
.SH OPTIONS
.TP
.B \-v, \-\-version
Print version.
.TP
.B \-h, \-\-help
Show usage message.
.TP
.B \-f FORMAT, \-r FORMAT, --from=FORMAT, --read=FORMAT
Specify input format.
.I FORMAT
can be
.I native
(native Haskell),
.I markdown
(markdown or plain text),
.I rst
(reStructuredText),
.I html
(HTML),
or
.I latex
(LaTeX).
.TP
.B \-t FORMAT, \-w FORMAT, --to=FORMAT, --write=FORMAT
Specify output format.
.I FORMAT
can be
.I native
(native Haskell),
.I markdown
(markdown or plain text),
.I rst
(reStructuredText),
.I html
(HTML),
.I latex
(LaTeX),
.I s5
(S5 HTML and javascript slide show),
or
.I rtf
(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
.B \-p, \-\-preserve-tabs
Preserve tabs instead of converting them to spaces.
.TP
.B \-\-tab-stop=TABSTOP
Specify tab stop (default is 4).
.TP
.B \-R, \-\-parse-raw
Parse untranslatable HTML codes and LaTeX environments as raw HTML or
LaTeX, instead of ignoring them.
.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
Number section headings in LaTeX output. (Default is not to number them.)
.TP
.B \-c CSS, \-\-css=CSS
Link to a CSS style sheet.
.I CSS
is the pathname of the style sheet.
.TP
.B \-H FILENAME, \-\-include-in-header=FILENAME
Include contents of
.I FILENAME
at the end of the header. Implies
.BR \-s .
.TP
.B \-B FILENAME, \-\-include-before-body=FILENAME
Include contents of
.I FILENAME
at the beginning of the document body.
.TP
.B \-A FILENAME, \-\-include-after-body=FILENAME
Include contents of
.I FILENAME
at the end of the document body.
.TP
.B \-\-custom-header=FILENAME
Use contents of
.I FILENAME
as the document header (overriding the default header, which can be
printed by using the
.B \-D
option). Implies
.BR \-s .
.TP
.B \-D FORMAT, \-\-print-default-header=FORMAT
Print the default header for
.I FORMAT
(
.I html, s5, latex, markdown, rst, rtf
).
.TP
.B \-T STRING, \-\-title-prefix=STRING
Specify
.I STRING
as a prefix to the HTML window title.
.SH "SEE ALSO"
\fBmarkdown2html\fR(1),
\fBhtml2markdown\fR(1),
\fBmarkdown2latex\fR(1),
\fBlatex2markdown\fR(1),
\fBmarkdown2pdf\fR(1),
\fBiconv\fR(1)
The
.I README
file distributed with Pandoc contains full documentation.
The Pandoc source code and all documentation may be downloaded from
<http://sophos.berkeley.edu/macfarlane/pandoc/>.
.SH AUTHOR
John MacFarlane
|