Possible Duplicate:
Placing figures inside a two-column document
Here is my MWE:
\documentclass{article}
\usepackage{multicol}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{lipsum}
\begin{document}
\title{How to insert algorithm inside multicols environment}
\author{pythonee}
\date{}
\maketitle
\begin{abstract}
\lipsum[1-2]
\end{abstract}
\begin{multicols*}{2}
\begin{algorithm}
\caption{Euclid’s algorithm}\label{euclid}
\begin{algorithmic}[1]
\Procedure{Euclid}{$a,b$}\Comment{The g.c.d. of a and b}
\State $r\gets a\bmod b$
\While{$r\not=0$}\Comment{We have the answer if r is 0}
\State $a\gets b$
\State $b\gets r$
\State $r\gets a\bmod b$
\EndWhile\label{euclidendwhile}
\State \textbf{return} $b$\Comment{The gcd is b}
\EndProcedure
\end{algorithmic}
\end{algorithm}
\end{multicols*}
\end{document}
It output the warning message when I compile this:
Package multicol Warning: Floats and marginpars not allowed inside `multicols'
environment!.
And the pseudocode is missing.
Can you tell me how to insert single column float algorithm environment. I don't want algorithm* style.
algorithm? – Werner Jul 01 '12 at 02:18algorithm. but there leave much blank space – pythonee Jul 01 '12 at 02:31multicolsenvironment. For that, Frank's answer in Placing figures inside a two-column document should provide a solution, however minimal, and one could consider this question a duplicate. – Werner Jul 01 '12 at 02:58