Beamer 脚线对齐:有缺陷?

Beamer 脚线对齐:有缺陷?

祝你新年快乐!

我正在尝试创建 Beamer 文档,然后我发现页脚线对齐不正确。有什么方法可以修复这个问题吗?自从进行了一些 TexLive 更新后,我发现我所有新排版的文档都对齐不正确 - 过去这是很正常的。

\documentclass{beamer}
\usetheme{Boadilla}

\title[Title]{This is the title}

\author[Name]{Author's name}
\institute[Institute]{Author's Institute}
\date[Date]{\today}

\begin{document}
\begin{frame}
    \titlepage
\end{frame}

\end{document}

enter image description here

答案1

这确实看起来像是一个错误,因为我也获得了预期的结果。作为一种解决方法,也许您可​​以使用\boxheight以下代码中的参数?默认值为2.25ex,它确定文本基线和页脚框顶部边框之间的距离。尝试使用2.75ex,看看问题是否解决。

\documentclass{beamer}
\usepackage{etoolbox}
\usetheme{Boadilla}

\newcommand{\boxheight}{2.25ex}
\newcommand{\boxdepth}{1ex}
\makeatletter
\setbeamertemplate{footline}
{%
    \leavevmode%
    \hbox{%
        \begin{beamercolorbox}[wd=.333333\paperwidth,ht=\boxheight,dp=\boxdepth,center]{author in head/foot}%
            \usebeamerfont{author in head/foot}\insertshortauthor\expandafter\ifblank\expandafter{\beamer@shortinstitute}{}{~~(\insertshortinstitute)}
        \end{beamercolorbox}%
        \begin{beamercolorbox}[wd=.333333\paperwidth,ht=\boxheight,dp=\boxdepth,center]{title in head/foot}%
            \usebeamerfont{title in head/foot}\insertshorttitle
        \end{beamercolorbox}%
        \begin{beamercolorbox}[wd=.333333\paperwidth,ht=\boxheight,dp=\boxdepth,right]{date in head/foot}%
            \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
            \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 
        \end{beamercolorbox}%
    }%
    \vskip0pt%
}
\makeatother

\title[Title]{This is the title}

\author[Name]{Author's name}
\institute[Institute]{Author's Institute}
\date[Date]{\today}

\begin{document}
    \begin{frame}
        \titlepage
    \end{frame}

\end{document}

相关内容