#!/bin/bash [[ -z $1 ]] && echo argument missing && exit 1 echo -n ${1%\.md}.pdf... pandoc \ --latex-engine=xelatex -V geometry:margin=1in -V papersize:a4paper \ --listings -H ~/preamble.tex \ $1 -o ${1%\.md}.tex && echo -n tex... pandoc \ --latex-engine=xelatex -V geometry:margin=1in -V papersize:a4paper \ --listings -H ~/preamble.tex \ $1 -o ${1%\.md}.pdf && echo pdf