I write my homework in markdown and my professors usually want pdfs. Here’s what I do
# Install homebrew (see below) brew install pandoc brew cask install basictex
This is the main macOS package manager. If you do any programming on macOS you’ll need it eventually. Follow the instruction on their homepage to install.
“If you need to convert files from one markup format into another, pandoc is your swiss-army knife…”
basictex provides pdflatex, a lib needed by pandoc to convert markdown -> pdf
pandoc -f markdown-implicit_figures -t pdf file.md > file.pdf
-f means from
You can also just use markdown but your images will be moved around like in latex which I generally don’t want.
-t means to
> redirect output to file.pdf