Now make will do everything, no need of md2pdf.sh make Lesson-1 make Lesson-2
use shell scripts md2pdf.sh
to generate Lesson-x.pdf automatically
./md2pdf.sh Lesson-1
then Lesson-1.pdf will be under slides/
Very good introduction started from here http://jeromyanglim.blogspot.com/2012/07/beamer-pandoc-markdown.html
pandoc -t beamer --slide-level 3 Lesson-1.md -o talk.tex
xelatex main.tex
main.tex
will include talk.tex automatically, main.tex defines the theme
slide-level 3
means ###