采用 CambridgeUS 主题的 Beamer:页脚中的标题不适合

采用 CambridgeUS 主题的 Beamer:页脚中的标题不适合

我正在使用带有 CambridgeUS 主题的 beamer。我的问题是,使用默认设置,演示文稿的标题(如页脚所示)无法容纳,只能容纳几个字母。下面我报告一个例子。我怎样才能稍微扩大中央栏的空间?

在此处输入图片描述

答案1

您可以重新定义脚注线。默认情况下,每个框都是wd=.333\paperwidth宽的,但您可以根据所需的布局重新分配比例:

\documentclass{beamer}

\title{some very long title which overflows the footline and needs some extra space}

\usetheme{CambridgeUS}

\makeatletter
\setbeamertemplate{footline}{%
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.2\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertshortauthor\expandafter\ifblank\expandafter{\beamer@shortinstitute}{}{~~(\insertshortinstitute)}
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.6\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
    \usebeamerfont{title in head/foot}\insertshorttitle
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.2\paperwidth,ht=2.25ex,dp=1ex,leftskip=2ex,rightskip=2ex,sep=0pt]{date in head/foot}%
    \hfill%
    \usebeamerfont{date in head/foot}%
    \insertshortdate{}%
    \hfill%
    \usebeamercolor[fg]{page number in head/foot}%
    \usebeamerfont{page number in head/foot}%
    \usebeamertemplate{page number in head/foot}%
  \end{beamercolorbox}}%
  \vskip0pt%
}
\makeatother

\begin{document}

\begin{frame}

\end{frame}

\end{document}

在此处输入图片描述

相关内容