我知道我不应该使用子小节,但我有需要描述的层次结构,所以我必须使用它们。我想定义一个看起来像图片的子小节页面,基本上是章节标题/小节标题 - 小小节标题。我使用章节标题来生成图像。我怎样才能实现这个结果?
\documentclass{beamer}
\usetheme[sectionpage=none, progressbar=frametitle, numbering=fraction]{metropolis}
\begin{document}
\section{Section Title}
\subsection{Subsection Title - Subsubsection title}
\subsubsection{Subsubsection title}
\frame{\subsectionpage} %ideally I'd have a \subsubsectionpage command
\end{document}
答案1
\documentclass{beamer}
\usetheme[sectionpage=none, progressbar=frametitle, numbering=fraction]{metropolis}
\makeatletter
\AtBeginSubsubsection[]{%
\begin{frame}
\centering
\begin{minipage}{22em}
\raggedright
\usebeamercolor[fg]{section title}
\usebeamerfont{section title}
\insertsectionhead\\[-1ex]
\usebeamertemplate*{progress bar in section page}
\par
\ifx\insertsubsectionhead\@empty\else%
\usebeamercolor[fg]{subsection title}%
\usebeamerfont{subsection title}%
\insertsubsectionhead{} -- \insertsubsubsectionhead
\fi
\end{minipage}
\par
\vspace{\baselineskip}
\end{frame}
}
\makeatother
\begin{document}
\section{section title}
\subsection{subsection title}
\subsubsection{subsubsection title}
\begin{frame}
\frametitle{Title}
\end{frame}
\end{document}