答案1
您可以将hideallsubsections
其作为选项添加到主目录中,即
\begin{frame}{Table of Contents}
\tableofcontents[hideallsubsections]
\end{frame}
另一种方式是取消注释\setcounter{tocdepth}{1}
,并\setcounter{tocdepth}{2}
在主目录之后立即添加。
\documentclass{beamer}
\usepackage{beamerthemesplit}
%\setcounter{tocdepth}{1}
%\setcounter{secnumdepth}{1}
\usetheme{Antibes}
\title{The Title}
\subtitle{Subtitle}
\author[F. Author]{F.author\inst{1}\and S. Autor\inst{2}}
\institute[University of Somewhere and Elsewhere] {
\inst{1}
UofS
\and
\inst{2}%
UofE
}
\date{\today}
\AtBeginSubsection[] {
\begin{frame}<beamer>{Outline}
\tableofcontents[currentsection,currentsubsection]
\end{frame}
}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}{Table of Contents}
\tableofcontents[hideallsubsections]
\end{frame}
\section{First Main Section}
\subsection{First Subsection}
\begin{frame}{First Slide Title}{Optional Subtitle}
\begin{itemize}
\item {
My first point.
}
\item {
My second point.
}
\end{itemize}
\end{frame}
\subsection{Second Subsection}
% You can reveal the parts of a slide one at a time
% with the \pause command:
\begin{frame}{Second Slide Title}
\begin{itemize}
\item {
First item.
\pause % The slide will pause after showing the first item
}
\item {
Second item.
}
% You can also specify when the content should appear
% by using <n->:
\item<3-> {
Third item.
}
\item<4-> {
Fourth item.
}
% or you can use the \uncover command to reveal general
% content (not just \items):
\item<5-> {
Fifth item. \uncover<6->{Extra text in the fifth item.}
}
\end{itemize}
\end{frame}
\section{Second Main Section}
\subsection{Another Subsection}
\begin{frame}{Blocks}
\begin{block}{Block Title}
You can also highlight sections of your presentation in a block, with it's own title
\end{block}
\begin{theorem}
There are separate environments for theorems, examples, definitions and proofs.
\end{theorem}
\begin{example}
Here is an example of an example block.
\end{example}
\end{frame}
% Placing a * after \section means it will not show in the
% outline or table of contents.
\section*{Summary}
\begin{frame}{Summary}
\begin{itemize}
\item
The \alert{first main message} of your talk in one or two lines.
\item
The \alert{second main message} of your talk in one or two lines.
\item
Perhaps a \alert{third message}, but not more than that.
\end{itemize}
\begin{itemize}
\item
Outlook
\begin{itemize}
\item
Something you haven't solved.
\item
Something else you haven't solved.
\end{itemize}
\end{itemize}
\end{frame}
% All of the following is optional and typically not needed.
\appendix
\section<presentation>*{\appendixname}
\subsection<presentation>*{For Further Reading}
\begin{frame}[allowframebreaks]
\frametitle<presentation>{For Further Reading}
\begin{thebibliography}{10}
\beamertemplatebookbibitems
% Start with overview books.
\bibitem{Author1990}
A.~Author.
\newblock {\em Handbook of Everything}.
\newblock Some Press, 1990.
\beamertemplatearticlebibitems
% Followed by interesting articles. Keep the list short.
\bibitem{Someone2000}
S.~Someone.
\newblock On this and that.
\newblock {\em Journal of This and That}, 2(1):50--100,
2000.
\end{thebibliography}
\end{frame}
\end{document}