Changed markdown2pdf to halt-on-error.

Before, we used -interaction=batchmode, which just ignored errors.
This leads to bad results--users should know when something goes wrong.
This commit is contained in:
John MacFarlane 2011-07-20 08:13:00 -07:00
parent 71736869bb
commit 1951c2349f

View file

@ -48,7 +48,7 @@ runPandoc inputsAndArgs output = do
runLatexRaw :: String -> FilePath -> IO (Either (Either String String) FilePath)
runLatexRaw latexProgram file = do
-- we ignore the ExitCode because pdflatex always fails the first time
run latexProgram ["-interaction=batchmode", "-output-directory",
run latexProgram ["-halt-on-error", "-output-directory",
takeDirectory file, dropExtension file] >> return ()
let pdfFile = replaceExtension file "pdf"
let logFile = replaceExtension file "log"