Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to insert non-indented chunks of text/image/graphs into an outline. I would like to avoid nested enumerate environments. Anyone have a simple solution using something similar to what I have below? Thanks!

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

\begin{document}
\begin{outline}[enumerate]
    \1 Some text
        \2 Other Text 
            \3 Other other text
WANTED: to be able to insert text and graph here that is NOT indented
            \3 More other other text
        \2 More other text
\end{outline}
\end{document}
share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

You can use \hspace*{\dimexpr\linewidth-\textwidth\relax} to move the following text all the way to the left side margin:

\documentclass{article}
\usepackage{xcolor}
\begin{document}

\noindent\raisebox{0pt}[0pt][0pt]{\color{red}\rule[-2in]{0.4pt}{2in}}
\begin{itemize}
\item Random stuff. blah blah blah. More random stuff.
\item Random stuff. blah blah blah. More random stuff.
    \begin{itemize}
    \item Random stuff. blah blah blah. More random stuff.
    \item Random stuff. blah blah blah. More random stuff.
        \begin{itemize}
        \item Random stuff. blah blah blah. More random stuff.
        \item Random stuff. blah blah blah. More random stuff.

        \hspace*{\dimexpr\linewidth-\textwidth\relax}\fbox{\color{blue}Nonindented material}

        \item Random stuff. blah blah blah. More random stuff.
        \end{itemize}
    \item Random stuff. blah blah blah. More random stuff.
    \end{itemize}
\item Random stuff. blah blah blah. More random stuff.
\item Random stuff. blah blah blah. More random stuff.
\end{itemize}

\end{document}

enter image description here

The vertical red line shows you where the left margin is.

If you've got more text to insert, you can put it in a minipage whose width is set to \textwidth.

\documentclass{article}
\usepackage{xcolor}
\usepackage{lipsum}
\pagestyle{empty}
\begin{document}

\noindent\raisebox{0pt}[0pt][0pt]{\color{red}\rule[-2in]{0.4pt}{2in}}
\begin{itemize}
\item Random stuff. blah blah blah. More random stuff.
\item Random stuff. blah blah blah. More random stuff.
    \begin{itemize}
    \item Random stuff. blah blah blah. More random stuff.
    \item Random stuff. blah blah blah. More random stuff.
        \begin{itemize}
        \item Random stuff. blah blah blah. More random stuff.
        \item Random stuff. blah blah blah. More random stuff.

        \hspace*{\dimexpr\linewidth-\textwidth\relax}%
        \begin{minipage}[t]{\textwidth}%
            \lipsum[1]
        \end{minipage}

        \item Random stuff. blah blah blah. More random stuff.
        \end{itemize}
    \item Random stuff. blah blah blah. More random stuff.
    \end{itemize}
\item Random stuff. blah blah blah. More random stuff.
\item Random stuff. blah blah blah. More random stuff.
\end{itemize}

\end{document}

enter image description here

share|improve this answer
    
Thanks! Works great! –  ruya Jan 13 '13 at 19:25
add comment

If you wish to allow for page-breaking across the "WANTED" text, then using a minipage would not help (since it keeps the contained text together in a box. For this you could use mdframed or a primitive \parshape to reflow the text block boundaries temporarily:

enter image description here

\documentclass{article}
\usepackage{enumitem,lipsum}% http://ctan.org/pkg/{enumitem,lipsum}
\setenumerate[1]{label=\Roman*.}
\setenumerate[2]{label=\Alph*.}
\setenumerate[3]{label=\roman*.}
\setenumerate[4]{label=\alph*.}

\begin{document}
\lipsum[1]
\begin{enumerate}
  \item Some text
  \begin{enumerate}
    \item Other Text
    \begin{enumerate}
      \item Other other text \par
      {\parshape 1 -\itemindent \textwidth
      \lipsum[2-5]}
      \item More other other text
      \item More other text
    \end{enumerate}
    \item Some more text
  \end{enumerate}
  \item Some other text
\end{enumerate}
\lipsum[4]
\end{document}

I've grouped the \parshape settings to localize its effect for the scope of the "WANTED" text. Although not included, the showframe package was added to produce the visible text block boundaries.

See Wrap around a logo at bottom right of page for a short discussion on the use of \parshape.

share|improve this answer
    
This is also super helpful! Thank you! –  ruya Jan 15 '13 at 18:47
    
How would you do the above using mdframed? –  ruya Jan 15 '13 at 19:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.