LaTeX Beamer:框架外部部分?

LaTeX Beamer:框架外部部分?

在 Beamer 演示文稿结束时,我希望有一张“感谢您的关注”幻灯片,但该幻灯片不属于我演示文稿的部分。更具体地说,当我在该幻灯片上时,我希望导航栏中的任何部分都不会突出显示。那么有没有办法结束一个部分,使得下面的幻灯片不属于该部分?

或者,我想我可以创建一个不出现在目录或导航栏中的部分。但我无法做到这一点。这一页,建议可以使用

\section[]*{Starred section}

但这会在目录中出现“*”,并添加额外的寄生幻灯片。例如:

\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[]*{Sec3}
\begin{frame}
\frametitle{Frame3}
\end{frame}

\end{document}

最后一节 Sec3 正确地没有出现在导航中,而是在目录中显示为“*”。

有什么建议么?

答案1

为了有效地获得没有部分部分,使用:

\section*{}或者\section{}

就像您的代码的以下变体一样:

\documentclass{beamer}
%\url{http://tex.stackexchange.com/q/66628/86}
\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{} % or \section*{}
\begin{frame}
\frametitle{Frame3}
\end{frame}

\end{document}

这将产生以下内容:

无截面的 Beamer 框架

据我通过实验得知,section 命令在它能接受和不能接受的内容方面有点奇怪。最通用的形式是\section<*>[Optional]{Mandatory}然而,看起来*Optional是不兼容的(即使 Optional 为空)。因此,你可以有一个星号或一个可选参数,但不能同时使用。根据这一条件,可能的组合如下:

  • \section{Text}Text位于目录和导航中。
  • \section{}:从目录和导航中完全省略(甚至没有分配空间)
  • \section[Text]{Long Text}Long Text用于 TOC、Text导航。
  • \section[]{Text}Text位于目录中,导航中没有任何内容。
  • \section[]{}:两个地方都没有。
  • \section*{}:从目录和导航中完全省略
  • \section*{Text}:目录中无任何内容,Text用于导航

以下是一些测试代码:

\documentclass{beamer}
%\url{http://tex.stackexchange.com/q/66628/86}
\usetheme{Frankfurt}

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

\section{NNT}
\begin{frame}{No Star, No Optional, Text}
\end{frame}

\section{}
\begin{frame}{No Star, No Optional, Empty}
\end{frame}

\section[NOT(S)]{NOT}
\begin{frame}{No Star, Optional, Text}
\end{frame}

\section[NOE]{}
\begin{frame}{No Star, Optional, Empty}
\end{frame}

\section[]{NET}
\begin{frame}{No Star, Empty Optional, Text}
\end{frame}

\section[]{}
\begin{frame}{No Star, Empty Optional, Empty}
\end{frame}

\section*{SNT}
\begin{frame}{Star, No Optional, Text}
\end{frame}

\section*{}
\begin{frame}{Star, No Optional, Empty}
\end{frame}

\section*[SOT(S)]{SOT}
\begin{frame}{Star, Optional, Text}
\end{frame}

\section*[SOE]{}
\begin{frame}{Star, Optional, Empty}
\end{frame}

\section*[]{SET}
\begin{frame}{Star, Empty Optional, Text}
\end{frame}

\section*[]{}
\begin{frame}{Star, Empty Optional, Empty}
\end{frame}
\end{document}

这似乎允许所有可能性除了您希望有一个具有正确标题的部分,它既不出现在目录中也不出现在导航中。幸运的是,这里的情况并非如此。在这种情况下,我能想到的最好的办法是暂时禁用,\addtocontents因为这会阻止写入toc文件(用于...等待...目录)和文件nav(用于导航栏),但允许其他所有内容通过。查看代码,如果命令\section有任何参数,则至少会写入其中一个文件,因此这似乎是唯一的方法。它可以包装得更花哨一些,但本质上可以归结为:

\let\origaddtocontents=\addtocontents
\def\dontaddtocontents#1#2{} % or \@gobbletwo if in \makeatletter ... \makeatother

...

\let\addtocontents=\dontaddtocontents
\section{Invisible Section}
\let\addtocontents=\origaddtocontents

答案2

您可以简单地使用最后的突出框架:

\begin{frame}[standout]
Thank you\\ 
for your time!
\end{frame}

相关内容