麻烦在knitr中使用fig.env?
我无法让fig.env在knitr中工作。 这里有一个简单的例子:
documentclass[12pt]{article}
usepackage{rotfloat}
begin{document}
<<setup, include=F, cache=F>>=
opts_chunk$set(comment=NA,fig.path=file.path(getwd(),'figure/minimal-'),tidy=F, fig.align='center',size='footnotesize')
options(replace.assign=TRUE, width=60)
@
Hoping for a sideways figure!
<<FIGURE, fig.env='sidewaysfigure',fig.width=10, fig.height=5>>=
plot(1:10,1:10)
@
end{document}
编织后,我得到的数字的输出.tex文件
{centering includegraphics[width=maxwidth]{D:/R/figure/minimal-FIGURE}
}
任何可能出错的建议?
sessionInfo()R版本3.0.0(2013-04-03)平台:x86_64-w64-mingw32 / x64(64位)
您需要fig.cap
选项来处理与figure
环境相关的所有工作,例如
<<FIGURE, fig.cap='A boring figure.', fig.env='sidewaysfigure', fig.width=10, fig.height=5>>=
plot(1:10,1:10)
@
链接地址: http://www.djcxy.com/p/77271.html
上一篇: Trouble with fig.env in knitr?
下一篇: ROauth on Windows using R, Invalid response after authorization