PDF from Markdown

less than 1 minute read

I like to use markdown for my course syllabus, since it’s quick and easy, and allows easy use of git to make and track updates.

My department requires a PDF version of the syllabus, so I discovered this handy way to convert from github-flavored markdown (at least tables are supported):

pandoc -t latex -o README.pdf README.md

It first converts the markdown to latex, then produces the PDF.

(Update 2020-04-05) This will change the font (to something in /usr/local/texlive/*/texmf-dist/source/fonts/) and set the margins to be smaller.

pandoc -o README.pdf README.md --variable=fontfamily:arev -V geometry:margin=1in