When a mdframed
frame begins with a display math, and the break occurs just at the end of the display math environment, the widths of the frame are different across the page break boundary:
Also note the inconsistent spacing on the first few lines of the second page.
Notes:
- The page geometry changes were to allow for a better image to show the problem.
- I encounter this problem with Version
2012/04/08 v1.5
, but apparently the earlier version2012/03/04 v1.4
works just fine.
References:
- mdframed : Bug with page break?
- Inconsistent horizontal width of mdframed with only display math content
Code:
\documentclass{article}
\usepackage[bottom=0.2cm,top=0.2cm]{geometry}
\usepackage{amsmath}
\usepackage{lipsum}
\usepackage{mdframed}
\newmdenv[%
leftmargin=0.5cm,
rightmargin=0.5cm,
backgroundcolor=yellow,%
]{Myframe}%
\begin{document}
\vspace*{24.75cm}
\begin{Myframe}
\begin{align*}
e &= mc^2\\
F &= ma
\end{align*}
\lipsum[1]
\end{Myframe}
\end{document}