如中所示beamerbasetheorems.sty
:
\documentclass[notheorems]{beamer}
\theoremstyle{plain}
\newtheorem{theorem}{\translate{Theorem}}
\newtheorem{example}[theorem]{\translate{Example}}
% or
\theoremstyle{definition}
\newtheorem{theorem}{\translate{Theorem}}
\newtheorem{example}[theorem]{\translate{Example}}
% or
\theoremstyle{example}
\newtheorem{theorem}{\translate{Theorem}}
\newtheorem{example}[theorem]{\translate{Example}}
不管你喜欢什么风格。您还可以更改 [alert|example] 块的外观:
\setbeamercolor{block body}{fg=blue,bg=white}
\setbeamercolor{block body alerted}{fg=blue,bg=white}
\setbeamercolor{block body example}{fg=blue,bg=white}
(没有尝试过,只是查看了投影仪的来源)
编辑:仍然不确定您想要做什么,但您可以定义自己的定理样式:
\makeatletter
\def\th@something{%
\normalfont % body font
\def\inserttheoremblockenv{alertblock}
}
\theoremstyle{something}
\newtheorem{warn}[theorem]{WARNING}
\makeatother
\begin{warn}[Attention please]
This is dangerous
\end{warn}
(这行得通,我测试过)
您有 3 个预定义的块,您可以使用 \defbeamertemplate 对其进行自定义。查看有关如何执行此操作的来源和文档。如果您需要更多块环境,请参阅basebeamerlocalstructure.sty
:
\newenvironment<>{alertblock}[1]{%
\begin{actionenv}#2%
\def\insertblocktitle{#1}%
\par%
\mode<presentation>{%\usebeamerfont{block}%
\setbeamercolor{local structure}{parent=alerted text}}%
\usebeamertemplate{block alerted begin}}
{\par%
\usebeamertemplate{block alerted end}%
\end{actionenv}}
希望有帮助