# latex two column layout set figure to load on single column

this is the double column code

\begin{multicols}{2}

\begin{figure*}[!ht]
\centering
\includegraphics[height=60mm]{CC.jpg}
\caption{AA \cite{BB}}
\end{figure*}

\end{multicols}

But the image consumes both columns. How can i make it display only on a single column ?

-

## migrated from stackoverflow.comMay 14 '11 at 23:51

This question came from our site for professional and enthusiast programmers.

use the environment center instead of figure. Of course you have to use \captionof{figure}{<text>} or with the package caption \captionsetup{type=figure}.

multicols uses saveboxes to split the contents. In this case you can't use any floating material.

Example with center, captionof and captionsetup: FYI: captionof requires the package caption or capt-of or a documentclass of the KOMA Bundle; captionsetup requires the package caption.

\documentclass[english,demo]{scrreprt}
\usepackage{babel}
\usepackage{blindtext}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{caption}
\begin{document}
\blindtext
\begin{multicols}{2}
\blindtext
\begin{center}
\includegraphics[height=60mm]{CC.jpg}
\captionof{figure}{AA \cite{BB}}
\end{center}
\blindtext[2]
\end{multicols}
\blindtext
\clearpage
\blindtext
\begin{multicols}{2}
\blindtext
\begin{center}
\captionsetup{type=figure}
\includegraphics[height=60mm]{CC.jpg}
\caption{AA \cite{BB}}
\end{center}
\blindtext[2]
\end{multicols}
\blindtext
\begin{thebibliography}{99}
\bibitem{BB} Name, Title
\end{thebibliography}
\end{document}
-
oh please give me a example i am completely new to the latex syntax. :( –  user5535 May 15 '11 at 2:45
I have edited my answer. –  Marco Daniel May 15 '11 at 8:52
The small package that only provides the \captionof macro is called capt-of. –  lockstep May 15 '11 at 8:58
@lockstep: Thanks. –  Marco Daniel May 15 '11 at 9:04

the figure environment don't work inside the multicol environment. You have to choose the \twocolumn command or alternatively the package caption and then

\begin{multicols}{2}

\begin{center}
\includegraphics[height=60mm]{CC.jpg}
\captionof{figure}{AA \cite{BB}}
\end{center}

\end{multicols}

However, if you want the image span both columns, then you have to split the multicol environment:

\begin{multicols}{2}
foo
\end{multicols}

\begin{figure}[!ht]
\centering
\includegraphics[height=60mm]{CC.jpg}
\caption{AA \cite{BB}}
\end{figure}

\begin{multicols}{2}
bar
\end{multicols}
-
This seems to be a very crude, how can one possibly know exactly where to begin and stop the multicol environment, in order to place a spanning image at the bottom of the page. Trial and error?... then you need to add or remove a paragraph on the previous page (for whatever reason) and everything is out of whack again. There has to be a better way. –  Nicholas Hamilton Jan 16 '13 at 0:50
@Herbert multicols does support figure* and interprets them as pagewide figures, so that is not correct. –  Frank Mittelbach Aug 24 '13 at 16:46

you can also use usepackage{here} and use H

\begin{multicols}{2}

\begin{figure*}[H]
\centering
\includegraphics[height=60mm]{CC.jpg}
\caption{AA \cite{BB}}
\end{figure*}

\end{multicols}
-