![当我更改脚注颜色时,如何防止 Beamer 更改正常文本颜色?](https://linux22.com/image/233851/%E5%BD%93%E6%88%91%E6%9B%B4%E6%94%B9%E8%84%9A%E6%B3%A8%E9%A2%9C%E8%89%B2%E6%97%B6%EF%BC%8C%E5%A6%82%E4%BD%95%E9%98%B2%E6%AD%A2%20Beamer%20%E6%9B%B4%E6%94%B9%E6%AD%A3%E5%B8%B8%E6%96%87%E6%9C%AC%E9%A2%9C%E8%89%B2%EF%BC%9F.png)
当我使用 更改 Beamer 中的脚注颜色时\setbeamercolor{footnote}{fg=blue}
,我最终也会无意中更改所有其他幻灯片上的正常文本颜色。更奇怪的是,正常文本仅在带有脚注的幻灯片上是正确的。以下示例说明了我的问题:
\documentclass{beamer}
\setbeamercolor{footnote}{fg=blue}
\begin{document}
\begin{frame}
It seems like adding a footnote\footnote{Like this} will cause the normal text of subsequent slides to inherit the footnote's color.
\end{frame}
\begin{frame}
See? This text is now blue.
\end{frame}
\begin{frame}
Invoking another footnote\footnote{like this} will cause the fonts to return to normal color, at least for this slide.
\end{frame}
\begin{frame}
But this text will again be blue (the color of the footnotes)!
\end{frame}
\end{document}
我正在使用 MacTex 2010。
答案1
它看起来像一个错误...但这应该有帮助
\documentclass{beamer}
\setbeamercolor{footnotemark}{fg=blue}
\setbeamertemplate{footnote}{%
\parindent 1em\noindent%
\raggedright
\hbox to 1.8em{\hfil\insertfootnotemark}
\textcolor{blue}{\insertfootnotetext}\par}
...
答案2
使其每帧都本地化。
\documentclass{beamer}
%{\setbeamercolor{footnote}{fg=blue}}
\begin{document}
\begin{frame}
\setbeamercolor{footnote}{fg=blue}
It seems like adding a footnote\footnote{Like this} will cause the normal text of subsequent slides to inherit the footnote's color.
\end{frame}
\begin{frame}
See? This text is now blue.
\end{frame}
\begin{frame}
\setbeamercolor{footnote}{fg=blue}
Invoking another footnote\footnote{like this} will cause the fonts to return to normal color, at least for this slide.
\end{frame}
\begin{frame}
But this text will again be blue (the color of the footnotes)!
\end{frame}
\end{document}
答案3
好吧...重新定义模板
\documentclass{beamer}
\setbeamercolor{footnote mark}{fg=green} % the mark (1, 2, ...)
\setbeamertemplate{footnote}{\mbox{ \insertfootnotemark \textcolor{red}{ \insertfootnotetext}}}
% local use of a color (its not so beamer like but works)
\begin{document}
\frame{\frametitle{One}
some text in black
\footnote{don´t use red!}
red and green footnote
}
\frame{
\frametitle{Two}
not red
}
\end{document}