Use the writeLaTeX API to compile tex files to pdf