summaryrefslogtreecommitdiff
path: root/MANUAL.txt
diff options
context:
space:
mode:
authorMauro Bieg <mb21@users.noreply.github.com>2017-09-12 05:18:42 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-09-11 20:18:42 -0700
commitc7e3c1ec1797d633c181e5701c94f4169b0e5471 (patch)
tree90d951a5db9e9682ab0856e0a15c5cf7ac76786d /MANUAL.txt
parentddecd727838c017f376cdd8d51e14db1b9652217 (diff)
Support for PDF generation via `weasyprint` and `prince` (#3909)
* Rename --latex-engine to --pdf-engine * In `Text.Pandoc.Options.WriterOptions`, rename `writerLaTeXEngine` to `writerPdfEngine` and `writerLaTeXArgs` to `writerPdfArgs`. * Add support for `weasyprint` and `prince`, in addition to `wkhtmltopdf`, for PDF generation via HTML (closes #3906). * `Text.Pandoc.PDF.html2pdf`: use stdin instead of intermediate HTML file
Diffstat (limited to 'MANUAL.txt')
-rw-r--r--MANUAL.txt29
1 files changed, 17 insertions, 12 deletions
diff --git a/MANUAL.txt b/MANUAL.txt
index ee50d7225..0b0fadd22 100644
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -186,12 +186,12 @@ Creating a PDF
--------------
To produce a PDF, specify an output file with a `.pdf` extension.
-By default, pandoc will use LaTeX to convert it to PDF:
+By default, pandoc will use LaTeX to create the PDF:
pandoc test.txt -o test.pdf
Production of a PDF requires that a LaTeX engine be installed (see
-`--latex-engine`, below), and assumes that the following LaTeX packages
+`--pdf-engine`, below), and assumes that the following LaTeX packages
are available: [`amsfonts`], [`amsmath`], [`lm`], [`unicode-math`],
[`ifxetex`], [`ifluatex`], [`listings`] (if the
`--listings` option is used), [`fancyvrb`], [`longtable`],
@@ -210,16 +210,19 @@ if added to the template or included in any header file. The
optionally be used for [citation rendering]. These are included
with all recent versions of [TeX Live].
-Alternatively, pandoc can use ConTeXt, `wkhtmltopdf`, or
-`pdfroff` to create a PDF. To do this, specify an output file
-with a `.pdf` extension, as before, but add `-t context`, `-t
-html5`, or `-t ms` to the command line.
+Alternatively, pandoc can use [ConTeXt], `pdfroff`, or any of the
+following HTML/CSS-to-PDF-engines, to create a PDF: [`wkhtmltopdf`],
+[`weasyprint`] or `prince`.
+To do this, specify an output file with a `.pdf` extension, as before,
+but add the `--pdf-engine` option or `-t context`, `-t html`, or `-t ms`
+to the command line (`-t html` defaults to `--pdf-engine=wkhtmltopdf`).
PDF output can be controlled using [variables for LaTeX] (if
LaTeX is used) and [variables for ConTeXt] (if ConTeXt is used).
+When using an HTML/CSS-to-PDF-engine, `--css` affects the output.
If `wkhtmltopdf` is used, then the variables `margin-left`,
`margin-right`, `margin-top`, `margin-bottom`, and `papersize`
-will affect the output, as will `--css`.
+will affect the output.
[`amsfonts`]: https://ctan.org/pkg/amsfonts
[`amsmath`]: https://ctan.org/pkg/amsmath
@@ -251,6 +254,8 @@ will affect the output, as will `--css`.
[`bibtex`]: https://ctan.org/pkg/bibtex
[`biber`]: https://ctan.org/pkg/biber
[TeX Live]: http://www.tug.org/texlive/
+[`wkhtmltopdf`]: https://wkhtmltopdf.org
+[`weasyprint`]: http://weasyprint.org
Options
=======
@@ -990,15 +995,15 @@ Options affecting specific writers
the EPUB-specific contents. The default is `EPUB`. To put
the EPUB contents in the top level, use an empty string.
-`--latex-engine=pdflatex`|`lualatex`|`xelatex`
+`--pdf-engine=pdflatex`|`lualatex`|`xelatex`|`wkhtmltopdf`|`weasyprint`|`prince`|`context`|`pdfroff`
-: Use the specified LaTeX engine when producing PDF output.
+: Use the specified engine when producing PDF output.
The default is `pdflatex`. If the engine is not in your PATH,
the full path of the engine may be specified here.
-`--latex-engine-opt=`*STRING*
+`--pdf-engine-opt=`*STRING*
-: Use the given string as a command-line argument to the `latex-engine`.
+: Use the given string as a command-line argument to the `pdf-engine`.
If used multiple times, the arguments are provided with spaces between
them. Note that no check for duplicate options is done.
@@ -1300,7 +1305,7 @@ Language variables
[Unicode Bidirectional Algorithm].
When using LaTeX for bidirectional documents, only the `xelatex` engine
- is fully supported (use `--latex-engine=xelatex`).
+ is fully supported (use `--pdf-engine=xelatex`).
[BCP 47]: https://tools.ietf.org/html/bcp47
[Unicode Bidirectional Algorithm]: http://www.w3.org/International/articles/inline-bidi-markup/uba-basics