在 beamer 的两种用户定义配色方案之间切换

在 beamer 的两种用户定义配色方案之间切换

我对 完全陌生beamer,我正在尝试在两种自定义颜色之间切换。我不知道为什么新命令\sidetheme对输出没有影响。侧面主题是灰色的,而主主题是黄色的。特别是,我无法重新定义 的头部/脚部中的结构和部分\sidetheme。附件是代码,提前谢谢您。

\documentclass[10pt, xcolor=dvipsnames]{beamer}
\usetheme{Frankfurt}

\definecolor{main}{rgb}{0.4675, 0.11, 0.115}
\definecolor{secondary}{rgb}{0.75, 0.625, 0.15}
\definecolor{secondarylight}{rgb}{0.896, 0.83, 0.56}

\setbeamercolor{structure}{fg=main,bg=secondary}
\setbeamercolor{section in head/foot}{fg=main,bg=secondarylight}
\setbeamercolor{frametitle}{parent=structure}
\setbeamerfont{frametitle}{size=\large}
\setbeamercolor{title}{parent=section in head/foot}
\setbeamercolor{item}{fg=structure.bg}
\setbeamertemplate{enumerate items}[default]
\setbeamercolor{enumerate item}{parent=structure}
\setbeamertemplate{blocks}[rounded][shadow=true]
\setbeamerfont{block title}{series=\bfseries}
\setbeamercolor{block title}{fg=structure.fg,bg=structure.bg} 
\setbeamercolor{block body}{bg=white}
\beamertemplatenavigationsymbolsempty


\newcommand{\sidetheme}{
  \setbeamercolor*{structure}{fg=white,bg=gray}
  \setbeamercolor*{section in head/foot}{fg=white,bg=lightgray}
  \setbeamercolor*{item}{fg=section in head/foot.bg}
  \setbeamercolor*{enumerate item}{fg=structure.bg}
  \setbeamercolor*{palette primary}{bg=gray}
  \setbeamercolor*{palette secondary}{bg=gray}
  \setbeamercolor*{palette tertiary}{bg=gray}
  \setbeamercolor*{palette quaternary}{bg=gray}
}

% \newcommand{\maintheme}{
%   \setbeamercolor*{structure}{fg=main,bg=secondary}
%   \setbeamercolor*{section in head/foot}{fg=main,bg=secondarylight}
%   \setbeamercolor*{item}{fg=structure.bg}
%   \setbeamercolor*{enumerate item}{parent=structure}
% }

\title{Changing Color Schemes Locally}

\begin{document}

\thispagestyle{empty}
\maketitle
\setcounter{beamerpauses}{1}
\setcounter{framenumber}{0}

\section{Topic 1}

\begin{frame}
\frametitle{Information Central to the Course}

\begin{definition}
Some very insightful definition.
\begin{enumerate}
\item Yada
\item Yada
\end{enumerate}
\end{definition}
\medskip

\textbf{Interpretation:}
\begin{itemize}
\item Important point.
\item Another important point.
\end{itemize}
\end{frame}


{\sidetheme
\begin{frame}
\frametitle{Additional Information}

\begin{definition}
Some very insightful definition.
\begin{enumerate}
\item Yada
\item Yada
\end{enumerate}
\end{definition}
\medskip

\textbf{Interpretation:}
\begin{itemize}
\item Important point.
\item Another important point.
\end{itemize}
\end{frame}
}
\end{document}

相关内容