## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Cannot align caption to the center

Information and discussion about graphics, figures & tables in LaTeX documents.
pratikvimal.iitk
Posts: 3
Joined: Tue Jul 13, 2010 8:11 pm

### Cannot align caption to the center

I am using the code below for centering the image and it's caption. But there seems to be some problem with it. The image is centered but the caption isn't. The caption is left centered. Please note that the Table Caption is Centered.

\begin{figure}[h]  \begin{center}		\includegraphics[height=50 mm,width=90mm]{levelmmfustiny.eps}	\caption{\it Levels of multi modal information fusion}	\label{mmfus}	\end{center}\end{figure}

localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany
This code snippet is far too little information, not to say useless [1]. The code below doesn't cause any problems. So its your turn to show the opposite by means of a counterexample (MWE).
\documentclass[11pt,a4paper,english]{article}\usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}\usepackage{babel} \begin{document}   \begin{figure}[!ht]     \centering     \rule{6.4cm}{3.6cm}     \caption{Dummy figure}\label{fig:dummy}   \end{figure}\end{document}

As you can see, the default behaviour is a centered caption, even if the figure itself would not be centered.

[1] View topic: Avoidable mistakes

Best regards and welcome to the board
Thorsten
LaTeX Community Moderator

¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses

pratikvimal.iitk
Posts: 3
Joined: Tue Jul 13, 2010 8:11 pm

My document class is IEEEtran as you can see in the code above.

...................................................
\begin{figure}[h]\begin{center}       \includegraphics[height=50 mm,width=90mm]{levelmmfustiny.eps}    \caption{\it Levels of multi modal information fusion}    \label{mmfus}    \end{center}\end{figure}

Please let me know if this helps

localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany
pratikvimal.iitk wrote:[...] Please let me know if this helps

Not really. So I can only advice to read Section X (Floating structures, p. 8ff) of the IEEEtran manual. Seems that this caption format is the default setup. And by the way, you don't need to load a package three times.
LaTeX Community Moderator

¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses

sommerfee
Posts: 495
Joined: Mon Apr 09, 2007 4:20 pm
Contact:
pratikvimal.iitk wrote:My document class is IEEEtran as you can see in the code above.

The IEEEtran document class will only center figure captions in Conference Mode, i.e. document class option "conference" is set.

(See also IEEEtrans documentation "How to Use the IEEEtran LATEX Class", page 2: "Conference Mode Details: Conference mode makes a number of significant changes to the way IEEEtran behaves: [...]
• The figure captions are centered.")

Axel

pratikvimal.iitk
Posts: 3
Joined: Tue Jul 13, 2010 8:11 pm
Thanks localghost and Axel