by mr_mitm · 5mo ago · 0 comments
Pandoc probably uses latex under the hood, and Typst is order of magnitudes faster. Also, much better error messages.
Typst is vastly superior for usage in automation or when developing document classes.
If that's not your use case, don't bother.
I use this command to create pdf from my md file.
Downloads/pandoc-3.9/bin/pandoc \
README.md \
-o "my-output.pdf" \
--pdf-engine=typst \
-V papersize=a4 \
-V fontsize=10pt \
-V margin-left=2.5cm \
-V margin-right=2.5cm \
-V margin-top=2.5cm \
-V margin-bottom=2.5cm \
-V title="My title" \
-V lang=de \
--include-in-header=typst-header.typ \
--toc --toc-depth=3 2>&1
That's the typst-header.typ #set figure(placement: none)
#show figure: set block(breakable: true)
#set table(
inset: 5pt,
stroke: 0.5pt + rgb("#cccccc"),
)
#show table: set text(size: 8pt)
#show table.cell: it => {
set text(hyphenate: true)
show raw: set text(size: 6.5pt)
it
}
#set par(justify: true)
#show heading: it => block(sticky: true, it)