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

时间:2010-02-23 18:39:28

标签: latex beamer

我想从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?

3 个答案:

答案 0 :(得分:7)

如果您愿意,可以直接更改文件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%
    }

答案 1 :(得分:6)

由于beameroutertheminfolines.sty自2010年以来发生了变化,因此现在可以放手了

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

在序言中。

答案 2 :(得分:-2)

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

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