# Inserting non-indented mdframed object in outline

I want to be able to put an mdframed object inside of an outline environment without it being indented to the indentation level that I'm at, and so that I can continue the outline after the mdframed like below:

    I. text text text
A. text text text
__________________________
|                         |
|  MD FRAMED STUFF        |
|                         |
|                         |
|_________________________|
B. text text text


Below is the code that I'm trying to use, but I can't get back to level \2 after level \0. I've tried adding the leftmargin =-1.75cm and that will move the mdframed over, but I have to guess at the amount by which to move it over (ie, -1.75 cm or -1.7cm or ...) and then if I add more to my outline, it is a less than ideal strategy. Please help!

\documentclass[11pt]{article}

\usepackage{enumerate}
\usepackage{outlines}
\usepackage{enumitem}
\setenumerate[1]{label=\Roman*.}
\setenumerate[2]{label=\Alph*.}
\setenumerate[3]{label=\arabic*.}
\setenumerate[4]{label=\alph*.}

\usepackage{mdframed}

\title{Notes}
\author{}
\date{}

\begin{document}
\maketitle

\begin{outline}[enumerate]
\1 text text text
\2 text text text
\0
\begin{mdframed}[frametitle=MD FRAMED STUFF:]
MD FRAMED STUFF
\end{mdframed}
\2 text text text
\end{outline}

\end{document}


At this site, in section 1.4 they seem to be doing something like what I'm interested in, but I don't understand what each part means, and if I could just adjust set those items for the area I want the mdframed, and not the entire paper. http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/outlines/outlines.pdf

-

No sledgehammers: the amount of indentation in a list is stored in \@totalleftmargin.

\documentclass[11pt]{article}
\usepackage[pass,showframe]{geometry} % just for the example

\usepackage{enumerate}
\usepackage{outlines}
\usepackage{enumitem}
\setenumerate[1]{label=\Roman*.}
\setenumerate[2]{label=\Alph*.}
\setenumerate[3]{label=\arabic*.}
\setenumerate[4]{label=\alph*.}

\usepackage{mdframed}

\usepackage{color}
\mdfsetup{linecolor=red} % just for the example

\begin{document}

\begin{outline}[enumerate]
\1 text text text
\2 text text text
\begin{mdframed}[
frametitle=MD FRAMED STUFF:,
leftmargin=-\csname @totalleftmargin\endcsname % the devious trick
]
MD FRAMED STUFF
\end{mdframed}
\2 text text text
\end{outline}

\end{document}


Adjust the vertical spacing with skipabove and skipbelow.

-
This is absolutely wonderful, as I can set it as a default for all the mdframed sections in my document. Thanks!!! – ruya Feb 10 '13 at 0:30

LaTeX lists are based on \parshape. If you don't mind bashing a sledgehammer through all the latex interfaces you can just zero out the parshape locally:

\documentclass[11pt]{article}

\usepackage{enumerate}
\usepackage{outlines}
\usepackage{enumitem}
\setenumerate[1]{label=\Roman*.}
\setenumerate[2]{label=\Alph*.}
\setenumerate[3]{label=\arabic*.}
\setenumerate[4]{label=\alph*.}

\usepackage{mdframed}

\title{Notes}
\author{}
\date{}

\begin{document}
\maketitle
\makeatletter
\begin{outline}[enumerate]
\1 text text text
\2 text text text
\par{\parshape0 \linewidth\textwidth
\begin{mdframed}[frametitle=MD FRAMED STUFF:]
MD FRAMED STUFF
\end{mdframed}
\par
}
\2 text text text
\end{outline}

\end{document}

-
Why, thanks! I don't mind at all :-P Maybe I should? – ruya Feb 8 '13 at 20:39