I am currently typesetting a document in a two column layout. Many text blocks are put into colored boxes, currently implemented with TikZ. This works; however, I have to split the text blocks manually between two columns, otherwise the whole column will move to the second column, as the tikzpicture gets too large. Is there any way to automatically split all nodes of a tikzpicture when the bottom of a column is reached? If not, can I implement this using a theorem package?
\documentclass[twocolumn]{scrartcl}
\usepackage{lipsum}
\usepackage{tikz}
\newcommand\mybox[1]{%
\noindent\begin{tikzpicture}%
\node[rectangle, draw=red!40, fill=red!20, inner sep=10pt] (box){%
\begin{minipage}{0.9\columnwidth}%
#1%
\end{minipage}%
};%
\end{tikzpicture}%
}
\begin{document}
\section{Observe overflow:}
\mybox{\lipsum[1]}
\mybox{\lipsum[3]}
\newpage
\section{Correctly set:}
\mybox{\lipsum[4]}
\end{document}


mdframedpackage. – yannisl Oct 10 '11 at 14:06