josephwright / beamer

A LaTeX class for producing presentations and slides
Other
1.35k stars 139 forks source link

Under `\includeonlyframes`, frames without a label are still typeset (only to be discarded) #866

Closed amonakov closed 5 months ago

amonakov commented 7 months ago

Consider this minimal repro:

\documentclass{beamer}

\begin{document}
\includeonlyframes{good}
\begin{frame}[label=bad]
        1111111111111111111111111111111111111111111111111111111111111111
\end{frame}
\begin{frame}
        2222222222222222222222222222222222222222222222222222222222222222
\end{frame}
\end{document}

Each of the frames has an overfull hbox if typeset normally. Compiling this source yields an "overfull hbox" warning once, for the second slide. It seems the slide with a label is somehow properly skipped, but the slide without a label at all is typeset and then discarded?

This is a problem when preparing a presentation with slides that compile slowly: even when using \includeonlyframes, they are still compiled, unless you label all slides (and then you get "multiply-defined label" warnings if using the same label for each).

amonakov commented 7 months ago

Testing how mode specification works for suppressing frames reveals a similar issue:

\documentclass{beamer}

\begin{document}
\begin{frame}<all:0>[label=bad]
        1111111111111111111111111111111111111111111111111111111111111111
\end{frame}
\begin{frame}<all:0>
        2222222222222222222222222222222222222222222222222222222222222222
\end{frame}
\end{document}

This yields "overfull hbox" for the unlabeled slide only.