Discussion:
Hiding frames
mpf01
2009-02-14 02:05:28 UTC
Permalink
I'm looking for a convenient way of hiding slides---i.e., "frames"---from a
Beamer document. For example, I sometimes decide that my talk is too long
and wish to hide a few slides, but don't want to remove the code for that
slide.

The obvious way of doing this is to simply comment out the latex code that
corresponds to the particular frame that needs to be hidden. But I'm
wondering if there's something more convenient.

In particular, I would be happy if there were an additional frame option,
say "hide", that could be passed to the frame environment that would cause
the frame not to be created. For example,

\begin{frame}[hide]{Slide title}
This slide will be hidden.
\end{frame}

Another possibility is a command analogous to \includeonlyframes that
instead hides the listed frames, e.g.,


\excludeframes{example1,example2}
\frame[label=example1]
{This frame will be included. }
\frame[label=example2]
{This frame will not be included. }
\frame{This frame will not be included.}
\againframe{example1} % Will be included


Can someone suggest how I might implement one of these solutions, or offer
an alternative?

Many thanks!
Michael
--
View this message in context: http://www.nabble.com/Hiding-frames-tp22008369p22008369.html
Sent from the latex-beamer-users mailing list archive at Nabble.com.
Bill Gatliff
2009-02-14 03:46:44 UTC
Permalink
Post by mpf01
I'm looking for a convenient way of hiding slides---i.e., "frames"---from a
Beamer document. For example, I sometimes decide that my talk is too long
and wish to hide a few slides, but don't want to remove the code for that
slide.
Both the options you propose sound really hard to deal with as a
presentation gets large. Specifically, you have to touch each frame
once to hide it--- and then again to un-hide it. I prefer something
less invasive and error-prone.

LaTeX has an ifthen package, but it's been a really long time since I've
used it so I won't provide an example---Google and CTAN are your friends
here. You could use its environment around frames that you might want
to omit, and then "flip the switch" at rendering time if you decide you
actually want to leave them out. Later on, you merely re-render without
the switch flipped to get the full-length results back.

There are some examples here:

http://www.devdaily.com/blog/post/latex/two-simple-examples-using-latex-ifthen-package/

The package itself is documented here:

http://www.ctan.org/tex-archive/help/Catalogue/entries/ifthen.html

Maybe you could use that instead?


b.g.
--
Bill Gatliff
***@billgatliff.com
Jean-Pierre Chrétien
2009-02-15 17:26:28 UTC
Permalink
Post by mpf01
I'm looking for a convenient way of hiding slides---i.e., "frames"---from a
Beamer document. For example, I sometimes decide that my talk is too long
and wish to hide a few slides, but don't want to remove the code for that
slide.
The obvious way of doing this is to simply comment out the latex code that
corresponds to the particular frame that needs to be hidden. But I'm
wondering if there's something more convenient.
In particular, I would be happy if there were an additional frame option,
say "hide", that could be passed to the frame environment that would cause
the frame not to be created. For example,
\begin{frame}[hide]{Slide title}
This slide will be hidden.
\end{frame}
Another possibility is a command analogous to \includeonlyframes that
instead hides the listed frames, e.g.,
\excludeframes{example1,example2}
\frame[label=example1]
{This frame will be included. }
\frame[label=example2]
{This frame will not be included. }
\frame{This frame will not be included.}
\againframe{example1} % Will be included
Can someone suggest how I might implement one of these solutions, or offer
an alternative?
Maybe the "branch" functionality of LyX is what you are looking for ?
It allows you to include conditionnaly parts of a document, like
questions and answers for exercises.

LyX has got layouts for beamer, I did quite a lot of presentations
with it.
http://www.lyx.org/

HTH
--
Jean-Pierre
Jon Engel
2009-02-16 15:38:05 UTC
Permalink
How about something like the following?

In the preamble:

\usepackage{ifthen}
\newboolean{includethis}
\setboolean{includethis}{false}
\newcommand{\ifinclude}[1]{\ifthenelse{\boolean{includethis}}{#1}{}}

Then if you do

\ifinclude{%
\begin{frame}{Slide title}
This slide will be hidden.
\end{frame}
}

the frame will be included only if you change the setting of the boolean
variable includethis to 'true' in the preamble.
--
View this message in context: http://www.nabble.com/Hiding-frames-tp22008369p22039532.html
Sent from the latex-beamer-users mailing list archive at Nabble.com.
Loading...