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.

I'm using a LaTeX to write a small paper using CVPR template.

I'd like to put a figure between my title+name and body(which consists with two columns) like many CVPR papers do, but I don't find the way to do that.

I tried:

\begin{figure*}
\begin{center}
\fbox{\rule{0pt}{2in} \rule{.9\linewidth}{0pt}}
\end{center}
   \caption{some caption..}
\label{fig:short}
\end{figure*}

But it turned out figure-star only displays it's figure at the top of next page, and when I just use figure like \begin{figure}[htb], it's only located one of those two columns.

Does anyone know how to put a long figure between my title+name and body context?

share|improve this question
    
Welcome to TeX.sx! Please add a full minimal working example (MWE) that illustrates your problem, not just a code fragment. You can't have a double-column material in the middle of the page, because it is not possible to split two-columns in half. This seems to be very similar to Span columns with a 'center' environment, just with a different class. –  Martin Scharrer May 14 '12 at 8:16
    
Note that you shouldn't use center but \centering inside figure. Also you can now use \includegraphics[..]{example-image} to represent your image. See New support package for MWEs –  Martin Scharrer May 14 '12 at 8:51
add comment

1 Answer

up vote 4 down vote accepted

The title is also set in double-column format and you can't have two of these in a row. You need to place the title and the (non-floating) figure into one \twocolumn[{..}] macro. The problem is that \maketitle already uses \twocolumn, but this can actually be redefined as a non-op.

This is analog to my solution for Span columns with a 'center' environment. I post it here again because it's for a different style and many beginners will have issues adapting the other post to CVPR.

I like to mention that having a figure directly below the title might not be a good style.

\documentclass[twocolumn]{article}
\usepackage{cvpr}
\usepackage{blindtext}% for dummy text only
\usepackage{graphicx}
\usepackage{caption}
\def\cvprPaperID{}% Remove and set correct ID

\title{Test}
\author{A. Tester}
\begin{document}
\twocolumn[{%
\renewcommand\twocolumn[1][]{#1}%
\maketitle
\begin{center}
    \centering
    \includegraphics[width=.8\textwidth,height=5cm]{example-image}
    \captionof{figure}{Test caption}
\end{center}%
}]

\Blindtext% Replace with your real text

\end{document}

Result

share|improve this answer
    
This works how it is supposed to be but it prints out some error when I compile it. (still make the result though). it says: "Undefined Control Sequence }]" Do you have any idea? –  devEvan May 14 '12 at 18:24
    
No, not really. Can you post a minimized version of the code somewhere? –  Martin Scharrer May 14 '12 at 19:31
    
Spent many agonizing hours trying to figure this out until I found your answer. Thank you! –  Greg Kramida Nov 4 '13 at 20:03
add comment

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.