Um bestimmte Vorlesungsfolien aus der Artikelform einer Vorlesung auszuschließen, habe ich folgende Arbeitsstruktur:
\documentclass[11pt,handout]{beamer}
\newif\iflecture
\lecturetrue
% Next three lines for article form of presentation
\lecturefalse
\documentclass[11pt]{article}
\usepackage{beamerarticle}
\iflecture
...frames for just the lecture and not the article form
\fi
verbleibende Frames für beide.
Kann diese Logik auf einen einzelnen Frame erweitert werden?
\begin{frame}
...content for both lecture and article, a problem for example
end article content here
...remaining content just for lecture
\end{frame}
Antwort1
Wenn Sie möchten, dass bestimmtes Material nur angezeigt wird, wenn die Datei als Vorlesung gesetzt ist, mit \lectureture
, dann müssen Sie es nur mit umgeben
\iflecture <lecture only material>...\fi
Ebenso gilt für Material, das nicht für die Vorlesung bestimmt ist:
\iflecture\else <article only material>...\fi
Natürlich können Sie diese auch kombinieren:
\iflecture <lecture only material>
\else <article only material>\fi
Eine weitere nützliche Konstruktion ist, dass Sie verschiedene Optionen an beamer oder an andere Pakete übergeben können, indem Sie verwenden \PassOptionsToClass
. Hier ist ein vollständiges MWE:
\newif\iflecture
\lecturefalse % uncomment if typesetting as an article
%\lecturetrue % uncomment if typesetting as a lecture
\iflecture\else
\PassOptionsToClass{11pt,handout}{beamer}
\fi
\documentclass{beamer}
\begin{document}
\iflecture
\begin{frame}{Lecture only frame}
A framed lecture
\end{frame}
\fi
\begin{frame}
...content for both lecture and article, a problem for example
\iflecture\else article content here\fi
\iflecture ...remaining content just for lecture\fi
\end{frame}
\end{document}