ypn*_*nos 41
要保留索引的特定子部分,请使用:
\subsection*{...}
要仅从TOC中删除所有子部分,请使用:( \tableofcontents[hideallsubsections]从另一个答案添加)
Ale*_*ysh 40
隐藏小节使用非常不言自明的:
\tableofcontents[hideallsubsections]
与其他两个答案相同,也可以使用\setcounter{tocdepth}{1}, before (or after)来实现\begin{document}:尝试编译以下代码,然后删除或注释标有 的行%%%并再次编译(一次或两次,如有必要)以查看差异.
\documentclass{beamer}
\usetheme{Goettingen}
\setcounter{tocdepth}{1} %%%
\begin{document}
\frame{\tableofcontents}
\section{First}
\begin{frame}
A
\end{frame}
\section{Second}
\subsection{One only}
\begin{frame}
B
\end{frame}
\end{document}
Run Code Online (Sandbox Code Playgroud)
与使用 相同\tableofcontents[hideallsubsections],subsections 消失在 sframe所在的\tableofcontents位置,但不会出现在侧边栏中(如果您使用的主题中存在)。同样,在本地使用 starred 也是如此\subsection*{Subsection Title}。