我正在用 beamer 准备一个演示文稿。
我有以下代码可以在更多幻灯片上拆分目录(几个部分),并且运行良好。
问题在于,一个部分包含大量子部分,我无法将目录的这一部分拆分为两页或更多页。相反,标题列表会写在幻灯片底部下方(请参阅下面代码中的 C 部分)
编辑如果我allowframebreaks
按照评论中的建议使用,则不会呈现子部分的条目,但会呈现 C 部分的额外条目(进入第二个索引 II 页的条目)
\documentclass{beamer}
\mode<presentation>
\usepackage[italian]{babel}
\setbeamertemplate{navigation symbols}{}
\usetheme{Antibes}
\usecolortheme{seahorse}
\useoutertheme{tree}
\setbeamertemplate{footline}[frame number]
\usefonttheme{serif}
\begin{document}
\section{A}
\subsection{1}
\subsection{2}
\subsection{3}
\subsection{4}
\section{B}
\subsection{1}
\subsection{2}
\subsection{3}
\subsection{4}
\section{C}
\subsection{1}
\subsection{2}
\subsection{3}
\subsection{4}
\subsection{5}
\subsection{6}
\subsection{7}
\subsection{8}
\subsection{9}
\subsection{10}
\subsection{11}
\subsection{12}
\subsection{13}
\subsection{14}
\subsection{15}
\subsection{16}
\section{D}
\subsection{1}
\subsection{2}
\subsection{3}
\subsection{4}
\section{E}
\begin{frame}[t,allowframebreaks]
\frametitle{Index}
\tableofcontents[pausesections, pausesubsections,sections={-1}]
\end{frame}
\begin{frame}[t,noframenumbering,allowframebreaks]
\frametitle{Index}
\tableofcontents[pausesections, pausesubsections,sections={2-2}]
\end{frame}
\begin{frame}[t,noframenumbering,allowframebreaks]
\frametitle{Index}
\tableofcontents[pausesections, pausesubsections,sections={3-3}]
\end{frame}
\begin{frame}[t,noframenumbering,allowframebreaks]
\frametitle{Index}
\tableofcontents[pausesections, pausesubsections,sections={4-}]
\end{frame}
\end{document}
注意,.toc 有从\beamer@subsectionintoc {3}{1}
到的条目\beamer@subsectionintoc {3}{16}
,我想要类似
\tableofcontents[pausesections, pausesubsections,sections={3-3}, **subsections={-7}**]
答案1
pausesection
等使用覆盖逐个显示项目。它们与 不相配allowframebreaks
。如果要使用allowframebreaks
,则应删除pause(sub-)section
s 以获取整个目录。
对于这种特定情况,可以使用如下覆盖来伪造分割:
\documentclass{beamer}
\mode<presentation>
\usepackage[italian]{babel}
\setbeamertemplate{navigation symbols}{}
\usetheme{Antibes}
\usecolortheme{seahorse}
\useoutertheme{tree}
\setbeamertemplate{footline}[frame number]
\usefonttheme{serif}
\makeatletter
\setbeamertemplate{subsection in toc}{%
\ifnum\inserttocsubsectionnumber<11
\only<1-12>{\leavevmode\leftskip=5ex\llap{%
\usebeamercolor[bg]{subsection number projected}%
\vrule width1ex height1ex\kern1ex}\inserttocsubsection\par}%
\else%
\only<12->{\leavevmode\leftskip=5ex\llap{%
\usebeamercolor[bg]{subsection number projected}%
\vrule width1ex height1ex\kern1ex}\inserttocsubsection\par}%
\fi%
}
\makeatother
\begin{document}
\section{A}
\subsection{1}
\subsection{2}
\subsection{3}
\subsection{4}
\section{B}
\subsection{1}
\subsection{2}
\subsection{3}
\subsection{4}
\section{C}
\subsection{1}
\subsection{2}
\subsection{3}
\subsection{4}
\subsection{5}
\subsection{6}
\subsection{7}
\subsection{8}
\subsection{9}
\subsection{10}
\subsection{11}
\subsection{12}
\subsection{13}
\subsection{14}
\subsection{15}
\subsection{16}
\section{D}
\subsection{1}
\subsection{2}
\subsection{3}
\subsection{4}
\section{E}
\begin{frame}<1-5>[t]
\frametitle{Index}
\tableofcontents[pausesections, pausesubsections,sections={-1}]
\end{frame}
\begin{frame}<1-5>[t,noframenumbering]
\frametitle{Index}
\tableofcontents[pausesections, pausesubsections,sections={2-2}]
\end{frame}
\begin{frame}<1-17>[t,noframenumbering]
\frametitle{Index}
\tableofcontents[pausesections, pausesubsections,sections={3-3}]
\only<12>{\vspace{-2.9cm}}%
\end{frame}
\begin{frame}<1-6>[t,noframenumbering]
\frametitle{Index}
\tableofcontents[pausesections, pausesubsections,sections={4-}]
\end{frame}
\end{document}