从导航栏中删除章节页面项目符号 - beamer-Metropolis

从导航栏中删除章节页面项目符号 - beamer-Metropolis

我想sectionpage = progressbar在幻灯片中添加 sectionpages ()。但是,我不希望它们出现在导航栏中。有什么办法吗?以下是 MWE:


\documentclass[xcolor={dvipsnames},compress]{beamer}
\usepackage{appendixnumberbeamer}
\usetheme[titleformat=regular, numbering=fraction, progressbar=frametitle, background=light, sectionpage=progressbar]{metropolis}           % Use metropolis theme

\useoutertheme[subsection=false]{miniframes}


\title{A minimal example}
\date{\today}
\author{John Smith}
\institute{School of something, The University of World}



%----------------------------------------------
\begin{document}
  \maketitle
  \begin{frame}{Overview}
    \tableofcontents
  \end{frame}
   
  \section{First Section}
  \begin{frame}{First Frame}
    Hello, world!
  \end{frame}

  \section{Second Section}
  \begin{frame}{Second Frame}
    \begin{itemize}
        \item option 1
        \item option 2
    \end{itemize}
  \end{frame}

  \section{Third Section}
  \begin{frame}{Third Frame}
  \only<1-2>{ % this allows to have multiple frames with only one bullet that is highlighted
    \begin{enumerate}
        \item option 1
        \item option 2
    \end{enumerate}
    \pause
  
    \begin{equation}
        f(x)=a\times x^2+b\times x +c
    \end{equation}
    }
  \end{frame}
  
 

  % Thank you slide
  \begin{frame}[standout]
    Thank you!
  \end{frame}
    
\end{document}

目前,我看到的是这样的。虽然我的部分只有一个框架,但您可以在导航栏中看到两个项目符号,第一个是用于部分页面的: 在此处输入图片描述

其他部分页面也存在同样的问题。有什么办法可以修复吗?

答案1

你可以使用与如何从 Beamer 中的导航项目符号中删除一些页面?

\documentclass[xcolor={dvipsnames},compress]{beamer}
\usepackage{appendixnumberbeamer}
\usetheme[progressbar=frametitle, background=light, sectionpage=progressbar]{moloch}% modern fork of the metropolis theme

\useoutertheme[subsection=false]{miniframes}


\title{A minimal example}
\date{\today}
\author{John Smith}
\institute{School of something, The University of World}

\makeatletter
\let\beamer@writeslidentry@miniframeson=\beamer@writeslidentry%
\def\beamer@writeslidentry@miniframesoff{%
  \expandafter\beamer@ifempty\expandafter{\beamer@framestartpage}{}% does not happen normally
  {%else
    % removed \addtocontents commands
    \clearpage\beamer@notesactions%
  }
}
\newcommand*{\miniframeson}{\let\beamer@writeslidentry=\beamer@writeslidentry@miniframeson}
\newcommand*{\miniframesoff}{\let\beamer@writeslidentry=\beamer@writeslidentry@miniframesoff}


\renewcommand{\moloch@enablesectionpage}{
  \AtBeginSection{
  \miniframesoff
    \ifbeamer@inframe
      \sectionpage
    \else
      \frame[plain,c,noframenumbering]{\sectionpage}
    \fi
  \miniframeson
  }
}
\moloch@enablesectionpage
\makeatother

%----------------------------------------------
\begin{document}
  \maketitle
  \begin{frame}{Overview}
    \tableofcontents
  \end{frame}
   
  \section{First Section}
  \begin{frame}{First Frame}
    Hello, world!
  \end{frame}

  \section{Second Section}
  \begin{frame}{Second Frame}
    \begin{itemize}
        \item option 1
        \item option 2
    \end{itemize}
  \end{frame}

  \section{Third Section}
  \begin{frame}{Third Frame}
  \only<1-2>{ % this allows to have multiple frames with only one bullet that is highlighted
    \begin{enumerate}
        \item option 1
        \item option 2
    \end{enumerate}
    \pause
  
    \begin{equation}
        f(x)=a\times x^2+b\times x +c
    \end{equation}
    }
  \end{frame}
  
 

  % Thank you slide
  \begin{frame}[standout]
    Thank you!
  \end{frame}
    
\end{document}

相关内容