1

I have following latex problem. Whenever I use the figure* or table* environment I get the error message:

Extra } or forgotten \endgroup

However I can't find any "}" that aren't necessary. I don't get the error when I use figure or table environment instead. I use figure*/table* because I need tables/figures over two columns.

The code compiles but the word "table" or "figure" appears in my compiled pdf.

Code:

\documentclass[10pt, conference, compsocconf]{IEEEtran}
\usepackage[tight,footnotesize]{subfigure}
\usepackage[caption=false]{caption}
\usepackage[font=footnotesize]{subfig}
\usepackage{fixltx2e}


\begin{document}

\begin{figure*}[b]
    \centering
    \rule{5cm}{5cm}
    \caption{Caption}
    \label{fig:my_label}
\end{figure*}


\end{document}

I couldn't find a solution anywhere. Can anyone help me out?

Thanks in advance!

9
  • 2
    Please extend this to a full minimal self contained example that others can copy and test as is (you can replace the image by \rule{5cm}{5cm} as we do not have your image.
    – daleif
    May 28, 2021 at 8:40
  • 3
    Unrelated: don't use the center env to center inside floats. Sounds strange, but center adds extra vertical space above and below, as does the float, so here center gives excessive spacing. Replace \begin{center} with \centering and delete \end{center}
    – daleif
    May 28, 2021 at 8:41
  • 3
    Welcome to TeX.SE.
    – Mico
    May 28, 2021 at 8:41
  • 1
    Remove contents supposedly unrelated with the problem, checking after each deletion that the error is still there, and it is not a different error. Then do the same with packages, settings, and macro definitions of the preamble that are no longer used (e.g. remove tabularx package if there are not tables) or are unrelated with the problem (e.g., geometry package if change of margins will not change the error). Finally, change your image by example-image. This is the MWE (Minimal Working -- reproducible -- Example) to show, but now you see the problem, right?
    – Fran
    May 28, 2021 at 10:07
  • 2
    I'm not sure if it is related to the problem, but the package subfigure is considered obsolete, and is in fact superseded by subfig. So I guess that in any case, you should not use both and you should use only subfig.
    – Vincent
    May 28, 2021 at 13:54

1 Answer 1

1
  • subfigure (which is obsolete) and subfige are not compatible. Remove both of them.
  • IEEEtran has own definition for captions. It is not recommended to use package caption
  • images over two columns, inserted by figure* are appear on the top of the next page from point its inserting in document. If you add position option [b] it will ne moved on the end of document, so don't use positioning options.
  • in a case, that you like that it appear at bottom of the same or next page, you need to use the package stfloats (see MWE below).
\documentclass[conference, compsocconf]{IEEEtran}
%\usepackage[tight,footnotesize]{subfigure}
%\usepackage[caption=false]{caption}
\usepackage[font=footnotesize]{subfig}
%\usepackage{fixltx2e}
\usepackage{stfloats}   %   <---
\usepackage{lipsum}     %   <---

\begin{document}
\begin{figure*}[b]
    \centering
    \rule{\linewidth}{5cm}
    \caption{Caption}
    \label{fig:my_label}
\end{figure*}
\lipsum\lipsum
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .