In the ieeetran how to, they are using caption with their examples; however, latex tells me not to use caption.

So if I use subfloat, all my figures are labeled as such (a), (b) and don't have a main label Figure:1. In order to get the main label, I would need to use caption.

How can I change the label from (a) to figure 1 without using caption?

\uspackage{subfig, float, wrapfig}
  • LaTeX tells you not to use \caption? You can, even in ieeetran. When I add \caption{A caption} to your MWE, I obtain Fig 1. A caption. Or is it that you don't want to use \caption but \subfloat instead? – Werner May 9 '13 at 16:08
  • 2
    It seems to me you are mixing the caption package and the \caption command. Of course you can use \caption but should not use the caption package since it is incompatible to the IEEEtran document class. So better replace \usepackage{subfig} with \usepackage[caption=false]{subfig} to prevent loading the caption package. – user2574 May 9 '13 at 16:09
  • @AxelSommerfeldt I am not using the caption package and I get the latex warning with \caption – dustin May 9 '13 at 16:13
  • 1
    @dustin You are using the caption package since \usepackage{subfig} does load it unless you say \usepackage[caption=false]{subfig}. The warning you get does not come from LaTeX itself but from the caption package. – user2574 May 9 '13 at 17:34
  • @AxelSommerfeldt post your comment as a solution. You fixed the problem. – dustin May 10 '13 at 18:03

I have mentioned it a few times before but IEEE does not directly use your .tex file. It's there to supply the bare minimal so if it looks like an article it's enough. It doesn't have to be following the standards internally.

They will recode your article with their own terrible terrible workflow, rasterize your images and ruin your math after acceptance. I've been using the following for a couple of years without any issues. It uses subcaption and does a superb job even though it has a command clash due to the redefinitions.


% Training subcaption package to comply with
% IEEE standards. We can ignore the warning
% generated by caption.sty which is due to 
% the redefinition of \@makecaption

\title{My title}
\author{my author}


\draw[help lines] (-1,-1) grid (1,2);
\caption{A caption}
\draw[help lines] (-1,-1) grid (1,2);
\caption{B cap}
\caption{Two figures.}\label{fig:1}

enter image description here

If you only want the caption labels leave the sub \caption{} definitions empty and describe the subfigures in the main caption. If you want to remove also the (a),(b) use \phantomcaption commands as described in the manual.

  • I have used your above code to redefine the captions for figures. The captions for tables – J Spen Oct 25 '13 at 7:02
  • 1
    I have used your above code to be able to use the subcation class with IEEEtran and get the same figure captions. The subcaption class also redefines the table caption so can you provide the code for the correct table caption or inform me how I can find it? I have all my other documents using subcaption package so much easier than changing everything over to use the subfig package. – J Spen Oct 25 '13 at 7:05
  • if you need an example let me know but can just look at any IEEE journal with a table caption and what you get is a table caption that is the same type as the figure caption. – J Spen Oct 25 '13 at 7:06
  • This seems to be the right settings for the table caption: \captionsetup[table]{format=plain,labelformat=simple,justification=centering, labelsep=newline, singlelinecheck=false, textfont={sc}}. Do you have something similar?? Also I noticed another issue of the table and figures not lining up to text at the top of the pages. They align maybe 0.2 or 0.3 cms above the text. This is not supposed to be the case as it should line up evenly with the text. Do you know how to set the margins so the figures line up correctly? – J Spen Oct 25 '13 at 7:41
  • @JSpen That's a known issue. you don't need to worry about it because IEEE will fix stuff by themselves. I'll check the table settings when I have the chance in the meantime I have this answer for a reasoning about why you don't need to make it perfect tex.stackexchange.com/a/89790/3235 – percusse Oct 25 '13 at 9:10

According to http://www.michaelshell.org/tex/ieeetran/ the following code may be used in the preamble.




Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.