I am using an itemize to list several algorithms, and I want to use the algorithm package to display the algorithm.
However, when I use the \begin{algorithm} within one of the items, the algorithm stretches across the entire width of the page, whereas I want it to be in line with the start of the item.
How do I do this?
For reference, this is what my incorrect latex looks like:
\begin{itemize}
\item this algorithm .....
\begin{algorithm}
\caption{Algorithm 1}\label{alg:cap}
\begin{algorithmic}
\state{algorithm step}
\end{algorithmic}
\end{algorithm}
\item ...
\end{itemize}
\linewidth
(which is different from\textwidth
in a standard list environment).