如何从编号中排除某些幻灯片、删除幻灯片编号以及删除圆圈?

如何从编号中排除某些幻灯片、删除幻灯片编号以及删除圆圈?

我想

(1)将附录部分从主幻灯片的编号中排除

(2)隐藏附录部分幻灯片底部的数字

(3)隐藏附录部分幻灯片顶部的圆圈

我该怎么做?

以下是我的文档示例:如下面的评论所建议,我可以通过包含 [noframenumbering] 来实现 (1)。然而,这并不能解决 (2)、(3)

\documentclass[xcolor=dvipsnames]{beamer}

\usetheme{Antibes}
\usecolortheme{dolphin}
\usefonttheme{professionalfonts}
\useoutertheme{infolines}
\useinnertheme{circles}

\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{etoolbox}
\usepackage[gen]{eurosym}

\makeatletter
\newcount\beamer@subsectionstartframe
\beamer@subsectionstartframe=1
\apptocmd{\beamer@subsection}{\addtocontents{nav}{\protect\headcommand{%
            \protect\beamer@subsectionframes{\the\beamer@subsectionstartframe}{\the\c@framenumber}}}}{}{}
\apptocmd{\beamer@subsection}{\beamer@subsectionstartframe=\c@framenumber\advance\beamer@subsectionstartframe by1\relax}{}{}
\AtEndDocument{\immediate\write\@auxout{\string\@writefile{nav}%
        {\noexpand\headcommand{\noexpand\beamer@subsectionframes{\the\beamer@subsectionstartframe}{\the\c@framenumber}}}}}{}{}
\def\beamer@startframeofsubsection{1}
\def\beamer@endframeofsubsection{1}
\def\beamer@subsectionframes#1#2{%
    \ifnum\c@framenumber<#1%
    \else%
    \ifnum\c@framenumber>#2%
    \else%
    \gdef\beamer@startframeofsubsection{#1}%
    \gdef\beamer@endframeofsubsection{#2}%
    \fi%
    \fi%
}
\newcommand\insertsubsectionstartframe{\beamer@startframeofsubsection}
\newcommand\insertsubsectionendframe{\beamer@endframeofsubsection}
\makeatother

\newcounter{subsectionframenumber}
\newcounter{totalsubsectionframenumber}

\setbeamertemplate{headline}
{
    \leavevmode%
    \hbox{%
        \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,right]{section in head/foot}%
            \usebeamerfont{section in head/foot}\insertsectionhead\hspace*{2ex}
        \end{beamercolorbox}%
        \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,left]{subsection in head/foot}%
            \parbox[b]{.4\textwidth}{
            \usebeamerfont{subsection in head/foot}\hspace*{2ex}\insertsubsectionhead%
            \setcounter{subsectionframenumber}{1}
            \addtocounter{subsectionframenumber}{\insertframenumber}
            \addtocounter{subsectionframenumber}{-\insertsubsectionstartframe}
            \setcounter{totalsubsectionframenumber}{1}
            \addtocounter{totalsubsectionframenumber}{\insertsubsectionendframe}
            \addtocounter{totalsubsectionframenumber}{-\insertsubsectionstartframe}
            \ifnum\thesection>0%
            \foreach\x in {1,...,\thetotalsubsectionframenumber}{%
                \ifnum\x=\thesubsectionframenumber%
                \usebeamertemplate{mini frame}~%
                \else%
                \usebeamertemplate{mini frame in other subsection}~%
                \fi%
            }%
            \fi%
        }%
        %\hfill\hyperlink{toc}{Outline}%
        \end{beamercolorbox}}%
        \vskip0pt%
    }
\usepackage{bbm}
\usepackage{amssymb}
\usepackage{mathabx}

\newcommand{\beginbackup}{
   \newcounter{framenumbervorappendix}
   \setcounter{framenumbervorappendix}{\value{framenumber}}
}
\newcommand{\backupend}{
   \addtocounter{framenumbervorappendix}{-\value{framenumber}}
   \addtocounter{framenumber}{\value{framenumbervorappendix}} 
}

\usepackage{multicol}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}


    \beginbackup
    \begin{frame}
        \titlepage
    \end{frame}
    \backupend

    \begin{frame}[label=toc]
        \frametitle{Outline}
        \tableofcontents
    \end{frame}
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{BLAH}
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \subsection{sub1}

    \begin{frame}{SLIDE1}\label{slide1}
    \hyperlink{appendix}{\beamergotobutton{More}}
    \end{frame}

    \begin{frame}{SLIDE2}
    \end{frame}


    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{Appendix}
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \begin{frame}[noframenumbering]{Extensions 1}\label{appendix} 
    \end{frame}
    \begin{frame}[noframenumbering]{Extensions 2}
    \hyperlink{slide1}{\beamergotobutton{Back}}
    \end{frame}



\end{document}

答案1

代码有点乱,似乎满足(1)- (3)。我还删除了标题页上显示的帧编号,因为你似乎想要这个未编号的它变得0/3很奇怪。

\documentclass[xcolor=dvipsnames]{beamer}

\usetheme{Antibes}
\usecolortheme{dolphin}
\usefonttheme{professionalfonts}
\useoutertheme{infolines}
\useinnertheme{circles}

\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{etoolbox}
\usepackage[gen]{eurosym}

\makeatletter
\newcount\beamer@subsectionstartframe
\beamer@subsectionstartframe=1
\apptocmd{\beamer@subsection}{\addtocontents{nav}{\protect\headcommand{%
            \protect\beamer@subsectionframes{\the\beamer@subsectionstartframe}{\the\c@framenumber}}}}{}{}
\apptocmd{\beamer@subsection}{\beamer@subsectionstartframe=\c@framenumber\advance\beamer@subsectionstartframe by1\relax}{}{}
\AtEndDocument{\immediate\write\@auxout{\string\@writefile{nav}%
        {\noexpand\headcommand{\noexpand\beamer@subsectionframes{\the\beamer@subsectionstartframe}{\the\c@framenumber}}}}}{}{}
\def\beamer@startframeofsubsection{1}
\def\beamer@endframeofsubsection{1}
\def\beamer@subsectionframes#1#2{%
    \ifnum\c@framenumber<#1%
    \else%
    \ifnum\c@framenumber>#2%
    \else%
    \gdef\beamer@startframeofsubsection{#1}%
    \gdef\beamer@endframeofsubsection{#2}%
    \fi%
    \fi%
}
\newcommand\insertsubsectionstartframe{\beamer@startframeofsubsection}
\newcommand\insertsubsectionendframe{\beamer@endframeofsubsection}
\makeatother

\newcounter{subsectionframenumber}
\newcounter{totalsubsectionframenumber}

\setbeamertemplate{headline}
{
    \leavevmode%
    \hbox{%
        \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,right]{section in head/foot}%
            \usebeamerfont{section in head/foot}\insertsectionhead\hspace*{2ex}
        \end{beamercolorbox}%
        \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,left]{subsection in head/foot}%
            \parbox[b]{.4\textwidth}{
            \usebeamerfont{subsection in head/foot}\hspace*{2ex}\insertsubsectionhead%
            \setcounter{subsectionframenumber}{1}
            \addtocounter{subsectionframenumber}{\insertframenumber}
            \addtocounter{subsectionframenumber}{-\insertsubsectionstartframe}
            \setcounter{totalsubsectionframenumber}{1}
            \addtocounter{totalsubsectionframenumber}{\insertsubsectionendframe}
            \addtocounter{totalsubsectionframenumber}{-\insertsubsectionstartframe}
            \ifnum\value{section}>0%
            \foreach\x in {1,...,\value{totalsubsectionframenumber}}{%
                \ifnum\x=\value{subsectionframenumber}%
                \usebeamertemplate{mini frame}~%
                \else%
                \usebeamertemplate{mini frame in other subsection}~%
                \fi%
            }%
            \fi%
        }%
        %\hfill\hyperlink{toc}{Outline}%
        \end{beamercolorbox}}%
        \vskip0pt%
    }
\usepackage{bbm}
\usepackage{amssymb}
\usepackage{mathabx}

\newcounter{framenumbervorappendix}

\usepackage{multicol}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

{

  \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
    \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%
  } 

    \begin{frame}[noframenumbering]
        \titlepage
    \end{frame}

}

    \begin{frame}[label=toc]
        \frametitle{Outline}
        \tableofcontents
    \end{frame}

    \section{BLAH}
    \subsection{sub1}

    \begin{frame}{SLIDE1}\label{slide1}
    \hyperlink{appendix}{\beamergotobutton{More}}
    \end{frame}

    \begin{frame}{SLIDE2}
    \end{frame}


    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     \setcounter{framenumbervorappendix}{\value{framenumber}}
    \section*{Appendix}
    \subsection{Appendix}
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 {

 \setbeamertemplate{headline}
 {
     \leavevmode%
     \hbox{%
         \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,right]{section in head/foot}%
             \usebeamerfont{section in head/foot}\insertsectionhead\hspace*{2ex}
         \end{beamercolorbox}%
         \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,left]{subsection in head/foot}%
         \end{beamercolorbox}}%
         \vskip0pt%
     }   

  \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
    \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%
  }   


    \begin{frame}{Extensions 1}\label{appendix} 
    \end{frame}
    \begin{frame}{Extensions 2}
    \hyperlink{slide1}{\beamergotobutton{Back}}
    \end{frame}


}

\setcounter{framenumber}{\value{framenumbervorappendix}}

\end{document}

在此处输入图片描述

答案2

如果你将\AtEndDocument...行改为

\pretocmd\appendix{\immediate\write\@auxout{\string\@writefile{nav}%
{\noexpand\headcommand{\noexpand\beamer@subsectionframes{\the\beamer@subsectionstartframe}{\the\c@framenumber}}}}}{}{}

那么你将不会得到附录中各节等的圆圈。使用samcarter 的建议[noframenumbering]无需摆弄计数器即可避免标题页被编号。

然而,我并不完全相信我理解了这里的目的。

更少的圆圈和数字

\documentclass[xcolor=dvipsnames]{beamer}
\usetheme{Antibes}
\usecolortheme{dolphin}
\usefonttheme{professionalfonts}
\useoutertheme{infolines}
\useinnertheme{circles}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{etoolbox}

\makeatletter
\newcount\beamer@subsectionstartframe
\beamer@subsectionstartframe=1
\apptocmd{\beamer@subsection}{\addtocontents{nav}{\protect\headcommand{%
      \protect\beamer@subsectionframes{\the\beamer@subsectionstartframe}{\the\c@framenumber}}}}{}{}
\apptocmd{\beamer@subsection}{\beamer@subsectionstartframe=\c@framenumber\advance\beamer@subsectionstartframe by1\relax}{}{}
\pretocmd\appendix{\immediate\write\@auxout{\string\@writefile{nav}%
    {\noexpand\headcommand{\noexpand\beamer@subsectionframes{\the\beamer@subsectionstartframe}{\the\c@framenumber}}}}}{}{}
\def\beamer@startframeofsubsection{1}
\def\beamer@endframeofsubsection{1}
\def\beamer@subsectionframes#1#2{%
    \ifnum\c@framenumber<#1%
    \else%
    \ifnum\c@framenumber>#2%
    \else%
    \gdef\beamer@startframeofsubsection{#1}%
    \gdef\beamer@endframeofsubsection{#2}%
    \fi%
    \fi%
}
\newcommand\insertsubsectionstartframe{\beamer@startframeofsubsection}
\newcommand\insertsubsectionendframe{\beamer@endframeofsubsection}
\makeatother

\newcounter{subsectionframenumber}
\newcounter{totalsubsectionframenumber}

\setbeamertemplate{headline}
{
  \leavevmode%
  \hbox{%
    \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,right]{section in head/foot}%
      \usebeamerfont{section in head/foot}\insertsectionhead\hspace*{2ex}
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,left]{subsection in head/foot}%
      \parbox[b]{.4\textwidth}{
        \usebeamerfont{subsection in head/foot}\hspace*{2ex}\insertsubsectionhead%
        \setcounter{subsectionframenumber}{1}
        \addtocounter{subsectionframenumber}{\insertframenumber}
        \addtocounter{subsectionframenumber}{-\insertsubsectionstartframe}
        \setcounter{totalsubsectionframenumber}{1}
        \addtocounter{totalsubsectionframenumber}{\insertsubsectionendframe}
        \addtocounter{totalsubsectionframenumber}{-\insertsubsectionstartframe}
        \ifnum\thesection>0%
        \foreach\x in {1,...,\thetotalsubsectionframenumber}{%
          \ifnum\x=\thesubsectionframenumber%
          \usebeamertemplate{mini frame}~%
          \else%
          \usebeamertemplate{mini frame in other subsection}~%
          \fi%
        }%
        \fi%
      }%
      %\hfill\hyperlink{toc}{Outline}%
    \end{beamercolorbox}}%
  \vskip0pt%
}


\begin{document}
\begin{frame}[noframenumbering]
  \titlepage
\end{frame}

\begin{frame}[label=toc]
  \frametitle{Outline}
  \tableofcontents
\end{frame}
\section{BLAH}
\subsection{sub1}

\begin{frame}{SLIDE1}\label{slide1}
  \hyperlink{appendix}{\beamergotobutton{More}}
\end{frame}

\begin{frame}{SLIDE2}
\end{frame}

\appendix
\begin{frame}{Extensions}\label{appendix}
  \hyperlink{slide1}{\beamergotobutton{Back}}
\end{frame}

\end{document}

相关内容