Tenho um mdframed
ambiente e quero outro quadro, apenas com cor de fundo, dentro dele, mas não desejo que o título acima seja herdado.
Por isso usei o ambiente sombreado. Meu problema é que não consigo alinhar a shaded
caixa interna com as linhas internas da externa.
Existe uma maneira de encaixar as duas caixas perfeitamente, sem espaços em branco e sem sobreposições de uma sobre a outra?
\documentclass[9pt,twoside,openright,showtrims]{memoir}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{mathspec,xltxtra}
\usepackage{color, colortbl}
\usepackage[framemethod=TikZ]{mdframed}
\colorlet{shadecolor}{gray!10}
\newcounter{solved}[chapter]
\renewcommand{\thesolved}{\thechapter.\arabic{solved}}
\newenvironment{solved}[1][]{%
\refstepcounter{solved}
\begin{mdframed}[%
frametitle={\textbf{\Large{SOLVED EXAMPLE} \thesolved}\ \\ #1},
frametitlerule=true,
frametitlerulewidth=1pt,
frametitlerulecolor=black,
innertopmargin=-0.7em,%
innerleftmargin=0.4em,%,
hidealllines=true,leftline=true,
%frametitlebackgroundcolor=gray!70,
linewidth=10pt,
linecolor=gray!80,
%fontcolor=white,%
%backgroundcolor=gray!10
]%
}{%
\end{mdframed}
}
\begin{document}
\begin{solved}[Lorem ipsum dolor sit amet]
\begin{shaded}
Solve this one
\begin{enumerate}
\item
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\item
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
\item
Velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
\end{enumerate}
\end{shaded}
\b{\Large{SOLUTION}}
\noindent
Velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
\end{solved}
\end{document}
Responder1
Você pode usar outro mdframed
para a área sombreada interna. Para isso defina um estilo como
\mdfdefinestyle{style2}{frametitle={},innertopmargin=5pt,linecolor=blue!20,%
linewidth=2pt,hidealllines=true,topline=true,backgroundcolor=gray!20}
e aplique-o ao mdframed
ambiente interno.
\documentclass[9pt,twoside,openright,showtrims]{memoir}
\usepackage{amsmath,amssymb,amsfonts}
%\usepackage{mathspec,xltxtra}
\usepackage{color, colortbl}
\usepackage[framemethod=TikZ]{mdframed}
\colorlet{shadecolor}{gray!10}
\newcounter{solved}[chapter]
\renewcommand{\thesolved}{\thechapter.\arabic{solved}}
\newenvironment{solved}[1][]{%
\refstepcounter{solved}
\begin{mdframed}[%
frametitle={\hspace{0.5em}\textbf{\Large SOLVED EXAMPLE \thesolved}\ \\ \hspace*{0.5em}#1},
frametitlerule=true,
frametitlerulewidth=1pt,
frametitlerulecolor=black,
innertopmargin=0em,%
innerleftmargin=0em,%,
innerrightmargin=0em,
hidealllines=true,leftline=true,
%frametitlebackgroundcolor=gray!70,
linewidth=10pt,
linecolor=gray!80,
%fontcolor=white,%
%backgroundcolor=gray!10
]%
}{%
\end{mdframed}
}
\mdfdefinestyle{style1}{frametitle={},innertopmargin=0pt,
linewidth=0.5em,linecolor=white,hidealllines=true,rightline=true,leftline=true,
}
\mdfdefinestyle{style2}{frametitle={},innertopmargin=5pt,innerrightmargin=0.5em,%
linewidth=2pt,linecolor=gray!20,hidealllines=true,topline=true,leftline=true,
linewidth=0.4em,backgroundcolor=gray!20}
\begin{document}
\begin{solved}[Lorem ipsum dolor sit amet]
\begin{mdframed}[style=style2]
Solve this one
\begin{enumerate}
\item
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\item
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
\item
Velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
\end{enumerate}
\end{mdframed}
\begin{mdframed}[style=style1]
{\bfseries\Large{SOLUTION}}
\noindent
Velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
\end{mdframed}
\end{solved}
\end{document}