从 Beamer 页脚中删除幻灯片计数

发布于 2024-08-22 14:53:12 字数 1228 浏览 6 评论 0原文

我想从 Beamer 演示文稿的页脚(脚线)中删除幻灯片计数(例如,SLIDE_NUMBER / TOTAL_SLIDES),而不完全删除页脚。我正在使用 Boadilla 主题,它使用 infolines 外部主题。在 beamerouterthemeinfolines.sty 文件中,我们找到以下脚线定义:

\defbeamertemplate*{footline}{infolines theme}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor~~(\insertshortinstitute)
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\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%
}

我需要重新定义这个外部主题,使其不具有 \insertframenumber{} / \inserttotalframenumber\ hspace*{2ex} 在其中,或者以其他方式定义一个新的外部主题,该外部主题继承 infolines 主题的其他所有内容。我该怎么做?

相关问题:如何删除 LaTeX Beamer 模板的页脚?

I would like to remove the slide count (e.g., SLIDE_NUMBER / TOTAL_SLIDES) from the footer (footline) of a Beamer presentation, without removing the footer entirely. I am using the Boadilla theme, which uses the infolines outer theme. In the beamerouterthemeinfolines.sty file, we find the following definition for the footline:

\defbeamertemplate*{footline}{infolines theme}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor~~(\insertshortinstitute)
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\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%
}

I need to essentially redefine this outer theme such that it doesn't have the \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} in it, or otherwise define a new outer theme that inherits everything else from the infolines theme. How can I do this?

Related question: How to Remove Footers of LaTeX Beamer Templates?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

潜移默化 2024-08-29 14:53:12

由于 beameroutertheminfolines.sty 自 2010 年以来已发生变化,目前将

\setbeamertemplate{页码放在 head/foot}{} 中 就足够了
序言中的

As beameroutertheminfolines.sty has changed since 2010, for now it's enough to put

\setbeamertemplate{page number in head/foot}{}

in preamble.

不弃不离 2024-08-29 14:53:12

如果您愿意,可以简单地更改文件 beamroutertheminfolines.sty 这可能不是一个好主意。因此,您只需将脚线代码放入 .tex 文件中,然后删除帧编号行,或者像我一样,将其转换为注释。因此,您将 beameroutertheminfolines.sty 中的确切部分复制到您的 .tex 文件中:

 \documentclass{beamer}
    %#comment out the Boadilla theme and uses only the header bar
    %\usetheme[]{Boadilla} 
    \usetheme[secheader]{Boadilla}

      %#make sure to change this part, since it is predefined
      %\defbeamertemplate*{footline}{infolines theme}
      \setbeamertemplate{footline}
        {
      \leavevmode%
      \hbox{%
      \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
        \usebeamerfont{author in head/foot}\insertshortauthor~~(\insertshortinstitute)
      \end{beamercolorbox}%
      \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
        \usebeamerfont{title in head/foot}\insertshorttitle
      \end{beamercolorbox}%
      \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
        \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}

    %#turning the next line into a comment, erases the frame numbers
        %\insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 

      \end{beamercolorbox}}%
      \vskip0pt%
    }

If you like you can simply change the file beameroutertheminfolines.sty which might be not that of a good idea. So instead you simply take the code of the footline into your .tex file and delete the line for the frame numbers or, as i did, simply turn it into a comment. So you copy the exact part from beameroutertheminfolines.sty into your .tex file:

 \documentclass{beamer}
    %#comment out the Boadilla theme and uses only the header bar
    %\usetheme[]{Boadilla} 
    \usetheme[secheader]{Boadilla}

      %#make sure to change this part, since it is predefined
      %\defbeamertemplate*{footline}{infolines theme}
      \setbeamertemplate{footline}
        {
      \leavevmode%
      \hbox{%
      \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
        \usebeamerfont{author in head/foot}\insertshortauthor~~(\insertshortinstitute)
      \end{beamercolorbox}%
      \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
        \usebeamerfont{title in head/foot}\insertshorttitle
      \end{beamercolorbox}%
      \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
        \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}

    %#turning the next line into a comment, erases the frame numbers
        %\insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 

      \end{beamercolorbox}}%
      \vskip0pt%
    }
喜爱皱眉﹌ 2024-08-29 14:53:12
\setbeamertemplate{footline}{%
  \raisebox{5pt}{\makebox[\paperwidth]{\hfill\makebox[10pt]{\scriptsize\insertframenumber}}}}

来自 https://latex.org/forum/viewtopic.php?t=6694

\setbeamertemplate{footline}{%
  \raisebox{5pt}{\makebox[\paperwidth]{\hfill\makebox[10pt]{\scriptsize\insertframenumber}}}}

from https://latex.org/forum/viewtopic.php?t=6694

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文