我只是想改变证明块的颜色,使其与定理块的颜色不同。
\documentclass[11pt]{beamer}
\usetheme{Warsaw}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\setbeamertemplate{navigation symbols}{}
\setbeamersize{text margin left=1.5cm,text margin right=1.5cm}
\setbeamertemplate{frametitle}[default][center]
\begin{document}
\title{My Presentation}
\subtitle{Using Beamer}
\author{Joe Bloggs}
\institute{University of ShareLaTeX}
\date{\today}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}{Characterisation of nilpotent groups}
\begin{theorem}
let $G$ be a group. Suppose that $H_{1}$, $H_{2}$, $K_{1}$ and $K_{2}$ are subgroups of $G$ such that $H_{1} \subseteq H_{2}$ and $K_{1} \subseteq K_{2}$. Then $[H_{1},K_{1}]\leq [H_{2},K_{2}]$.
\end{theorem}
\begin{proof}
Suppose $[H_{1},K_{1}]$ is generated by $[h,k]$ where $h\in H_{1} \;\text{and}\; k\in K_{1}$. Now since each of these generators are in $[H_{2},K_{2}]$, the proof follows.
\end{proof}
答案1
\documentclass{beamer}
\addtobeamertemplate{proof begin}{%
\setbeamercolor{block title}{fg=black,bg=red!50!white}%
\setbeamercolor{block body}{fg=red, bg=red!30!white}%
}{}
\addtobeamertemplate{theorem begin}{%
\setbeamercolor{block title}{fg=black,bg=orange!50!white}%
\setbeamercolor{block body}{fg=orange, bg=orange!30!white}%
}{}
\addtobeamertemplate{qed symbol}{%
\color{red}%
}
\begin{document}
\begin{frame}
\begin{theorem}[My theorem]
A theorem.
\end{theorem}
\begin{proof}[My proof]
A proof.
\end{proof}
\end{frame}
\end{document}