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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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 Nov 26 '14 at 11:04

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.