logoalt Hacker News

aleks_me2yesterday at 11:06 PM0 repliesview on HN

you can tell pandoc to use typst as pdf-engine.

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)