Ignoring page numbers in backup slides

前端 未结 9 1600
谎友^
谎友^ 2021-01-30 06:10

I am using the beamer document class in latex to make a presentation. I will have a number of back up slides which are there for offline viewing, reference etc. Beamer has a f

相关标签:
9条回答
  • 2021-01-30 06:49

    To manually fix the total frame count to a certain number, say 25, you could add the following command

    \renewcommand{\inserttotalframenumber}{25}
    

    right after the \begin{document} command.

    You can also add the \appendix command right before the beginning of your backup slides, so that the corresponding sections/subsections do not appear in the table of contents/navigation structure.

    It should be possible to tweak the renewcommand above so that it automatically uses the last frame number before the appendix, but I don't know how to do it.

    0 讨论(0)
  • 2021-01-30 06:55

    The great command \insertpresentationendpage will take care of your problem. Just place \appendix at the begin of your backup slides.

    \documentclass[t]{beamer}
    
    \usepackage[absolute,overlay]{textpos}
    \setbeamertemplate{navigation symbols}{}
    
    \def\insertpresentationendframe{\inserttotalframenumber}
    \makeatletter
    \g@addto@macro{\appendix}{\immediate\write\@auxout{\string\@writefile{nav}{\noexpand\headcommand{\noexpand\def\noexpand\insertpresentationendframe{\the\c@framenumber}}}}}
    \makeatother
    
    \setbeamertemplate{footline}{%
        \begin{picture}(54,12.5)(0,0)
        \put(0.9,0.52){%
            \begin{minipage}[b][12.5mm][c]{112.5mm}
            \raggedleft
            \insertframenumber/\insertpresentationendframe
            \end{minipage}
        }
        \end{picture}
    }
    
    \begin{document}
    
        \begin{frame}
            slide in the main part
            \only<2>{blub}
        \end{frame}
    
        \appendix
        \section*{Backup}
    
        \begin{frame}
            \frametitle{backup}
            not counting in the total frame number
        \end{frame}
    
    \end{document}
    

    enter image description here

    0 讨论(0)
  • 2021-01-30 06:56

    This can now be achieved with the following option on all "backup" slides:

    \begin{frame}[noframenumbering]{My Title}
    \end{frame}
    

    Source

    This will cause the final number (e.g. 25/25) to be displayed on such pages.

    As always, a matter of taste.

    0 讨论(0)
  • 2021-01-30 06:58

    This can be done with the appendixnumberbeamer package. Just add \usepackage{appendixnumberbeamer} to the preamble and use \appendix before the first backup slide.

    0 讨论(0)
  • 2021-01-30 07:03

    Fanfan, thanks for your answer, your answer steered me to this sty file that one can include in a beamer document class that will automatically count only the number of frames before the appendix, and then restart the a separate count for the appendix slides, pretty neat.

    http://www.ensta.fr/~lelong/Latex/appendixnumberbeamer.sty

    Thanks also to Jérôme LELONG for having this available online.

    0 讨论(0)
  • 2021-01-30 07:05

    You can put all of your backup slides in appendix and use the appendixnumberbeamer package.

    \documentclass[12pt]{beamer}
    \usepackage{appendixnumberbeamer}
    \begin{document}
    \begin{frame}{Frames that counts}
    \end{frame}
    \appendix
    \begin{frame}{Backup slides}
    \end{frame}
    \end{document}
    
    0 讨论(0)
提交回复
热议问题