我有一个 Beamer 演示文稿,它被分成了部分、子部分和子子部分。我想在页脚中显示迷你框架作为一种“进度条”,但只针对当前子部分。我该如何实现呢?下面的代码目前显示整个文档的所有部分、子部分和子子部分的迷你框架。
\documentclass{beamer}
\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{footline}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=5mm,dp=2.5ex,center]{title in head/foot}%
\insertsubsectionnavigationhorizontal{\paperwidth}{\hfill}{\hfill}
\end{beamercolorbox}%
}%
\vskip0pt%
}
\begin{document}
\section{Section 1.}
\subsection{Subsection 1.1.}
\subsubsection{Subsubsection 1.1.1.}
\begin{frame}{Title}
\begin{itemize}
\item Item 1
\item Item 2
\item Item 3
\end{itemize}
\end{frame}
\subsubsection{Subsubsection 1.1.2.}
\begin{frame}{Title}
\begin{itemize}
\item Item 1
\item Item 2
\item Item 3
\end{itemize}
\end{frame}
\begin{frame}{Title}
\begin{itemize}
\item Item 1
\item Item 2
\item Item 3
\end{itemize}
\end{frame}
\subsection{Subsection 1.2.}
\subsubsection{Subsubsection 1.2.1.}
\begin{frame}{Title}
\begin{itemize}
\item Item 1
\item Item 2
\item Item 3
\end{itemize}
\end{frame}
\begin{frame}{Title}
\begin{itemize}
\item Item 1
\item Item 2
\item Item 3
\end{itemize}
\end{frame}
\section{Section 2.}
\subsection{Subsection 2.1.}
\subsubsection{Subsubsection 2.1.1}
\begin{frame}{Title}
\begin{itemize}
\item Item 1
\item Item 2
\item Item 3
\end{itemize}
\end{frame}
\end{document}```