【问题标题】:Remove the slide count from Beamer footer从 Beamer 页脚中删除幻灯片计数
【发布时间】:2010-02-23 18:39:28
【问题描述】:

我想从 Beamer 演示文稿的页脚 (footline) 中删除幻灯片计数(例如,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 主题的所有其他内容。我该怎么做?

相关问题:How to Remove Footers of LaTeX Beamer Templates?

【问题讨论】:

    标签: latex beamer


    【解决方案1】:

    由于beameroutertheminfolines.sty 自 2010 年以来发生了变化,所以现在足以放置

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

    在序言中。

    【讨论】:

      【解决方案2】:

      如果您愿意,可以简单地更改文件beameroutertheminfolines.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%
          }
      

      【讨论】:

      • 此解决方案运行良好,但请确保将注释“#turning the next...”中的# 交换为%,否则将无法编译(# 会中断编译)。
      • 这对我来说效果很好,并允许我进行额外的修改(保留幻灯片编号但删除“/ \inserttotalframenumber”
      【解决方案3】:
      \setbeamertemplate{footline}{%
        \raisebox{5pt}{\makebox[\paperwidth]{\hfill\makebox[10pt]{\scriptsize\insertframenumber}}}}
      

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

      【讨论】:

        猜你喜欢
        • 2017-12-26
        • 2023-02-23
        • 1970-01-01
        • 2023-02-05
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-11-05
        • 1970-01-01
        相关资源
        最近更新 更多