使用 Beamer v 3.50 在导航栏中添加不可见的部分

使用 Beamer v 3.50 在导航栏中添加不可见的部分

目前我的笔记本电脑上安装了 Beamer v3.43。当我想要一个不显示在导航栏上的部分时,我会使用\section{}(或\section*{}),如这个问题

我的一名学生最近安装了 Beamer,并且安装了 3.50 版本(2018 年 2 月发布)。对于此版本的 Beamer,建议的解决方案失败。该部分仍添加到导航栏中,并带有\section{}

第 10.2 条Beamer 用户指南v3.50 介绍了该\section命令的工作原理:

\section<⟨模式规范⟩>[⟨短节名⟩]{⟨节名⟩}
开始一个节。不创建标题。默认情况下,⟨节名⟩显示在目录和导航栏中;如果指定了⟨短节名⟩,它将显示在导航栏中;如果⟨短节名⟩明确为空,它将不会显示在导航栏中。如果给出了⟨模式规范⟩,该命令仅对指定的模式有效。

我猜这样就可以\section[]{}了。不幸的是,该部分仍然添加到导航栏中。

\section*{}此外,根据用户指南,v3.43 中的解决方案也不再是解决方案:

\section<⟨模式规范⟩>*{⟨节名⟩}
开始一个没有目录条目的节。不创建标题,但导航栏中会显示⟨节名⟩。

那么我该如何使用新版本的 Beamer 来解决此问题?

下面是一个最小的工作示例(取自这个问题

\documentclass{beamer}
\usetheme{Frankfurt}

\begin{document}
\begin{frame}
\tableofcontents
\end{frame}

\section{Sec1}
\begin{frame}
\frametitle{Frame1}
\end{frame}

\section{Sec2}
\begin{frame}
\frametitle{Frame2}
\end{frame}

\section{} % this works for v3.43, not for v3.50
\begin{frame}
\frametitle{Frame3}
\end{frame}

\end{document}

顺便说一句,我没有在自己的笔记本电脑上测试,因为我还没有找到将软件包降级到早期版本的令人满意的解决方案。

答案1

基于https://tex.stackexchange.com/a/375843/36296

\documentclass{beamer}
\usetheme{Frankfurt}

\begin{document}
\begin{frame}
\tableofcontents
\end{frame}

\section{Sec1}
\begin{frame}
\frametitle{Frame1}
\end{frame}

\section{Sec2}
\begin{frame}
\frametitle{Frame2}
\end{frame}



\section{} % this works for v3.43, not for v3.50

{
\makeatletter
\def\beamer@writeslidentry{\clearpage\beamer@notesactions}
\makeatother
\begin{frame}
\frametitle{Frame3}
\end{frame}
}

\section{Sec4}
\begin{frame}
\frametitle{Frame4}
\end{frame}


\end{document}

相关内容