Take the 2-minute tour ×
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.

Possible Duplicate:
How to make a figure span on two columns in a scientific paper?

It's my first time working with a two-column document (declared as an argument to \documentclass) and I need to put in a very wide figure. The thing is, LaTeX puts it bounded by a column so it either (1) gets truncated, bleeding off the border or [right column] or (2) displays with an awkward text/line wrapping. Is there any way for me to get it to display the way \maketitle does, that is, at the top of the page (ideally) but at least spanning both columns and no awkward line wrapping?

BTW, I use the following code to display my figure:

\begin{figure}
    \centering
    \includegraphics[width=6in]{tictac.png}
    \caption{\textsf{The structure of our tic-tac-toe implementation.}}
    \label{fig:ds}
\end{figure}
share|improve this question

marked as duplicate by Werner, lockstep, doncherry, Joseph Wright Dec 5 '11 at 20:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

up vote 20 down vote accepted

You need to use the starred version * of the figure environment:

\documentclass[twocolumn]{article}
\usepackage[showframe]{geometry}% http://ctan.org/pkg/geometry
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\begin{document}
\lipsum[1-2]
\begin{figure*}
  \includegraphics[width=\textwidth,height=4cm]{tiger}
  \caption{This is a tiger.}
\end{figure*}
\lipsum[3-10]
\end{document}

enter image description here

This will usually flush the figure to the top of the following page, so there's not much control left to the user for movement. However, this may just be dependent on the user output.

In my opinion, you may be better off (for ease of use) with the multicol package. Then you can specify text (and sectional commands) in a multicols environment (with a mandatory argument specifying the number of columns), while specifying your figures in the usual way. The layout is different, since the content flows now with the multicols environment. However, this may also be user preference.

Here's a minimal working example:

\documentclass{article}
\usepackage[showframe]{geometry}% http://ctan.org/pkg/geometry
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{multicol}% http://ctan.org/pkg/multicols
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\begin{document}
\begin{multicols}{2}
  \lipsum[1-2]
\end{multicols}
\begin{figure*}[h]
  \includegraphics[width=\textwidth,height=4cm]{tiger}
  \caption{This is a tiger.}
\end{figure*}
\begin{multicols}{2}
  \lipsum[3-4]
\end{multicols}
\end{document}

enter image description here

share|improve this answer
    
Is there a reason you always include CTAN links of the packages? –  doncherry Oct 9 '11 at 9:30
2  
@doncherry: I've just grown use to that style since there are many new users to LaTeX on TeX.SX. If they copy and use code, they have a reference to the source of the package. –  Werner Oct 9 '11 at 15:00
    
Alright ... I'm just not sure if a user who doesn't know how to retrieve a package from CTAN would be helped with a standard link to CTAN. We could think about two basic questions (one for each MiKTeX and TeX Live) explaining how to install a package, that you could refer to when necessary? –  doncherry Oct 9 '11 at 15:13
1  
@doncherry: The standard CTAN link provides a section called Getting it. This sheds some light on downloading/installation procedures for both MiKTeX & TeX Live. If someone is not capable of following these guidelines, I'm sure they'll post a question specific to this, which will solve the problem. They may even have MiKTeX's texify/pdftexify running to install packages on-the-fly (or use the recently released texliveonfly.py). Regardless, I thought it could only help. –  Werner Oct 9 '11 at 15:27
    
Good point, I hadn't actually visited the links. Thanks for enlightening me :) –  doncherry Oct 9 '11 at 15:31

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