knitr Rnw Latex:如何在横向模式下获取全页宽度的图形和标题

2024-01-09

我正在尝试以横向模式制作一个整页图和标题。如果我省略“fig.cap='Caption Trial'”,下面的 Rnw 文件可以正常工作,但如果使用了标题,则不行。任何帮助将不胜感激。

\documentclass{article}
\usepackage{fullpage}
\usepackage{pdflscape}
\begin{document}

\begin{landscape}
<<test, out.width='1\\linewidth', fig.width=7, fig.height=4, fig.cap='Caption Trial'>>=
par(mar=c(4, 4, .1, .1)); plot(1:10)
@
\end{landscape}

\end{document}

尝试这个:

\documentclass{article}
\usepackage{fullpage}
\usepackage{pdflscape}
\begin{document}

\begin{landscape}
\begin{figure}
<<test, out.width='1\\linewidth', fig.width=7, fig.height=4>>=
par(mar=c(4, 4, .1, .1)); plot(1:10)
@
\caption{Caption Trial}
\end{figure}
\end{landscape}

\end{document}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

knitr Rnw Latex:如何在横向模式下获取全页宽度的图形和标题 的相关文章

随机推荐