In the standard article
class it would suffice to wrap the abstract
environment inside some appropriate element (a \colorbox
, for example); however, since you are using amsart
, additional work is required: you need to redefine the abstract
environment to use, for example, a mdframed
environment (from the mdframed
package) with the desired background color; a little example:
\documentclass{amsart}
\usepackage{geometry}
\usepackage{xcolor}
\usepackage{mdframed}
\usepackage{lipsum}% just to generate some text
\geometry{a4paper}
\makeatletter
\renewenvironment{abstract}{%
\ifx\maketitle\relax
\ClassWarning{\@classname}{Abstract should precede
\protect\maketitle\space in AMS documentclasses; reported}%
\fi
\global\setbox\abstractbox=\vtop \bgroup
\normalfont\Small
\list{}{\labelwidth\z@
\leftmargin3pc \rightmargin\leftmargin
\listparindent\normalparindent \itemindent\z@
\parsep\z@ \@plus\p@
\let\fullwidthdisplay\relax
}%
\item[]\vskip-\baselineskip
\begin{mdframed}[backgroundcolor=blue!20,hidealllines=true]
\item[\hskip\labelsep\scshape\abstractname.]%
}{%
\end{mdframed}\endlist\egroup
\ifx\@setabstract\relax \@setabstracta \fi
}
\makeatother
\title{some title}
\author{the author}
\date{} % delete this line to display the current date
\begin{document}
\begin{abstract}
\lipsum[4]
\end{abstract}
\maketitle
\lipsum[2]
\end{document}
On a side note, the abstract
environment must be placed before \maketitle
when using amsart
.
Here's another option using the framed
package:
\documentclass{amsart}
\usepackage{geometry}
\usepackage{xcolor}
\usepackage{framed}
\usepackage{lipsum}% just to generate some text
\geometry{a4paper}
\colorlet{shadecolor}{blue!20}
\makeatletter
\renewenvironment{abstract}{%
\ifx\maketitle\relax
\ClassWarning{\@classname}{Abstract should precede
\protect\maketitle\space in AMS documentclasses; reported}%
\fi
\global\setbox\abstractbox=\vtop \bgroup\begin{shaded}
\normalfont\Small
\list{}{\labelwidth\z@
\leftmargin3pc \rightmargin\leftmargin
\listparindent\normalparindent \itemindent\z@
\parsep\z@ \@plus\p@
\let\fullwidthdisplay\relax
}%
\item[\hskip\labelsep\scshape\abstractname.]%
}{%
\endlist\end{shaded}\egroup
\ifx\@setabstract\relax \@setabstracta \fi
}
\makeatother
\title{some title}
\author{the author}
\date{} % delete this line to display the current date
\begin{document}
\begin{abstract}
\lipsum[4]
\end{abstract}
\maketitle
\lipsum[2]
\end{document}
\usepackage{xcolor,mdframed}
, and wrap the abstract in\begin{mdframed}[backgroundcolor=yellow!10]
, \end{mdframed}`.amsart
due to the way it handles the abstract.