pausesections
在 beamer 文档中,我尝试使用和 自定义目录\addcontentsline
(请参阅我之前的问题第一的和第二)。您可能会看到添加的目录项重复出现。非常感谢您的帮助。
\documentclass{beamer}
\usetheme{Antibes}
\usecolortheme{seahorse}
\useoutertheme{tree}
\setbeamertemplate{footline}[frame number]
\setbeamertemplate{navigation symbols}{}
\begin{document}
\begin{frame}[t]
\frametitle{Index}
\tableofcontents[pausesections, pausesubsections,sections={-1}]
\end{frame}
\begin{frame}[t,noframenumbering]
\frametitle{Index}
\tableofcontents[pausesections, pausesubsections,sections={2-2}]
\end{frame}
\begin{frame}[t,noframenumbering]
\frametitle{Index}
\tableofcontents[pausesections, pausesubsections,sections={3-3}]
\end{frame}
\begin{frame}[t,noframenumbering]
\frametitle{Index}
\tableofcontents[pausesections, pausesubsections,sections={4-}]
\end{frame}
\begin{frame}
\section{section one \& A}
\end{frame}
\begin{frame}
\subsection{subsection one}
\addcontentsline{toc}{subsection}{\hskip5ex line added to TOC: AAA \par}
\end{frame}
\begin{frame}
\subsection{subsection two}
\addcontentsline{toc}{subsection}{\hskip5ex line added to TOC: BBB \par}
\addcontentsline{toc}{subsection}{\hskip5ex line added to TOC: CCC \par}
\end{frame}
\begin{frame}
\subsubsection{subsubsection after addcontentsline: three}
LAST
\end{frame}
\section{B} B
\subsection{1} B1
\subsection{2} B2
\subsection{3} B3
\subsection{4} B4
\section{C}
\subsection{1} C1
\subsection{2} C2
\subsection{3} C3
\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}
\end{document}
答案1
你可以使用https://tex.stackexchange.com/a/513634/36296仅在某些目录框架上显示附加文本:
\documentclass{beamer}
\usetheme{Antibes}
\usecolortheme{seahorse}
\useoutertheme{tree}
\setbeamertemplate{footline}[frame number]
\setbeamertemplate{navigation symbols}{}
\let\testA\relax
\let\testB\relax
\begin{document}
\begin{frame}[t]
\frametitle{Index}
\tableofcontents[pausesections, pausesubsections,sections={-1}]
\end{frame}
\begin{frame}[t,noframenumbering]
\let\testA\iffalse
\let\testB\fi
\frametitle{Index}
\tableofcontents[pausesections, pausesubsections,sections={2-2}]
\end{frame}
\begin{frame}[t,noframenumbering]
\let\testA\iffalse
\let\testB\fi
\frametitle{Index}
\tableofcontents[pausesections, pausesubsections,sections={3-3}]
\end{frame}
\begin{frame}[t,noframenumbering]
\let\testA\iffalse
\let\testB\fi
\frametitle{Index}
\tableofcontents[pausesections, pausesubsections,sections={4-}]
\end{frame}
\section{section one \& A}
\subsection{subsection one}
\addtocontents{toc}{\testA\hskip5ex line added to TOC: AAA \par\testB }
\subsection{subsection two}
\addtocontents{toc}{\testA\hskip5ex line added to TOC: BBB \par\testB}
\addtocontents{toc}{\testA\hskip5ex line added to TOC: CCC \par\testB}
\subsubsection{subsubsection after addcontentsline: three}
\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}
content...
\end{frame}
\end{document}