#!/usr/bin/env bash
# ARG WRANGLING
if [[ $# -eq 0 ]] ; then
    echo 'Usage: `topdf somefile.md`'
    exit 0
fi
INFILE=$1
NAME=${1%.md}
PDFNAME=${NAME}.pdf
# PROCESSING
sed -e 's/––/---/g' ${INFILE} | # Add any other operations after this...
pandoc --from=markdown --latex-engine=xelatex -o ${PDFNAME} # ...and before this.
# CONVENIENCE
echo "Done: created" $PDFNAME
open $PDFNAME

#!/usr/bin/env bash
# ARG WRANGLING
if [[ $# -eq 0 ]] ; then
    echo 'Usage: `topdf somefile.md`'
    exit 0
fi
INFILE=$1
NAME=${1%.md}
PDFNAME=${NAME}.pdf
# PROCESSING
sed -e 's/––/---/g' ${INFILE} | # Better em-dashes
sed -e 's/<br>/\\\newline /g' | # Support <br> for line breaks. Add any other operations after this...
pandoc --from=markdown --latex-engine=xelatex -o ${PDFNAME} --variable urlcolor=NavyBlue # ...and before this.
# CONVENIENCE
echo "Done: created" $PDFNAME
open $PDFNAME

Add support for <br> for newlines in lists
Add support for <br> for newlines in lists
