定義beamerframe關鍵點的beamer框架覆蓋規範

定義beamerframe關鍵點的beamer框架覆蓋規範

如何定義像這樣的投影機覆蓋beamer:0規範beamerframe key?就像是:

\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}

提前謝謝!

答案1

\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}

相關內容