I have a simple two-column text, and want to place figures within the text. I used this code
\documentclass{article}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{caption}
\begin{document}
\begin{multicols}{2}
First text
\begin{center}
\includegraphics[width=0.5\textwidth]{ebooks.jpg}
\captionof{figure}{This is a test}
\label{fig: 11}
\end{center}
Second text
\end{multicols}
\end{document}
My problem is that the figure will be placed exactly after First text no matter where it is. For example, if First text needs 80% space and figure needs 30%; figure will be pushed to the second page, and we will have 20% gap in the first page.
How can I make the structure flexible. In this example, put 70% of First text in the first page (with 30% space needed for figure to make 100% filled page); then, flow the remaining 10% of First text to the second page.
figurebut when wrappingcenterwithinfigure, the image will not be displayed at all. – Googlebot Feb 27 '12 at 17:32floatpackage as well. And write:\begin{figure}[H]\centering … \end{figure}. It should display… but I am no expert regarding themulticolpackage, though I know it causes some issues with floats. – ienissei Feb 27 '12 at 17:47figure*andtable*floats work inside multicols - they spread the entire textwidth, not just a single column. If everything else fails, you can manually put the graphics someplace earlier in text. – Frg Feb 27 '12 at 17:47