我下载了 Radboud University Beamer(版本 1)并尝试将标题左侧的颜色从黑色更改为蓝色。即,如何将黑色更改为其他颜色,如下图所示?
为了.sty
文件,请参阅http://www.cs.ru.nl/P.Vullers/beamer.php
非常感谢..
\documentclass{beamer}
\usepackage[british]{babel}
\usepackage{graphicx,hyperref,ru,url}
% Optional: The sublogo of the presentation:
% - the sublogo which is visible at the bottom right of each slide;
\logo{\includegraphics[width=0.6in]{CIS}}
% The title of the presentation:
% - first a short version which is visible at the bottom of each slide;
% - second the full title shown on the title slide;
\title[IMGS.633.01 - Optics for Imaging]{
MATLAB Fundamentals in Optics}
% Optional: a subtitle to be dispalyed on the title slide
\subtitle{IMGS.633.01 - Optics for Imaging}
% The author(s) of the presentation:
% - again first a short version to be displayed at the bottom;
% - next the full list of authors, which may include contact information;
\author[ ]{
\\\medskip
{\small \url{ }} \\
{\small \url{ }}}
% The institute:
% - to start the name of the university as displayed on the top of each slide
% this can be adjusted such that you can also create a Dutch version
% - next the institute information as displayed on the title slide
\institute[Rochester Institute of Technology]{
Chester F. Carlson Center for Imaging Science \\
Rochester Institute of Technology }
% Add a date and possibly the name of the event to the slides
% - again first a short version to be shown at the bottom of each slide
% - second the full date and event name for the title slide
\date[1st January 2015]{
1st January 2015 \\
Happy New Year :-)}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}
\frametitle{Outline}
\tableofcontents
\end{frame}
....
\end{document}
答案1
黑色来自颜色section in head/foot
,因此一种可能性是根据您的需要使用类似的东西来设置这种颜色
\setbeamercolor{section in head/foot}{bg=blue!40!black,fg=white}
在文档的序言中。然而,这会影响框架的某些其他元素,例如脚注的左半部分和框架标题的最右侧部分,它们也使用颜色section in head/foot
规范。
如果你只想更改标题左侧部分的颜色,则需要设置投影仪颜色,例如
\setbeamercolor{mysection in head/foot}{bg=blue!40!black,fg=white}
并重新定义标题模板,如下例所示:
\documentclass{beamer}
\usepackage[british]{babel}
\usepackage{graphicx,hyperref,ru,url}
\setbeamercolor{mysection in head/foot}{bg=blue!40!black,fg=white}
\makeatletter
\defbeamertemplate*{headline}{myru theme}{%
\leavevmode%
\@tempdimb=2.4375ex%
\multiply\@tempdimb by\beamer@sectionmax%
\pgfdeclareimage[height=.9\@tempdimb]{logo}{ru_logo}%
\logo{\pgfuseimage{logo}}%
\ifdim\@tempdimb>0pt%
\advance\@tempdimb by 1.125ex%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=\@tempdimb]{mysection in head/foot}%
\vbox to\@tempdimb{\vfil\insertsectionnavigation{.5\paperwidth}\vfil}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.4\paperwidth,ht=\@tempdimb,right]{subsection in head/foot}%
\vbox to\@tempdimb{\vfil\vfil\textbf{\footnotesize\insertshortinstitute~~}\vfil}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.1\paperwidth,ht=\@tempdimb,left]{subsection in head/foot}%
\vbox to\@tempdimb{\vfil\insertlogo\vfil\vfil}%
\end{beamercolorbox}%
\fi%
}
\makeatother
\title[RU style for Beamer]{
Radboud University style for Beamer \LaTeX}
\subtitle{Show where you're from}
\author[Pim Vullers MSc]{
Pim Vullers MSc \\\medskip
{\small \url{[email protected]}} \\
{\small \url{http://www.cs.ru.nl/~pim/}}}
\institute[Radboud University Nijmegen]{
Institute for Computing and Information Sciences -- Digital Security \\
Radboud University Nijmegen}
\date[slides Example 2010]{
the 1st example presentation 2010 \\
7th October 2010}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}
\frametitle{Outline}
\tableofcontents
\end{frame}
\section{Introduction}
\begin{frame}
\frametitle{Introduction}
\begin{itemize}
\item This is just a short example
\item The comments in the \LaTeX\ file are most important
\item This is just the result after running pdflatex
\item The style is based on the webpage \url{http://www.ru.nl/}
\end{itemize}
\end{frame}
\section{Background information}
\begin{frame}
\frametitle{Background information}
\begin{block}{Slides with \LaTeX}
Beamer offers a lot of functions to create nice slides using \LaTeX.
\end{block}
\begin{block}{The basis}
This style uses the following default styles:
\begin{itemize}
\item split
\item whale
\item rounded
\item orchid
\end{itemize}
\end{block}
\end{frame}
\end{document}
输出的其中一帧: