Is there a way to specify the placement of captions for figures generated by R using KnitR? I'm hoping that there's something functionally equivalent to xtable()
's caption.placement
option.
A minimal working example is provided below.
\documentclass[12pt, english, oneside]{amsart}
\begin{document}
The caption for Figure \ref{fig:plot} is placed below the figure. Could we place it above, instead?
<<plot, echo=FALSE, fig.cap="Default caption placement is below the figure.">>=
plot(x=0, y=0)
@
\end{document}
This would likely be best to deal with in the latex style for all figures, but you can customize figures with hooks. The fig.env
chunk option controls the environment the block is inserted into. You could always make your own version of figure
with your own formatting.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With