- algorithm2e: Folgenden Lösungsvorschlag anbieten:
Make an environment which is based on `algorithm' but not a floating one.
This should do the trick:
\documentclass{article}
\usepackage{algorithm2e}
\newenvironment{algorithmic}{%
\renewenvironment{algocf}[1][h]{}{}% pass over the floating stuff
\algorithm
}{%
\endalgorithm
}
\begin{document}
\begin{algorithmic}
\SetVline
\eIf{cond1}{
a line\;
a line\;
}{
another line\;
another line\;
}
\end{algorithmic}
\end{document}
(It's a pity that the algorithm2e package do not offer such environment by itself...)
Oder: algorithmicx Paket verwenden:
Using the algorithmicx package you can either use the `algorithm'
environment, which is a floating one, or `algorithmic', which is a non-
floating one.
Therefore using `algorithmic' should be possible inside minipages etc.
Lesezeichen