git.iko.soy/typeable/pandoc
on master help sign in
Man pages are now generated from markdown templates,

using pandoc's man page writer. Removed man pages from repository, added (.md) templates. Modified Makefile to generate man pages as part of the build process. git-svn-id: https://pandoc.googlecode.com/svn/trunk@609 788f1e2b-df1e-0410-8736-df70ead52e1b

commit5fbe057d27f62546b403969cc184c103ee9dd281 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSun 1 Jul 2007, 23:26 (19 years ago) parente6f67fc
9 files changed+381−380
Makefile+6−3 man/man1/hsmarkdown.1−36 man/man1/hsmarkdown.1.md+42 man/man1/html2markdown.1−85 man/man1/html2markdown.1.md+93 man/man1/markdown2pdf.1−61 man/man1/markdown2pdf.1.md+68 man/man1/pandoc.1−195 man/man1/pandoc.1.md+172
Makefile+6−3
@@ -33,6 +33,7 @@ EXECS := $(addsuffix $(EXTENSION),$(EXECSBASE))
3333PROGS := $(EXECS) $(WRAPPERS)
3434MAIN := $(firstword $(EXECS))
3535DOCS := README.html README BUGS
36+MANPAGES := $(patsubst %.md,%,$(wildcard $(MANDIR)/man?/*.?.md))
3637
3738#-------------------------------------------------------------------------------
3839# Variables to setup through environment
@@ -88,6 +89,8 @@ all: build-program
8889 sh ./markdown2pdf $< || rm -f $@
8990%.txt: %
9091 perl -p -e 's/\n/\r\n/' $< > $@ || rm -f $@ # convert to DOS line endings
92+%.1: %.1.md $(MAIN)
93+ ./$(MAIN) -s -S -w man $< >$@ || rm -f $@
9194
9295.PHONY: templates
9396templates: $(SRCDIR)/templates
@@ -139,8 +142,8 @@ $(EXECS): build
139142 done
140143
141144.PHONY: build-doc
142−cleanup_files+=README.html
143−build-doc: $(DOCS)
145+cleanup_files+=README.html $(MANPAGES)
146+build-doc: $(DOCS) $(MANPAGES)
144147
145148.PHONY: build-program
146149build-program: build-exec build-doc
@@ -158,7 +161,7 @@ build-all: build-program build-lib-doc
158161
159162# User documents installation.
160163.PHONY: install-doc uninstall-doc
161−man_all:=$(patsubst $(MANDIR)/%,%,$(wildcard $(MANDIR)/man?/*.1))
164+man_all:=$(patsubst $(MANDIR)/%,%,$(MANPAGES))
162165install-doc: build-doc
163166 $(INSTALL) -d $(DOCPATH) && $(INSTALL_DATA) $(DOCS) $(DOCPATH)/
164167 for f in $(man_all); do \
man/man1/hsmarkdown.1deleted−36
@@ -1,36 +0,0 @@
1−.TH HSMARKDOWN 1 "January 1, 2007" Pandoc "User Manuals"
2−.SH NAME
3−hsmarkdown \- convert markdown-formatted text to HTML
4−.SH SYNOPSIS
5−\fBhsmarkdown\fR [\fIinput\-file\fR]...
6−.SH DESCRIPTION
7−\fBhsmarkdown\fR converts markdown-formatted text to HTML. It is designed
8−to be usable as a drop-in replacement for John Gruber's \fBMarkdown.pl\fR.
9−.PP
10−If no \fIinput\-file\fR is specified, input is read from STDIN.
11−Otherwise, the \fIinput\-files\fR are concatenated (with a blank
12−line between each) and used as input. Output goes to STDOUT by
13−default. For output to a file, use shell redirection:
14−.IP
15−.B hsmarkdown input.txt > output.html
16−.PP
17−\fBhsmarkdown\fR uses the UTF\-8 character encoding for both input and output.
18−If your local character encoding is not UTF\-8, you should pipe input
19−and output through \fBiconv\fR:
20−.IP
21−.B iconv \-t utf\-8 input.txt | hsmarkdown | iconv \-f utf\-8
22−.PP
23−\fBhsmarkdown\fR is implemented as a wrapper around \fBpandoc\fR(1). It
24−calls \fBpandoc\fR with the options \fB\-\-from markdown \-\-to html
25−\-\-strict\fR and disables all other options. (Command-line options
26−will be interpreted as filenames, as they are by \fBMarkdown.pl\fR.)
27−.SH "SEE ALSO"
28−\fBpandoc\fR(1).
29−The
30−.I README
31−file distributed with Pandoc contains full documentation.
32−
33−The Pandoc source code and all documentation may be downloaded from
34−<http://sophos.berkeley.edu/macfarlane/pandoc/>.
35−.SH AUTHOR
36−John MacFarlane
man/man1/hsmarkdown.1.mdnew file+42
@@ -0,0 +1,42 @@
1+% HSMARKDOWN
2+% John MacFarlane
3+% June 30, 2007
4+
5+# NAME
6+
7+hsmarkdown - convert markdown-formatted text to HTML
8+
9+# SYNOPSIS
10+
11+**hsmarkdown [*input-file*]...**
12+
13+# DESCRIPTION
14+
15+`hsmarkdown` converts markdown-formatted text to HTML. It is designed
16+to be usable as a drop-in replacement for John Gruber's `Markdown.pl`.
17+
18+If no *input-file* is specified, input is read from STDIN.
19+Otherwise, the *input-files* are concatenated (with a blank
20+line between each) and used as input. Output goes to STDOUT by
21+default. For output to a file, use shell redirection:
22+
23+ hsmarkdown input.txt > output.html
24+
25+`hsmarkdown` uses the UTF-8 character encoding for both input and output.
26+If your local character encoding is not UTF-8, you should pipe input
27+and output through `iconv`:
28+
29+ iconv -t utf-8 input.txt | hsmarkdown | iconv -f utf-8
30+
31+`hsmarkdown` is implemented as a wrapper around `pandoc`(1). It
32+calls `pandoc` with the options `--from markdown --to html
33+--strict` and disables all other options. (Command-line options
34+will be interpreted as filenames, as they are by `Markdown.pl`.)
35+
36+# SEE ALSO
37+
38+`pandoc`(1). The *README*
39+file distributed with Pandoc contains full documentation.
40+
41+The Pandoc source code and all documentation may be downloaded from
42+<http://sophos.berkeley.edu/macfarlane/pandoc/>.
man/man1/html2markdown.1deleted−85
@@ -1,85 +0,0 @@
1−.TH HTML2MARKDOWN 1 "December 15, 2006" Pandoc "User Manuals"
2−.SH NAME
3−html2markdown \- converts HTML to markdown-formatted text
4−.SH SYNOPSIS
5−\fBhtml2markdown\fR [\fIpandoc\-options\fR]
6−[\-\- \fIspecial\-options\fR] [\fIinput\-file\fR or \fIURL\fR]
7−.SH DESCRIPTION
8−\fBhtml2markdown\fR converts \fIinput\-file\fR or \fIURL\fR (or text
9−from STDIN) from HTML to markdown\-formatted plain text.
10−If a URL is specified, \fBhtml2markdown\fR uses an available program
11−(e.g. wget, w3m, lynx or curl) to fetch its contents. Output is sent
12−to STDOUT unless an output file is specified using the \fB\-o\fR
13−option.
14−.PP
15−\fBhtml2markdown\fR uses the character encoding specified in the
16−"Content-type" meta tag. If this is not present, or if input comes
17−from STDIN, UTF-8 is assumed. A character encoding may be specified
18−explicitly using the \fB\-e\fR special option.
19−.SH OPTIONS
20−.PP
21−\fBhtml2markdown\fR is a wrapper for \fBpandoc\fR, so all of
22−\fBpandoc\fR's options may be used. See \fBpandoc\fR(1) for
23−a complete list. The following options are most relevant:
24−.TP
25−.B \-s, \-\-standalone
26−Include title, author, and date information (if present) at the
27−top of markdown output.
28−.TP
29−.B \-o FILE, \-\-output=FILE
30−Write output to \fIFILE\fR instead of STDOUT.
31−.TP
32−.B \-\-strict
33−Use strict markdown syntax, with no extensions or variants.
34−.TP
35−.B \-\-reference\-links
36−Use reference-style links, rather than inline links, in writing markdown
37−or reStructuredText.
38−.TP
39−.B \-R, \-\-parse-raw
40−Parse untranslatable HTML codes as raw HTML.
41−.TP
42−.B \-H \fIFILE\fB, \-\-include-in-header=\fIFILE\fB
43−Include contents of \fIFILE\fR at the end of the header. Implies
44−\fB\-s\fR.
45−.TP
46−.B \-B \fIFILE\fB, \-\-include-before-body=\fIFILE\fB
47−Include contents of \fIFILE\fR at the beginning of the document body.
48−.TP
49−.B \-A \fIFILE\fB, \-\-include-after-body=\fIFILE\fB
50−Include contents of \fIFILE\fR at the end of the document body.
51−.TP
52−.B \-C \fIFILE\fB, \-\-custom-header=\fIFILE\fB
53−Use contents of \fIFILE\fR
54−as the document header (overriding the default header, which can be
55−printed using '\fBpandoc \-D markdown\fR'). Implies
56−\fB-s\fR.
57−.SH "SPECIAL OPTIONS"
58−.PP
59−In addition, the following special options may be used. The special
60−options must be separated from the \fBhtml2markdown\fR command and any
61−regular \fBpandoc\fR options by the delimiter `\-\-', as in
62−.IP
63−.B html2markdown \-o foo.txt \-\- \-g 'curl \-u bar:baz' \-e latin1
64−.B www.foo.com
65−.TP
66−.B \-e \fIencoding\fR, \-\-encoding=\fIencoding\fR
67−Assume the character encoding \fIencoding\fR in reading HTML.
68−(Note: \fIencoding\fR will be passed to \fBiconv\fR; a list of
69−available encodings may be obtained using `\fBiconv \-l\fR'.)
70−If this option is not specified and input is not from
71−STDIN, \fBhtml2markdown\fR will try to extract the character encoding
72−from the "Content-type" meta tag. If no character encoding is
73−specified in this way, or if input is from STDIN, UTF-8 will be
74−assumed.
75−.TP
76−.B \-g \fIcommand\fR, \-\-grabber=\fIcommand\fR
77−Use \fIcommand\fR to fetch the contents of a URL. (By default,
78−\fBhtml2markdown\fR searches for an available program or text-based
79−browser to fetch the contents of a URL.)
80−
81−.SH "SEE ALSO"
82−\fBpandoc\fR(1),
83−\fBiconv\fR(1)
84−.SH AUTHOR
85−John MacFarlane and Recai Oktas
man/man1/html2markdown.1.mdnew file+93
@@ -0,0 +1,93 @@
1+% HTML2MARKDOWN
2+% John MacFarlane and Recai Oktas
3+% June 30, 2007
4+
5+# NAME
6+
7+html2markdown - converts HTML to markdown-formatted text
8+
9+# SYNOPSIS
10+
11+**html2markdown [*pandoc-options*] [-- *special-options*] [*input-file* or
12+*URL*]**
13+
14+# DESCRIPTION
15+
16+`html2markdown` converts *input-file* or *URL* (or text
17+from STDIN) from HTML to markdown-formatted plain text.
18+If a URL is specified, `html2markdown` uses an available program
19+(e.g. wget, w3m, lynx or curl) to fetch its contents. Output is sent
20+to STDOUT unless an output file is specified using the `-o`
21+option.
22+
23+`html2markdown` uses the character encoding specified in the
24+"Content-type" meta tag. If this is not present, or if input comes
25+from STDIN, UTF-8 is assumed. A character encoding may be specified
26+explicitly using the `-e` special option.
27+
28+# OPTIONS
29+
30+`html2markdown` is a wrapper for `pandoc`, so all of
31+`pandoc`'s options may be used. See `pandoc`(1) for
32+a complete list. The following options are most relevant:
33+
34+-s, --standalone
35+: Include title, author, and date information (if present) at the
36+ top of markdown output.
37+
38+-o *FILE*, --output=*FILE*
39+: Write output to *FILE* instead of STDOUT.
40+
41+--strict
42+: Use strict markdown syntax, with no extensions or variants.
43+
44+--reference-links
45+: Use reference-style links, rather than inline links, in writing markdown
46+ or reStructuredText.
47+
48+-R, --parse-raw
49+: Parse untranslatable HTML codes as raw HTML.
50+
51+-H *FILE*, --include-in-header=*FILE*
52+: Include contents of *FILE* at the end of the header. Implies
53+ `-s`.
54+
55+-B *FILE*, --include-before-body=*FILE*
56+: Include contents of *FILE* at the beginning of the document body.
57+
58+-A *FILE*, --include-after-body=*FILE*
59+: Include contents of *FILE* at the end of the document body.
60+
61+-C *FILE*, --custom-header=*FILE*
62+Use contents of *FILE*
63+as the document header (overriding the default header, which can be
64+printed using `pandoc -D markdown`). Implies
65+`-s`.
66+
67+# SPECIAL OPTIONS
68+
69+In addition, the following special options may be used. The special
70+options must be separated from the `html2markdown` command and any
71+regular `pandoc` options by the delimiter '`--`', as in
72+
73+ html2markdown -o foo.txt -- -g 'curl -u bar:baz' -e latin1 \
74+ www.foo.com
75+
76+-e *encoding*, --encoding=*encoding*
77+: Assume the character encoding *encoding* in reading HTML.
78+ (Note: *encoding* will be passed to `iconv`; a list of
79+ available encodings may be obtained using `iconv -l`.)
80+ If this option is not specified and input is not from
81+ STDIN, `html2markdown` will try to extract the character encoding
82+ from the "Content-type" meta tag. If no character encoding is
83+ specified in this way, or if input is from STDIN, UTF-8 will be
84+ assumed.
85+
86+-g *command*, --grabber=*command*
87+: Use *command* to fetch the contents of a URL. (By default,
88+ `html2markdown` searches for an available program or text-based
89+ browser to fetch the contents of a URL.)
90+
91+# SEE ALSO
92+
93+`pandoc`(1), `iconv`(1)
man/man1/markdown2pdf.1deleted−61
@@ -1,61 +0,0 @@
1−.TH MARKDOWN2PDF 1 "December 15, 2006" Pandoc "User Manuals"
2−.SH NAME
3−markdown2pdf \- converts markdown-formatted text to PDF, using pdflatex
4−.SH SYNOPSIS
5−\fBmarkdown2pdf\fR [\fIoptions\fR] [\fIinput-file\fR]...
6−.SH DESCRIPTION
7−\fBmarkdown2pdf\fR converts \fIinput\-file\fR (or text from standard
8−input) from markdown\-formatted plain text to PDF, using \fBpdflatex\fR.
9−If no output filename is specified (using the \fB\-o\fR option),
10−the name of the output file is derived from the input file; thus, for
11−example, if the input file is \fIhello.txt\fR, the output file will be
12−\fIhello.pdf\fR. If the input is read from STDIN and no output filename
13−is specified, the output file will be named \fIstdin.pdf\fR. If multiple
14−input files are specified, they will be concatenated before conversion,
15−and the name of the output file will be derived from the first input file.
16−.PP
17−Input is assumed to be in the UTF\-8 character encoding. If your
18−local character encoding is not UTF\-8, you should pipe input and
19−output through \fBiconv\fR:
20−.IP
21−.B iconv \-t utf\-8 input.txt | pandoc | iconv \-f utf\-8
22−.PP
23−\fBmarkdown2pdf\fR assumes that the 'unicode' and 'fancyvrb' packages
24−are in latex's search path. If these packages are not included in your
25−latex setup, they can be obtained from <http://ctan.org>.
26−.SH OPTIONS
27−.PP
28−\fBmarkdown2pdf\fR is a wrapper around \fBpandoc\fR, so all of
29−\fBpandoc\fR's options can be used with \fBmarkdown2pdf\fR as well.
30−See \fBpandoc\fR(1) for a complete list.
31−The following options are most relevant:
32−.TP
33−.B \-o FILE, \-\-output=FILE
34−Write output to \fIFILE\fR.
35−.TP
36−.B \-\-strict
37−Use strict markdown syntax, with no extensions or variants.
38−.TP
39−.TP
40−.B \-N, \-\-number-sections
41−Number section headings in LaTeX output. (Default is not to number them.)
42−.TP
43−.B \-H \fIFILE\fB, \-\-include-in-header=\fIFILE\fB
44−Include (LaTeX) contents of \fIFILE\fR at the end of the header. Implies
45−\fB\-s\fR.
46−.TP
47−.B \-B \fIFILE\fB, \-\-include-before-body=\fIFILE\fB
48−Include (LaTeX) contents of \fIFILE\fR at the beginning of the document body.
49−.TP
50−.B \-A \fIFILE\fB, \-\-include-after-body=\fIFILE\fB
51−Include (LaTeX) contents of \fIFILE\fR at the end of the document body.
52−.TP
53−.B \-C \fIFILE\fB, \-\-custom-header=\fIFILE\fB
54−Use contents of \fIFILE\fR
55−as the LaTeX document header (overriding the default header, which can be
56−printed using '\fBpandoc \-D latex\fR'). Implies \fB-s\fR.
57−.SH "SEE ALSO"
58−\fBpandoc\fR(1),
59−\fBpdflatex\fR(1)
60−.SH AUTHOR
61−John MacFarlane and Recai Oktas
man/man1/markdown2pdf.1.mdnew file+68
@@ -0,0 +1,68 @@
1+% MARKDOWN2PDF
2+% John MacFarlane and Recai Oktas
3+% June 30, 2007
4+
5+# NAME
6+
7+markdown2pdf - converts markdown-formatted text to PDF, using pdflatex
8+
9+# SYNOPSIS
10+
11+**markdown2pdf [*options*] [*input-file*]...**
12+
13+# DESCRIPTION
14+
15+`markdown2pdf` converts *input-file* (or text from standard
16+input) from markdown-formatted plain text to PDF, using `pdflatex`.
17+If no output filename is specified (using the `-o` option),
18+the name of the output file is derived from the input file; thus, for
19+example, if the input file is *hello.txt*, the output file will be
20+*hello.pdf*. If the input is read from STDIN and no output filename
21+is specified, the output file will be named *stdin.pdf*. If multiple
22+input files are specified, they will be concatenated before conversion,
23+and the name of the output file will be derived from the first input file.
24+
25+Input is assumed to be in the UTF-8 character encoding. If your
26+local character encoding is not UTF-8, you should pipe input and
27+output through `iconv`:
28+
29+ iconv -t utf-8 input.txt | pandoc | iconv -f utf-8
30+
31+`markdown2pdf` assumes that the 'unicode' and 'fancyvrb' packages
32+are in latex's search path. If these packages are not included in your
33+latex setup, they can be obtained from <http://ctan.org>.
34+
35+# OPTIONS
36+
37+`markdown2pdf` is a wrapper around `pandoc`, so all of
38+`pandoc`'s options can be used with `markdown2pdf` as well.
39+See `pandoc`(1) for a complete list.
40+The following options are most relevant:
41+
42+-o *FILE*, --output=*FILE*
43+: Write output to *FILE*.
44+
45+--strict
46+: Use strict markdown syntax, with no extensions or variants.
47+
48+-N, --number-sections
49+: Number section headings in LaTeX output. (Default is not to number them.)
50+
51+-H *FILE*, --include-in-header=*FILE*
52+: Include (LaTeX) contents of *FILE* at the end of the header. Implies
53+ `-s`.
54+
55+-B *FILE*, --include-before-body=*FILE*
56+: Include (LaTeX) contents of *FILE* at the beginning of the document body.
57+
58+-A *FILE*, --include-after-body=*FILE*
59+: Include (LaTeX) contents of *FILE* at the end of the document body.
60+
61+-C *FILE*, --custom-header=*FILE*
62+: Use contents of *FILE*
63+ as the LaTeX document header (overriding the default header, which can be
64+ printed using `pandoc -D latex`). Implies `-s`.
65+
66+# SEE ALSO
67+
68+`pandoc`(1), `pdflatex`(1)
man/man1/pandoc.1deleted−195
@@ -1,195 +0,0 @@
1−.TH PANDOC 1 "December 15, 2006" Pandoc "User Manuals"
2−.SH NAME
3−pandoc \- general markup converter
4−.SH SYNOPSIS
5−\fBpandoc\fR [\fIoptions\fR] [\fIinput\-file\fR]...
6−.SH DESCRIPTION
7−\fIPandoc\fR converts files from one markup format to another. It can
8−read markdown and (subsets of) reStructuredText, HTML, and LaTeX, and
9−it can write markdown, reStructuredText, HTML, LaTeX, RTF, DocBook
10−XML, and S5 HTML slide shows.
11−.PP
12−If no \fIinput\-file\fR is specified, input is read from STDIN.
13−Otherwise, the \fIinput\-files\fR are concatenated (with a blank
14−line between each) and used as input. Output goes to STDOUT by
15−default. For output to a file, use the \fB\-o\fR option:
16−.IP
17−.B pandoc \-o output.html input.txt
18−.PP
19−The input and output formats may be specified using command-line options
20−(see \fBOPTIONS\fR, below, for details). If these formats are not
21−specified explicitly, \fIPandoc\fR will attempt to determine them
22−from the extensions of the input and output filenames. If input comes
23−from STDIN or from a file with an unknown extension, the input is assumed
24−to be markdown. If no output filename is specified using the \fB\-o\fR
25−option, or if a filename is specified but its extension is unknown,
26−the output will default to HTML. Thus, for example,
27−.IP
28−.B pandoc -o chap1.tex chap1.txt
29−.PP
30−converts \fIchap1.txt\fR from markdown to LaTeX. And
31−.IP
32−.B pandoc README
33−.PP
34−converts \fIREADME\fR from markdown to HTML.
35−.PP
36−Pandoc's version of markdown is an extended variant of standard
37−markdown: the differences are described in the \fIREADME\fR file in
38−the user documentation. If standard markdown syntax is desired, the
39−\fB\-\-strict\fR option may be used.
40−.PP
41−\fIPandoc\fR uses the UTF\-8 character encoding for both input and output.
42−If your local character encoding is not UTF\-8, you should pipe input
43−and output through \fBiconv\fR:
44−.IP
45−.B iconv \-t utf\-8 input.txt | pandoc | iconv \-f utf\-8
46−.PP
47−\fIPandoc\fR's HTML parser is not very forgiving. If your input is
48−HTML, consider running it through \fBtidy\fR(1) before passing it
49−to Pandoc. Or use \fBhtml2markdown\fR(1), a wrapper around \fBpandoc\fR.
50−
51−.SH OPTIONS
52−.TP
53−.B \-f \fIFORMAT\fB, \-r \fIFORMAT\fB, \-\-from=\fIFORMAT\fB, \-\-read=\fIFORMAT\fB
54−Specify input format.
55−.I FORMAT
56−can be
57−.B native
58−(native Haskell),
59−.B markdown
60−(markdown or plain text),
61−.B rst
62−(reStructuredText),
63−.B html
64−(HTML),
65−or
66−.B latex
67−(LaTeX).
68−.TP
69−.B \-t \fIFORMAT\fB, \-w \fIFORMAT\fB, \-\-to=\fIFORMAT\fB, \-\-write=\fIFORMAT\fB
70−Specify output format.
71−.I FORMAT
72−can be
73−.B native
74−(native Haskell),
75−.B markdown
76−(markdown or plain text),
77−.B rst
78−(reStructuredText),
79−.B html
80−(HTML),
81−.B latex
82−(LaTeX),
83−.B docbook
84−(DocBook XML),
85−.B s5
86−(S5 HTML and javascript slide show),
87−or
88−.B rtf
89−(rich text format).
90−.TP
91−.B \-s, \-\-standalone
92−Produce output with an appropriate header and footer (e.g. a
93−standalone HTML, LaTeX, or RTF file, not a fragment).
94−.TP
95−.B \-o FILE, \-\-output=FILE
96−Write output to \fIFILE\fR instead of STDOUT. If \fIFILE\fR is
97−`\-', output will go to STDOUT.
98−.TP
99−.B \-p, \-\-preserve-tabs
100−Preserve tabs instead of converting them to spaces.
101−.TP
102−.B \-\-tab-stop=\fITABSTOP\fB
103−Specify tab stop (default is 4).
104−.TP
105−.B \-\-strict
106−Use strict markdown syntax, with no extensions or variants.
107−.TP
108−.B \-\-reference\-links
109−Use reference-style links, rather than inline links, in writing markdown
110−or reStructuredText.
111−.TP
112−.B \-R, \-\-parse-raw
113−Parse untranslatable HTML codes and LaTeX environments as raw HTML
114−or LaTeX, instead of ignoring them.
115−.TP
116−.B \-S, \-\-smart
117−Use smart quotes, dashes, and ellipses. (This option is significant
118−only when the input format is \fBmarkdown\fR. It is selected automatically
119−when the output format is \fBlatex\fR.)
120−.TP
121−.B \-m, \-\-asciimathml
122−Use ASCIIMathML to display embedded LaTeX math in HTML output.
123−.TP
124−.B \-i, \-\-incremental
125−Make list items in S5 display incrementally (one by one).
126−.TP
127−.B \-N, \-\-number-sections
128−Number section headings in LaTeX output. (Default is not to number
129−them.)
130−.TP
131−.B \-c \fICSS\fB, \-\-css=\fICSS\fB
132−Link to a CSS style sheet.
133−.I CSS
134−is the pathname of the style sheet.
135−.TP
136−.B \-H \fIFILE\fB, \-\-include-in-header=\fIFILE\fB
137−Include contents of \fIFILE\fR at the end of the header. Implies
138−\fB\-s\fR.
139−.TP
140−.B \-B \fIFILE\fB, \-\-include-before-body=\fIFILE\fB
141−Include contents of \fIFILE\fR at the beginning of the document
142−body.
143−.TP
144−.B \-A \fIFILE\fB, \-\-include-after-body=\fIFILE\fB
145−Include contents of \fIFILE\fR at the end of the document body.
146−.TP
147−.B \-C \fIFILE\fB, \-\-custom-header=\fIFILE\fB
148−Use contents of \fIFILE\fR as the document header (overriding the
149−default header, which can be printed by using the \fB\-D\fR option).
150−Implies \fB-s\fR.
151−.TP
152−.B \-D \fIFORMAT\fB, \-\-print-default-header=\fIFORMAT\fB
153−Print the default header for \fIFORMAT\fR (\fBhtml, s5, latex, docbook,
154−markdown, rst, rtf\fR).
155−.TP
156−.B \-T \fISTRING\fB, \-\-title-prefix=\fISTRING\fB
157−Specify \fISTRING\fR as a prefix to the HTML window title.
158−.TP
159−.B \-\-dump\-args
160−Print information about command\-line arguments to STDOUT, then exit.
161−The first line of output contains the name of the output file specified
162−with the \fB\-o\fR option, or `\-' (for STDOUT) if no output file was
163−specified. The remaining lines contain the command\-line arguments,
164−one per line, in the order they appear. These do not include regular
165−Pandoc options and their arguments, but do include any options appearing
166−after a `\-\-' separator at the end of the line.
167−This option is intended primarily for use in wrapper scripts.
168−.TP
169−.B \-\-ignore\-args
170−Ignore command\-line arguments (for use in wrapper scripts).
171−Regular Pandoc options are not ignored. Thus, for example,
172−.IP
173−.B pandoc \-\-ignore\-args \-o foo.html \-s foo.txt -- -e latin1
174−.IP
175−is equivalent to
176−.IP
177−.B pandoc \-o foo.html \-s
178−.TP
179−.B \-v, \-\-version
180−Print version.
181−.TP
182−.B \-h, \-\-help
183−Show usage message.
184−
185−.SH "SEE ALSO"
186−\fBhtml2markdown\fR(1),
187−\fBmarkdown2pdf\fR(1).
188−The
189−.I README
190−file distributed with Pandoc contains full documentation.
191−
192−The Pandoc source code and all documentation may be downloaded from
193−<http://sophos.berkeley.edu/macfarlane/pandoc/>.
194−.SH AUTHOR
195−John MacFarlane
man/man1/pandoc.1.mdnew file+172
@@ -0,0 +1,172 @@
1+% PANDOC
2+% John MacFarlane
3+% June 30, 2007
4+
5+# NAME
6+
7+pandoc - general markup converter
8+
9+# SYNOPSIS
10+
11+**pandoc [*options*] [*input-file*]...**
12+
13+# DESCRIPTION
14+
15+Pandoc converts files from one markup format to another. It can
16+read markdown and (subsets of) reStructuredText, HTML, and LaTeX, and
17+it can write markdown, reStructuredText, HTML, LaTeX, RTF, DocBook
18+XML, and S5 HTML slide shows.
19+
20+If no *input-file* is specified, input is read from STDIN.
21+Otherwise, the *input-files* are concatenated (with a blank
22+line between each) and used as input. Output goes to STDOUT by
23+default. For output to a file, use the `-o` option:
24+
25+ pandoc -o output.html input.txt
26+
27+The input and output formats may be specified using command-line options
28+(see **OPTIONS**, below, for details). If these formats are not
29+specified explicitly, Pandoc will attempt to determine them
30+from the extensions of the input and output filenames. If input comes
31+from STDIN or from a file with an unknown extension, the input is assumed
32+to be markdown. If no output filename is specified using the `-o`
33+option, or if a filename is specified but its extension is unknown,
34+the output will default to HTML. Thus, for example,
35+
36+ pandoc -o chap1.tex chap1.txt
37+
38+converts *chap1.txt* from markdown to LaTeX. And
39+
40+ pandoc README
41+
42+converts *README* from markdown to HTML.
43+
44+Pandoc's version of markdown is an extended variant of standard
45+markdown: the differences are described in the *README* file in
46+the user documentation. If standard markdown syntax is desired, the
47+`--strict` option may be used.
48+
49+Pandoc uses the UTF-8 character encoding for both input and output.
50+If your local character encoding is not UTF-8, you should pipe input
51+and output through `iconv`:
52+
53+ iconv -t utf-8 input.txt | pandoc | iconv -f utf-8
54+
55+Pandoc's HTML parser is not very forgiving. If your input is
56+HTML, consider running it through `tidy`(1) before passing it
57+to Pandoc. Or use `html2markdown`(1), a wrapper around `pandoc`.
58+
59+# OPTIONS
60+
61+-f *FORMAT*, -r *FORMAT*, --from=*FORMAT*, --read=*FORMAT*
62+: Specify input format. *FORMAT* can be
63+ `native` (native Haskell), `markdown` (markdown or plain text),
64+ `rst` (reStructuredText), `html` (HTML), or `latex` (LaTeX).
65+
66+-t *FORMAT*, -w *FORMAT*, --to=*FORMAT*, --write=*FORMAT*
67+: Specify output format. *FORMAT* can be `native` (native Haskell),
68+ `man` (groff man page),
69+ `markdown` (markdown or plain text), `rst` (reStructuredText),
70+ `html` (HTML), `latex` (LaTeX), `docbook` (DocBook XML),
71+ `s5` (S5 HTML and javascript slide show), or
72+ `rtf` (rich text format).
73+
74+-s, --standalone
75+: Produce output with an appropriate header and footer (e.g. a
76+ standalone HTML, LaTeX, or RTF file, not a fragment).
77+
78+-o *FILE*, --output=*FILE*
79+: Write output to *FILE* instead of STDOUT. If *FILE* is
80+ '`-`', output will go to STDOUT.
81+
82+-p, --preserve-tabs
83+: Preserve tabs instead of converting them to spaces.
84+
85+--tab-stop=*TABSTOP*
86+: Specify tab stop (default is 4).
87+
88+--strict
89+: Use strict markdown syntax, with no extensions or variants.
90+
91+--reference-links
92+: Use reference-style links, rather than inline links, in writing markdown
93+ or reStructuredText.
94+
95+-R, --parse-raw
96+: Parse untranslatable HTML codes and LaTeX environments as raw HTML
97+ or LaTeX, instead of ignoring them.
98+
99+-S, --smart
100+: Use smart quotes, dashes, and ellipses. (This option is significant
101+ only when the input format is `markdown`. It is selected automatically
102+ when the output format is `latex`.)
103+
104+-m, --asciimathml
105+: Use ASCIIMathML to display embedded LaTeX math in HTML output.
106+
107+-i, --incremental
108+: Make list items in S5 display incrementally (one by one).
109+
110+-N, --number-sections
111+: Number section headings in LaTeX output. (Default is not to number
112+ them.)
113+
114+-c *CSS*, --css=*CSS*
115+: Link to a CSS style sheet. *CSS* is the pathname of the style sheet.
116+
117+-H *FILE*, --include-in-header=*FILE*
118+: Include contents of *FILE* at the end of the header. Implies `-s`.
119+
120+-B *FILE*, --include-before-body=*FILE*
121+: Include contents of *FILE* at the beginning of the document body.
122+
123+-A *FILE*, --include-after-body=*FILE*
124+: Include contents of *FILE* at the end of the document body.
125+
126+-C *FILE*, --custom-header=*FILE*
127+: Use contents of *FILE* as the document header (overriding the
128+ default header, which can be printed by using the `-D` option).
129+ Implies `-s`.
130+
131+-D *FORMAT*, --print-default-header=*FORMAT*
132+: Print the default header for *FORMAT* (`html`, `s5`, `latex`,
133+ `docbook`, `man`, `markdown`, `rst`, `rtf`).
134+
135+-T *STRING*, --title-prefix=*STRING*
136+: Specify *STRING* as a prefix to the HTML window title.
137+
138+--dump-args
139+: Print information about command-line arguments to STDOUT, then exit.
140+ The first line of output contains the name of the output file specified
141+ with the `-o` option, or '`-`' (for STDOUT) if no output file was
142+ specified. The remaining lines contain the command-line arguments,
143+ one per line, in the order they appear. These do not include regular
144+ Pandoc options and their arguments, but do include any options appearing
145+ after a '`--`' separator at the end of the line.
146+ This option is intended primarily for use in wrapper scripts.
147+
148+--ignore-args
149+: Ignore command-line arguments (for use in wrapper scripts).
150+ Regular Pandoc options are not ignored. Thus, for example,
151+
152+: pandoc --ignore-args -o foo.html -s foo.txt -- -e latin1
153+
154+: is equivalent to
155+
156+: pandoc -o foo.html -s
157+
158+-v, --version
159+: Print version.
160+
161+-h, --help
162+: Show usage message.
163+
164+# SEE ALSO
165+
166+`html2markdown`(1),
167+`markdown2pdf`(1).
168+The *README* file distributed with Pandoc contains full documentation.
169+
170+The Pandoc source code and all documentation may be downloaded from
171+<http://sophos.berkeley.edu/macfarlane/pandoc/>.
172+