knitr Rnw乳胶:如何在横向模式下获取全页宽度的图形和标题 [英] knitr Rnw latex: how to obtain a figure and caption in landscape mode that's full page width

查看:110
本文介绍了knitr Rnw乳胶:如何在横向模式下获取全页宽度的图形和标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在风景模式下制作整页图形以及标题.如果我省略了"fig.cap ='Caption Trial'",则下面的Rnw文件可以正常工作,但是如果使用了字幕,则不能.任何帮助将不胜感激.

I am trying to produce a full-page figure along with a caption in landscape mode. The Rnw file below works fine if I omit "fig.cap='Caption Trial'", but not if the caption is used. Any help would be greatly appreciated.

\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}

这篇关于knitr Rnw乳胶:如何在横向模式下获取全页宽度的图形和标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆