具有 CambridgeUS 主題的 Beamer:頁腳中的標題不合適

具有 CambridgeUS 主題的 Beamer:頁腳中的標題不合適

我正在使用帶有 CambridgeUS 主題的投影機。我的問題是,使用預設設定時,頁腳中顯示的簡報標題不適合,而只適合幾個字母。下面我舉一個例子。如何稍微擴大中央吧台的空間?

在此輸入影像描述

答案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}

在此輸入影像描述

相關內容