为柏林主题添加帧编号

为柏林主题添加帧编号

如何在 beamer 主题 berlin 的脚注中(研究所下方)添加帧编号而不删除作者、标题或研究所?

我的代码:

\documentclass{beamer}

\usepackage[utf8]{inputenc}
\usepackage{bookmark,hyperref}
\hypersetup{bookmarksdepth=4,bookmarksnumbered=true,bookmarksopen=true}
\usetheme[compress]{Berlin}
\usefonttheme{structuresmallcapsserif}\usecolortheme{rose}
\setbeamerfont{section in head/foot}{size=\tiny}


\title{Title of My Presentation}
\subtitle{My Subtitle}
\author{My Name}
\institute{My Institute}
\date{01. Januar 1111}


\begin{document}

\frame{\titlepage}

\end{document}

幻灯片编号应位于

答案1

\documentclass{beamer}

\usepackage[utf8]{inputenc}
\usepackage{bookmark}
\hypersetup{bookmarksdepth=4,bookmarksnumbered=true,bookmarksopen=true}
\usetheme[compress]{Berlin}
\usefonttheme{structuresmallcapsserif}\usecolortheme{rose}
\setbeamerfont{section in head/foot}{size=\tiny}


\title{Title of My Presentation}
\subtitle{My Subtitle}
\author{My Name}
\institute{My Institute}
\date{01. Januar 1111}

\makeatletter
  \setbeamertemplate{footline}{%
    \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot}
    \end{beamercolorbox}
    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm plus1fil]{author in head/foot}%
      \leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor}%
      \hfill%
      {\usebeamerfont{institute in head/foot}\usebeamercolor[fg]{institute in head/foot}\insertshortinstitute}%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
      {\usebeamerfont{title in head/foot}\insertshorttitle\hfill\insertframenumber}%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
    \end{beamercolorbox}
  }
\makeatletter


\begin{document}

\frame{\titlepage}

\end{document}

在此处输入图片描述


在 beamer 的当前开发版本中(可能包含在从 v. 3.50 开始的发布版本中),这个答案可以简化为:

\documentclass{beamer}

\usetheme[compress]{Berlin}
\setbeamertemplate{page number in head/foot}[framenumber]

\title{Title of My Presentation}
\subtitle{My Subtitle}
\author{My Name}
\institute{My Institute}
\date{01. Januar 1111}

\begin{document}

\frame{\titlepage}

\end{document}

相关内容