I use mdframed boxes with maths. As my work is about geometry, I end up having vertical 3d vectors, which take up quite some vertical space. This is leading to non-uniform vertical spacing:
MWE:
\documentclass[
10pt,
a4paper,
oneside,
headinclude,
footinclude,
BCOR5mm,
titlepage
]{scrartcl}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{amsmath}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usepackage{mathtools}
\usepackage{float}
\usepackage{bm}
\usepackage{pstricks-add}
\usepackage{commath}
\mdfdefinestyle{Beispiel}{%
linecolor=blue,
outerlinewidth=2pt,
roundcorner=20pt,
innertopmargin=\baselineskip,
innerbottommargin=\baselineskip,
innerrightmargin=20pt,
innerleftmargin=20pt,
backgroundcolor=gray!10!white
}
\begin{document}
\begin{mdframed}[style=Beispiel]
\begin{center}
{\textbf{Beispiel}}
\end{center}%
\bigskip
\noindent Zeigen Sie, dass die Gerade $g:\vec{x} = \left( \begin{smallmatrix} 7 \\ 3 \end{smallmatrix} \right) + t \cdot \left( \begin{smallmatrix} 1 \\ -1 \end{smallmatrix} \right) $
den Kreis\newline$c: \left( \vec{x}- \left( \begin{smallmatrix}2 \\ 1 \end{smallmatrix} \right) \right)^2 = 25$ schneidet und bestimmen Sie die Koordinaten der Schnittpunkte.
\begin{alignat*}{2}
\text{Einsetzen} \qquad &\left( \left( \begin{smallmatrix} 7 \\ 3 \end{smallmatrix} \right) + t \cdot \left( \begin{smallmatrix} 1 \\ -1 \end{smallmatrix} \right) - \left( \begin{smallmatrix}2 \\ 1 \end{smallmatrix} \right) \right)^2 = 25 \\
\text{Vereinfachen} \qquad & \left( \left( \begin{smallmatrix} 5 \\ 2 \end{smallmatrix} \right) + t \cdot \left( \begin{smallmatrix} 1 \\ -1 \end{smallmatrix} \right) \right)^2 = 25 \\
\text{Potenz aufl{\"o}sen} \qquad & (5+t)^2 + (2-t)^2 = 25 \\
& t_{1} = -1 \quad t_{2} = -2
\end{alignat*}%
\newline
Damit haben $g$ und $c$ zwei Schnittpunkte. Um die Punkte zu bestimmen, substituiert
man beide L\"{o}sungen in die Geradengleichung und erh\"{a}lt dann die Ortsvektoren
\begin{equation*}
\vec{P} = \left( \begin{smallmatrix} 6 \\ 4 \end{smallmatrix} \right) \quad \vec{Q} = \left( \begin{smallmatrix} 5 \\ 5 \end{smallmatrix} \right)
\end{equation*}
beziehungsweise die Punkte
\begin{equation*}
P(6|4), Q(5|5)
\end{equation*}
\end{mdframed}
\end{document}
\left
because otherwise the compiler will start to do weird things with the exponent after the bracket and it starts to look silly. I do not have much experience with vertical spacing, so I'd be very happy if someone could provide a solution with uniform spacing. The spacing may differ compared to the rest of the document (i.e. be much bigger) but should be consistent in the md-environment.