Skip to content

Instantly share code, notes, and snippets.

@drewkerrigan
Created November 21, 2018 16:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save drewkerrigan/2f28c187599bf774f90da892b1e808ce to your computer and use it in GitHub Desktop.
Save drewkerrigan/2f28c187599bf774f90da892b1e808ce to your computer and use it in GitHub Desktop.
Pandoc, Mactex, Markdown to PDF

I've had to install and configure these things a few times, and I always forget how to do it, so here it is for posterity:

  • Update brew and install pandoc:

    brew update
    brew install pandoc
    
  • Install mactex from https://www.tug.org/mactex/

  • Update $PATH

    # add the following to .zshrc or wherever you define your $PATH
    export PATH="$PATH:/usr/local/texlive/2018/bin/x86_64-darwin"
    

    It's also possible that pdflatex is in a slightly different path depending on the version of MacLaTeX.

  • Create PDF from Markdown

    pandoc doc.md -o doc.pdf
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment