罗切斯特主题:更改标题不起作用

罗切斯特主题:更改标题不起作用

我有罗切斯特主题演示文稿 (beamer),我想更改标题栏的颜色。我到处搜索,发现

\setbeamercolor{headline}{bg=red}

理论上应该可以。但实际上不行。我找到了一种方法来更改标题中的字体

\setbeamertemplate{frametitle}
{
    \nointerlineskip
    \begin{beamercolorbox}[sep=0.3cm,ht=0.3em,wd=\paperwidth]{frametitle}
        \vbox{}\vskip-2ex%
        \strut\insertframetitle\strut
        \vskip-0.9ex%
    \end{beamercolorbox}
}

我需要在这里定义背景颜色吗?如果需要,该如何定义?

如果有人感兴趣的话,这里是 MWE:

%&latex

\documentclass[xcolor={dvipsnames},hyperref={breaklinks=true}%,mathserif
,10pt]{beamer} 
\definecolor{flatblue}{RGB}{0, 82, 156}
\colorlet{shadecolor}{white}
\usefonttheme{serif}
\usecolortheme[named=flatblue]{structure} 
\useoutertheme{infolines}
\usetheme[height=7mm]{Rochester}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{itemize items}[triangle]
\setbeamercolor{headline}{bg=red}
\usefonttheme{professionalfonts}
\setbeamerfont{frametitle}{family=\sffamily, shape=\upshape}
\setbeamertemplate{frametitle}
{
    \nointerlineskip
    \begin{beamercolorbox}[sep=0.3cm,ht=0.3em,wd=\paperwidth]{frametitle}
        \vbox{}\vskip-2ex%
        \strut\insertframetitle\strut
        \vskip-0.9ex%
    \end{beamercolorbox}
}




\usepackage{amsmath,amssymb,amsthm,amssymb}
\usepackage{mathtools}
\usepackage{bbm}
\usepackage{graphicx}
\usepackage{float}
\usepackage[croatian]{babel}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage{txfonts}
\usepackage{subfigure}
\usepackage{listings}
\usepackage{time}
\usepackage{extarrows}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{framed}


\newcommand*\openquote{\makebox(25,-22){\scalebox{5}{``}}}
\newcommand*\closequote{\makebox(25,-22){\scalebox{5}{''}}}

\makeatletter
\newif\if@right
\def\shadequote{\@righttrue\shadequote@i}
\def\shadequote@i{\begin{snugshade}\begin{quote}\openquote}
\def\endshadequote{%
  \if@right\hfill\fi\closequote\end{quote}\end{snugshade}}
\@namedef{shadequote*}{\@rightfalse\shadequote@i}
\@namedef{endshadequote*}{\endshadequote}
\makeatother


\title{Random text is random}
\subtitle{Randomness}
\author{N.N}
\institute[Random institute]{Random institute, Somewhere far far away}
\date{\today}



\begin{document}
\maketitle

\begin{frame}
\frametitle{Sadr\v zaj}
\tableofcontents
\end{frame}

\section{Uvod}
\begin{frame}
\begin{itemize}
\item bla
\item bla
\end{itemize}
\end{frame}

\section{Reference}

\begin{frame}[allowframebreaks]{Reference}
    \bibliographystyle{alpha}
    \bibliography{mybibMIMM}
\end{frame}

\section*{}

\begin{frame}
\begin{center}
\Large
Hvala na pozornosti\\

\end{center}
\end{frame}


\end{document}

另外,第一页标题下方的大块内容可以以某种方式自定义吗?比如添加自定义背景,或者在 tikz 中涂鸦一些东西?

谢谢

答案1

您可以使用

\setbeamercolor*{frametitle}{parent=<your color>}

包含部分设置的完整示例:

\documentclass[xcolor={dvipsnames},hyperref={breaklinks=true}%,mathserif
,10pt]{beamer} 
\usepackage[croatian]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{txfonts}

\definecolor{flatblue}{RGB}{0, 82, 156}
\colorlet{shadecolor}{white}

\usefonttheme{serif}
\usecolortheme[named=flatblue]{structure} 
\useoutertheme{infolines}
\usetheme[height=7mm]{Rochester}

\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{itemize items}[triangle]
\setbeamercolor{headline}{bg=red,fg=white}
\usefonttheme{professionalfonts}
\setbeamerfont{frametitle}{family=\sffamily, shape=\upshape}

\setbeamercolor*{frametitle}{parent=headline}

\begin{document}

\begin{frame}
\frametitle{Sadr\v zaj}
test
\end{frame}

\end{document}

在此处输入图片描述

对于footline,您可以重新定义颜色author in head/foottitle in head/foot和 , date in head/foot它们分别用于beamercolorbox形成 的左、中、右三分之一footline

\documentclass[xcolor={dvipsnames},hyperref={breaklinks=true}%,mathserif
,10pt]{beamer} 
\usepackage[croatian]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{txfonts}

\definecolor{flatblue}{RGB}{0, 82, 156}
\colorlet{shadecolor}{white}

\usefonttheme{serif}
\usecolortheme[named=flatblue]{structure} 
\useoutertheme{infolines}
\usetheme[height=7mm]{Rochester}

\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{itemize items}[triangle]
\setbeamercolor{headline}{bg=red,fg=white}
\usefonttheme{professionalfonts}
\setbeamerfont{frametitle}{family=\sffamily, shape=\upshape}

\setbeamercolor{author in head/foot}{bg=red,fg=white}
\setbeamercolor{title in head/foot}{bg=red!70!black,fg=white}
\setbeamercolor{date in head/foot}{bg=red!40,fg=white}

\setbeamercolor*{frametitle}{parent=headline}

\begin{document}

\begin{frame}
\frametitle{Sadr\v zaj}
test
\end{frame}

\end{document}

在此处输入图片描述

相关内容