I am using algorithm2e
for formatting pseudo-code: is it possible to compress single-instructions control structure to one single line?
For example I would like to modify this so that l.sort()
appears on the same line as foreach
:
\begin{algorithm}[htb]
\ForEach{$l \in list\_of\_lists$}{ $l.sort()$\; }
\caption{...}
\label{...}
\end{algorithm}
Thanks in advance