Skip to content

Commit

Permalink
Configure CLI options SILE to be used as a PDF engine
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Nov 16, 2024
1 parent 37ab1bc commit db6303e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 3 additions & 2 deletions MANUAL.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1447,8 +1447,8 @@ header when requesting a document from a URL:
: Use the specified engine when producing PDF output.
Valid values are `pdflatex`, `lualatex`, `xelatex`, `latexmk`,
`tectonic`, `wkhtmltopdf`, `weasyprint`, `pagedjs-cli`,
`prince`, `context`, `pdfroff`, and `typst`. If the engine is not in
your PATH, the full path of the engine may be specified here.
`prince`, `context`, `pdfroff`, `sile`, and `typst`. If the engine is not
in your PATH, the full path of the engine may be specified here.
If this option is not specified, pandoc uses the following
defaults depending on the output format specified using
`-t/--to`:
Expand All @@ -1461,6 +1461,7 @@ header when requesting a document from a URL:
see [print-css.rocks](https://print-css.rocks) for a good
introduction to PDF generation from HTML/CSS)
- `-t ms`: `pdfroff`
- `-t sile`: `sile`
- `-t typst`: `typst`

`--pdf-engine-opt=`*STRING*
Expand Down
1 change: 1 addition & 0 deletions src/Text/Pandoc/App/CommandLineOptions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ engines = map ("html",) htmlEngines ++
map ("latex",) latexEngines ++
map ("beamer",) latexEngines ++
[ ("ms", "pdfroff")
, ("sile", "sile")
, ("typst", "typst")
, ("context", "context")
]
Expand Down
6 changes: 6 additions & 0 deletions src/Text/Pandoc/PDF.hs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ makePDF program pdfargs writer opts doc =
source <- writer opts doc
verbosity <- getVerbosity
liftIO $ toPdfViaTempFile verbosity program pdfargs mkOutArgs source
"sile" -> do
let mkOutArgs f = ["-o", f]
source <- writer opts doc
verbosity <- getVerbosity
liftIO $
toPdfViaTempFile verbosity program pdfargs mkOutArgs source
"typst" -> do
source <- writer opts doc
verbosity <- getVerbosity
Expand Down

0 comments on commit db6303e

Please sign in to comment.