3D-printed-parametric-gas-mask/manual/convert-to-pdf.sh

13 lines
348 B
Bash
Raw Permalink Normal View History

2025-01-19 15:26:40 +00:00
#!/bin/bash
files=$(ls *.md)
OIFS="$IFS"
IFS=$'\n'
for file in $files; do
tmpfile=.$(basename "${file%.*}").html
outfile=$(basename "${file%.*}").pdf
pandoc -f markdown+emoji -t html -o $tmpfile $file
pandoc -f html -t pdf -o $outfile $tmpfile --pdf-engine=lualatex -V geometry:margin=2.5cm -V mainfont="DejaVu Sans"
done
IFS=$OIFS