假设我有一个像我这样的R chuck:
\documentclass[xcolor=x11names,compress]{beamer}
\begin{frame}[fragile]{Visualization}
<<echo=FALSE, results="asis", fig.keep="all", tidy=TRUE>>=
library(knitr)
for (i in 1:100){
plot(rnorm(100))
}
@
\end{frame}
\end{document}
我的问题是如何在每张幻灯片中显示100个图而不是保留在一张幻灯片中?
答案 0 :(得分:3)
如果您提供“allowframebreaks”选项,Beamer可以拆分幻灯片。对于有多少页面似乎存在一些限制,但这有效:
\documentclass[xcolor=x11names,compress]{beamer}
\begin{document}
\begin{frame}[allowframebreaks]{Visualization}
<<echo=FALSE, fig.height=4>>=
for (i in 1:10){
plot(rnorm(100))
}
@
\end{frame}
\end{document}