小编Ser*_*ena的帖子

使用knitr(LaTeX/PDF)的上图

我想在texmaker中使用knitr将标题放在图上方. 我知道这个问题已经被提出,我理解到目前为止建议的解决方案是使用:

\begin{figure} 
\caption{This is a caption above the figure} 
<<a-plot, echo=FALSE>>= 
plot(1) 
@ 
\end{figure} 
Run Code Online (Sandbox Code Playgroud)

但是这样我就无法显示代码(因为echo=FALSE).如果我选择echo=TRUE,我得到的是标题,然后是代码,然后是图表,这也不是我想要的.我想要展示的是代码R,()用该R代码绘制的图表,图表上方的标题.

latex caption texmaker knitr

7
推荐指数
2
解决办法
1736
查看次数

标签 统计

caption ×1

knitr ×1

latex ×1

texmaker ×1