[Tex/LaTex] How to place a “banner image” at the top of a paper

floatspositioning

When using this class: http://daviddoria.com/Uploads/acmtog.cls

I am trying to place a figure* right under the title/authors. I tried this:

\documentclass{acmtog}
\pdfminorversion=5

\usepackage{float}
\usepackage{graphicx}
\usepackage{subfig} % needed for \subfloat. caption=false fixes: ``Unsupported document class (or package) detected, (caption) use of the caption package is not recommended''. format=hang makes the hanging indention in the figure captions look correct.
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{algpseudocode}
\usepackage{algorithm}
\usepackage{lipsum}

\acmVolume{VV}
\acmNumber{N}
\acmYear{2012}
\acmMonth{April}
\acmArticleNum{XXX}
\acmdoi{10.1145/XXXXXXX.YYYYYYY}

\begin{document}

\title{My paper}

\author{Me {\upshape and} My Friend
\affil{Affiliation}}

\maketitle

\begin{bottomstuff}

Authors' addresses: 
\end{bottomstuff}

\def\BannerFigSize{.25}
\begin{figure*}[ht!]
\centering
\subfloat[a.]
  {
  \fbox{\rule{0pt}{1in} Some text \rule{1in}{0pt} }
  \label{fig:banner:scene}
  }
\subfloat[b.]
  {
  \fbox{\rule{0pt}{1in} Some text \rule{1in}{0pt} }
  \label{fig:banner:strokes}
  }
\caption{Our algorithms.}
\label{fig:banner}
\end{figure*}


\lipsum[1-4]

\end{document}

But the figure appears on the next page. I also tried [H] placement (from the float package) but that seems to make the image disappear entirely. Is there a better way to do this?

Best Answer

As I wrote in the comment you should use the environment center instead of a floating one. However my system doesn't know your document class so I can't provide a general solution. Use the package caption which allows setting a type. So at the beginning of center write \captionsetup{type=figure}.

\documentclass{article}
\usepackage{graphicx}
\usepackage[caption=false,format=hang]{subfig} 
\usepackage{caption}
\begin{document}
\def\BannerFigSize{.25}
\begin{center}
\captionsetup{type=figure}
\subfloat[a.]
  {
  \fbox{\rule{0pt}{1in} Some text \rule{1in}{0pt} }
  \label{fig:banner:scene}
  }
\subfloat[b.]
  {
  \fbox{\rule{0pt}{1in} Some text \rule{1in}{0pt} }
  \label{fig:banner:strokes}
  }
\caption{Our algorithms.}
\label{fig:banner}
\end{center}
\end{document}

The class uses special definitions of caption so you can do the following: I defined the command \captiontype{} so that you can use it inside an environment.

\newcommand*\captiontype[1]{\def\@captype{#1}}

In your case simple \captiontype{figure}

\documentclass{acmtog}
\usepackage{graphicx}
\usepackage[caption=false,format=hang]{subfig} 
\makeatletter
\newcommand*\captiontype[1]{\def\@captype{#1}}
\makeatother
\begin{document}
\def\BannerFigSize{.25}
\begin{center}
\captiontype{figure}
\subfloat[a.]
  {
  \fbox{\rule{0pt}{1in} Some text \rule{1in}{0pt} }
  \label{fig:banner:scene}
  }
\subfloat[b.]
  {
  \fbox{\rule{0pt}{1in} Some text \rule{1in}{0pt} }
  \label{fig:banner:strokes}
  }
\caption{Our algorithms.}
\label{fig:banner}
\end{center}
\end{document}