You could take a look at mdframed
, which also allows pagebreaks, and allows you to customize the look of the frame. A simple example, which puts a box similar to \fbox
around the content.
\documentclass{article}
\usepackage{mdframed}
\usepackage{lipsum} % for creating dummy text
\begin{document}
\begin{mdframed}
\lipsum[1]
\begin{equation}
f(x) = \sin(x)
\end{equation}
\lipsum[2]
\end{mdframed}
\end{document}
A second example, showing some more of what the package can do. See the manual for the full story.
\documentclass{article}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{lipsum}
\mdfdefinestyle{MyFrame}{%
linecolor=blue,
outerlinewidth=2pt,
roundcorner=20pt,
innertopmargin=\baselineskip,
innerbottommargin=\baselineskip,
innerrightmargin=20pt,
innerleftmargin=20pt,
backgroundcolor=gray!50!white}
\begin{document}
\begin{mdframed}[style=MyFrame]
\lipsum[1]
\begin{equation}
f(x) = \sin(x)
\end{equation}
\lipsum[2]
\end{mdframed}
\end{document}
