1

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! – Moriambar May 26 '17 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) – cladelpino May 26 '17 at 19:14
0

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}

enter image description here

  • 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. – cladelpino May 26 '17 at 19:13
  • @cladelpino only if you feel that the question remains the same – Moriambar May 26 '17 at 19:14
  • roger. I will do it separately then – cladelpino May 26 '17 at 19:15
  • @cladelpino it's up to you, really. – Moriambar May 26 '17 at 19:16
  • Actually, it has a very weird interaction with \usepackage{parskip}. – cladelpino May 26 '17 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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