I was trying to highlight some text as shown in this post, but I'm having problems. the following works for me



\begin{mdframed}[backgroundcolor=gray!20, linecolor=white]

but when I try to use his exact same code


\usepackage{xcolor}     % for colour
\usepackage{lipsum}     % for sample text
\usepackage{ntheorem}   % for theorem-like environments
\usepackage{mdframed}   % for framing



\section{mdframed for the win}


I get an error "Undefined control sequence. l.10 \newmdtheoremenv".Do you know what could be the problem? I'm kind of new with latex and I have no clue.

  • 4
    Your code runs fine for me. May be it is time to update your tex distro! :-) – user11232 Oct 28 '12 at 23:07
  • 1
    Yes, you need at least a 2011 distribution. I can reproduce your problem with TeXLive 2010, but works fine with TeXLive 2011, and TeXLive 2012. – Peter Grill Oct 29 '12 at 0:17
  • 1
  • I think I had the 2011 distribution, but anyway, I updated it and it worked now. Thank you. – German Oct 29 '12 at 20:48