【问题标题】:knitr Rnw latex: how to obtain a figure and caption in landscape mode that's full page widthknitr Rnw latex:如何在横向模式下获得全页宽度的图形和标题
【发布时间】:2014-05-17 16:15:54
【问题描述】:

我正在尝试在横向模式下生成整页图和标题。如果我省略“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}

【问题讨论】:

    标签: knitr pdflatex rnw


    【解决方案1】:

    试试这个:

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

    【讨论】:

    • 非常感谢 - 这很有帮助!
    • 太棒了。你能接受答案吗?谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-30
    • 2015-10-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多