我想使用 smoothbars 为我的 beamer 演示文稿获取当前部分的所有子部分的概览。我想查看子部分,就像部分的外观一样。
\usetheme{Madrid}
\useoutertheme{smoothbars}
\setbeamertemplate{mini frames}{}
我使用了以下代码,但没有获得结果:
\makeatletter
\setbeamertemplate{subsection in smoothbars}
{\vspace*{-\baselineskip}}
\makeatother
有人可以帮忙吗?
答案1
您可以重新定义headline
beamer 模板,按照 中的定义beamerouterthemesmoothbars.sty
来使用\insertsubsectionnavigationhorizontal
,而不是默认的\insertsubsectionhead
;类似这样的操作:
\documentclass{beamer}
\usetheme{Madrid}
\useoutertheme{smoothbars}
\setbeamertemplate{mini frames}{}
\makeatletter
\setbeamertemplate{headline}
{%
\pgfuseshading{beamer@barshade}%
\ifbeamer@sb@subsection%
\vskip-9.75ex%
\else%
\vskip-7ex%
\fi%
\begin{beamercolorbox}[ignorebg,ht=2.25ex,dp=3.75ex]{section in head/foot}
\insertnavigation{\paperwidth}
\end{beamercolorbox}%
\ifbeamer@sb@subsection%
\begin{beamercolorbox}[ignorebg,ht=2.125ex,dp=1.125ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{subsection in head/foot}
\usebeamerfont{subsection in head/foot}\insertsubsectionnavigationhorizontal{\dimexpr\paperwidth-0.6cm\relax}{}{}
\end{beamercolorbox}%
\fi%
}
\makeatother
\begin{document}
\section{Test Section One}
\begin{frame}test\end{frame}
\subsection{Test Subsection One One}
\begin{frame}test\end{frame}
\subsection{Test Subsection One Two}
\begin{frame}test\end{frame}
\subsection{Test Subsection One Three}
\begin{frame}test\end{frame}
\section{Test Section Two}
\begin{frame}test\end{frame}
\subsection{Test Subsection Two One}
\begin{frame}test\end{frame}
\subsection{Test Subsection Two Two}
\begin{frame}test\end{frame}
\subsection{Test Subsection Two Three}
\begin{frame}test\end{frame}
\subsection{Test Subsection Two Four}
\begin{frame}test\end{frame}
\end{document}
一些放大的图像显示了第一部分和第二部分中某些框架的标题: