#!/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 pdfjoin ./pdf/README.pdf ./pdf/semaine*.pdf -o journal_de_bord_908144032.pdf