本地更改投影机颜色主题

本地更改投影机颜色主题

我想知道是否可以只针对几张幻灯片在本地更改 Beamer 的颜色主题。我正在教研究生课程,有时会包含一些可能只与积极从事该特定领域研究的研究生相关的主题摘要。我想使用更灰的配色方案来区分这些幻灯片,以便以后不来上课的学生知道这些幻灯片与考试无关。

我注意到这只\usecolortheme{colortheme}在序言中有效,并且框架环境没有更改其颜色主题的选项。我知道我可以从单独的.tex文件生成这些幻灯片,然后稍后连接幻灯片,但这样我会失去一些交互功能。有没有什么解决方法可以让我在本地更改颜色主题?

编辑:我猜薛定谔的猫建议的是定义structuresection in head/foot使用自己的颜色,通过继承这两种颜色来定义其他每种颜色beamercolor,并创建如下自定义命令来在主题之间切换:

\newcommand{\maintheme}{
  \setbeamercolor{structure}{fg=main,bg=secondary}
  \setbeamercolor{section in head/foot}{fg=main,bg=secondarylight}
}
\newcommand{\sidetheme}{
  \setbeamercolor{structure}{fg=white,bg=gray}
  \setbeamercolor{section in head/foot}{fg=white,bg=lightgray}
}

这个想法很棒,但我遇到了一些意想不到的情况,颜色要么没有改变(背景颜色sectionnavigation),要么颜色在幻灯片上晚了一步改变(项目itemize符号),要么变成了与最初定义的颜色不同的颜色(enumerate item)。你知道这是怎么回事吗?

抱歉,MWE 有点长,主要是在每张幻灯片上都包含一个block、一个itemize和一个环境:enumerate

\documentclass[10pt]{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}
}

\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}

\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}

\maintheme

\section{Topic 2}

\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}

\end{document}

相关内容