头部/脚部的幻灯片数量

头部/脚部的幻灯片数量

我使用以下代码

\documentclass[xcolor=dvipsnames]{beamer}
\usecolortheme[named=blue]{structure}

%------------------------\AtBeginSubsection[]----------------------
\AtBeginSubsection[]{   
    \begin{frame}<beamer>[noframenumbering,plain]{Outline}
        \transsplitverticalout
        \tableofcontents[currentsection,currentsubsection]
    \end{frame}
}

\usetheme{Madrid}

%-----------------------------footline-----------------------------
\setbeamertemplate{footline}{
    \leavevmode%
    \hbox{%
        \begin{beamercolorbox}[wd=.3\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
            \usebeamerfont{author in head/foot}\insertshortauthor
        \end{beamercolorbox}%
        \begin{beamercolorbox}[wd=.7\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
            \usebeamerfont{title in head/foot}\insertshorttitle\hspace*{3em}
            \insertframenumber{} / \inserttotalframenumber\hspace*{1ex}
        \end{beamercolorbox}%
    }%
    \vskip0pt%
}

\setbeamercolor{author in head/foot}{bg=black}
\setbeamercolor{title in head/foot}{bg=blue}

\title[The essential numerical range and the Olsen problem]{The 
essential numerical range and the Olsen problem}
\author[{Student} (University of ....)]{Student}

\begin{document}

\begin{frame}

\end{frame}

\end{document}

编译后,我得到

在此处输入图片描述

我的目标是用不同的颜色为幻灯片的编号创建一个脚,即用一种颜色表示作者,用第二种颜色表示演示文稿的内容,用第三种颜色表示幻灯片的编号,如下所示:在此处输入图片描述

答案1

向脚注中添加第三个框:

\documentclass[xcolor=dvipsnames]{beamer}
\usecolortheme[named=blue]{structure}

%------------------------\AtBeginSubsection[]----------------------
\AtBeginSubsection[]{   
    \begin{frame}<beamer>[noframenumbering,plain]{Outline}
        \transsplitverticalout
        \tableofcontents[currentsection,currentsubsection]
    \end{frame}
}

\usetheme{Madrid}

%-----------------------------footline-----------------------------
\setbeamertemplate{footline}{
    \leavevmode%
    \hbox{%
        \begin{beamercolorbox}[wd=.3\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
            \usebeamerfont{author in head/foot}\insertshortauthor
        \end{beamercolorbox}%
        \begin{beamercolorbox}[wd=.6\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
            \usebeamerfont{title in head/foot}\insertshorttitle
%            \hspace*{3em}
%            \insertframenumber{} / \inserttotalframenumber\hspace*{1ex}
        \end{beamercolorbox}%
        \begin{beamercolorbox}[wd=.1\paperwidth,ht=2.25ex,dp=1ex,center]{page number in head/foot}%
%            \usebeamerfont{title in head/foot}\insertshorttitle\hspace*{3em}
            \insertframenumber{} / \inserttotalframenumber
        \end{beamercolorbox}%        
    }%
    \vskip0pt%
}

\setbeamercolor{author in head/foot}{bg=black}
\setbeamercolor{title in head/foot}{bg=blue}
\setbeamercolor{page number in head/foot}{bg=gray}

\title[The essential numerical range and the Olsen problem]{The 
essential numerical range and the Olsen problem}
\author[{Student} (University of ....)]{Student}

\begin{document}

\begin{frame}

\end{frame}

\end{document}

在此处输入图片描述

相关内容