Beamer 模板:按子部分导航

Beamer 模板:按子部分导航

我希望导航行显示 Subsection1.1、Subsection1.2、Subsection 2.1 和 Subsection2.2,而不仅仅是 Section1 和 Section2。我该怎么做?\insertsubsectionnavigationsymbol 对我来说不起作用。

以下是 MWE:

\documentclass{beamer}
\usetheme{Frankfurt}
\setbeamertemplate{navigation symbols}{\insertsubsectionnavigationsymbol }

\begin{document}
\section{Section1}
\subsection{Subsection1.1}
\subsection{Subsection1.2}
\section{Section2}
\subsection{2.1}
\begin{frame}
bla2.1
\end{frame}
\subsection{2.2}
\begin{frame}
bla2.2
\end{frame}

\end{document} 

答案1

导航栏是一个比较棘手的东西。但是 Beamer 有一些内置功能,可能足够接近您想要实现的功能。

选项1:

您可以更改标题以显示当前部分的所有子部分而不是部分:

\documentclass{beamer}

\usetheme{Frankfurt}

\makeatletter
\setbeamertemplate{headline}
{%
    \pgfuseshading{beamer@barshade}%
    \vskip-5.5ex%
    \begin{beamercolorbox}[ignorebg,ht=2.25ex,dp=3.75ex]{section in head/foot}
        \insertsubsectionnavigationhorizontal{\paperwidth}{}{}
    \end{beamercolorbox}%
}%
\makeatother


\begin{document}
\section{Section1}
\subsection{Subsection1.1}
\frame{test}
\subsection{Subsection1.2}
\frame{test}
\section{Section2}
\subsection{Subsection2.1}
\frame{test}
\subsection{Subsection2.2}
\frame{test}
\end{document} 

在此处输入图片描述

选项 2:

除了本节之外:

\documentclass{beamer}

\useoutertheme[subsection=true]{smoothbars}
\useinnertheme[shadow=true]{rounded}
\usecolortheme{orchid}
\usecolortheme{whale}

\setbeamerfont{block title}{size={}}

\makeatletter
\setbeamertemplate{headline}
{%
    \pgfuseshading{beamer@barshade}%
    \ifbeamer@sb@subsection%
    \vskip-8.2ex%
    \else%
    \vskip-7ex%
    \fi%
    \begin{beamercolorbox}[ignorebg,ht=2.25ex,dp=3.75ex]{section in head/foot}
        \insertsectionnavigationhorizontal{\paperwidth}{}{}
    \end{beamercolorbox}%
    \ifbeamer@sb@subsection%
    \begin{beamercolorbox}[ignorebg,ht=1.ex,dp=1.125ex]{subsection in head/foot}
        \usebeamerfont{subsection in head/foot}\insertsubsectionnavigationhorizontal{\paperwidth}{}{}
    \end{beamercolorbox}%
    \fi%
}%
\makeatother


\begin{document}
\section{Section1}
\subsection{Subsection1.1}
\frame{test}
\subsection{Subsection1.2}
\frame{test}
\section{Section2}
\subsection{Subsection2.1}
\frame{test}
\subsection{Subsection2.2}
\frame{test}
\end{document} 

在此处输入图片描述

相关内容