Why does my LaTeX subfigure not work with an a0poster?

9.2k views Asked by At

Here's my problem. I have a bunch of figures already written in a LaTeX document, and I'd like to reuse them for a poster. The code for the figure looks like:

\begin{figure}[htp]
  \begin{center}  
    \subfigure[Figure A]{\label{fig:Sample-a}\includegraphics[scale=5]{Image1.png}} 
    \subfigure[Figure B]{\label{fig:Sampple-b}\includegraphics[scale=5]{Image2.png}} 
  \end{center}
  \caption{This is my caption!}
\label{LineJustification}
\end{figure}

And it works when I put at the beginning:

\usepackage{subfigure}
\usepackage{graphicx}

When I'm putting together the poster, I'm using the template I've found online at this website, with packages like:

\documentclass[a0]{a0poster}
\pagestyle{empty}
\setcounter{secnumdepth}{0}
\usepackage[absolute]{textpos}
\usepackage[it]{subfigure}

(and I've commented out the graphics, wrapfig, and times packages from the landscape file, just in case they're interfering).

So what gives? Why do I get the following error when I try to put the same figure into the a0poster document? If I don't use subfigures, the file compiles, but then I'd have to rework all of my figures, which would be painful.

!Undefined control sequence
 <argument> if\@captype
              topcap
 I.154  \subfigure 
       [Figure A]{\label{fig:Sample-a}

(I'm using mactex, if that means anything)

3

There are 3 answers

0
mmr On BEST ANSWER

I solved this problem by not using subfigure, but placing the figures explicitly and exactly. Kind of a dirty hack, but the poster went off well.

0
mattiast On

One wisdom I have heard: you should just do your posters as A4-sized articles with one page, and then print them as A0. Just use small enough font, like \footnotesize.

1
Jouni K. Seppänen On

The following TeX file works just fine for me in PDFLaTeX. You need to describe your problem in more detail, perhaps by trying to prune it down to a minimal example.

\documentclass[a0]{a0poster}
\pagestyle{empty}
\setcounter{secnumdepth}{0}
\usepackage[absolute]{textpos}
\usepackage[it]{subfigure}
\usepackage{graphicx}
\begin{document}
\begin{figure}[htp]
  \begin{center}  
    \subfigure[Figure A]{\label{fig:Sample-a}\includegraphics[scale=5]{Image1.png}} 
    \subfigure[Figure B]{\label{fig:Sampple-b}\includegraphics[scale=5]{Image2.png}} 
  \end{center}
  \caption{This is my caption!}
\label{LineJustification}
\end{figure}
\end{document}

The version numbers of my pdfTeX, LaTeX, a0poster.cls, and subfigure.sty are as follows:

This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7)
LaTeX2e <2005/12/01>
\ProvidesClass{a0poster}[2004/01/31 v1.22b a0poster class (GK, MW)]
\ProvidesPackage{subfigure}[2002/03/15 v2.1.5 subfigure package]