我在讲座中使用了一个单内容解决方案,其中包含两个主要文件,即 documentclasses beamer/scrbook+beamerarticle。现在我想使用该命令,\includeonlylecture
但它似乎不起作用。这里有一个最简单的例子:
\documentclass{scrbook}
\usepackage{beamerarticle}
\includeonlylecture{v2}
\begin{document}
\lecture{V1}{v1}
\begin{frame}
\frametitle{Heading V1}
\end{frame}
\lecture{V2}{v2}
\begin{frame}
\frametitle{Heading V2}
\end{frame}
\end{document}
输出仍然是
答案1
\includeonly
如果您处于文章模式,则可以使用:
%\documentclass{beamer}
\documentclass{scrbook}
\usepackage{beamerarticle}
\begin{filecontents*}[overwrite]{v1.tex}
\lecture{V1}{v1}
\begin{frame}
\frametitle{Heading V1}
\end{frame}
\end{filecontents*}
\begin{filecontents*}[overwrite]{v2.tex}
\lecture{V2}{v2}
\begin{frame}
\frametitle{Heading V2}
\end{frame}
\end{filecontents*}
\mode<article>{\newcommand{\arnelikestoplaywithmodes}[1]{\includeonly{#1}}}
\mode<beamer>{\newcommand{\arnelikestoplaywithmodes}[1]{\includeonlylecture{#1}}}
\arnelikestoplaywithmodes{v2}
\begin{document}
\include{v1}
\include{v2}
\end{document}