[Tex/LaTex] Using Pandoc to transform Markdown to Beamer Latex Code

beamermarkdownpandoc

According to

http://pandoc.org/demos.html

I see the command for turning an md file into a beamer pdf file.

pandoc -t beamer SLIDES -o example8.pdf

When I change the extension to tex instead of pdf,

pandoc -t beamer SLIDES -o example8.tex

the body of the tex file gets produced but there is no preamble. (No \begin{document}, etc)

Is there a way to get the tex file for beamer with the headings? It's not that big of a deal, but it would be convenient.

Best Answer

Pandoc has you covered! It is set up to produce document "fragments" by default, but there's the -s or --standalone flag, which will give you a whole .tex file. So something like

pandoc -s -t beamer SLIDES -o example8.tex

should do the trick.

Related Question