TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using {ieee}[2000/01/11].cls (via Formatting IEEE Papers in LaTeX2e), I have a problem with the following minimal code (which builds fine for \documentclass{article} - using pdflatex to compile):

% \documentclass{article}



Test ...



It fails with:

! Too many }'s.
\color@endbox ->\color@endgroup \egroup 

l.33 \end{figure}

? X
No pages of output.
Transcript written on test.log.

This error is discussed in LaTeX Community • View topic - color package incompatible with figures?, and indeed, ieee.cls does define \@xfloat - but I'm trying the following things:


% \undef\@xfloat % no work :) 

% http://joonidea.blogspot.com/2010/04/how-to-undefine-command-in-latex.html
% \let\@xfloat\@undefined                  % undefine \@xfloat
% no work, fails with:
%% ! Undefined control sequence.
%% \@xfloat #1[#2]->\caption@ORI@xfloat 
%%                                      {#1}[#2]\caption@settype {#1}
%% l.49 \end
%%          {figure}

% http://www.latex-community.org/forum/viewtopic.php?f=4&t=507&p=1978
% the below has no effect: 
% \let\latex@xfloat=\@xfloat
% \def\@xfloat #1[#2]{%
%   \latex@xfloat #1[#2]%
%   \def \baselinestretch {1}\@normalsize  %%  GT: need \@normalsize?
%   \normalsize
% }


... but obviously, cannot get it to work.

Is it somehow possible to have \figure with this {ieee}[2000/01/11] class, such that I override its behavior in the tex file, instead of hacking the .cls file?

Many thanks in advance for any answers,

share|improve this question
The ieee class is ancient. You really should be using the current IEEEtran class. – Joseph Wright Sep 19 '11 at 19:33
Thanks for confirming that @Joseph Wright - I will try to modify my document towards IEEEtran; but I'd still be interested in an answer to the OP, in case it turns out people insist on the "old" layout... Cheers! – sdaau Sep 19 '11 at 19:36
Just a note on IEEEtran: ieee.cls commands like \authorinfo or \journal are not present in IEEEtran, which also ignores the \documentclass[...] arguments as given above (and insists on twocolumn layout). – sdaau Sep 19 '11 at 19:45
@sdaau : actually it doesn't. It has many capabilities and you can check the extensive documentation. You can use for example \documentclass[12pt,onecolumn]{IEEEtran}. Moreover, as far as I know, all IEEE journals are converted to IEEEtran class maybe except the IEEE computer society and other few journals. So whoever is forcing IEEE.cls, simply does not follow IEEE regulations. – percusse Sep 19 '11 at 20:28
Many thanks for the clarification, @percusse - sorry for using imprecise wording, I merely wanted to emphasize different behavior between packages; also nice to know I shouldn't expect the old ieee.cls to be forced! Cheers! – sdaau Sep 19 '11 at 20:37
up vote 3 down vote accepted

I tried with



and the result seems to be the desired one. I believe that the problem lies in a very old definition of \@xfloat that is incompatible with the way LaTeX normally works with floats.

Using a class that is based on a LaTeX 2.09 document style along with much more modern packages leaves the door open for inconvenients, as you've discovered.

share|improve this answer
Yippie !! :) Awesome - many thanks for the solution, @egreg; a true life-saver this time :) Cheers! – sdaau Sep 19 '11 at 19:52

Your Answer


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.