I am trying to make a new environment using mdframed
but some of the options I am trying to define are not working.
Here is the code:
\documentclass[11pt, twosided]{book}
\usepackage[T1]{fontenc}
\usepackage[framemethod]{mdframed}
\usepackage{setspace}
\usepackage{xcolor}
\mdfdefinestyle{mdfexample1}{leftmargin=1cm,rightmargin=2cm,%
innerleftmargin=1cm,innerrightmargin=1cm,roundcorner=10pt}
\newmdenv[skipabove=15pt,
skipbelow=7pt,
rightline=true,
leftline=true,
topline=true,
bottomline=true,
linecolor=green,
backgroundcolor=green!10,
innerleftmargin=15pt,
innerrightmargin=15pt,
innertopmargin=15pt,
leftmargin=2cm,
rightmargin=2cm,
linewidth=2pt,
innerbottommargin=15pt,
roundcorner=10pt]{mBox}
\newenvironment{caixa}
{\begin{mBox}\onehalfspacing\small\color{blue}\ttfamily}{\end{mBox}}
\begin{document}
\begin{caixa}
\begin{itemize}
\item Parque 1
\item Parque 2
\end{itemize}
\end{caixa}
\begin{mdframed}[style=mdfexample1]
In any right triangle, the area of the square whose side is the hypotenuse
is equal to the sum of the areas of the squares whose sides are the two
legs.
\end{mdframed}
\end{document}
This is the result I am getting:
As you can see, it is not respecting several options I define, such as roundcorners
, leftmargin
and rightmargin
. Does anyone know what is going wrong? Thank you in advance!
setspace
is also missing and the color definitions ! – user31729 Jun 13 '17 at 18:39color
is superseded byxcolor
so it is not necessary to use it – Moriambar Jun 13 '17 at 18:42mdframed
already callsxcolor
so… – Moriambar Jun 13 '17 at 18:47