投影仪海报中的定理环境无法正常工作

投影仪海报中的定理环境无法正常工作

我正在尝试让警报块内的定理具有与警报块相同的背景颜色。我看过其他关于此问题的讨论,并尝试了这些解决方案,即在 documentclass 中的选项中添加 noamsthm。当我这样做时,文件将不再编译。有什么建议吗?这是代码:

\documentclass[final,noamsthm]{beamer}

\usepackage[scale=1.24]{beamerposter} % Use the beamerposter package for laying out the poster
\usepackage{amssymb}
\usepackage{amsmath}

\usetheme{confposter} % Use the confposter theme supplied with this template

\setbeamercolor{block title}{fg=ngreen,bg=white} % Colors of the block titles
\setbeamercolor{block body}{fg=black,bg=white} % Colors of the body of blocks
\setbeamercolor{block alerted title}{fg=white,bg=dblue!70} % Colors of the highlighted block titles
\setbeamercolor{block alerted body}{fg=black,bg=dblue!10} % Colors of the body of highlighted blocks
% Many more colors are available for use in beamerthemeconfposter.sty

%-----------------------------------------------------------
% Define the column widths and overall poster size
% To set effective sepwid, onecolwid and twocolwid values, first choose how many columns you want and how much separation you want between columns
% In this template, the separation width chosen is 0.024 of the paper width and a 4-column layout
% onecolwid should therefore be (1-(# of columns+1)*sepwid)/# of columns e.g. (1-(4+1)*0.024)/4 = 0.22
% Set twocolwid to be (2*onecolwid)+sepwid = 0.464
% Set threecolwid to be (3*onecolwid)+2*sepwid = 0.708

\newlength{\sepwid}
\newlength{\onecolwid}
\newlength{\twocolwid}
\newlength{\threecolwid}
\setlength{\paperwidth}{48in} % A0 width: 46.8in
\setlength{\paperheight}{36in} % A0 height: 33.1in
\setlength{\sepwid}{0.024\paperwidth} % Separation width (white space) between columns
\setlength{\onecolwid}{0.22\paperwidth} % Width of one column
\setlength{\twocolwid}{0.464\paperwidth} % Width of two columns
\setlength{\threecolwid}{0.708\paperwidth} % Width of three columns
\setlength{\topmargin}{-0.5in} % Reduce the top margin size
%-----------------------------------------------------------

\usepackage{graphicx}  % Required for including images

\usepackage{booktabs} % Top and bottom rules for tables

%----------------------------------------------------------------------------------------
%   TITLE SECTION
%----------------------------------------------------------------------------------------

\title{A Curious Proof of Fermat's Little Theorem} % Poster title

%\author{Michaela Fassler} % Author(s)

%\institute{Southwest Minnesota State University} % Institution(s)

%----------------------------------------------------------------------------------------

\begin{document}

\addtobeamertemplate{block end}{}{\vspace*{2ex}} % White space under blocks
\addtobeamertemplate{block alerted end}{}{\vspace*{2ex}} % White space under highlighted (alert) blocks

\setlength{\belowcaptionskip}{2ex} % White space under figures
\setlength\belowdisplayshortskip{2ex} % White space under equations

\begin{frame}[t] % The whole poster is enclosed in one beamer frame

\begin{columns}[t] % The whole poster consists of three major columns, the second of which is split into two columns twice - the [t] option aligns each column's content to the top

\begin{column}{\sepwid}\end{column} % Empty spacer column

\begin{column}{\onecolwid} % The first column

%----------------------------------------------------------------------------------------
%   OBJECTIVES
%----------------------------------------------------------------------------------------


%----------------------------------------------------------------------------------------
%   QUICK REVISION
%----------------------------------------------------------------------------------------
\begin{alertblock}{Introduction}
\begin{theorem}
If $p$ is prime and $a \in  \mathbb{Z}$, then $p$ divides $ a^{\,p} - a$
or in other words, $a^{\,p}\equiv a \pmod{p}$ [1]
\end{theorem}

How Fermat's Little Theorem is commonly used:
\begin{center}
$3^{31} \equiv x \pmod{7}$ \\
By thm, $3^7 \equiv 3 \pmod{7} $ \\
$3^{31} = (3^7)^{4} * (3^3)$ \\
$(3^7)^4 (3^3) \equiv (3^4) * (3^3) \equiv 4*6 \equiv 24 \equiv 3 \pmod{7} $
$ \therefore 3^{31} \equiv 3 \pmod{7} $
\end{center}


\end{alertblock}

\begin{block}{Proof 1: Induction using Binomial Coefficients}

When $a=0$ then $p \, |0^{\,p} - 0$ is always true \\
When $a=1$ then $p \, |1^{\,p} -1$ is always true. \\
Assume $p \,|a^{\,p} - a$ \\ %Inductive hypothesis
Examine $(a+1)^{\,p} - (a+1)$ \\ %n+1%

\begin{eqnarray*}
(a+1)^{\,p} = a^{\,p} + \dbinom{p}{1} a^{\,p-1} + \dbinom{p}{2} a^{\,p-2} + ... + \dbinom{p}{p-1} a+1
\end{eqnarray*}

\begin{eqnarray*}
(a+1)^{\,p} - a^{\,p} - 1 = \dbinom{p}{1} a^{\,p-1} + \dbinom{p}{2} a^{\,p-2} + ... + \dbinom{p}{p-1} a
\end{eqnarray*}
%Move a and 1 over%
% p divides right side (cuz combination) therefor p divides the left side%

\begin{equation*}
p \, | \, ((a+1)^{p} - a^{p} - 1) + (a^p - a) %We can add this because it is also divisible by p%
\end{equation*}

\begin{equation*}
\therefore p \, | \,  (a+1)^{p} -(a+1)
\end{equation*}
\raggedleft [2]

\end{block}

%------------------------------------------------


%----------------------------------------------------------------------------------------

\end{column} % End of the first column

\begin{column}{\sepwid}\end{column} % Empty spacer column

\begin{column}{\twocolwid} % Begin a column which is two columns wide (column 2)



\begin{column}{\sepwid}\end{column} % Empty spacer column

\begin{column}{\onecolwid} % The third column

%----------------------------------------------------------------------------------------
%   CONCLUSION
%----------------------------------------------------------------------------------------

\begin{block}{Proof 2: Using Lagrange's Theorem}
\begin{theorem}{Lagrange's Theorem} If G is a finite group and H is a subgroup of G, then the order of H divides the order of G aka $ |H| \,\, \big| \,\, |G|$
\end{theorem}

If $a=0$ then $a^{\, p} \equiv a \pmod{p} $ is true \\
Assume $ a \neq 0$ \\
Take $\bar{a} = a + p \mathbb{Z} $ \\
So, $ \bar{a} \in ( \mathbb{Z} / p \mathbb{Z} )^{x} $ \\
Let H be a subgroup of $ ( \mathbb{Z} / p \mathbb{Z} )^{x}$ generated by $\bar{a}$ \\
$$ |H| = | \bar{a} |$$
$$ |H| \, \, \big{|} \, \, (\mathbb{Z} / p \mathbb{Z} )^{x} $$
So we can write $$p-1 = m |H| \, , m \in \mathbb{Z} $$ \\
$$ \bar{a} ^{\,p-1} \equiv \bar{a} ^{|H|m} \equiv \bar{1} ^{m} \equiv \bar{1} \pmod{p} $$ \\ %WHY%
Which implies, $$a^{\, p-1} \equiv 1 \pmod{p} $$ \\
$$ \therefore a^{\,p} \equiv a \pmod{p} $$
\raggedleft [3]


\end{block}


%----------------------------------------------------------------------------------------
%   ACKNOWLEDGEMENTS
%----------------------------------------------------------------------------------------


\begin{alertblock}{References}
\begin{itemize}
\item 1. Alkauskas, Giedrius. A Curious Proof of Fermat's Little Theorem. The American Mathematical Monthly, vol. 116, no. 4, 2009, pp. 362–364. JSTOR, JSTOR, www.jstor.org/stable/40391097. \\
\item 2. Tsumura, Yu. Use Lagrange's Theorem to Prove Fermat's Little Theorem. Problems in Mathematics, 15 Dec. 2016, yutsumura.com/use-lagranges-theorem-to-prove-fermats-little-theorem/. \\
\item 3.  Weisstein, Eric W. Fermat's Little Theorem. From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/FermatsLittleTheorem.html
\end{itemize}

\end{alertblock}


%----------------------------------------------------------------------------------------

\end{column} % End of the third column

\end{columns} % End of all the columns in the poster

\end{frame} % End of the enclosing frame

\end{document}

相关内容