-
-
Save Makova/97bc4a19e92e8829397a5b18b06bef3b to your computer and use it in GitHub Desktop.
small flavored markdown converter to pdf using pandoc
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 | |
#md2pdf: small flavored markdown converter to pdf using pandoc | |
#by demiurgosoft | |
if [ $# -eq 0 ] | |
then echo "Need at least one argument md2pdf [files]"; | |
else | |
for var in "$@" | |
do | |
filename=$(basename "$var") | |
extension="${filename##*.}" | |
filename="${filename%.*}" | |
#add --toc to create a table of contents | |
pandoc $var -f markdown_github -o $filename.pdf -V geometry:margin=1in -V fontsize=14pt | |
done | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment