JuliaTeX / TikzPictures.jl

Creating PGF/TikZ pictures and saving them in various formats
Other
89 stars 28 forks source link

Error opening file when saving PDF on Windows #42

Closed mykelk closed 6 years ago

mykelk commented 6 years ago

Example:

tp = TikzPicture("\\draw (0,0) -- (10,10);\n\\draw (10,0) -- (0,10);\n\\node at (5,5) {tikz \$\\sqrt{\\pi}\$};", options="scale=0.25", preamble="")
save(PDF("testPic"), tp)

Error:

SystemError: opening file .\jl_465.tmp/testPic.log: No such file or directory

Stacktrace:
 [1] #systemerror#39(::Nothing, ::Function, ::String, ::Bool) at .\error.jl:106
 [2] systemerror at .\error.jl:106 [inlined]
 [3] #open#293(::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Function, ::String) at .\iostream.jl:283
 [4] open at .\iostream.jl:275 [inlined]
 [5] #open#294(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::getfield(Base, Symbol("##258#259")){String}, ::String) at .\iostream.jl:367
 [6] open at .\iostream.jl:367 [inlined]
 [7] read at .\io.jl:297 [inlined]
 [8] save(::PDF, ::TikzPicture) at C:\Users\mykel\.julia\packages\TikzPictures\xOhrp\src\TikzPictures.jl:229
 [9] top-level scope at In[4]:2
mykelk commented 6 years ago

Fixed with f2f261bfc5fe4a91c8d78306de6dfb22965d65e6

mykelk commented 6 years ago

There is also an issue with saving as SVG. The fix is likely similar.