Markdown to PDF with Pandoc

install

get the Pandoc and friends,

apt install pandoc lmodern texlive-latex-base texlive-fonts-recommended pandoc-citeproc apt-get install texlive-xetex

helper scripts

script for PDFs,

vi pandoc

!/bin/bash
[[ -z $1 ]] && echo argument missing && exit 1
echo -n ${1%\.md}.pdf...
pandoc --latex-engine=xelatex -V geometry:margin=1in -V papersize:a4paper -o ${1%\.md}.pdf $1 && echo done
#-f markdown+fancy_lists
#--toc --listings
#-t context

chmod +x pandoc

for beamer presentations,

vi preamble.tex

\setbeamercolor{normal text}{fg=white,bg=black!90}
\setbeamercolor*{structure}{fg=blue!33!white}
\setbeamercolor{alerted text}{use=structure,fg=structure.fg}
\setbeamercolor*{palette primary}{use=structure,fg=structure.fg}
\setbeamercolor*{palette secondary}{use=structure,fg=structure.fg!95!black}
\setbeamercolor*{palette tertiary}{use=structure,fg=structure.fg!90!black}
\setbeamercolor*{palette quaternary}{use=structure,fg=structure.fg!95!black,bg=black!80}
\setbeamercolor*{framesubtitle}{fg=white}

vi pandocslides

#!/bin/bash
[[ -z $1 ]] && echo argument missing && exit 1
echo -n ${1%\.md}.pdf...
pandoc --latex-engine=xelatex -t beamer -H ~/path/preamble.tex $1 -o ${1%\.md}.pdf && echo done
#--toc --listings --slide-level=3

chmod +x pandocslides

additional

and eventually the enscript helper for printing text,

apt install enscript

note. not using those:

#good but redundant with Ext -- MarkdownHighlighting
#default styling is white: MarkdownEditing
#this breaks the shift+tab feature to unindent: SmartMarkdown
#SFTP

references