Beamer 标题迷你框架 - 两种不同颜色

Beamer 标题迷你框架 - 两种不同颜色

我正在使用德累斯顿风格beamer。当我使用平滑条时,我得到了我想要的颜色组合。但是,当我更改为迷你框架时,我无法获得正确的颜色组合。

工作代码:

\documentclass{beamer}

\usepackage{amsmath,graphicx, natbib, lmodern, tikz}

\xdefinecolor{pgold}{rgb}{0.8,0.6,0.2}

\usetheme{Dresden}
\useoutertheme{smoothbars}

\usefonttheme{serif}
\usepackage{palatino}
\setbeamerfont{caption}{size=\tiny}
\setbeamercolor*{alerted text}{fg=red} 

\usecolortheme[named=pgold]{structure}
\beamertemplateballitem

\addtobeamertemplate{navigation symbols}{}{%
    \usebeamerfont{footline}%
    \usebeamercolor[fg]{footline}%
    \hspace{1em}%
    \insertframenumber/\inserttotalframenumber
}


\title[xx]{lalala}
\author{me} 


\setbeamertemplate{sidebar left}
{
\logo{\pgfuseimage{left-logo}}
\vfill%
\rlap{\hskip0.2cm\insertlogo}%
\vskip5pt%
}


% These next six lines declare a new beamerboxes environment
\setbeamercolor{uppercol}{fg=black,bg=purduegold}
\setbeamercolor{lowercol}{fg=black,bg=purduegold!20}
\newenvironment{colorblock}
{
\begin{beamerboxesrounded}[upper=uppercol,lower=lowercol,shadow=true]}
{\end{beamerboxesrounded}}

\begin{document}

\begin{frame}
\titlepage
\end{frame}

\section{1}
\begin{frame} \centering \huge
PAPER 1
\end{frame}

\end{document}

使用 smoothbars 后的效果如何

然而,当我\useoutertheme{smoothbars}改为\useoutertheme{miniframes}

演示文稿的颜色变为如图二所示:

在此处输入图片描述

无论我更改或添加什么,似乎都无法修复它。我真的很想使用迷你框架,因为我将有许多部分,并希望它们环绕。

答案1

如果我们查看beamerouterthemesmoothbars.sty和内部beamerouterthememiniframes.sty,我们可以看到前者使用,\setbeamercolor{section in head/foot}{parent=palette quaternary}而后者使用\setbeamercolor{section in head/foot}{parent=palette tertiary}

section in head/footbeamercolor 是用于在标题中包含导航的颜色,因此一个可能的解决方案是充电miniframes外部主题,然后更改section in head/foot为使用的主题smoothbars

我不确定这个变化是否会影响任何其他元素。

\documentclass{beamer}

\usepackage{amsmath,graphicx, natbib, lmodern, tikz}

\xdefinecolor{pgold}{rgb}{0.8,0.6,0.2}

\usetheme{Dresden}
%\useoutertheme{smoothbars}
\useoutertheme{miniframes}
\setbeamercolor{section in head/foot}{parent=palette quaternary}

\usefonttheme{serif}
\usepackage{palatino}
\setbeamerfont{caption}{size=\tiny}
\setbeamercolor*{alerted text}{fg=red} 

\usecolortheme[named=pgold]{structure}
\beamertemplateballitem

\addtobeamertemplate{navigation symbols}{}{%
    \usebeamerfont{footline}%
    \usebeamercolor[fg]{footline}%
    \hspace{1em}%
    \insertframenumber/\inserttotalframenumber
}


\title[xx]{lalala}
\author{me} 


%\setbeamertemplate{sidebar left}
%{
%\logo{\pgfuseimage{left-logo}}
%\vfill%
%\rlap{\hskip0.2cm\insertlogo}%
%\vskip5pt%
%}


% These next six lines declare a new beamerboxes environment
\setbeamercolor{uppercol}{fg=black,bg=pgold}
\setbeamercolor{lowercol}{fg=black,bg=pgold!20}
\newenvironment{colorblock}
{
\begin{beamerboxesrounded}[upper=uppercol,lower=lowercol,shadow=true]}
{\end{beamerboxesrounded}}

\begin{document}

\begin{frame}
\titlepage
\end{frame}

\section{1}
\begin{frame} \centering \huge
PAPER 1

\begin{colorblock}{Title}
This is a colorblock
\end{colorblock}
\end{frame}

\end{document}

在此处输入图片描述

相关内容