Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to compile .tex files to PDF with 'pandoc'?

Is it possible to compile a .tex file with pandoc?

I'm currently taking my class notes in MultiMarkdown with MacVim. That way, when I get home, I can just mmd2tex and compile the .tex file to PDF using TexShop. It works great but the process is actually quite time consuming.

I'd like to know if there would be a way to achieve virtually the same thing using pandoc from the command line. I tried to convert my original .txt file directly to PDF with pandoc but I'm getting all sort of errors...

Anyone have a solution for this? Or maybe suggesting another workflow for notetaking?

like image 982
Jon LK Avatar asked Jan 28 '15 17:01

Jon LK


1 Answers

If you just want to convert a .tex file to PDF you don't need pandoc, it's better to use a LaTeX processor directly (instead of using pandoc which will call pdflatex in turn, but will pass along only a subset of all LaTeX commands):

pdflatex test.tex

To create a PDF from markdown, pandoc is the right tool. It also uses LaTeX under the hood by default:

pandoc test.md -o test.pdf
like image 139
mb21 Avatar answered Oct 18 '22 13:10

mb21