![在 beamer 中,有什么方法可以只显示特定部分的目录吗?](https://linux22.com/image/440600/%E5%9C%A8%20beamer%20%E4%B8%AD%EF%BC%8C%E6%9C%89%E4%BB%80%E4%B9%88%E6%96%B9%E6%B3%95%E5%8F%AF%E4%BB%A5%E5%8F%AA%E6%98%BE%E7%A4%BA%E7%89%B9%E5%AE%9A%E9%83%A8%E5%88%86%E7%9A%84%E7%9B%AE%E5%BD%95%E5%90%97%EF%BC%9F.png)
我正在帮助我的学生完成她的论文,她想将所有 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>}
以获取更多信息。