Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question

1 Answer 1

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}

enter image description here

share|improve this answer
    
framemethod=pstricks does not seem to work with XeLaTeX, but framemethod=TikZ works great. –  Rafal 2 days ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.