Skip to content

Instantly share code, notes, and snippets.

@ed-flanagan
Created September 19, 2015 04:15
Show Gist options
  • Save ed-flanagan/dda1c13be8026b0fea55 to your computer and use it in GitHub Desktop.
Save ed-flanagan/dda1c13be8026b0fea55 to your computer and use it in GitHub Desktop.
Naive script to have pandoc convert markdown file to tex
#!/usr/bin/env bash
if [ -z "$1" ]; then
echo "usage:"
echo " pantex <filename>"
exit 1
fi
directory=$(dirname "$1")
filename=$(basename "$1")
extension="${filename##*.}"
filename="${filename%.*}"
pandoc "$1" -f markdown -t latex --smart -s -o "${directory}/${filename}".tex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment