diff --git a/src/Weave.jl b/src/Weave.jl index da5a260..f01bdab 100644 --- a/src/Weave.jl +++ b/src/Weave.jl @@ -135,7 +135,7 @@ function weave(source ; doctype = :auto, rm(mdname) elseif doc.doctype == "md2pdf" success = run_latex(doc, outname, latex_cmd) - success && rm(doc.fig_path, force = true, recursive = true) + rm(doc.fig_path, force = true, recursive = true) success || return outname = get_outname(out_path, doc, ext = "pdf") end diff --git a/src/pandoc.jl b/src/pandoc.jl index 41c9973..f4fed36 100644 --- a/src/pandoc.jl +++ b/src/pandoc.jl @@ -128,9 +128,9 @@ function run_latex(doc::WeaveDoc, outname, latex_cmd = "xelatex") catch e @info(e) @warn("Error converting document to pdf. Try running with md2tex format and using latex manually") - cd(old_wd) rm(xname) rm(textmp, recursive=true) + cd(old_wd) return false end end