您好,我正在编写一个投影仪演示文稿,我想theorem
从一个地方更改块中文本的颜色,这会影响我的整个演示文稿。
这可能吗?
我的例子:
\documentclass{beamer}
\usetheme{Madrid}
\usecolortheme[RGB={201,20,35}]{structure}
\setbeamercolor{background canvas}{bg=black}
\setbeamercolor{normal text}{fg=white}
\setbeamercolor{theorem text}{fg=black}
%\useoutertheme{shadow}
\useinnertheme{rounded}
\usepackage[utf8]{inputenc}
\usepackage{default}
\begin{document}
\begin{frame}{Primul Slide}
Bla bla bla
Bla bla bla
\begin{theorem}
This is a theorem it is very important!!
\end{theorem}
\end{frame}
\end{document}
答案1
一种可能性是设置block body
和/或block title
颜色以产生所需的结果;由于修改只能影响定理,因此etoolbox
可以使用该包来修补所需的环境;使用问题中提供的设置的一个小例子:
\documentclass{beamer}
\usepackage{etoolbox}
\usetheme{Madrid}
\usecolortheme[RGB={201,20,35}]{structure}
\setbeamercolor{background canvas}{bg=black}
\setbeamercolor{normal text}{fg=white}
\AtBeginEnvironment{theorem}{%
\setbeamercolor{block body}{fg=black,bg=blue!40}
}
\begin{document}
\begin{frame}{Primul Slide}
test text
\begin{theorem}
This is a theorem it is very important!!
\end{theorem}
\end{frame}
\end{document}
请注意我抑制了
\setbeamercolor{theorem text}{fg=black}
从原始代码中,使用更改字体颜色
\setbeamercolor{block body}{fg=black,bg=blue!40}