Skip to content

Instantly share code, notes, and snippets.

@brianephraim
Forked from schmurfy/gist:3199254
Last active December 19, 2015 17:09
Show Gist options
  • Save brianephraim/5989445 to your computer and use it in GitHub Desktop.
Save brianephraim/5989445 to your computer and use it in GitHub Desktop.
Convert markdown to pdf.
# Create a test1.md file. CD to its folder
# Install Xcode. In Xcode, go to preferences > Downloads. Install "Command Line Tools"
# Install MacTex: http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg
$ sudo chown -R `whoami` /usr/local/texlive
$ tlmgr update --self
$ tlmgr install ucs
$ tlmgr install etoolbox
# Install pandoc view homebrew
$ brew install haskell-platform
$ cabal install pandoc
# add to your path "~/.cabal/bin"
# Now to convert a document
$ pandoc -V geometry:margin=1in test1.md -s -o test1.pdf
# There should be a pdf in the folder now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment