Skip to content

Instantly share code, notes, and snippets.

@KrashLeviathan
Created November 6, 2017 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KrashLeviathan/89dd200d53d1a12f1a1ab723e54e3fba to your computer and use it in GitHub Desktop.
Save KrashLeviathan/89dd200d53d1a12f1a1ab723e54e3fba to your computer and use it in GitHub Desktop.
Simple Markdown to PDF Command
#!/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