This snippet doesn't render the boxes correctly using xelatex, though it works fine with pdflatex. you can see the box is cropped in correctly.
\documentclass[12pt]{article}
\usepackage{mdframed}
\begin{document}
outside of the
\global\mdfdefinestyle{exampledefault}{%
linecolor=red,middlelinewidth=3pt,%
leftmargin=1cm,rightmargin=1cm
}
\begin{mdframed}[style=exampledefault,roundcorner=5]
Example Text
\end{mdframed}
\begin{mdframed}[style=exampledefault,roundcorner=5]
Example Text
\end{mdframed}
boxes.
\end{document}
Anonymous