禁用单个框架的 \resetcounteronoverlays

禁用单个框架的 \resetcounteronoverlays

我在 beamer 演示文稿的序言中使用命令\resetcounteroverlays{exx},以避免示例编号在一帧内发生变化。(我使用 -packagegb4e来编号示例句子。)但是我想撤消此操作(即增加示例编号)以进行单帧显示。

我该如何做到这一点,最好不要手动指定每个示例编号?

以下是一个 mwe:

\documentclass[12pt]{beamer}
\usepackage{gb4e}

\resetcounteronoverlays{exx} % I do not want to delete this globally, just for the MWE-frame

\begin{document} 
\begin{frame}[t]
    \begin{itemize}
        \item<1-> \textbf{Point 1} \only<1-2>{(Temporary Info)}
            \only<2>{
            \begin{exe}
                \ex \begin{xlist}
                        \ex {This should be 1a}
                        \ex {This should be 1b}
                    \end{xlist}
                \ex \begin{xlist} 
                        \ex {This should be 2a}
                        \ex {This should be 2b}
                    \end{xlist}
            \end{exe}}
            \begin{itemize}
                \item<3-> \textbf{Point 2} \only<3-4>{(Temporary Info)}
                    \only<4>{
                    \begin{exe}
                        \ex \begin{xlist}
                            \ex {This should be 3a}
                            \ex {This should be 3b}
                        \end{xlist}
                        \ex \begin{xlist} 
                            \ex {This should be 4a}
                            \ex {This should be 4b}
                        \end{xlist}
                    \end{exe} }
            \end{itemize}
        \item<5-> \textbf{Point 3} \only<5-7>{(Temporary Info)}
            \only<6>{
            \begin{exe}
                \ex \begin{xlist}
                    \ex[ ] {This should be 5a}
                    \ex[ ] {This should be 5b}
                    \ex[*] {This should be 5c}
                    \ex[*] {This should be 5d}
                \end{xlist}
            \end{exe}}
            \begin{itemize}
                \item<7-> \textbf{Point 4}
            \end{itemize}
        \item<8-> \textbf{Point 5}
            \only<9,10>{
            \begin{exe}
                \ex \begin{xlist}
                        \ex {This should be 6a}
                        \ex This should be 6b
                        \ex This should be 6c
                    \end{xlist}
                \ex \begin{xlist}
                        \ex {This should be 7a}
                        \ex This should be 7b
                    \end{xlist}
            \end{exe}}
            \only<10>{
            \begin{itemize}
                \item Elaboration on Point 5
            \end{itemize}}
        \item<11-> \textbf{Point 6}
            \only<12>{
            \begin{exe}
                \ex \begin{xlist}
                        \ex {This should be 8a}
                        \ex {This should be 8b}
                    \end{xlist}
            \end{exe}}
            \begin{itemize}
                \item<13-14> Elaboration on Point 6:
                    \begin{exe}
                        \ex {This should be 9a}
                        \ex {This should be 9b}
                    \end{exe}
                \item<14>[$\rightarrow$] Remarks on Point 6.
            \end{itemize}
    \end{itemize}

    \only<15>{} % I need this in order to have a concluding final slide with all subpoints folded in. (At least I think I do.)

\end{frame}
\end{document}

这将产生一个包含 15 张幻灯片的单帧画面。

答案1

即使不使用gb4e包,您也可以通过恢复第二层枚举的计数器来实现类似的编号方案。

\documentclass[12pt]{beamer}

\newcounter{myenumi}

\begin{document}

\begin{frame}[t]
  \setcounter{myenumi}{0}
  \begin{itemize}
    \item<1-> \textbf{Point 1} \only<1-2>{(Temporary Info)}
      \begin{onlyenv}<2>
        \begin{enumerate}[(1)]
          \setcounter{enumi}{\value{myenumi}}
          \item \begin{enumerate}[a.]
                  \item This should be 1a
                  \item This should be 1b
                \end{enumerate}
          \item \begin{enumerate}[a.]
                  \item This should be 2a
                  \item This should be 2b
                \end{enumerate}
          \setcounter{myenumi}{\value{enumi}}
        \end{enumerate}
      \end{onlyenv}
    \item<3-> \textbf{Point 2} \only<3-4>{(Temporary Info)}
      \begin{onlyenv}<4>
        \begin{enumerate}[(1)]
          \setcounter{enumi}{\value{myenumi}}
          \item \begin{enumerate}[a.]
                  \item This should be 3a
                  \item This should be 3b
                \end{enumerate}
          \item \begin{enumerate}[a.]
                  \item This should be 4a
                  \item This should be 4b
                \end{enumerate}
          \setcounter{myenumi}{\value{enumi}}
        \end{enumerate}
      \end{onlyenv}  
    \end{itemize}

\end{frame}

\end{document}

相关内容