You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know if it is useful or not as I don't do a lot of Latex. I let you decide.
knit_hooks$set(tikz2png=function(before, options, envir) {
# use this hook only for dev='tikz' and externalized tikz graphicsif (before||options$dev!='tikz'||!options$external||options$fig.num==0) return()
figs=knitr:::all_figs(options, ext='pdf') # all figure names# note the tikz2png option is the extra parameters passed to 'convert'for (figinfigs) {
system(sprintf('convert %s %s %s', options$tikz2png, fig, sub('\\.pdf$', '.png', fig)))
}
})
I might put this in the category of "could be useful, but probably not for many people". @yihui wrote the original function so has the strongest opinion, so I will leave it open until he reviews it.
I see you have linked this to the knitrhooks so will probably let it rest there for now.
I don't know if it is useful or not as I don't do a lot of Latex. I let you decide.
https://github.com/yihui/knitr-examples/blob/master/047-tikz-png.Rnw
The text was updated successfully, but these errors were encountered: