Skip to content

Instantly share code, notes, and snippets.

@epilys
Last active March 23, 2023 14:12
Show Gist options
  • Save epilys/90c91a2c1de6d36f9cd654200b6aab47 to your computer and use it in GitHub Desktop.
Save epilys/90c91a2c1de6d36f9cd654200b6aab47 to your computer and use it in GitHub Desktop.
Compile markdown files with pandoc in shebang. Excute .md file as a script: "./Document.md". You might need to set the executable bit with chmod u+x Document.md
#!/usr/bin/env -S bash -c 'pandoc --from markdown -V links-as-notes -V boxlinks -V pagestyle:empty --pdf-engine xelatex -V mainfont:'FiraSans-Medium' -V geometry:a6paper -t pdf -o "$(basename ${0} md)pdf" <(tail -n +2 "${0}")'
Dear reader,
This is a letter addressed to you, written in Markdown.
Author Name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment