在 beamer 中,有什么方法可以只显示特定部分的目录吗?

在 beamer 中,有什么方法可以只显示特定部分的目录吗?

我正在帮助我的学生完成她的论文,她想将所有 3 个章节的幻灯片包含在 1 个 pdf 中(使用 beamer)。

我们正在研究这个问题,但是当我们使用目录为每个章节创建“演示大纲”时,会出现其他章节的部分,而我们暂时不想显示这些部分。我们最初考虑使用 \section* 命令,但是该部分没有出现在其他章节的其他大纲中。

有没有办法只显示特定章节的目录(即第 1 至 6 章节,而忽略第 7 至 18 章节)?

答案1

使用\tableofcontents[sections={<list of section ranges>}]

\documentclass{beamer}
\setbeamertemplate{section in toc}[sections numbered]

% helper
\newcommand\oneSecOneFrame{%
  \section{Title}%
  \begin{frame} contents \end{frame}}

\begin{document}
\begin{frame}
  \tableofcontents[sections={1-3}]
\end{frame}

\oneSecOneFrame
\oneSecOneFrame
\oneSecOneFrame

\begin{frame}
  \tableofcontents[sections={4-}]
\end{frame}
\oneSecOneFrame
\oneSecOneFrame
\oneSecOneFrame
\end{document}

在此处输入图片描述

查看用户指南 v3.63 中的文档beamer,第 10.5 节“添加目录”选项sections={<overlay specification>}以获取更多信息。

相关内容