I am working on a paper using the IEEEtran template in LyX.

I have run into a problem: While the contents (in this case, a table) of the figure float are centered, the caption is aligned to the left (see screenshot below). How can I center the caption as well?

enter image description here

This is generated by the following LyX document:

enter image description here

What I've tried:

  1. Center the table (the table is centered)
  2. Center all the contents in the float (only the table is centered)
  3. Select the caption and center it (no effect)

Technical details:

  • LyX
  • Mac OS X 10.7.5 (Lion)
  • All centering was performed by Right Click>Paragraph Settings>Align: Center
  • 3
    The IEEEtran class aligns figure captions to the left. Since it's thought for submissions to IEEE journals or conferences, you shouldn't tamper with the positioning.
    – egreg
    Mar 1, 2013 at 14:45
  • I think you have a level to use an other Editor than LyX. Please see this small discuss meta.tex.stackexchange.com/questions/1883/… and here is a small collection of editors: tex.stackexchange.com/questions/339/latex-editors-ides Mar 1, 2013 at 14:57
  • 1
    @MarcoDaniel I don't think LyX is a LaTeX editor. I do think though that a good understanding of LaTeX should be achieved before using LyX, not as a reason to leave LyX. See also yihui.name/en/2012/10/lyx-vs-latex. There are many good reasons to not use LyX, but I don't think knowing a lot of LaTeX should be one of them. Of course this is a personal opinion, but since you gave yours I gave mine :)
    – scottkosty
    Mar 1, 2013 at 15:39
  • @scottkosty: Indeed. I completely agree with you. Mar 1, 2013 at 17:46
  • @inspectorG4dget: I've added an answer. We should clean up our comments...
    – Werner
    Mar 1, 2013 at 22:01

4 Answers 4



\usepackage{caption}% http://ctan.org/pkg/caption

to your document preamble (using the menus Document > Settings... > LaTeX Preamble) centres the captions by default. Although this also changes the default formatting, it would be possible to adapt it to match that of the default IEEEtran document class.

If this is for a journal submission, it is advised to stick to their formatting.


Just Put the following code after \documentclass[journal]{IEEEtran}

\footnotesize\begin{center}{\normalfont\footnotesize #1}\\
{\normalfont\footnotesize\scshape #2}\end{center}%
\setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}~~ #2}%
\ifdim \wd\@tempboxa >\hsize%
\setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}~~ }%
\parbox[t]{\hsize}{\normalfont\footnotesize \noindent\unhbox\@tempboxa#2}%
\hbox to\hsize{\normalfont\footnotesize\hfil\box\@tempboxa\hfil}\fi\fi}

% will definitely work. 

This is the above code for JOURNAL class. Thanks to http://www.michaelshell.org/tex/ieeetran/

  • 1
    this is already the code inside IEEEtran no?
    – percusse
    Dec 24, 2015 at 13:00

IEEEtran has a conference mode which automatically centers all the captions. Adding following to your LaTeX code would center all the captions.


Although, I would also agree with @Werner, that it's best to stick to the format specified by the journal you are submitting.


Hinted by @Shaun , I tested on my computer and found that: for ieeetran, the caption is aligned at center in conference mode


while it is left aligned in journal mode


You must log in to answer this question.

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