我使用了代码
\AtBeginSection[]
{
\begin{frame}
\frametitle{Table of Contents}
%\tableofcontents[currentsection,hideothersubsections]
\tableofcontents[sectionstyle=show/hide,subsectionstyle=show/show/hide]
\end{frame}
}
不过,我有一个
\section{1}
\subsection{1.1}
\subsubsection{1.1.1}
\subsubsection{1.1.2}
\subsection{1.2}
\subsubsection{1.2.1}
\subsubsection{1.2.2}
\section{2}
\section{3}
\section{4}
\section{5}
当我尝试编译 latex 时,标题为
\subsubsection{1.1.1}
\subsubsection{1.1.2}
\subsubsection{1.2.1}
\subsubsection{1.2.2}
出现在目录中
\section{2}
\section{3}
\section{4}
\section{5}
有办法解决这个问题吗?
答案1
如果您只想显示当前部分,我会使用section={\thesection}
:
\documentclass{beamer}
\AtBeginSection[]
{
\begin{frame}
\frametitle{Table of Contents}
%\tableofcontents[currentsection,hideothersubsections]
\tableofcontents[sections={\thesection}]
\end{frame}
}
\begin{document}
\section{1}
\subsection{1.1}
\subsubsection{1.1.1}
\subsubsection{1.1.2}
\subsection{1.2}
\subsubsection{1.2.1}
\subsubsection{1.2.2}
\section{2}
\section{3}
\section{4}
\section{5}
\begin{frame}
abc
\end{frame}
\end{document}