Darmstadt
LaTeX 类的主题在beamer
标题部分产生颜色过渡/阴影(?),我发现在某些颜色组合中这不是很好。有没有办法在三个水平区域之间产生清晰的切分?
最小工作样本:
\documentclass[xcolor=dvipsnames]{beamer}
\usetheme{Darmstadt}
\definecolor{bblue}{rgb}{0.05, 0.15, 0.25}
\definecolor{rred}{rgb}{0.6, 0.4, 0.4}
\setbeamercolor{palette primary}{bg=bblue,fg=white}
\setbeamercolor{palette quaternary}{bg=white,fg=bblue}
\setbeamercolor{subsection in head/foot}{bg=rred,fg=white}
\begin{document}
\section{Question}
\subsection{Subquestion}
\begin{frame}{I have a question}
\begin{itemize}
\item I do not like the shade in the header
\item I would like all horizontal bars to appear without color transition
\item What can I do about it?
\item Thank you
\end{itemize}
\end{frame}
\end{document}
解决方案(在@samcarter 的帮助下):使用miniframes
outertheme
。我还编辑了pgfdeclareverticalshading
过渡到框架主要部分的。
\documentclass[xcolor=dvipsnames]{beamer}
\usetheme{Darmstadt}
\useoutertheme{miniframes}
\setbeamercolor{section in head/foot}{fg=black,bg=white}
\definecolor{bblue}{rgb}{0.05, 0.15, 0.25}
\definecolor{rred}{rgb}{0.6, 0.4, 0.4}
\setbeamercolor{palette primary}{bg=bblue,fg=white}
\setbeamercolor{palette quaternary}{bg=white,fg=bblue}
\setbeamercolor{subsection in head/foot}{bg=rred,fg=white}
\makeatletter
\AtBeginDocument{
{
\usebeamerfont*{headline}
\usebeamercolor{normal text}
\usebeamercolor{title in head/foot}
\usebeamercolor{subsection in head/foot}
\usebeamercolor{section in head/foot}
\usebeamercolor{frametitle}
\pgfdeclareverticalshading{beamer@aboveframetitle}{\the\paperwidth}{%
color(0ex)=(bblue);%
color(2ex)=(bblue);%
color(2ex)=(bblue)%
}
\pgfdeclareverticalshading{beamer@belowframetitle}{\the\paperwidth}{%
color(2ex)=(rred);%
color(0ex)=(bblue)%
}
}}
\makeatother
\begin{document}
\section{Answer}
\subsection{To the question}
\begin{frame}{That is the solution}
\begin{itemize}
\item Works like this!
\end{itemize}
\end{frame}
\end{document}
答案1
Darmstadt
使用smoothbars
外部主题,基本上就是miniframes
外部主题加上要删除的颜色过渡。因此,我建议不要删除它们,而是使用miniframes
外部主题:
\documentclass[xcolor=dvipsnames]{beamer}
\usetheme{Darmstadt}
\useoutertheme{miniframes}
\setbeamercolor{section in head/foot}{fg=black,bg=white}
\definecolor{bblue}{rgb}{0.05, 0.15, 0.25}
\definecolor{rred}{rgb}{0.6, 0.4, 0.4}
\setbeamercolor{palette primary}{bg=bblue,fg=white}
\setbeamercolor{palette quaternary}{bg=white,fg=bblue}
\setbeamercolor{subsection in head/foot}{bg=rred,fg=white}
\begin{document}
\section{Question}
\subsection{Subquestion}
\begin{frame}{I have a question}
\begin{itemize}
\item I do not like the shade in the header
\item I would like all horizontal bars to appear without color transition
\item What can I do about it?
\item Thank you
\end{itemize}
\end{frame}
\end{document}