daqana / tikzDevice

A R package for producing graphics output as PGF/TikZ code for use in TeX documents.
https://daqana.github.io/tikzDevice
131 stars 26 forks source link

Always initialize tikzInfo->outColorFileName #200

Closed p00ya closed 4 years ago

p00ya commented 4 years ago

fixes daqana/tikzDevice#199

rstub commented 4 years ago

Thanks for the contribution. It looks good at first glance, but I will need some time to look at this closer. It puzzles me a bit that Tikz_open isn't called in some cases.

p00ya commented 4 years ago

Thanks for the contribution. It looks good at first glance, but I will need some time to look at this closer. It puzzles me a bit that Tikz_open isn't called in some cases.

I can help explain that.

If onefile = FALSE, then TikZ_Open is not called from TikZ_Setup, with comments there explaining that TikZ_NewPage will create the new files. Actually, TikZ_Open is only called as a side-effect of calling TikZ_CheckState from various drawing operations e.g. TikZ_Text (ironically, not TikZ_NewPage). So without actually plotting anything, TikZ_Open never gets called, which seems reasonable other than the cleanup issues.