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
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)))
}
})
The text was updated successfully, but these errors were encountered:
Another hook found in knitr example
https://github.com/yihui/knitr-examples/blob/master/047-tikz-png.Rnw
The text was updated successfully, but these errors were encountered: