From 3d2ff3d0a8d6ee04e771d1261b1367d7a3f4efe3 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Wed, 27 Aug 2008 05:50:26 +0000 Subject: Removed PDF writer from core pandoc, restored markdown2pdf. + Added markdown2pdf. + Removed Text/Pandoc/PDF.hs. + Removed references to PDF writer from Main.hs. + Removed references to PDF writer from pandoc.cabal. + Added markdown2pdf.1 to list of man pages in Setup.hs. + Added markdown2pdf.1.md man page source. + Added reference to markdown2pdf(1) in pandoc man page. + Added markdown2pdf to WRAPPERS in Makefile. + Removed mention of pdf writer from README; added markdown2pdf. + Added remarks on markdown2pdf dependencies to README.Debian. + Added markdown2pdf to web/index.txt.in. + Use markdown2pdf for pdf web demos. + Put markdown2pdf back into debian control and rules. + Added markdown2pdf to macports Portfile. + Added markdown2pdf to freebsd package. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1415 788f1e2b-df1e-0410-8736-df70ead52e1b --- README | 69 ++++++++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 42 insertions(+), 27 deletions(-) (limited to 'README') diff --git a/README b/README index 73cb92f3a..89314fbb2 100644 --- a/README +++ b/README @@ -55,9 +55,8 @@ If you want to write to a file, use the `-o` option: pandoc -o hello.html hello.txt -[^1]: The exception is for non-text output formats, such as `odt` - and `pdf`. For output in these formats, an output file must be - specified explicitly. +[^1]: The exception is for `odt`. Since this is a binary output format, + an output file must be specified explicitly. Note that you can specify multiple input files on the command line. `pandoc` will concatenate them all (with blank lines between them) @@ -82,28 +81,16 @@ To convert `hello.html` from html to markdown: pandoc -f html -t markdown hello.html Supported output formats include `markdown`, `latex`, `context` -(ConTeXt), `pdf`, `html`, `rtf` (rich text format), `rst` +(ConTeXt), `html`, `rtf` (rich text format), `rst` (reStructuredText), `docbook` (DocBook XML), `opendocument` (OpenDocument XML), `odt` (OpenOffice text document), `texinfo`, (GNU Texinfo), `mediawiki` (MediaWiki markup), `man` (groff man), and `s5` (which produces an HTML file that acts like powerpoint). -Notes: - -- For `odt` output, you must have `zip` in the path. If you - don't have it installed, you can get the free [Info-ZIP]. - -- For `pdf` output, you must have `pdflatex` and `bibtex` in the - path. You should also have the following LaTeX packages installed: - `unicode`, `fancyhdr` (if you have verbatim text in footnotes), - `graphicx` (if you use images), `array` (if you use tables), and - `ulem` (if you use strikeout text). If they are not already included - in your LaTeX distribution, you can get them from [CTAN]. A full - [TeX Live] or [MacTeX] distribution will have all of these packages. - - [Info-ZIP]: http://www.info-zip.org/Zip.html - [TeX Live]: http://www.tug.org/texlive/ - [MacTeX]: http://www.tug.org/mactex/ +For `odt` output, you must have `zip` in the path. If you +don't have it installed, you can get the free [Info-ZIP]. + +[Info-ZIP]: http://www.info-zip.org/Zip.html Supported input formats include `markdown`, `html`, `latex`, and `rst`. Note that the `rst` reader only parses a subset of reStructuredText @@ -148,12 +135,38 @@ then convert the output back to the local encoding. Shell scripts ============= -Two shell scripts, `html2markdown` and `hsmarkdown`, are included in -the standard Pandoc installation. (They are not included in the Windows -binary package, as they require a POSIX shell, but they may be used in -Windows under Cygwin.) +Three shell scripts, `markdown2pdf`, `html2markdown`, and `hsmarkdown`, +are included in the standard Pandoc installation. (They are not included +in the Windows binary package, as they require a POSIX shell, but they +may be used in Windows under Cygwin.) + +1. `markdown2pdf` produces a PDF file from markdown-formatted + text, using `pandoc` and `pdflatex`. The default + behavior of `markdown2pdf` is to create a file with the same + base name as the first argument and the extension `pdf`; thus, + for example, + + markdown2pdf sample.txt endnotes.txt + + will produce `sample.pdf`. (If `sample.pdf` exists already, + it will be backed up before being overwritten.) An output file + name can be specified explicitly using the `-o` option: + + markdown2pdf -o book.pdf chap1 chap2 + + If no input file is specified, input will be taken from stdin. + All of `pandoc`'s options will work with `markdown2pdf` as well. + + `markdown2pdf` assumes that `pdflatex` is in the path. It also + assumes that the following LaTeX packages are available: + `unicode`, `fancyhdr` (if you have verbatim text in footnotes), + `graphicx` (if you use images), `array` (if you use tables), + and `ulem` (if you use strikeout text). If they are not already + included in your LaTeX distribution, you can get them from + [CTAN]. A full [TeX Live] or [MacTeX] distribution will have all of + these packages. -1. `html2markdown` grabs a web page from a file or URL and converts +2. `html2markdown` grabs a web page from a file or URL and converts it to markdown-formatted text, using `tidy` and `pandoc`. All of `pandoc`'s options will work with `html2markdown` as well. @@ -182,7 +195,7 @@ Windows under Cygwin.) It uses [`iconv`] for character encoding conversions; if `iconv` is absent, it will still work, but it will treat everything as UTF-8. -2. `hsmarkdown` is designed to be used as a drop-in replacement for +3. `hsmarkdown` is designed to be used as a drop-in replacement for `Markdown.pl`. It forces `pandoc` to convert from markdown to HTML, and to use the `--strict` flag for maximal compliance with official markdown syntax. (All of Pandoc's syntax extensions and @@ -202,6 +215,8 @@ Windows under Cygwin.) [HTML Tidy]: http://tidy.sourceforge.net/ [`iconv`]: http://www.gnu.org/software/libiconv/ [CTAN]: http://www.ctan.org "Comprehensive TeX Archive Network" +[TeX Live]: http://www.tug.org/texlive/ +[MacTeX]: http://www.tug.org/mactex/ Command-line options ==================== @@ -227,7 +242,7 @@ For further documentation, see the `pandoc(1)` man page. `-o` or `--output` *filename* : sends output to *filename*. If this option is not specified, or if its argument is `-`, output will be sent to stdout. - (Exception: if the output format is `odt` or `pdf`, output to stdout + (Exception: if the output format is `odt`, output to stdout is disabled.) `-p` or `--preserve-tabs` -- cgit v1.2.3