I have a slight problem with the framed
package when combined with the itemize
environment:
\documentclass[parskip]{scrartcl}
\usepackage{fancybox}
\usepackage{framed}
\newenvironment{simpages}%
{\def\FrameCommand{\fboxsep=\FrameSep \shadowbox}\MakeFramed {\FrameRestore}}%
{\endMakeFramed}
\begin{document}
Some text
\begin{simpages}
\begin{itemize}
\item Foo
\item Bar
\item Baz
\end{itemize}
\end{simpages}
Some more text
\end{document}
This leads to the following result:
As you can see, the vertical space above the items is much larger than the one below – this is what I would like to correct. I've tried to switch to the mdframed
package as suggested here, but so far unsuccessfully:
\documentclass[parskip]{scrartcl}
\usepackage{mdframed}
\newmdenv{simpages}
\begin{document}
Some text
\begin{simpages}
\begin{itemize}
\item Foo
\item Bar
\item Baz
\end{itemize}
\end{simpages}
Some more text
\end{document}
The result is pretty much the same, only now the shadow effect is missing…
Why is the vertical space above and below the contents of the environment different, and how do I adjust it?
Best Answer
Here there are two options to produce the shadowed box, one using
mdframed
, and the other one withtcolorbox
:And with the
framed
package, making some adjustments so theparskip
option doesn't interfere: