JuliaTeX / TikzPictures.jl

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

Fix temp directory paths #46

Closed balazsmezei closed 5 years ago

balazsmezei commented 5 years ago

There was a bug when saving a file to a relative path to a subdirectory (e.g save(PDF("figures/tree.pdf"), tp) ). This fixes it the issue and also uses pathjoin() to construct paths instead of manually adding "/".

balazsmezei commented 5 years ago

Also, is there any particular reason why currently the temp directory is created in the working folder? Wouldn't be better to just work in whatever mktempdir() gives back? (e.g. in /tmp/tmpXYZ on linux)?

mykelk commented 5 years ago

Good question. What you suggest might be better.

mykelk commented 5 years ago

This change doesn't give any issues with the Image examples in PGFPlots.jl, right? If it works okay, then I'm fine with merging this. Any thoughts @Shushman ?

Shushman commented 5 years ago

I'll try the branch with PGFPlots tomorrow and merge if it's fine. I think the idea with having the tmpdir in the working directory was to easily access it for debugging the intermediate files?

mykelk commented 5 years ago

That could be. Not sure. I do want to make sure that it is able to handle the external image file that gets generated by PGFPlots.jl. Go ahead an merge this PR if it checks out for you on the PGFPlots documentation.

Shushman commented 5 years ago

PGFPlots notebook examples work fine with this branch.