如何自动列出页脚栏中的所有部分?

如何自动列出页脚栏中的所有部分?

我知道如何自定义页脚栏,

\makeatletter
\setbeamertemplate{footline}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.4\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertsection
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.3\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
    \usebeamerfont{title in head/foot}\insertsubsection
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.3\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
    %\usebeamerfont{date in head/foot}\insertsubsubsection
    \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
    \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 
  \end{beamercolorbox}}%
  \vskip0pt%
}
\makeatother

如何才能自动列出页脚栏中的所有部分(不包括子部分),如下图所示?

在此处输入图片描述

答案1

这是一种使用beamercolorbox宽度等于0.7\paperwidth和的可能性\insertsectionnavigationhorizontal{.7\paperwidth}{}{}

\documentclass{beamer}
\usetheme{Warsaw}

\setbeamertemplate{headline}{}
\makeatletter
\setbeamertemplate{footline}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.7\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}%
    \insertsectionnavigationhorizontal{.7\paperwidth}{}{}%
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.3\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
    \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
    \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 
  \end{beamercolorbox}}%
  \vskip0pt%
}
\makeatother

\begin{document}

\section{Test section one}
\begin{frame} test\end{frame}
\section{Test section two}
\begin{frame} test\end{frame}
\section{Test section three}
\begin{frame} test\end{frame}

\end{document}

结果:

在此处输入图片描述

脚线特写:

在此处输入图片描述

相关内容