有没有办法为 R 使用 KnitR 生成的图形指定标题的位置?我希望有一些功能等同于 xtable()
的caption.placement
选项。
下面提供了一个最小的工作示例。
\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}
最佳答案
对于所有人物,这可能最好以 latex 样式处理,但您可以使用钩子(Hook)自定义人物。 fig.env
chunk 选项控制 block 插入的环境。您可以随时制作自己的 figure
版本使用您自己的格式。
关于r - 如何控制 KnitR 中人物的标题位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15030517/