diff options
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | man/man1/hsmarkdown.1 | 36 | ||||
-rw-r--r-- | man/man1/hsmarkdown.1.md | 42 | ||||
-rw-r--r-- | man/man1/html2markdown.1 | 85 | ||||
-rw-r--r-- | man/man1/html2markdown.1.md | 93 | ||||
-rw-r--r-- | man/man1/markdown2pdf.1 | 61 | ||||
-rw-r--r-- | man/man1/markdown2pdf.1.md | 68 | ||||
-rw-r--r-- | man/man1/pandoc.1 | 195 | ||||
-rw-r--r-- | man/man1/pandoc.1.md | 172 |
9 files changed, 381 insertions, 380 deletions
@@ -33,6 +33,7 @@ EXECS := $(addsuffix $(EXTENSION),$(EXECSBASE)) PROGS := $(EXECS) $(WRAPPERS) MAIN := $(firstword $(EXECS)) DOCS := README.html README BUGS +MANPAGES := $(patsubst %.md,%,$(wildcard $(MANDIR)/man?/*.?.md)) #------------------------------------------------------------------------------- # Variables to setup through environment @@ -88,6 +89,8 @@ all: build-program sh ./markdown2pdf $< || rm -f $@ %.txt: % perl -p -e 's/\n/\r\n/' $< > $@ || rm -f $@ # convert to DOS line endings +%.1: %.1.md $(MAIN) + ./$(MAIN) -s -S -w man $< >$@ || rm -f $@ .PHONY: templates templates: $(SRCDIR)/templates @@ -139,8 +142,8 @@ $(EXECS): build done .PHONY: build-doc -cleanup_files+=README.html -build-doc: $(DOCS) +cleanup_files+=README.html $(MANPAGES) +build-doc: $(DOCS) $(MANPAGES) .PHONY: build-program build-program: build-exec build-doc @@ -158,7 +161,7 @@ build-all: build-program build-lib-doc # User documents installation. .PHONY: install-doc uninstall-doc -man_all:=$(patsubst $(MANDIR)/%,%,$(wildcard $(MANDIR)/man?/*.1)) +man_all:=$(patsubst $(MANDIR)/%,%,$(MANPAGES)) install-doc: build-doc $(INSTALL) -d $(DOCPATH) && $(INSTALL_DATA) $(DOCS) $(DOCPATH)/ for f in $(man_all); do \ diff --git a/man/man1/hsmarkdown.1 b/man/man1/hsmarkdown.1 deleted file mode 100644 index 3db8a8b45..000000000 --- a/man/man1/hsmarkdown.1 +++ /dev/null @@ -1,36 +0,0 @@ -.TH HSMARKDOWN 1 "January 1, 2007" Pandoc "User Manuals" -.SH NAME -hsmarkdown \- convert markdown-formatted text to HTML -.SH SYNOPSIS -\fBhsmarkdown\fR [\fIinput\-file\fR]... -.SH DESCRIPTION -\fBhsmarkdown\fR converts markdown-formatted text to HTML. It is designed -to be usable as a drop-in replacement for John Gruber's \fBMarkdown.pl\fR. -.PP -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 STDOUT by -default. For output to a file, use shell redirection: -.IP -.B hsmarkdown input.txt > output.html -.PP -\fBhsmarkdown\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 -and output through \fBiconv\fR: -.IP -.B iconv \-t utf\-8 input.txt | hsmarkdown | iconv \-f utf\-8 -.PP -\fBhsmarkdown\fR is implemented as a wrapper around \fBpandoc\fR(1). It -calls \fBpandoc\fR with the options \fB\-\-from markdown \-\-to html -\-\-strict\fR and disables all other options. (Command-line options -will be interpreted as filenames, as they are by \fBMarkdown.pl\fR.) -.SH "SEE ALSO" -\fBpandoc\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 diff --git a/man/man1/hsmarkdown.1.md b/man/man1/hsmarkdown.1.md new file mode 100644 index 000000000..b8276ca6e --- /dev/null +++ b/man/man1/hsmarkdown.1.md @@ -0,0 +1,42 @@ +% HSMARKDOWN +% John MacFarlane +% June 30, 2007 + +# NAME + +hsmarkdown - convert markdown-formatted text to HTML + +# SYNOPSIS + +**hsmarkdown [*input-file*]...** + +# DESCRIPTION + +`hsmarkdown` converts markdown-formatted text to HTML. It is designed +to be usable as a drop-in replacement for John Gruber's `Markdown.pl`. + +If no *input-file* is specified, input is read from STDIN. +Otherwise, the *input-files* are concatenated (with a blank +line between each) and used as input. Output goes to STDOUT by +default. For output to a file, use shell redirection: + + hsmarkdown input.txt > output.html + +`hsmarkdown` 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 `iconv`: + + iconv -t utf-8 input.txt | hsmarkdown | iconv -f utf-8 + +`hsmarkdown` is implemented as a wrapper around `pandoc`(1). It +calls `pandoc` with the options `--from markdown --to html +--strict` and disables all other options. (Command-line options +will be interpreted as filenames, as they are by `Markdown.pl`.) + +# SEE ALSO + +`pandoc`(1). The *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/>. diff --git a/man/man1/html2markdown.1 b/man/man1/html2markdown.1 deleted file mode 100644 index ef8eb7f86..000000000 --- a/man/man1/html2markdown.1 +++ /dev/null @@ -1,85 +0,0 @@ -.TH HTML2MARKDOWN 1 "December 15, 2006" Pandoc "User Manuals" -.SH NAME -html2markdown \- converts HTML to markdown-formatted text -.SH SYNOPSIS -\fBhtml2markdown\fR [\fIpandoc\-options\fR] -[\-\- \fIspecial\-options\fR] [\fIinput\-file\fR or \fIURL\fR] -.SH DESCRIPTION -\fBhtml2markdown\fR converts \fIinput\-file\fR or \fIURL\fR (or text -from STDIN) from HTML to markdown\-formatted plain text. -If a URL is specified, \fBhtml2markdown\fR uses an available program -(e.g. wget, w3m, lynx or curl) to fetch its contents. Output is sent -to STDOUT unless an output file is specified using the \fB\-o\fR -option. -.PP -\fBhtml2markdown\fR uses the character encoding specified in the -"Content-type" meta tag. If this is not present, or if input comes -from STDIN, UTF-8 is assumed. A character encoding may be specified -explicitly using the \fB\-e\fR special option. -.SH OPTIONS -.PP -\fBhtml2markdown\fR is a wrapper for \fBpandoc\fR, so all of -\fBpandoc\fR's options may be used. See \fBpandoc\fR(1) for -a complete list. The following options are most relevant: -.TP -.B \-s, \-\-standalone -Include title, author, and date information (if present) at the -top of markdown output. -.TP -.B \-o FILE, \-\-output=FILE -Write output to \fIFILE\fR instead of STDOUT. -.TP -.B \-\-strict -Use strict markdown syntax, with no extensions or variants. -.TP -.B \-\-reference\-links -Use reference-style links, rather than inline links, in writing markdown -or reStructuredText. -.TP -.B \-R, \-\-parse-raw -Parse untranslatable HTML codes as raw HTML. -.TP -.B \-H \fIFILE\fB, \-\-include-in-header=\fIFILE\fB -Include contents of \fIFILE\fR at the end of the header. Implies -\fB\-s\fR. -.TP -.B \-B \fIFILE\fB, \-\-include-before-body=\fIFILE\fB -Include contents of \fIFILE\fR at the beginning of the document body. -.TP -.B \-A \fIFILE\fB, \-\-include-after-body=\fIFILE\fB -Include contents of \fIFILE\fR at the end of the document body. -.TP -.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 using '\fBpandoc \-D markdown\fR'). Implies -\fB-s\fR. -.SH "SPECIAL OPTIONS" -.PP -In addition, the following special options may be used. The special -options must be separated from the \fBhtml2markdown\fR command and any -regular \fBpandoc\fR options by the delimiter `\-\-', as in -.IP -.B html2markdown \-o foo.txt \-\- \-g 'curl \-u bar:baz' \-e latin1 -.B www.foo.com -.TP -.B \-e \fIencoding\fR, \-\-encoding=\fIencoding\fR -Assume the character encoding \fIencoding\fR in reading HTML. -(Note: \fIencoding\fR will be passed to \fBiconv\fR; a list of -available encodings may be obtained using `\fBiconv \-l\fR'.) -If this option is not specified and input is not from -STDIN, \fBhtml2markdown\fR will try to extract the character encoding -from the "Content-type" meta tag. If no character encoding is -specified in this way, or if input is from STDIN, UTF-8 will be -assumed. -.TP -.B \-g \fIcommand\fR, \-\-grabber=\fIcommand\fR -Use \fIcommand\fR to fetch the contents of a URL. (By default, -\fBhtml2markdown\fR searches for an available program or text-based -browser to fetch the contents of a URL.) - -.SH "SEE ALSO" -\fBpandoc\fR(1), -\fBiconv\fR(1) -.SH AUTHOR -John MacFarlane and Recai Oktas diff --git a/man/man1/html2markdown.1.md b/man/man1/html2markdown.1.md new file mode 100644 index 000000000..f83a4b2c4 --- /dev/null +++ b/man/man1/html2markdown.1.md @@ -0,0 +1,93 @@ +% HTML2MARKDOWN +% John MacFarlane and Recai Oktas +% June 30, 2007 + +# NAME + +html2markdown - converts HTML to markdown-formatted text + +# SYNOPSIS + +**html2markdown [*pandoc-options*] [-- *special-options*] [*input-file* or +*URL*]** + +# DESCRIPTION + +`html2markdown` converts *input-file* or *URL* (or text +from STDIN) from HTML to markdown-formatted plain text. +If a URL is specified, `html2markdown` uses an available program +(e.g. wget, w3m, lynx or curl) to fetch its contents. Output is sent +to STDOUT unless an output file is specified using the `-o` +option. + +`html2markdown` uses the character encoding specified in the +"Content-type" meta tag. If this is not present, or if input comes +from STDIN, UTF-8 is assumed. A character encoding may be specified +explicitly using the `-e` special option. + +# OPTIONS + +`html2markdown` is a wrapper for `pandoc`, so all of +`pandoc`'s options may be used. See `pandoc`(1) for +a complete list. The following options are most relevant: + +-s, --standalone +: Include title, author, and date information (if present) at the + top of markdown output. + +-o *FILE*, --output=*FILE* +: Write output to *FILE* instead of STDOUT. + +--strict +: Use strict markdown syntax, with no extensions or variants. + +--reference-links +: Use reference-style links, rather than inline links, in writing markdown + or reStructuredText. + +-R, --parse-raw +: Parse untranslatable HTML codes as raw HTML. + +-H *FILE*, --include-in-header=*FILE* +: Include contents of *FILE* at the end of the header. Implies + `-s`. + +-B *FILE*, --include-before-body=*FILE* +: Include contents of *FILE* at the beginning of the document body. + +-A *FILE*, --include-after-body=*FILE* +: Include contents of *FILE* at the end of the document body. + +-C *FILE*, --custom-header=*FILE* +Use contents of *FILE* +as the document header (overriding the default header, which can be +printed using `pandoc -D markdown`). Implies +`-s`. + +# SPECIAL OPTIONS + +In addition, the following special options may be used. The special +options must be separated from the `html2markdown` command and any +regular `pandoc` options by the delimiter '`--`', as in + + html2markdown -o foo.txt -- -g 'curl -u bar:baz' -e latin1 \ + www.foo.com + +-e *encoding*, --encoding=*encoding* +: Assume the character encoding *encoding* in reading HTML. + (Note: *encoding* will be passed to `iconv`; a list of + available encodings may be obtained using `iconv -l`.) + If this option is not specified and input is not from + STDIN, `html2markdown` will try to extract the character encoding + from the "Content-type" meta tag. If no character encoding is + specified in this way, or if input is from STDIN, UTF-8 will be + assumed. + +-g *command*, --grabber=*command* +: Use *command* to fetch the contents of a URL. (By default, + `html2markdown` searches for an available program or text-based + browser to fetch the contents of a URL.) + +# SEE ALSO + +`pandoc`(1), `iconv`(1) diff --git a/man/man1/markdown2pdf.1 b/man/man1/markdown2pdf.1 deleted file mode 100644 index 3162742bb..000000000 --- a/man/man1/markdown2pdf.1 +++ /dev/null @@ -1,61 +0,0 @@ -.TH MARKDOWN2PDF 1 "December 15, 2006" Pandoc "User Manuals" -.SH NAME -markdown2pdf \- converts markdown-formatted text to PDF, using pdflatex -.SH SYNOPSIS -\fBmarkdown2pdf\fR [\fIoptions\fR] [\fIinput-file\fR]... -.SH DESCRIPTION -\fBmarkdown2pdf\fR converts \fIinput\-file\fR (or text from standard -input) from markdown\-formatted plain text to PDF, using \fBpdflatex\fR. -If no output filename is specified (using the \fB\-o\fR option), -the name of the output file is derived from the input file; thus, for -example, if the input file is \fIhello.txt\fR, the output file will be -\fIhello.pdf\fR. If the input is read from STDIN and no output filename -is specified, the output file will be named \fIstdin.pdf\fR. If multiple -input files are specified, they will be concatenated before conversion, -and the name of the output file will be derived from the first input file. -.PP -Input is assumed to be in the UTF\-8 character encoding. If your -local character encoding is not UTF\-8, you should pipe input and -output through \fBiconv\fR: -.IP -.B iconv \-t utf\-8 input.txt | pandoc | iconv \-f utf\-8 -.PP -\fBmarkdown2pdf\fR assumes that the 'unicode' and 'fancyvrb' packages -are in latex's search path. If these packages are not included in your -latex setup, they can be obtained from <http://ctan.org>. -.SH OPTIONS -.PP -\fBmarkdown2pdf\fR is a wrapper around \fBpandoc\fR, so all of -\fBpandoc\fR's options can be used with \fBmarkdown2pdf\fR as well. -See \fBpandoc\fR(1) for a complete list. -The following options are most relevant: -.TP -.B \-o FILE, \-\-output=FILE -Write output to \fIFILE\fR. -.TP -.B \-\-strict -Use strict markdown syntax, with no extensions or variants. -.TP -.TP -.B \-N, \-\-number-sections -Number section headings in LaTeX output. (Default is not to number them.) -.TP -.B \-H \fIFILE\fB, \-\-include-in-header=\fIFILE\fB -Include (LaTeX) contents of \fIFILE\fR at the end of the header. Implies -\fB\-s\fR. -.TP -.B \-B \fIFILE\fB, \-\-include-before-body=\fIFILE\fB -Include (LaTeX) contents of \fIFILE\fR at the beginning of the document body. -.TP -.B \-A \fIFILE\fB, \-\-include-after-body=\fIFILE\fB -Include (LaTeX) contents of \fIFILE\fR at the end of the document body. -.TP -.B \-C \fIFILE\fB, \-\-custom-header=\fIFILE\fB -Use contents of \fIFILE\fR -as the LaTeX document header (overriding the default header, which can be -printed using '\fBpandoc \-D latex\fR'). Implies \fB-s\fR. -.SH "SEE ALSO" -\fBpandoc\fR(1), -\fBpdflatex\fR(1) -.SH AUTHOR -John MacFarlane and Recai Oktas diff --git a/man/man1/markdown2pdf.1.md b/man/man1/markdown2pdf.1.md new file mode 100644 index 000000000..045adc2c1 --- /dev/null +++ b/man/man1/markdown2pdf.1.md @@ -0,0 +1,68 @@ +% MARKDOWN2PDF +% John MacFarlane and Recai Oktas +% June 30, 2007 + +# NAME + +markdown2pdf - converts markdown-formatted text to PDF, using pdflatex + +# SYNOPSIS + +**markdown2pdf [*options*] [*input-file*]...** + +# DESCRIPTION + +`markdown2pdf` converts *input-file* (or text from standard +input) from markdown-formatted plain text to PDF, using `pdflatex`. +If no output filename is specified (using the `-o` option), +the name of the output file is derived from the input file; thus, for +example, if the input file is *hello.txt*, the output file will be +*hello.pdf*. If the input is read from STDIN and no output filename +is specified, the output file will be named *stdin.pdf*. If multiple +input files are specified, they will be concatenated before conversion, +and the name of the output file will be derived from the first input file. + +Input is assumed to be in the UTF-8 character encoding. If your +local character encoding is not UTF-8, you should pipe input and +output through `iconv`: + + iconv -t utf-8 input.txt | pandoc | iconv -f utf-8 + +`markdown2pdf` assumes that the 'unicode' and 'fancyvrb' packages +are in latex's search path. If these packages are not included in your +latex setup, they can be obtained from <http://ctan.org>. + +# OPTIONS + +`markdown2pdf` is a wrapper around `pandoc`, so all of +`pandoc`'s options can be used with `markdown2pdf` as well. +See `pandoc`(1) for a complete list. +The following options are most relevant: + +-o *FILE*, --output=*FILE* +: Write output to *FILE*. + +--strict +: Use strict markdown syntax, with no extensions or variants. + +-N, --number-sections +: Number section headings in LaTeX output. (Default is not to number them.) + +-H *FILE*, --include-in-header=*FILE* +: Include (LaTeX) contents of *FILE* at the end of the header. Implies + `-s`. + +-B *FILE*, --include-before-body=*FILE* +: Include (LaTeX) contents of *FILE* at the beginning of the document body. + +-A *FILE*, --include-after-body=*FILE* +: Include (LaTeX) contents of *FILE* at the end of the document body. + +-C *FILE*, --custom-header=*FILE* +: Use contents of *FILE* + as the LaTeX document header (overriding the default header, which can be + printed using `pandoc -D latex`). Implies `-s`. + +# SEE ALSO + +`pandoc`(1), `pdflatex`(1) diff --git a/man/man1/pandoc.1 b/man/man1/pandoc.1 deleted file mode 100644 index 7df9b0d79..000000000 --- a/man/man1/pandoc.1 +++ /dev/null @@ -1,195 +0,0 @@ -.TH PANDOC 1 "December 15, 2006" Pandoc "User Manuals" -.SH NAME -pandoc \- general markup converter -.SH SYNOPSIS -\fBpandoc\fR [\fIoptions\fR] [\fIinput\-file\fR]... -.SH DESCRIPTION -\fIPandoc\fR 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, DocBook -XML, and S5 HTML slide shows. -.PP -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 STDOUT by -default. For output to a file, use the \fB\-o\fR option: -.IP -.B pandoc \-o output.html input.txt -.PP -The input and output formats may be specified using command-line options -(see \fBOPTIONS\fR, below, for details). If these formats are not -specified explicitly, \fIPandoc\fR will attempt to determine them -from the extensions of the input and output filenames. If input comes -from STDIN or from a file with an unknown extension, the input is assumed -to be markdown. If no output filename is specified using the \fB\-o\fR -option, or if a filename is specified but its extension is unknown, -the output will default to HTML. Thus, for example, -.IP -.B pandoc -o chap1.tex chap1.txt -.PP -converts \fIchap1.txt\fR from markdown to LaTeX. And -.IP -.B pandoc README -.PP -converts \fIREADME\fR from markdown to HTML. -.PP -Pandoc's version of markdown is an extended variant of standard -markdown: the differences are described in the \fIREADME\fR file in -the user documentation. If standard markdown syntax is desired, the -\fB\-\-strict\fR option may be used. -.PP -\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 -and output through \fBiconv\fR: -.IP -.B iconv \-t utf\-8 input.txt | pandoc | iconv \-f utf\-8 -.PP -\fIPandoc\fR's HTML parser is not very forgiving. If your input is -HTML, consider running it through \fBtidy\fR(1) before passing it -to Pandoc. Or use \fBhtml2markdown\fR(1), a wrapper around \fBpandoc\fR. - -.SH OPTIONS -.TP -.B \-f \fIFORMAT\fB, \-r \fIFORMAT\fB, \-\-from=\fIFORMAT\fB, \-\-read=\fIFORMAT\fB -Specify input format. -.I FORMAT -can be -.B native -(native Haskell), -.B markdown -(markdown or plain text), -.B rst -(reStructuredText), -.B html -(HTML), -or -.B latex -(LaTeX). -.TP -.B \-t \fIFORMAT\fB, \-w \fIFORMAT\fB, \-\-to=\fIFORMAT\fB, \-\-write=\fIFORMAT\fB -Specify output format. -.I FORMAT -can be -.B native -(native Haskell), -.B markdown -(markdown or plain text), -.B rst -(reStructuredText), -.B html -(HTML), -.B latex -(LaTeX), -.B docbook -(DocBook XML), -.B s5 -(S5 HTML and javascript slide show), -or -.B 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 \-o FILE, \-\-output=FILE -Write output to \fIFILE\fR instead of STDOUT. If \fIFILE\fR is -`\-', output will go to STDOUT. -.TP -.B \-p, \-\-preserve-tabs -Preserve tabs instead of converting them to spaces. -.TP -.B \-\-tab-stop=\fITABSTOP\fB -Specify tab stop (default is 4). -.TP -.B \-\-strict -Use strict markdown syntax, with no extensions or variants. -.TP -.B \-\-reference\-links -Use reference-style links, rather than inline links, in writing markdown -or reStructuredText. -.TP -.B \-R, \-\-parse-raw -Parse untranslatable HTML codes and LaTeX environments as raw HTML -or LaTeX, instead of ignoring them. -.TP -.B \-S, \-\-smart -Use smart quotes, dashes, and ellipses. (This option is significant -only when the input format is \fBmarkdown\fR. It is selected automatically -when the output format is \fBlatex\fR.) -.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 \fICSS\fB, \-\-css=\fICSS\fB -Link to a CSS style sheet. -.I CSS -is the pathname of the style sheet. -.TP -.B \-H \fIFILE\fB, \-\-include-in-header=\fIFILE\fB -Include contents of \fIFILE\fR at the end of the header. Implies -\fB\-s\fR. -.TP -.B \-B \fIFILE\fB, \-\-include-before-body=\fIFILE\fB -Include contents of \fIFILE\fR at the beginning of the document -body. -.TP -.B \-A \fIFILE\fB, \-\-include-after-body=\fIFILE\fB -Include contents of \fIFILE\fR at the end of the document body. -.TP -.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. -.TP -.B \-D \fIFORMAT\fB, \-\-print-default-header=\fIFORMAT\fB -Print the default header for \fIFORMAT\fR (\fBhtml, s5, latex, docbook, -markdown, rst, rtf\fR). -.TP -.B \-T \fISTRING\fB, \-\-title-prefix=\fISTRING\fB -Specify \fISTRING\fR as a prefix to the HTML window title. -.TP -.B \-\-dump\-args -Print information about command\-line arguments to STDOUT, then exit. -The first line of output contains the name of the output file specified -with the \fB\-o\fR option, or `\-' (for STDOUT) if no output file was -specified. The remaining lines contain the command\-line arguments, -one per line, in the order they appear. These do not include regular -Pandoc options and their arguments, but do include any options appearing -after a `\-\-' separator at the end of the line. -This option is intended primarily for use in wrapper scripts. -.TP -.B \-\-ignore\-args -Ignore command\-line arguments (for use in wrapper scripts). -Regular Pandoc options are not ignored. Thus, for example, -.IP -.B pandoc \-\-ignore\-args \-o foo.html \-s foo.txt -- -e latin1 -.IP -is equivalent to -.IP -.B pandoc \-o foo.html \-s -.TP -.B \-v, \-\-version -Print version. -.TP -.B \-h, \-\-help -Show usage message. - -.SH "SEE ALSO" -\fBhtml2markdown\fR(1), -\fBmarkdown2pdf\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 diff --git a/man/man1/pandoc.1.md b/man/man1/pandoc.1.md new file mode 100644 index 000000000..b06d6e21d --- /dev/null +++ b/man/man1/pandoc.1.md @@ -0,0 +1,172 @@ +% PANDOC +% John MacFarlane +% June 30, 2007 + +# NAME + +pandoc - general markup converter + +# SYNOPSIS + +**pandoc [*options*] [*input-file*]...** + +# DESCRIPTION + +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, DocBook +XML, and S5 HTML slide shows. + +If no *input-file* is specified, input is read from STDIN. +Otherwise, the *input-files* are concatenated (with a blank +line between each) and used as input. Output goes to STDOUT by +default. For output to a file, use the `-o` option: + + pandoc -o output.html input.txt + +The input and output formats may be specified using command-line options +(see **OPTIONS**, below, for details). If these formats are not +specified explicitly, Pandoc will attempt to determine them +from the extensions of the input and output filenames. If input comes +from STDIN or from a file with an unknown extension, the input is assumed +to be markdown. If no output filename is specified using the `-o` +option, or if a filename is specified but its extension is unknown, +the output will default to HTML. Thus, for example, + + pandoc -o chap1.tex chap1.txt + +converts *chap1.txt* from markdown to LaTeX. And + + pandoc README + +converts *README* from markdown to HTML. + +Pandoc's version of markdown is an extended variant of standard +markdown: the differences are described in the *README* file in +the user documentation. If standard markdown syntax is desired, the +`--strict` option may be used. + +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 `iconv`: + + iconv -t utf-8 input.txt | pandoc | iconv -f utf-8 + +Pandoc's HTML parser is not very forgiving. If your input is +HTML, consider running it through `tidy`(1) before passing it +to Pandoc. Or use `html2markdown`(1), a wrapper around `pandoc`. + +# OPTIONS + +-f *FORMAT*, -r *FORMAT*, --from=*FORMAT*, --read=*FORMAT* +: Specify input format. *FORMAT* can be + `native` (native Haskell), `markdown` (markdown or plain text), + `rst` (reStructuredText), `html` (HTML), or `latex` (LaTeX). + +-t *FORMAT*, -w *FORMAT*, --to=*FORMAT*, --write=*FORMAT* +: Specify output format. *FORMAT* can be `native` (native Haskell), + `man` (groff man page), + `markdown` (markdown or plain text), `rst` (reStructuredText), + `html` (HTML), `latex` (LaTeX), `docbook` (DocBook XML), + `s5` (S5 HTML and javascript slide show), or + `rtf` (rich text format). + +-s, --standalone +: Produce output with an appropriate header and footer (e.g. a + standalone HTML, LaTeX, or RTF file, not a fragment). + +-o *FILE*, --output=*FILE* +: Write output to *FILE* instead of STDOUT. If *FILE* is + '`-`', output will go to STDOUT. + +-p, --preserve-tabs +: Preserve tabs instead of converting them to spaces. + +--tab-stop=*TABSTOP* +: Specify tab stop (default is 4). + +--strict +: Use strict markdown syntax, with no extensions or variants. + +--reference-links +: Use reference-style links, rather than inline links, in writing markdown + or reStructuredText. + +-R, --parse-raw +: Parse untranslatable HTML codes and LaTeX environments as raw HTML + or LaTeX, instead of ignoring them. + +-S, --smart +: Use smart quotes, dashes, and ellipses. (This option is significant + only when the input format is `markdown`. It is selected automatically + when the output format is `latex`.) + +-m, --asciimathml +: Use ASCIIMathML to display embedded LaTeX math in HTML output. + +-i, --incremental +: Make list items in S5 display incrementally (one by one). + +-N, --number-sections +: Number section headings in LaTeX output. (Default is not to number + them.) + +-c *CSS*, --css=*CSS* +: Link to a CSS style sheet. *CSS* is the pathname of the style sheet. + +-H *FILE*, --include-in-header=*FILE* +: Include contents of *FILE* at the end of the header. Implies `-s`. + +-B *FILE*, --include-before-body=*FILE* +: Include contents of *FILE* at the beginning of the document body. + +-A *FILE*, --include-after-body=*FILE* +: Include contents of *FILE* at the end of the document body. + +-C *FILE*, --custom-header=*FILE* +: Use contents of *FILE* as the document header (overriding the + default header, which can be printed by using the `-D` option). + Implies `-s`. + +-D *FORMAT*, --print-default-header=*FORMAT* +: Print the default header for *FORMAT* (`html`, `s5`, `latex`, + `docbook`, `man`, `markdown`, `rst`, `rtf`). + +-T *STRING*, --title-prefix=*STRING* +: Specify *STRING* as a prefix to the HTML window title. + +--dump-args +: Print information about command-line arguments to STDOUT, then exit. + The first line of output contains the name of the output file specified + with the `-o` option, or '`-`' (for STDOUT) if no output file was + specified. The remaining lines contain the command-line arguments, + one per line, in the order they appear. These do not include regular + Pandoc options and their arguments, but do include any options appearing + after a '`--`' separator at the end of the line. + This option is intended primarily for use in wrapper scripts. + +--ignore-args +: Ignore command-line arguments (for use in wrapper scripts). + Regular Pandoc options are not ignored. Thus, for example, + +: pandoc --ignore-args -o foo.html -s foo.txt -- -e latin1 + +: is equivalent to + +: pandoc -o foo.html -s + +-v, --version +: Print version. + +-h, --help +: Show usage message. + +# SEE ALSO + +`html2markdown`(1), +`markdown2pdf`(1). +The *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/>. + |