当我更改脚注颜色时,如何防止 Beamer 更改正常文本颜色?

当我更改脚注颜色时,如何防止 Beamer 更改正常文本颜色?

当我使用 更改 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}

相关内容