I like to define the following command :
\newcommand{\page}[2]{\begin{minipage}{#1\textwidth} #2 \end{minipage}}
So that I can do stuff like
\page{0.1}{blabla}\page{0.3}{lalala}
I've recently discovered the package listings
and I've noticed a very strange interaction.
This code doesn't trigger any error :
\begin{minipage}{0.5\textwidth}
\begin{lstlisting}
bla bla
\end{lstlisting}
\end{minipage}
But this :
\page{0.5}{
\begin{lstlisting}
bla bla
\end{lstlisting}
}
throws : Emergency stop. [...] job aborted, no legal \end found
And I must say I'm very confused, since I do not see much difference between those two.
lstlisting
environment in the argument to another command. I don't think you gain so much with\page
rather than the full environment form.\page
, I use a lot of minipages in my documents for formating, and I can assure you that the gain of time is huge.enumerate
,minipage
withfbox
... I'm sorry for editors but this makes writing so much more comfortable!