#!/bin/bash for filename in *.md; do pandoc -f markdown+yaml_metadata_block+raw_tex --latex-engine=pdflatex -o "pdf/$(basename "$filename" .md)".pdf $filename done