3

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

\documentclass{article}

\usepackage{xcolor}
\usepackage{mdframed}
\usepackage{lipsum}

\begin{document}
\begin{mdframed}[backgroundcolor=gray!20, linecolor=white]
\lipsum[1]
\end{mdframed}
\end{document}

but when I try to use his exact same code

\documentclass{article}

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

\theoremstyle{break}
\theoremheaderfont{\bfseries}
\newmdtheoremenv[%
linecolor=gray,leftmargin=60,%
rightmargin=40,
backgroundcolor=gray!40,%
innertopmargin=0pt,%
ntheorem]{myprop}{Proposition}[section]

\begin{document}

\section{mdframed for the win}
\begin{myprop}
\lipsum[1]
\end{myprop}

\end{document}

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.

German
  • 203

0 Answers0