mirror of https://github.com/mpastell/Weave.jl
Clean temp directories
parent
41dd6a9e37
commit
a9120129ab
|
@ -135,7 +135,7 @@ function weave(source ; doctype = :auto,
|
||||||
rm(mdname)
|
rm(mdname)
|
||||||
elseif doc.doctype == "md2pdf"
|
elseif doc.doctype == "md2pdf"
|
||||||
success = run_latex(doc, outname, latex_cmd)
|
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
|
success || return
|
||||||
outname = get_outname(out_path, doc, ext = "pdf")
|
outname = get_outname(out_path, doc, ext = "pdf")
|
||||||
end
|
end
|
||||||
|
|
|
@ -128,9 +128,9 @@ function run_latex(doc::WeaveDoc, outname, latex_cmd = "xelatex")
|
||||||
catch e
|
catch e
|
||||||
@info(e)
|
@info(e)
|
||||||
@warn("Error converting document to pdf. Try running with md2tex format and using latex manually")
|
@warn("Error converting document to pdf. Try running with md2tex format and using latex manually")
|
||||||
cd(old_wd)
|
|
||||||
rm(xname)
|
rm(xname)
|
||||||
rm(textmp, recursive=true)
|
rm(textmp, recursive=true)
|
||||||
|
cd(old_wd)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue