如何在投影仪演示结束时使所有微帧变暗?

如何在投影仪演示结束时使所有微帧变暗?

在 Beamer 演示中,我喜欢将演讲的第一张和最后几张幻灯片的所有迷你框架调暗(包含介绍、结论、参考资料等的幻灯片;不适合放在演讲的任何特定小节中的内容)。我以前能够通过在每个\section命令后跟一个\stepcounter{subsection}命令来实现这一点,并且\stepcounter{section}在演讲中我希望所有后续幻灯片的迷你框架都变暗时也包含一个命令。这不再有效,我不知道为什么。

梅威瑟:

\documentclass{beamer}

\usetheme[]{Madrid}
\useoutertheme[footline=empty,subsection=false]{miniframes}

\title{an awesome talk}
\author{a froody dude}
\date{\today}

\begin{document}

\begin{frame}[plain]
\titlepage
\end{frame}

\begin{frame}{slide 0}
All miniframes dimmed, as desired.
\end{frame}

\section{section 1}
\stepcounter{subsection}

\begin{frame}{slide 1}
content 1
\end{frame}

\begin{frame}{slide 2}
content 2
\end{frame}

\section{section 2}
\stepcounter{subsection}

\begin{frame}{slide 3}
content 3
\end{frame}

\begin{frame}{slide 4}
content 4
\end{frame}

\section{section 3}
\stepcounter{subsection}

\begin{frame}{slide 5}
shading on miniframes is wrong
\end{frame}

\begin{frame}{slide 6}
shading on miniframes is wrong
\end{frame}

\stepcounter{section} % This command used to result in the desired effect.

\begin{frame}{slide 5}
all miniframes should be dimmed
\end{frame}

\begin{frame}{slide 6}
all miniframes should be dimmed
\end{frame}

\end{document}

这里是我编译上述文档时看到的。由于压缩,上图中很难看清,但幻灯片 7 上的阴影

七

和 8

八

很乱。

我正在运行 Xubuntu 18.04、TexLive 2017。

答案1

好消息是,有了新的投影仪行为,您不再需要它了\stepcounter{subsection}

坏消息是:关闭迷你框架需要一点技巧:

\documentclass{beamer}

\usetheme[]{Madrid}
\useoutertheme[footline=empty,subsection=false]{miniframes}

\title{an awesome talk}
\author{a froody dude}
\date{\today}


\makeatletter
\let\beamer@writeslidentry@miniframeson=\beamer@writeslidentry%
\def\beamer@writeslidentry@miniframesoff{%
  \expandafter\beamer@ifempty\expandafter{\beamer@framestartpage}{}% does not happen normally
  {%else
    % removed \addtocontents commands
    \clearpage\beamer@notesactions%
  }
}
\newcommand*{\miniframeson}{\let\beamer@writeslidentry=\beamer@writeslidentry@miniframeson}
\newcommand*{\miniframesoff}{\let\beamer@writeslidentry=\beamer@writeslidentry@miniframesoff}
\makeatother

\begin{document}

\begin{frame}[plain]
\titlepage
\end{frame}

\begin{frame}{slide 0}
All miniframes dimmed, as desired.
\end{frame}

\section{section 1}
%\stepcounter{subsection}

\begin{frame}{slide 1}
content 1
\end{frame}

\begin{frame}{slide 2}
content 2
\end{frame}

\section{section 2}
%\stepcounter{subsection}

\begin{frame}{slide 3}
content 3
\end{frame}

\begin{frame}{slide 4}
content 4
\end{frame}

\section{section 3}
%\stepcounter{subsection}

\begin{frame}{slide 5}
shading on miniframes is wrong
\end{frame}

\begin{frame}{slide 6}
shading on miniframes is wrong
\end{frame}

\section{}
\miniframesoff

\begin{frame}{slide 5}
all miniframes should be dimmed
\end{frame}

\begin{frame}{slide 6}
all miniframes should be dimmed
\end{frame}

\end{document}

答案2

将计数器设置为 0 似乎有效。请注意,您不需要手动调整子部分计数器。

部分 MWE:

\section{section 3}
%\stepcounter{subsection}

\begin{frame}{slide 5}
shading on miniframes is wrong
\end{frame}

\begin{frame}{slide 6}
shading on miniframes is wrong
\end{frame}

\setcounter{section}{0}

\begin{frame}{slide 5}
all miniframes should be dimmed
\end{frame}

\begin{frame}{slide 6}
all miniframes should be dimmed
\end{frame}

\end{document}

结果:

在此处输入图片描述

相关内容