Fix a bug with out_path and tmp figure directory

pull/71/merge
Matti Pastell 2016-12-29 17:58:21 +02:00
parent c5659c03bf
commit f1b42156e1
1 changed files with 4 additions and 2 deletions

View File

@ -28,12 +28,14 @@ function Base.run(doc::WeaveDoc; doctype = :auto, plotlib=:auto,
doctype == :auto && (doctype = detect_doctype(doc.source))
doc.doctype = doctype
doc.format = formats[doctype]
isdir(doc.cwd) || mkpath(doc.cwd)
if contains(doctype, "2pdf") && cache == :off
fig_path = mktempdir(doc.cwd)
fig_path = mktempdir(abspath(doc.cwd))
elseif contains(doctype, "2html")
fig_path = mktempdir(doc.cwd)
fig_path = mktempdir(abspath(doc.cwd))
end
#This is needed for latex and should work on all output formats
is_windows() && (fig_path = replace(fig_path, "\\", "/"))