框架标题投影仪下的简单迷你框架

框架标题投影仪下的简单迷你框架

我有一个简单的黑色投影仪模板,我经常使用它来演示。我想为它添加一些简单的迷你框架导航,但迷你框架的外部主题添加了太多额外的东西(部分名称等)。

我想在框架标题下方添加迷你框架圆圈,不带任何文字或分隔符来表示 pdf 中的部分更改。每个框架只有一个圆圈,以框架标题下方的细线为中心。但我确实希望在 pdf 中有一些部分,以便在查看文件时进行常规导航。

它看起来像这样... 在此处输入图片描述

我研究了从外部主题“mini-frame” .sty 改编代码,但这超出了我的技能。

这是我的 MWE:

\documentclass{beamer}
\setbeamertemplate{itemize items}[circle]
\setbeamercolor{itemize item}{fg=black}
\setbeamercolor{section in head/foot}{fg=white, bg=black}
\setbeamercolor{frametitle}{fg=white, bg=black}
\setbeamerfont{frametitle}{size=\small}
\setbeamertemplate{navigation symbols}{ }
\usefonttheme{serif}
\begin{document}


\section{Some Amazing Presentation}
\begin{frame}{MWE $\vert$ Some Amazing Presentation}
\begin{itemize}
\item This is a really amazing presentation, demonstrating a MWE
\item Very impressive
\end{itemize}
\end{frame}

\section{The Second Part}
\begin{frame}{MWE $\vert$ The Second Part}
\begin{itemize}
\item The second part of this presentation is even better
\item It was really worth waiting for
\end{itemize}
\end{frame}


\begin{frame}{MWE $\vert$ The Second Part}
\begin{itemize}
\item Lots of things to say
\item these things are interesting
\end{itemize}
\end{frame}


\begin{frame}{MWE $\vert$ The Second Part}
\begin{itemize}
\item blah blah blah
\item la la la
\end{itemize}
\end{frame}


\section{The End}
\begin{frame}{MWE $\vert$ The End}
\begin{itemize}
\item But the end is really the best part
\end{itemize}
\end{frame}


\end{document}

答案1

这应该可以按你期望的方式工作:

\documentclass{beamer}
\setbeamertemplate{itemize items}[circle]
\setbeamercolor{itemize item}{fg=black}
\setbeamercolor{section in head/foot}{fg=white, bg=black}
\setbeamerfont{frametitle}{size=\small}
\setbeamertemplate{navigation symbols}{ }
\usefonttheme{serif}
\setbeamercolor{frametitle}{fg=white,bg=black}

\setbeamercolor{mini frame}{fg=white}

\makeatletter
\def\insertsubsectionnavigationhorizontal#1#2#3{%
    \hbox to #1{{%
        \usebeamerfont{subsection in head/foot}\usebeamercolor[fg]{subsection in head/foot}
        \beamer@currentsubsection=0%
        \def\sectionentry##1##2##3##4##5{}%
        \def\slideentry##1##2##3##4##5##6{%
        \ifnum##6=\c@part\ifnum##2>0\ifnum##3>0%
            \beamer@tempdim=-\beamer@vboxoffset%
    \advance\beamer@tempdim by-\beamer@boxsize%
    \multiply\beamer@tempdim by\beamer@ypos%
    \advance\beamer@tempdim by -1cm%
    \raise\beamer@tempdim\hbox to 3pt{
                \beamer@link(##4){%
                    \usebeamerfont{mini frame}%
                    \ifnum\c@section=##1%
                            \ifnum\c@subsection=##2%
                                    \usebeamercolor[fg]{mini frame}%
                                    \ifnum\c@subsectionslide=##3%
                                            \usebeamertemplate{mini frame}%\beamer@minislidehilight%
                                    \else%
                                            \usebeamertemplate{mini frame in current subsection}%\beamer@minisliderowhilight%
                                    \fi%
                            \else%
                                    \usebeamercolor{mini frame}%
                                    %\color{fg!50!bg}%
                                    \usebeamertemplate{mini frame in other subsection}%\beamer@minislide%
                            \fi%
                    \else%
                            \usebeamercolor{mini frame}%
                            %\color{fg!50!bg}%
                            \usebeamertemplate{mini frame in other subsection}%\beamer@minislide%
                    \fi%
                            }\hskip-10cm plus 1fil%
            }
        \fi\fi\else%
        \fakeslideentry{##1}{##2}{##3}{##4}{##5}{##6}%
        \fi
        \ignorespaces
        }%
        #2\hskip.3cm\setbox\beamer@sectionbox=\hbox{}%
        \hskip-1.875ex\dohead%
        \box\beamer@sectionbox\hfil\hskip.3cm%
        #3
        }}
}
\makeatother

\setbeamertemplate{frametitle}
{\nointerlineskip
  \leavevmode
  \vbox{%
  \begin{beamercolorbox}[wd=\paperwidth,ht=3ex,dp=1ex]{frametitle}%
    \raggedright\hspace*{1em}\insertframetitle
  \end{beamercolorbox}\nointerlineskip
  \begin{beamercolorbox}[wd=\paperwidth,ht=1ex,dp=1ex]{frametitle}%
        \insertsubsectionnavigationhorizontal{\paperwidth}{\hfill}{\hfill}
  \end{beamercolorbox}
  }%
}


\begin{document}   
\section{Some Amazing Presentation}
\subsection{Subsection 1}
\begin{frame}{MWE $\vert$ Some Amazing Presentation}
\begin{itemize}
\item This is a really amazing presentation, demonstrating a MWE
\item Very impressive
\end{itemize}
\end{frame}

\section{The Second Part}
\subsection{Subsection 1}
\begin{frame}{MWE $\vert$ The Second Part}
\begin{itemize}
\item The second part of this presentation is even better
\item It was really worth waiting for
\end{itemize}
\end{frame}


\begin{frame}{MWE $\vert$ The Second Part}
\begin{itemize}
\item Lots of things to say
\item these things are interesting
\end{itemize}
\end{frame}


\begin{frame}{MWE $\vert$ The Second Part}
\begin{itemize}
\item blah blah blah
\item la la la
\end{itemize}
\end{frame}

\section{The End}
\subsection{Subsection 1}
\begin{frame}{MWE $\vert$ The End}
\begin{itemize}
\item But the end is really the best part
\end{itemize}
\end{frame}
\end{document}

在此处输入图片描述

上述解决方案需要:

  1. 重写默认的迷你框架导航,以便不打印任何部分名称(\makeatletter和之间的部分\makeatother)。
  2. frame title嵌入新导航系统(\setbeamertemplate{frametitle}宏)的自定义模板。

请注意,您的 MWE 中没有子部分,而子部分是迷你框架导航正常工作所必需的。如果您不想要/不需要子部分,只需为每个部分引入一个虚拟的单个子部分(您也可以将其从目录中排除)。

对于单个子节,灰色项目符号将指示来自其他节的框架,因为每个节都包含单个子节。

相关内容