From cefb669418ec6588963568e702410758f238a8f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartal=20L=C3=A6arsson?= Date: Thu, 22 Oct 2026 21:52:26 +0100 Subject: [PATCH] Update snippets/md-to-pdf.sh --- snippets/md-to-pdf.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/snippets/md-to-pdf.sh b/snippets/md-to-pdf.sh index 94c0a0b..080d6ee 100644 --- a/snippets/md-to-pdf.sh +++ b/snippets/md-to-pdf.sh @@ -1,3 +1,16 @@ +# Convert Markdown files to PDF Pandoc & Typst +So sometimes I have a md file that I just really quickly want to +convert to a PDF file. I usually always have typst and pandoc installed +on my system, so I've just created a small script which I have in `/usr/local/bin/md-to-pdf.sh` ish. +Just a no brainer, write something super fast in md, spit it out as a pdf. +Good yes. + +*Dependencies*: +- pandoc as converter +- typst as pdf creation engine +- tested on fedora and ubuntu + +```bash #!/usr/bin/env bash set -euo pipefail @@ -35,3 +48,4 @@ pandoc "$input" \ -V mainfont="Noto Sans" \ printf '%s\n' "$output" +```