# outlines package + minipage error

I'm happily using the outlines package. I am in the quest to keep an item in the same page. I've tried wrapping it in a minipage, and this works:

\documentclass{article}
\usepackage{outlines}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}

\usepackage{blindtext}
\begin{document}
\section{aSection}
\begin{outline}
\1 \blindtext[3]
%\2 \blindtext[1]
\begin{minipage}{\linewidth}
\1 [$\blacktriangleright$]\emph{\textbf{aTitle}}: \blindtext[3]
\end{minipage}
\1 \blindtext[3]
\end{outline}
\end{document}

But if the commented line is uncommented (adding another item to the one before the item in the minipage environment), it will trigger this error:

! LaTeX Error: \begin{minipage} on input line 13 ended by \end{itemize}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...

l.14 \1
[$\blacktriangleright$]\emph{\textbf{aTitle}}: \blindtext[3]
?

So, any chance I can do what I want ? Or I'm lost ?

• Welcome to TeX.SE. Allow me to tell you that you have posted a perfect question, especially for a newbie! May 26, 2017 at 19:09
• Thanks ! I guess you can blame it on using TeX.SE to learn tex, and I use SE a lot in general (other communities) May 26, 2017 at 19:14

Basically the start of the minipage environment does not end the \2 outline command. This is ended by the \1 you put inside the minipage making it going across the start of the minipage which causes TeX to raise an error since the minipage environment, being defined inside the \2 should be entirely included in it.

One simple, but perhaps boring solution, is to separate the outlines, ie:

\documentclass{article}
\usepackage{outlines}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}

\usepackage{blindtext}
\begin{document}
\section{aSection}
\begin{outline}
\1[sss] \blindtext[3]
\2 \blindtext[1]
\end{outline}
\begin{minipage}{\linewidth}
\begin{outline}
\1 [$\blacktriangleright$]\emph{\textbf{aTitle}}: \blindtext[3]
\end{outline}
\end{minipage}
\begin{outline}
\1 \blindtext[3]
\end{outline}
\end{document}

• thanks, this works indeed. Nevertheless, it mess up with custom spacing I left out of my MWE. I will edit the question to include it. May 26, 2017 at 19:13
• @cladelpino only if you feel that the question remains the same May 26, 2017 at 19:14
• roger. I will do it separately then May 26, 2017 at 19:15
• @cladelpino it's up to you, really. May 26, 2017 at 19:16
• Actually, it has a very weird interaction with \usepackage{parskip}. May 26, 2017 at 19:30