Skip to content

Commit db6303e

Browse files
committed
Configure CLI options SILE to be used as a PDF engine
1 parent 37ab1bc commit db6303e

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

MANUAL.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,8 +1447,8 @@ header when requesting a document from a URL:
14471447
: Use the specified engine when producing PDF output.
14481448
Valid values are `pdflatex`, `lualatex`, `xelatex`, `latexmk`,
14491449
`tectonic`, `wkhtmltopdf`, `weasyprint`, `pagedjs-cli`,
1450-
`prince`, `context`, `pdfroff`, and `typst`. If the engine is not in
1451-
your PATH, the full path of the engine may be specified here.
1450+
`prince`, `context`, `pdfroff`, `sile`, and `typst`. If the engine is not
1451+
in your PATH, the full path of the engine may be specified here.
14521452
If this option is not specified, pandoc uses the following
14531453
defaults depending on the output format specified using
14541454
`-t/--to`:
@@ -1461,6 +1461,7 @@ header when requesting a document from a URL:
14611461
see [print-css.rocks](https://print-css.rocks) for a good
14621462
introduction to PDF generation from HTML/CSS)
14631463
- `-t ms`: `pdfroff`
1464+
- `-t sile`: `sile`
14641465
- `-t typst`: `typst`
14651466

14661467
`--pdf-engine-opt=`*STRING*

src/Text/Pandoc/App/CommandLineOptions.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ engines = map ("html",) htmlEngines ++
222222
map ("latex",) latexEngines ++
223223
map ("beamer",) latexEngines ++
224224
[ ("ms", "pdfroff")
225+
, ("sile", "sile")
225226
, ("typst", "typst")
226227
, ("context", "context")
227228
]

src/Text/Pandoc/PDF.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ makePDF program pdfargs writer opts doc =
9292
source <- writer opts doc
9393
verbosity <- getVerbosity
9494
liftIO $ toPdfViaTempFile verbosity program pdfargs mkOutArgs source
95+
"sile" -> do
96+
let mkOutArgs f = ["-o", f]
97+
source <- writer opts doc
98+
verbosity <- getVerbosity
99+
liftIO $
100+
toPdfViaTempFile verbosity program pdfargs mkOutArgs source
95101
"typst" -> do
96102
source <- writer opts doc
97103
verbosity <- getVerbosity

0 commit comments

Comments
 (0)