在剑桥模板中自定义框架节头/节脚的颜色,包括页码

在剑桥模板中自定义框架节头/节脚的颜色,包括页码

我想将框架部分头部和脚部的默认颜色(我不知道它的具体名称,但基本上是演示者经常将其姓名、研讨会名称/地点、日期和页码放在框架的顶部和底部)更改为我最喜欢的绿色(svgnames 包中的)。具体来说,在运行代码时将显示的框架中,我如何自定义以下两个?

(1)如何将“标题部分”中显示的“第一个结果”从白色转换为绿色(svgnames 的绿色)?

(2)如何将页码从默认的栗色或棕色数字转换为绿色,以与绿色保持一致?

我是一个不太熟练的 Beamer 用户。您能帮我一下吗?

\documentclass [xcolor=svgnames, t] {beamer} 
\usepackage[round,sort&compress,authoryear]{natbib}
\usepackage{booktabs, comment} 
\usepackage[absolute, overlay]{textpos} 
%%% Beamer them customization
\useoutertheme{infolines} 
\usetheme{CambridgeUS} % I like this them but want to customize it a bit
\usecolortheme[named=Green]{structure} % I want this color, etc.
\setbeamercolor{normal text}{fg=black} % Control text color
\setbeamercolor{title}{fg=Green} % Color of slide title
\setbeamercolor{frametitle}{fg=Green,bg=Green!0} 
\setbeamercolor{section in head/foot}{bg=Green}
\setbeamercolor{author in head/foot}{bg=Green}
\setbeamertemplate{navigation symbols}{} 
\setbeamertemplate{frametitle continuation}{} 
\setbeamertemplate{items}[circle] 
\newenvironment{reference}[2]{ %
\begin{textblock*} {\textwidth} (#1, #2) 
\footnotesize\it\bgroup\color{red!50!black}} {\egroup\end{textblock*}}
\usepackage[]{hyperref} 
\hypersetup{colorlinks=True, linkcolor=white, citecolor=Green, urlcolor=blue, pdfstartview={XYZ null null 1.73}, pdfcreator={}, pdfauthor={}, pdftitle={}, bookmarksopenlevel=1} 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% STARTING! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title[\textcolor{Green}{My Seminar Here}] {Presentation Title}
\subtitle[]{\textcolor{black}{\scriptsize }} % Nice consistent color: Maroon
\author[\textcolor{white}{My Name Here}]
    {
        \small Author 1's Name\inst{\dagger}\\ 
        \and Author 2's Name \inst{\dagger}\\ 
        \and Author 3's Name\inst{\S} \\ 
        \and Author 4's Name\inst{\P} \\ 
        \and Author 5's Name\inst{\dagger} 
    }
\institute[]
    {
        \inst{\dagger} \scriptsize University 1 \and 
        \inst{\S} \scriptsize University 2 \and 
        \inst{\P} \scriptsize University 3
       } 

\date[\textcolor{Green}{\today}]{Place, 201X}

\begin{document}
    \begin{frame} [plain] \label{titlepage}
        \titlepage
    \end{frame}     
    \section{Outlines} 
        \begin{frame}{Outline}  
            \begin{enumerate}
                \item First
                \item Second
                \item Third
                \item Fourth
                \item Fifth
                \item Conclusions
            \end{enumerate}
        \end{frame}

    \section{Results} 
    \subsection{First results}

    Two things I can't figure out how to do:

    \begin{itemize}
        \item   How to convert "First results" as shown in ``Section in Head" from WHITE color to Green color (Green color of svgnames)?
        \item How to convert the PAGE NUMBER from DEFAULT Maroon-looking or Brown-looking number to Green to be consistent with GREEN color?
    \end{itemize}

\end{document}

答案1

您正在寻找的是两个语句:

\setbeamercolor{subsection in head/foot}{bg=Green, fg=white}
\setbeamercolor{date in head/foot}{fg=Green}

梅威瑟:

\documentclass[xcolor=svgnames,t] {beamer} 

\useoutertheme{infolines} 
\usetheme{CambridgeUS}
\usecolortheme[named=Green]{structure}

\setbeamercolor{author in head/foot}{bg=Green}
\setbeamercolor{section in head/foot}{bg=Green}
\setbeamercolor{subsection in head/foot}{bg=Green, fg=white}
\setbeamercolor{date in head/foot}{fg=Green}


\begin{document}

  \section{Results} 
  \subsection{First results}

    \begin{frame}
        Two things I can't figure out how to do:

        \begin{itemize}
            \item   How to convert "First results" as shown in ``Section in Head" from WHITE color to Green color (Green color of svgnames)?
            \item How to convert the PAGE NUMBER from DEFAULT Maroon-looking or Brown-looking number to Green to be consistent with GREEN color?
        \end{itemize}
    \end{frame}

\end{document}

在此处输入图片描述

离题评论:

  • 您不需要\usepackage[]{hyperref},beamer 已经加载了该包。事实上,最好不要再次加载它,因为这有选项冲突的风险。

  • 不要使用宏中的格式化命令,例如\title。如果您希望标题在脚注中显示为绿色,请使用

    \setbeamercolor{title in head/foot}{fg=Green}
    

    作者、机构、日期等也一样(这就是帧号颜色错误的原因)

  • Two things...必须放在框架内。

相关内容