![在 beamer 中对子部分进行编号](https://linux22.com/image/280913/%E5%9C%A8%20beamer%20%E4%B8%AD%E5%AF%B9%E5%AD%90%E9%83%A8%E5%88%86%E8%BF%9B%E8%A1%8C%E7%BC%96%E5%8F%B7.png)
我尝试使用
\setbeamertemplate{subsubsection in toc}[subsubsections numbered]
但似乎不起作用。
以下是完整示例:
\documentclass{beamer}
\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}[subsections numbered]
\setbeamertemplate{subsubsection in toc}[subsubsections numbered]
\begin{document}
\section{Section 1}
\subsection{Subsection 1.1}
\subsubsection{Subsubsection 1.1.1}
\subsubsection{Subsubsection 1.1.2}
\subsection{Subsection 1.2}
\subsubsection{Subsubsection 1.2.1}
\subsubsection{Subsubsection 1.2.2}
\section{Section 2}
\subsection{Subsection 2.1}
\subsubsection{Subsubsection 2.1.1}
\subsubsection{Subsubsection 2.1.2}
\subsection{Subsection 2.2}
\subsubsection{Subsubsection 2.2.1}
\subsubsection{Subsubsection 2.2.2}
\begin{frame}\frametitle{Table of Contents}
\tableofcontents
\end{frame}
\end{document}
输出为
答案1
恐怕模板subsubsections numbered
不存在...
但你可以创建它:
\defbeamertemplate{subsubsection in toc}{subsubsections numbered}
{\leavevmode\leftskip=3em%
\rlap{\hskip-3em\inserttocsectionnumber.\inserttocsubsectionnumber.\inserttocsubsubsectionnumber}%
\inserttocsubsubsection\par}
平均能量损失
\documentclass{beamer}
\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}[subsections numbered]
\defbeamertemplate{subsubsection in toc}{subsubsections numbered}
{\leavevmode\leftskip=3em%
\rlap{\hskip-3em\inserttocsectionnumber.\inserttocsubsectionnumber.\inserttocsubsubsectionnumber}%
\inserttocsubsubsection\par}
\setbeamertemplate{subsubsection in toc}[subsubsections numbered]
\begin{document}
\section{Section 1}
\subsection{Subsection 1.1}
\subsubsection{Subsubsection 1.1.1}
\subsubsection{Subsubsection 1.1.2}
\subsection{Subsection 1.2}
\subsubsection{Subsubsection 1.2.1}
\subsubsection{Subsubsection 1.2.2}
\section{Section 2}
\subsection{Subsection 2.1}
\subsubsection{Subsubsection 2.1.1}
\subsubsection{Subsubsection 2.1.2}
\subsection{Subsection 2.2}
\subsubsection{Subsubsection 2.2.1}
\subsubsection{Subsubsection 2.2.2}
\begin{frame}\frametitle{Table of Contents}
\tableofcontents
\end{frame}
\end{document}
输出: