Created
November 6, 2017 17:49
-
-
Save KrashLeviathan/89dd200d53d1a12f1a1ab723e54e3fba to your computer and use it in GitHub Desktop.
Simple Markdown to PDF Command
This file contains hidden or 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
#!/bin/bash | |
# I actually just added this as a function in my .bashrc, but you | |
# could just "chmod +x" this script and drop it in a bin folder in | |
# a local $PATH directory such as "/usr/local/bin" | |
# Requires pandoc be installed. https://pandoc.org/ | |
# Might also require latex to be installed, but I'm not sure about that one. | |
mdBase=`basename -s ".md" "${1}"` | |
pandoc "${1}" -f markdown -s -t latex -o "${mdBase}.pdf" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment