Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 2.0.5.1
  • Mac OS X 10.7.5 (Lion)
  • All centering was performed by Right Click>Paragraph Settings>Align: Center
share|improve this question

migrated from stackoverflow.com Mar 1 '13 at 14:36

This question came from our site for professional and enthusiast programmers.

    
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 '13 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 –  Marco Daniel Mar 1 '13 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 '13 at 15:39
    
@scottkosty: Indeed. I completely agree with you. –  Marco Daniel Mar 1 '13 at 17:46
    
@inspectorG4dget: I've added an answer. We should clean up our comments... –  Werner Mar 1 '13 at 22:01

1 Answer 1

up vote 6 down vote accepted

Adding

\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.

share|improve this answer

Your Answer

 
discard

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.