Last active
August 29, 2015 13:57
-
-
Save arvearve/9622831 to your computer and use it in GitHub Desktop.
Pandoc markdown -> pdf macro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put in ~/.bashrc or similar | |
# requires pandoc and xelatex | |
# | |
# usage: | |
# $ mdpdf myfile.md | |
# outputs myfile.pdf in same directory | |
# | |
# Additional flags are passed: | |
# $ mdpdf myfile.md --toc | |
# outputs myfile.pdf with table of contents. | |
function _mdpdf(){ | |
pandoc -o ${1%.*}.pdf $1 --latex-engine=xelatex --gladtex -V geometry:margin=1in "${@:2}" | |
} | |
alias mdpdf=_mdpdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment