Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a two column document (using multicol) and want to insert figures so that they do NOT span columns. I have searched around and the only thing I can find says that only figure* is supported which spans the whole page (both columns). Is there a way to get single column figures in a document using multicols?

share|improve this question
1  
Ask here: tex.stackexchange.com – sorush-r Feb 27 '11 at 20:39
1  
@Sorush: Be aware that LaTeX questions with the programming nature are still on topic on SO. @bryanp: That said, this one doesn't really have the programming nature. You want figure without the *. – dmckee Feb 27 '11 at 22:00
1  
I second this question. I would like to have a figure/table float to the top of the column, like it would using twocolumn instead of multicol (which means that Herbert's answer does not apply). – tohecz May 28 '12 at 13:50
I should have specified in the bounty that obviously [h]/[H] for "wide" float is a sort of a non-sense and is not needed. – tohecz May 28 '12 at 16:35

migrated from stackoverflow.com Feb 27 '11 at 23:39

2 Answers

up vote 14 down vote accepted
\documentclass[a5paper]{article}
\usepackage{multicol,caption}
\usepackage[demo]{graphicx}
\usepackage{lipsum}
\newenvironment{Figure}
  {\par\medskip\noindent\minipage{\linewidth}}
  {\endminipage\par\medskip}
\begin{document}

\begin{multicols}{2}
\lipsum[1]
\begin{Figure}
 \centering
 \includegraphics[width=\linewidth]{foo}
 \captionof{figure}{my caption of the fugure}
\end{Figure}

\lipsum[1]
\end{multicols}

\end{document}

enter image description here

share|improve this answer

One solution is to use the nonfloat package.

\documentclass[]{article}

\usepackage{nonfloat}
\usepackage{multicol}

\usepackage[demo]{graphicx}
\usepackage{lipsum}

\newcommand\myfigure[1]{%
\medskip\noindent\begin{minipage}{\columnwidth}
\centering%
#1%
%figure,caption, and label go here
\end{minipage}\medskip}

\begin{document}
\begin{multicols}{3}
\lipsum[1]
%
\myfigure{\includegraphics[width=.9\columnwidth]{test}%
\figcaption{\emph{I am a figure caption!}}}
%
\lipsum[1]
\end{multicols}
\end{document}

example output

share|improve this answer
This answer is meant to address the original question and is not meant to satisfy the additional requirements of the bounty. – JohnReed May 28 '12 at 17:06
Sorry if it's rude, but does this add anything more compared to the Herbert's answer? – tohecz May 28 '12 at 17:59
Your question is legitimate. In terms of features, it does not add anything that I can think of. It is merely a slightly different way of addressing the original question by using the nonfloat package. I only added this answer for the sake of completeness. It may have worked better as an addendum to Herbert's answer but I didn't feel comfortable modifying it. – JohnReed May 28 '12 at 18:51
My apologies, I just wasn't sure. It is probably not wrong to provide an alternative, even though I think that caption package works great. – tohecz May 28 '12 at 19:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.