beamer add tag
kilsen (imported from SE)
How do I define a beamer overlay specification like `beamer:0` as `beamerframe key`? Something like:

```
\documentclass{beamer}

\makeatletter
\define@key{beamerframe}{hide}[true]{%

	%<--- definition of the beamer:0 switch??
}
\makeatother

\begin{document}

\begin{frame}[hide] %<-- has now overlay specification beamer:0

example text

\end{frame}

\end{document}
```

Thx in advance!
Top Answer
samcarter
That's an interesting problem! You could patch the frame environment like this to force the `beamer:0` option for the hidden frame.

Caveat: this will throw away any other mode specifications you might pass to the hidden frames.

```
\documentclass{beamer}

\usepackage{xpatch}

\makeatletter
\newif\ifbeamer@hide
\define@key{beamerframe}{hide}[true]{\beamer@hidetrue}
\BeforeBeginEnvironment{frame}{\beamer@hidefalse}
\xpatchcmd{\beamer@@@@frame}{%
  \gdef\beamer@whichframes{#1}%
}{
  \ifbeamer@hide
    \gdef\beamer@whichframes{beamer:0}%
  \else
    \gdef\beamer@whichframes{#1}%
  \fi
}{}{}
\makeatother

\begin{document}

\begin{frame}
content...
\end{frame}

\begin{frame}[hide] %<-- has now overlay specification beamer:0

example text

\end{frame}



\begin{frame}
content...s
\end{frame}

\end{document}
```

This room is for discussion about this question.

Once logged in you can direct comments to any contributor here.

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.