converting markdown to pdf.

tl;dr: thanks pandoc and weasyprint!


i used to use obsidian, and exporting markdown files to PDFs was pretty easy. but since i no longer use obsidian (because electron), i had to find a workaround.

luckily pandoc exists, but for conversion to PDF, it uses pdflatex by default. i didn’t want to install anything latex in my system, so i decided to use weasyprint . here’s the whole command:

pandoc input.md\
    --pdf-engine=weasyprint\
    --css=style.css\
    --embed-resources --standalone\
    -o output.pdf