[Tex/LaTex] Centering caption under a table

horizontal alignmenttables

I have the following table in my document:

defaults&5976&2258\\ \hline

and the table itself is centered, but the caption is aligned to the left.

  1. Is it caused by the style sheet of the journal, or is it standard behaviour?
  2. How can I fix it (in case of both answers to the previous question)?

How does one debug what the stylesheet is changing anyway?

Best Answer

Just to echo some of the comments. It is best to try and provide as much information as possible. The class you using is a Springer-Verlag class and can be downloaded here.

You can add the following in your preamble:

 \setbox\@tempboxa\hbox{{\floatlegendstyle #1\floatcounterend}%
 \capstrut #2}%
 \ifdim \wd\@tempboxa >\hsize
   {\floatlegendstyle #1\floatcounterend}\capstrut #2\par

Use the template.tex test file that comes with the bundle to test. Testing it with the above I got:

enter image description here

When you inserting your figures or tables, use the \centering command to ensure that the figure or tabular is also centered:


To be honest, it will look awful with small figures or tables and will probably break the \sidecaption command that is provided by the class. It is also possible the Journal Editor will not be very happy for you to change the look and feel.

Related Question