I\'m currently using Kramdown to generate HTML from Markdown in Ruby. I know that I can generate a latex file using kramdown and convert it to pdf usaing a command line util
You can use https://github.com/walle/gimli
I made it just for this purpose. Though, I use textile. But gimli supports all formats supported by GitHub-Markup.