## this is what happens for a chunk like this
## <<foo-bar-plot, dev=pdf, out.width=.7\\linewidth,
# fig.align=right>>=
hook_plot_tex(c("foo-bar-plot", "pdf"), opts_chunk$merge(list(out.width = ".7\\linewidth",
fig.align = "right")))
## <<bar, dev=tikz>>=
hook_plot_tex(c("bar", "tikz"), opts_chunk$merge(list(dev = "tikz")))
## <<foo, dev=pdf, fig.show=animate, interval=.1>>=
## 5 plots are generated in this chunk
hook_plot_tex(c("foo5", "pdf"), opts_chunk$merge(list(fig.show = "animate",
interval = 0.1, fig.cur = 5, fig.num = 5)))
Run the code above in your browser using DataLab