Allowframebreaks 导致 beamer miniframes 行为异常

Allowframebreaks 导致 beamer miniframes 行为异常

以下最小工作示例应足以说明我在使用 miniframe 和 framebreaks 时遇到的问题,即在 miniframe 项目符号中,跨越多个帧的帧全部被同时突出显示为活动帧。我希望只有 miniframe 项目符号的活动帧被标记为活动帧。

\documentclass[compress]{beamer}

\usetheme{Singapore}

\beamertemplatenavigationsymbolsempty

%http://tex.stackexchange.com/a/66626/9115
\usepackage{etoolbox}
\makeatletter
\patchcmd{\slideentry}{\ifnum#2>0}{\ifnum2>0}{}{\@error{unable to patch}}% replace the subsection number test with a test that always returns true
\makeatother

\begin{document}

\section{Introduction}

\begin{frame}[allowframebreaks]{Introduction}
\begin{enumerate}
\item One
\item Two
\item Three
\item Four
\item Five
\item Six
\item Seven
\item Eight
\item Nine
\item Ten
\item Eleven
\item Twelve
\item Thirteen % Break occurs after this item
\item Fourteen
\item Fifteen
\item Sixteen
\item Seventeen
\item Eighteen
\end{enumerate}
\end{frame}

\end{document}

损坏枚举的两个框架均被标记为活动

答案1

(请注意,原始错误已在这是对问题 2072 的回答这个问题在 Beamer 上游已经得到解决,因此现在的解决方法弊大于利。我已将其从下方删除。)

按照排列反模式进行编程,下面的方法似乎有效(两个额外的补丁,将\c@subsectionslide对于损坏的框架来说不是唯一的更改\c@framenumber为):

\documentclass[compress]{beamer}

\usetheme{Singapore}

\beamertemplatenavigationsymbolsempty

\usepackage{etoolbox}
\makeatletter
% use frame numbers instead of subsection slide numbers so that frames broken over slides get separate circles
\patchcmd{\slideentry}{\c@subsectionslide}{\c@framenumber}{}{\errmessage{unable to patch \string\slideentry}}
\patchcmd{\beamer@writeslidentry}{\c@subsectionslide}{\c@framenumber}{}{\errmessage{unable to patch \string\beamer@writeslideentry}}
\makeatother

\begin{document}

\section{Introduction}

\begin{frame}[allowframebreaks]{Introduction}
\begin{enumerate}
\item One
\item Two
\item Three
\item Four
\item Five
\item Six
\item Seven
\item Eight
\item Nine
\item Ten
\item Eleven
\item Twelve
\item Thirteen % Break occurs after this item
\item Fourteen
\item Fifteen
\item Sixteen
\item Seventeen
\item Eighteen
\end{enumerate}
\end{frame}

\begin{frame}{Test} Testing \end{frame}

\section{Conclusion}
\begin{frame}{Another test} Lorem ipsum \end{frame}

\end{document}

相关内容