# Could not get round corner working in mdframed

Round corner is not working in mdframed environment although I followed the example shown in the mdframed package. Below is my code

\documentclass[10pt]{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[usenames]{color}
\usepackage[usenames]{xcolor}
\usepackage{mdframed}
\usepackage{lipsum}

\begin{document}

\mdfsetup{%
middlelinecolor=red,
middlelinewidth=2pt,
backgroundcolor=red!20,
roundcorner=20pt}

\begin{mdframed}
\lipsum[3]
\end{mdframed}

\end{document}

-

You have to pass framemethod=TikZ (or framemethod=pstricks if working with xelatex/latex...) option to \usepackage{mdframed} like

\usepackage[framemethod=TikZ]{mdframed}


Without any options, the frame is set to default in which roundcorner is equal to 0pt.

Full code:

\documentclass[10pt]{article}

\usepackage{amsmath}
\usepackage{amssymb}
%\usepackage[usenames]{color}
\usepackage[usenames]{xcolor}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{lipsum}

\begin{document}

\mdfsetup{%
middlelinecolor=red,
middlelinewidth=2pt,
backgroundcolor=red!20,
roundcorner=20pt}

\begin{mdframed}
\lipsum[3]
\end{mdframed}

\end{document}


-
framemethod=pstricks does not seem to work with XeLaTeX, but framemethod=TikZ works great. –  Rafal Nov 26 '14 at 11:04