git.iko.soy/typeable/pandoc
on master help sign in
+ Improved man page for pandoc and markdown2pdf.
76bd231fiddlosopher
README+19−18
@@ -87,38 +87,39 @@ and many other command-line options, see below.)
87
87
88Unfortunately, due to limitations in GHC, `pandoc` does not automatically
88Unfortunately, due to limitations in GHC, `pandoc` does not automatically
89detect the system's local character encoding. Hence, all input and
89detect the system's local character encoding. Hence, all input and
90−output is assumed to be in the UTF-8 encoding. If you use accented or
90+output is assumed to be in the UTF-8 encoding. If your local character
91−foreign characters, you should convert the input file to UTF-8 before
91+encoding is not UTF-8 and you use accented or foreign characters,
92−processing it with `pandoc`. This can be done by piping the input through
92+you should pipe the input and output through [`iconv`]. For example,
93−[`iconv`]: for example,
94
93
95− iconv -t utf-8 source.txt | pandoc > output.html
94+ iconv -t utf-8 source.txt | pandoc | iconv -f utf-8 > output.html
96
95
97will convert `source.txt` from the local encoding to UTF-8, then
96will convert `source.txt` from the local encoding to UTF-8, then
97+convert it to HTML, then convert back to the local encoding,
98−convert it to HTML, putting the output in `output.html`.
98+putting the output in `output.html`.
99
99
100[`iconv`]: http://www.gnu.org/software/libiconv/
100[`iconv`]: http://www.gnu.org/software/libiconv/
101
101
102−The shell scripts (described below) automatically convert the source
102+The shell scripts (described below) automatically convert the input
103−from the local encoding to UTF-8 before running them through `pandoc`.
103+from the local encoding to UTF-8 before running them through `pandoc`,
104+then convert the output back to the local encoding.
104
105
105# The shell scripts
106# The shell scripts
106
107
107For convenience, five shell scripts have been included that make it
108For convenience, five shell scripts have been included that make it
108easy to run `pandoc` without remembering all the command-line options.
109easy to run `pandoc` without remembering all the command-line options.
109−All of the scripts presuppose that `pandoc` is in the path, and
110+All of the scripts use `iconv` to convert to and from the local
111+character encoding. All of the scripts presuppose that `pandoc`
110−some have additional requirements. (For example, `html2markdown`
112+is in the path, and some have additional requirements. (For example,
111−uses `tidy`, and `markdown2pdf` uses `pdflatex`.)
113+`html2markdown` uses `tidy`, and `markdown2pdf` uses `pdflatex`.)
112
114
113−1. `markdown2html` converts markdown to HTML, running `iconv` first to
115+1. `markdown2html` converts markdown to HTML. (This can be used
114− convert the file to UTF-8. (This can be used as a replacement for
115− `Markdown.pl`.)
116+ as a replacement for `Markdown.pl`.)
116
117
1172. `html2markdown` can take either a filename or a URL as argument. If
1182. `html2markdown` can take either a filename or a URL as argument. If
118 it is given a URL, it uses `curl`, `wget`, or an available text-based
119 it is given a URL, it uses `curl`, `wget`, or an available text-based
119 browser to fetch the contents of the specified URL, then filters this
120 browser to fetch the contents of the specified URL, then filters this
120− through `tidy` to straighten up the HTML and convert to UTF-8,
121+ through `tidy` to straighten up the HTML, and finally passes
121− and finally passes this HTML to `pandoc` to produce markdown text:
122+ this HTML to `pandoc` to produce markdown text:
122
123
123 html2markdown http://www.fsf.org
124 html2markdown http://www.fsf.org
124
125
@@ -126,7 +127,7 @@ uses `tidy`, and `markdown2pdf` uses `pdflatex`.)
126
127
127 html2markdown subdir/mylocalfile.html
128 html2markdown subdir/mylocalfile.html
128
129
129−3. `latex2markdown` converts a LaTeX file to markdown.
130+3. `latex2markdown` converts a LaTeX file to markdown:
130
131
131 latex2markdown mytexfile.tex
132 latex2markdown mytexfile.tex
132
133
@@ -134,7 +135,7 @@ uses `tidy`, and `markdown2pdf` uses `pdflatex`.)
134
135
135 markdown2latex mytextfile.txt
136 markdown2latex mytextfile.txt
136
137
137−5. `markdown2pdf` converts markdown to PDF using `pdflatex`. Example:
138+5. `markdown2pdf` converts markdown to PDF using `pdflatex`:
138
139
139 markdown2pdf mytextfile.txt
140 markdown2pdf mytextfile.txt
140
141
TODO+27
@@ -1,2 +1,29 @@
1# TODO
1# TODO
2
2
3+- create a changelog in root, with a symlink to it in debian
4+ (only the top entry needs the sig.)
5+> pandoc (0.3) unstable; urgency=low
6+>
7+> [ John MacFarlane ]
8+> * Revised RTF writer:
9+> + made default font Helvetica
10+> + added \f0 to each \pard, so that font resizing works correctly
11+>
12+> [ Recai Oktaş ]
13+> * Created proper debian package
14+> * Revamped build system:
15+> + [describe changes in targets]
16+> * Modified wrapper scripts to make them more robust.
17+> + added --output option to markdown2pdf
18+>
19+> -- Recai Oktaş <roktas@debian.org> Tue, 24 Oct 2006 07:48:30 +0300
20+
21+- make a proper man page for pandoc, with documentation of all options
22+- uninstall script in Mac package; add information about it to Welcome?
23+- create a compressed disk image containing Mac pkg
24+- website target
25+- put web templates and osx stuff in separate directories
26+- look into warnings on pdflatex concerning ucs packages
27+- change all versions to 0.3
28+- iconv on both input and output in wrappers
29+
man/man1/markdown2pdf.1+1−2
@@ -1,4 +1,4 @@
1−.TH PANDOC 1 "AUGUST 2006" Linux "User Manuals"
1+.TH PANDOC 1 "NOVEMBER 2006" Linux "User Manuals"
2.SH NAME
2.SH NAME
3markdown2pdf \- converts markdown-formatted text to PDF, using pdflatex
3markdown2pdf \- converts markdown-formatted text to PDF, using pdflatex
4.SH SYNOPSIS
4.SH SYNOPSIS
@@ -15,4 +15,3 @@ John MacFarlane <jgm at berkeley.edu>
15.SH "SEE ALSO"
15.SH "SEE ALSO"
16pandoc (1), markdown2html (1), html2markdown (1), markdown2latex (1),
16pandoc (1), markdown2html (1), html2markdown (1), markdown2latex (1),
17latex2markdown (1)
17latex2markdown (1)
18−
man/man1/pandoc.1+159−11
@@ -1,20 +1,168 @@
1−.TH PANDOC 1 "AUGUST 2006" Linux "User Manuals"
1+.TH PANDOC 1 "November 1, 2006" Linux "User Manuals"
2.SH NAME
2.SH NAME
3pandoc \- general markup converter
3pandoc \- general markup converter
4.SH SYNOPSIS
4.SH SYNOPSIS
5+.B pandoc [
6+.I options
7+] [
5−.B pandoc [options] [input-files]
8+.I input-files
9+]
10+
6.SH DESCRIPTION
11.SH DESCRIPTION
7−.B pandoc
12+.I Pandoc
8converts files from one markup format to another. It can read markdown
13converts files from one markup format to another. It can read markdown
9−and (with some limitations) reStructuredText, HTML, and LaTeX, and it
14+and (subsets of) reStructuredText, HTML, and LaTeX, and it can write
10−can write markdown, reStructuredText, HTML, LaTeX, RTF, and S5 HTML
15+markdown, reStructuredText, HTML, LaTeX, RTF, and S5 HTML slide shows.
11−slide shows.
16+.PP
17+If no
18+.I input-files
19+are specified, input is read from STDIN. Otherwise, the
20+.I input-files
21+are concatenated (with a blank line between each) and used
22+as input. Output goes to STDOUT. Use redirection to produce
23+a file:
24+.IP
25+.B pandoc input.txt > output.html
26+.PP
27+The default behavior of
28+.I Pandoc
29+is to convert the
30+input from markdown-formatted plain text to HTML. Different
31+input and output formats can be specified using command-line
32+options.
33+.PP
34+.I Pandoc
35+uses the UTF-8 character encoding for both input and output.
36+If your local character encoding is not UTF-8, you should pipe
37+input and output through
38+.B iconv
39+:
40+.IP
41+.B iconv -t utf-8 input.txt | pandoc | iconv -f utf-8
42+
12.SH OPTIONS
43.SH OPTIONS
13−For full usage information, including command-line options,
44+.TP
14−type
45+.B \-v, \-\-version
15−.B pandoc -h
46+Print version.
47+.TP
48+.B \-h, \-\-help
49+Show usage message.
50+.TP
51+.B \-f FORMAT, \-r FORMAT, --from=FORMAT, --read=FORMAT
52+Specify input format.
53+.I FORMAT
54+can be
55+.I native
56+(native Haskell),
57+.I markdown
58+(markdown or plain text),
59+.I rst
60+(reStructuredText),
61+.I html
62+(HTML),
63+or
64+.I latex
65+(LaTeX).
66+.TP
67+.B \-t FORMAT, \-w FORMAT, --to=FORMAT, --write=FORMAT
68+Specify output format.
69+.I FORMAT
70+can be
71+.I native
72+(native Haskell),
73+.I markdown
74+(markdown or plain text),
75+.I rst
76+(reStructuredText),
77+.I html
78+(HTML),
79+.I latex
80+(LaTeX),
81+.I s5
82+(S5 HTML and javascript slide show),
83+or
84+.I rtf
85+(rich text format).
86+.TP
87+.B \-s, \-\-standalone
88+Produce output with an appropriate header and footer (e.g. a
89+standalone HTML, LaTeX, or RTF file, not a fragment).
90+.TP
91+.B \-p, \-\-preserve-tabs
92+Preserve tabs instead of converting them to spaces.
93+.TP
94+.B \-\-tab-stop=TABSTOP
95+Specify tab stop (default is 4).
96+.TP
97+.B \-R, \-\-parse-raw
98+Parse untranslatable HTML codes and LaTeX environments as raw HTML or
99+LaTeX, instead of ignoring them.
100+.TP
101+.B \-S, \-\-smartypants
102+Use smart quotes, dashes, and ellipses in HTML output.
103+.TP
104+.B \-m, \-\-asciimathml
105+Use ASCIIMathML to display embedded LaTeX math in HTML output.
106+.TP
107+.B \-i, \-\-incremental
108+Make list items in S5 display incrementally (one by one).
109+.TP
110+.B \-N, \-\-number-sections
111+Number section headings in LaTeX output. (Default is not to number them.)
112+.TP
113+.B \-c CSS, \-\-css=CSS
114+Link to a CSS style sheet.
115+.I CSS
116+is the pathname of the style sheet.
117+.TP
118+.B \-H FILENAME, \-\-include-in-header=FILENAME
119+Include contents of
120+.I FILENAME
121+at the end of the header. Implies
122+.B \-s.
123+.TP
124+.B \-B FILENAME, \-\-include-before-body=FILENAME
125+Include contents of
126+.I FILENAME
127+at the beginning of the document body.
128+.TP
129+.B \-A FILENAME, \-\-include-after-body=FILENAME
130+Include contents of
131+.I FILENAME
132+at the end of the document body.
133+.TP
134+.B \-\-custom-header=FILENAME
135+Use contents of
136+.I FILENAME
137+as the document header (overriding the default header, which can be
138+printed by using the
139+.B \-D
140+option). Implies
141+.B \-s.
142+.TP
143+.B \-D FORMAT, \-\-print-default-header=FORMAT
144+Print the default header for
145+.I FORMAT
146+(
147+.I html, s5, latex, markdown, rst, rtf
148+).
149+.TP
150+.B \-T STRING, \-\-title-prefix=STRING
151+Specify
152+.I STRING
153+as a prefix to the HTML window title.
154+
16.SH AUTHOR
155.SH AUTHOR
17−John MacFarlane <jgm at berkeley.edu>
156+John MacFarlane
157+
18.SH "SEE ALSO"
158.SH "SEE ALSO"
19−markdown2html (1), html2markdown (1), markdown2latex (1), latex2markdown (1), markdown2pdf (1)
159+markdown2html (1), html2markdown (1), markdown2latex (1), latex2markdown (1), markdown2pdf (1), iconv (1)
160+
161+The
162+.B README
163+file distributed with Pandoc contains full documentation.
164+
165+The Pandoc source code and all documentation may be downloaded from
166+.B http://sophos.berkeley.edu/macfarlane/pandoc/
167+.
20
168