Metropolis Beamer 中的自定义迷你框架导航位置

Metropolis Beamer 中的自定义迷你框架导航位置

我希望导航圈(每个对应一个框架)出现在摘要介绍背景和其余小节下。

\documentclass[10pt, xcolor=dvipsnames, compress]{beamer}
\usetheme[progressbar=foot]{metropolis}
\usecolortheme{default}

\usepackage{amsmath, setspace, amssymb, booktabs, siunitx, caption, adjustbox, lipsum, lscape, pdflscape, afterpage, capt-of, appendix, graphicx,  chronology, geometry, bigstrut, tabularx, enumitem, parskip, tikz, rotating, tabulary, tabu, verbatim, mathtools, xpatch,  multicol, hyperref, ltablex, subfig, lineno, changepage, longtable, float,  array,  ragged2e, calc, dirtytalk, fancyhdr}
\usepackage[flushleft]{threeparttable} 

\captionsetup[table]{position=top}   %% or below
%\renewcommand\harvardyearleft{\unskip, }
%\renewcommand\harvardyearright[1]{.}
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}
\usepackage{chapterbib}
\usepackage[sectionbib]{natbib}
\usepackage[symbol]{footmisc}

\usepackage{appendixnumberbeamer}
\usepackage{booktabs}
\usepackage[scale=2]{ccicons}
\usepackage{pgfplots}
\usepgfplotslibrary{dateplot}
\usepackage{xspace}

\newcommand{\themename}{\textbf{\textsc{metropolis}}\xspace}
\definecolor{Purple}{rgb}{0.6471, 0.1098, 0.1882}
\definecolor{Teal}{rgb}{.194, .229, .113}
\hypersetup{
    colorlinks,
    citecolor=Purple,
    linkcolor=Teal
}
\setbeamercolor{progress bar}{fg=Purple}
\setbeamercolor{alerted text}{fg=Purple}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\addtobeamertemplate{frametitle}{}{%
  \ifx\insertframesubtitle\@empty\else%
      \usebeamerfont{framesubtitle}%
      \usebeamercolor[fg]{framesubtitle}%
      \insertframesubtitle%
  \fi%
  }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamercolor{framesubtitle}{fg=bg}%
\setbeamercolor{framesubtitle}{bg=fg}%

\setbeamerfont{framesubtitle}{size=\footnotesize}%
\setbeamerfont{frametitle}{size=\large}%

\defbeamertemplate*{frametitle}{my theme}
{%
{\nointerlineskip
  \leavevmode
  \vbox{%
  \begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1ex]{frametitle}%
    \raggedright\hspace*{1em}\insertframetitle\\\usebeamercolor[fg]{frametitle}
    \usebeamerfont{frametitle}
  \end{beamercolorbox}
  \nointerlineskip

  \begin{beamercolorbox}[wd=\paperwidth,ht=2ex,dp=.25ex]{framesubtitle}%
   \usebeamercolor[bg]{framesubtitle}
    \usebeamercolor[fg]{framesubtitle}

   \usebeamerfont{framesubtitle}
    \insertsubsectionnavigationhorizontal{\paperwidth}{\hfill}{\hfill}\\
  \end{beamercolorbox}
  }%
}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\setlength{\metropolis@progressinheadfoot@linewidth}{1.5pt}
\setlength{\metropolis@titleseparator@linewidth}{1pt}
\setlength{\metropolis@progressonsectionpage@linewidth}{1pt}

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

%\setbeamertemplate{mini frames}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{lll}
\subtitle{xxx}}}
\author{xxx}
\date{}    
\institute{xxx}
%\date{\scriptsize\today}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\metroset{titleformat=smallcaps, sectionpage=none, numbering=fraction, background=light}
\useoutertheme[subsection=false]{miniframes}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\renewcommand{\thefootnote}{\arabic{footnote}}
\renewcommand{\thempfootnote}{\arabic{mpfootnote}}

\newcommand\Wider[2][3em]{%
\makebox[\linewidth][c]{%
  \begin{minipage}{\dimexpr\textwidth+#1\relax}
  \raggedright#2
  \end{minipage}%
  }%
}

\begin{document}

\newcommand{\chapterbib}{
  \bibliographystyle{custom.bst}
  \bibliography{references}
}
\renewcommand{\bibsection}{\section*{\bibname}}

\input{slides/00__Title}
\input{slides/00_Introduction}
% \input{slides/01_Chapter1}
% \input{slides/02_Chapter2}
\input{slides/03_Chapter3}
\input{slides/04_Conclusion.tex}
\appendix
\scriptsize \chapterbib
\end{document}

在此处输入图片描述

答案1

miniframes 外部主题将导航置于标题中。如果您希望将其放在框架标题下方,则可以将其添加\insertnavigation到自定义框架标题中:

\documentclass[10pt, xcolor=dvipsnames, compress]{beamer}
\usetheme[progressbar=foot, sectionpage=none]{moloch}% modern fork of the metropolis theme

\usecolortheme{default}

\usepackage{amsmath, setspace, amssymb, booktabs, siunitx, caption, adjustbox, lipsum, lscape, pdflscape, afterpage, capt-of, appendix, graphicx, geometry, bigstrut, tabularx, enumitem, parskip, tikz, rotating, tabulary, tabu, verbatim, mathtools, xpatch,  multicol, hyperref, ltablex, subfig, lineno, changepage, longtable, float,  array,  ragged2e, calc, dirtytalk, fancyhdr}
\usepackage[flushleft]{threeparttable} 

\captionsetup[table]{position=top}   %% or below
%\renewcommand\harvardyearleft{\unskip, }
%\renewcommand\harvardyearright[1]{.}
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}
\usepackage{chapterbib}
\usepackage[sectionbib]{natbib}
\usepackage[symbol]{footmisc}

\usepackage{appendixnumberbeamer}
\usepackage{booktabs}
\usepackage[scale=2]{ccicons}
\usepackage{pgfplots}
\usepgfplotslibrary{dateplot}
\usepackage{xspace}

\newcommand{\themename}{\textbf{\textsc{moloch}}\xspace}
\definecolor{Purple}{rgb}{0.6471, 0.1098, 0.1882}
\definecolor{Teal}{rgb}{.194, .229, .113}
\hypersetup{
    colorlinks,
    citecolor=Purple,
    linkcolor=Teal
}
\setbeamercolor{progress bar}{fg=Purple}
\setbeamercolor{alerted text}{fg=Purple}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\addtobeamertemplate{frametitle}{}{%
  \ifx\insertframesubtitle\@empty\else%
      \usebeamerfont{framesubtitle}%
      \usebeamercolor[fg]{framesubtitle}%
      \insertframesubtitle%
  \fi%
  }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamercolor{framesubtitle}{fg=bg}%
\setbeamercolor{framesubtitle}{bg=fg}%

\setbeamerfont{framesubtitle}{size=\footnotesize}%
\setbeamerfont{frametitle}{size=\large}%

\defbeamertemplate*{frametitle}{my theme}
{%
{\nointerlineskip
  \leavevmode
  \vbox{%
  \begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1ex]{frametitle}%
    \raggedright\hspace*{1em}\insertframetitle\\\usebeamercolor[fg]{frametitle}
    \usebeamerfont{frametitle}
  \end{beamercolorbox}
  \nointerlineskip

  \begin{beamercolorbox}[wd=\paperwidth,ht=2ex,dp=.25ex]{framesubtitle}%
   \usebeamercolor[bg]{framesubtitle}
    \usebeamercolor[fg]{framesubtitle}

   \usebeamerfont{framesubtitle}
    \insertsubsectionnavigationhorizontal{\paperwidth}{\hfill}{\hfill}
  \end{beamercolorbox}
 
  \begin{beamercolorbox}[wd=\paperwidth]{section in head/foot}
    \tiny
    \vskip2pt\insertnavigation{\paperwidth}\vskip2pt
  \end{beamercolorbox}%  
  }%
}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\setlength{\moloch@progressinheadfoot@linewidth}{1.5pt}
\setlength{\moloch@titleseparator@linewidth}{1pt}
\setlength{\moloch@progressonsectionpage@linewidth}{1pt}

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

%\setbeamertemplate{mini frames}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{lll}
\subtitle{xxx}
\author{xxx}
\date{}    
\institute{xxx}



\begin{document}

\section{test 2}
\subsection{sub 1}
\begin{frame}
\frametitle{title}
content...
\end{frame}

\subsection{sub 2}
\begin{frame}
\frametitle{title}
content...
\end{frame}

\section{test 1}
\subsection{title}
\begin{frame}
\frametitle{title}
content...
\end{frame}
\end{document}

在此处输入图片描述

相关内容