# Zumbs' Blog

## Two columns, subfigure and figure*

Posted by Zumbs on October 4, 2009

I used a few hours earlier this week trying to get my two column latex document to compile using the figure* environment. At the \end{figure*} line pdflatex complained that it did not have enough endpoints:

! Extra }, or forgotten \endgroup.
\@endfloatbox ...pagefalse \outer@nobreak \egroup
\color@endbox
l.239 \end{figure*}

The error were in the lines:

\begin{figure*}
\includegraphics{somefig.png}
\end{figure*}

After seriously reducing the size of my latex document, I discovered that removing the subfigure package would remove the problem. However, this were not a solution, as I had some pagesized figures, consisting of smaller figures. I searched googled the problem, and eventually found this thread.

As noted by localghost, the subfigure package is depricated, and using the subfig package instead solved the problem. Using the subfig package instead of the subfigure package is, fortunately, rather simple – it pretty much consists of replacing \subfigure with \subfloat.

On a side note, it seems that the problem were not caused by the subfigure package by itself, but by interaction between the subfigure package and another package, as this code does compile:

\documentclass[twoside,twocolumn]{article}
\usepackage{graphicx}
\usepackage{subfigure}
\begin{document}
\begin{figure*}
\includegraphics{somefig.png}
\end{figure*}
\end{document}