如何使用投影仪中的小框架更改过去幻灯片上的点的颜色?

如何使用投影仪中的小框架更改过去幻灯片上的点的颜色?

考虑下面的 MWE,它借用自这个问题

\documentclass[compress]{beamer}

\usetheme{Ilmenau}

\makeatletter
\def\slideentry#1#2#3#4#5#6{%
  %section number, subsection number, slide number, first/last frame, page number, part number
  \ifnum#6=\c@part\ifnum#2>0\ifnum#3>0%
    \ifbeamer@compress%
      \advance\beamer@xpos by1\relax%
    \else%
      \beamer@xpos=#3\relax%
      \beamer@ypos=#2\relax%
    \fi%
  \hbox to 0pt{%
    \beamer@tempdim=-\beamer@vboxoffset%
    \advance\beamer@tempdim by-\beamer@boxsize%
    \multiply\beamer@tempdim by\beamer@ypos%
    \advance\beamer@tempdim by -.05cm%
    \raise\beamer@tempdim\hbox{%
      \beamer@tempdim=\beamer@boxsize%
      \multiply\beamer@tempdim by\beamer@xpos%
      \advance\beamer@tempdim by -\beamer@boxsize%
      \advance\beamer@tempdim by 1pt%
      \kern\beamer@tempdim
      \global\beamer@section@min@dim\beamer@tempdim
      \hbox{\beamer@link(#4){%
          \usebeamerfont{mini frame}%
          \ifnum\c@section>#1%
            %\usebeamercolor[fg]{mini frame}%
            %\usebeamertemplate{mini frame}%
            \usebeamercolor{mini frame}%
            \usebeamertemplate{mini frame in other subsection}%
          \else%
            \ifnum\c@section=#1%
              \ifnum\c@subsection>#2%
                \usebeamercolor[fg]{mini frame}%
                \usebeamertemplate{mini frame}%
              \else%
                \ifnum\c@subsection=#2%
                  \usebeamercolor[fg]{mini frame}%
                  \ifnum\c@subsectionslide<#3%
                    \usebeamertemplate{mini frame in current subsection}%
                  \else%
                    \usebeamertemplate{mini frame}%
                  \fi%
                \else%
                  \usebeamercolor{mini frame}%
                  \usebeamertemplate{mini frame in other subsection}%
                \fi%
              \fi%
            \else%
              \usebeamercolor{mini frame}%
              \usebeamertemplate{mini frame in other subsection}%
            \fi%
          \fi%
        }}}\hskip-10cm plus 1fil%
  }\fi\fi%
  \else%
  \fakeslideentry{#1}{#2}{#3}{#4}{#5}{#6}%
  \fi\ignorespaces
  }
\makeatother

\begin{document}
\section{Section 1}
\subsection{Subsection 1}
\frame{}\frame{}\frame{}
\subsection{Subsection 2}
\frame{}\frame{}
\section{Section 2}
\subsection{Subsection 1}
\frame{}
\subsection{Subsection 2}
\frame{}\frame{}\frame{}\frame{}\frame{}\frame{}
\section{Section 3}
\subsection{Subsection 1}
\frame{}\frame{}\frame{}\frame{}\frame{}\frame{}
\end{document}

有人可以修改这个 MWE 吗全部过去幻灯片的点是彩色的,而且不仅是同一节的点?另外,有人能告诉我如何更改这些点的颜色吗?我没有找到同时解决这两个问题的问题;尽管那里存在非常相似的问题。

提前向大家表示感谢。

答案1

\documentclass[compress]{beamer}

\usetheme{Ilmenau}

\setbeamercolor{mini frame}{bg=green, fg=blue}
\setbeamercolor{mini frame current frame}{fg=red}

\makeatletter
\def\slideentry#1#2#3#4#5#6{%
  %section number, subsection number, slide number, first/last frame, page number, part number
  \ifnum#6=\c@part\ifnum#2>0\ifnum#3>0%
    \ifbeamer@compress%
      \advance\beamer@xpos by1\relax%
    \else%
      \beamer@xpos=#3\relax%
      \beamer@ypos=#2\relax%
    \fi%
  \hbox to 0pt{%
    \beamer@tempdim=-\beamer@vboxoffset%
    \advance\beamer@tempdim by-\beamer@boxsize%
    \multiply\beamer@tempdim by\beamer@ypos%
    \advance\beamer@tempdim by -.05cm%
    \raise\beamer@tempdim\hbox{%
      \beamer@tempdim=\beamer@boxsize%
      \multiply\beamer@tempdim by\beamer@xpos%
      \advance\beamer@tempdim by -\beamer@boxsize%
      \advance\beamer@tempdim by 1pt%
      \kern\beamer@tempdim
      \global\beamer@section@min@dim\beamer@tempdim
      \hbox{\beamer@link(#4){%
          \usebeamerfont{mini frame}%
          \ifnum\c@section>#1%
            \usebeamercolor[fg]{mini frame}%
            %\usebeamertemplate{mini frame}%
%            \usebeamercolor{mini frame}%
            \usebeamertemplate{mini frame}%
          \else%
            \ifnum\c@section=#1%
              \ifnum\c@subsection>#2%
                \usebeamercolor[fg]{mini frame}%
                \usebeamertemplate{mini frame}%
              \else%
                \ifnum\c@subsection=#2%
                  \usebeamercolor[fg]{mini frame}%
                  \ifnum\c@subsectionslide<#3%
                    \usebeamertemplate{mini frame in current subsection}%
                  \else%
                    \ifnum\c@subsectionslide=#3%
                        \usebeamercolor[fg]{mini frame current frame}
                    \fi 
                    \usebeamertemplate{mini frame}%
                  \fi%
                \else%
                  \usebeamercolor{mini frame}%
                  \usebeamertemplate{mini frame in other subsection}%
                \fi%
              \fi%
            \else%
              \usebeamercolor{mini frame}%
              \usebeamertemplate{mini frame in other subsection}%
            \fi%
          \fi%
        }}}\hskip-10cm plus 1fil%
  }\fi\fi%
  \else%
  \fakeslideentry{#1}{#2}{#3}{#4}{#5}{#6}%
  \fi\ignorespaces
  }
\makeatother

\begin{document}
\section{Section 1}
\subsection{Subsection 1}
\frame{}\frame{}\frame{}
\subsection{Subsection 2}
\frame{}\frame{}
\section{Section 2}
\subsection{Subsection 1}
\frame{}
\subsection{Subsection 2}
\frame{}\frame{}\frame{}\frame{}\frame{}\frame{}
\section{Section 3}
\subsection{Subsection 1}
\frame{}\frame{}\frame{}\frame{}\frame{}\frame{}
\end{document}

在此处输入图片描述

相关内容