TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

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.

share|improve this question

closed as too localized by cmhughes, Kurt, Werner, Andrew Swann, Stefan Kottwitz Oct 29 '12 at 6:27

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Your code runs fine for me. May be it is time to update your tex distro! :-) – Harish Kumar Oct 28 '12 at 23:07
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
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