设置子部分标题页

设置子部分标题页

请您找出定义中的错误\setbeamertemplate{subsubsection page}。子小节标题页未显示。我不想使用已发布的答案中提到的解决方案;我想找出我的代码中的错误。

\documentclass{beamer}
\usepackage{verbatim}
\setbeamertemplate{navigation symbols}{}

\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}

\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}{\leavevmode\leftskip=3.2em\rlap{\hskip-2em\textcolor{violet}{\inserttocsectionnumber.\inserttocsubsectionnumber.}}\textcolor{violet}\inserttocsubsection\par}

\setbeamertemplate{section page}
{
\begingroup
\begin{beamercolorbox}[sep=10pt,center,rounded=true,shadow=true]{section title}
    \usebeamerfont{section title}\thesection-~\insertsection\par
\end{beamercolorbox}
\endgroup
}

\setbeamertemplate{subsection page}
{
\begingroup
\begin{beamercolorbox}[sep=2pt,center,rounded=true,shadow=true]{section title}
    \usebeamerfont{section title}\thesection-~\insertsection\par
\end{beamercolorbox}
\vspace*{-1.pt}
\begin{beamercolorbox}[sep=6pt,center,rounded=true,shadow=true]{subsection title}
    \usebeamerfont{subsection title}\thesection.\thesubsection.~\insertsubsection\par
\end{beamercolorbox}
\endgroup
}

\setbeamertemplate{subsubsection page}
{
\begingroup
\begin{beamercolorbox}[sep=6pt,center,rounded=true,shadow=true]{subsubsection title}
    \usebeamerfont{subsubsection title}\thesection.\thesubsection.\thesubsubsection.~\insertsubsubsection\par
\end{beamercolorbox}
\endgroup
}

\setbeamercolor{section title}{bg=blue!40}
\setbeamercolor{subsection title}{bg=blue!20}
\setbeamercolor{subsubsection title}{bg=blue!20}
\setbeamerfont{section title}{size=\Large,series=\bfseries}
\setbeamerfont{subsection title}{size=\large,series=\bfseries}
\setbeamerfont{subsubsection title}{size=\large,series=\bfseries}

\begin{document}


\begin{frame}[t,allowframebreaks]
\frametitle{Table of Contents}
\tableofcontents
\end{frame}

\section{ Openings }
\frame{\sectionpage}

\subsection{ Ruy Lopez Opening }
\frame{\subsectionpage}

\subsubsection{ Ruy Lopez: Giuoco Piano Defense }
\frame{\subsubsectionpage}
\end{document}

答案1

代码中的错误消息告诉您\subsubsectionpage未定义它,因此您需要定义它。

\documentclass{beamer}

\setbeamertemplate{subsubsection page}{%
\begingroup
\begin{beamercolorbox}[sep=6pt,center,rounded=true,shadow=true]{subsubsection title}%
    \usebeamerfont{subsubsection title}\thesection.\thesubsection.\thesubsubsection.~\insertsubsubsection\par%
\end{beamercolorbox}%
\endgroup
}

\newcommand{\subsubsectionpage}{\usebeamertemplate{subsubsection page}}
\setbeamercolor{subsubsection title}{bg=blue!20}
\setbeamerfont{subsubsection title}{size=\large,series=\bfseries}

\begin{document}

\section{Openings}
\subsection{Ruy Lopez Opening}
\subsubsection{Ruy Lopez: Giuoco Piano Defense}

\begin{frame}
    \subsubsectionpage
\end{frame}

\end{document}

在此处输入图片描述

相关内容