Graphics, Figures & TablesCannot align caption to the center

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

Cannot align caption to the center

Post by pratikvimal.iitk »

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.

Code: Select all

Code, edit and compile here:
\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}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Cannot align caption to the center

Post by localghost »

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

Code: Select all

Code, edit and compile here:
\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}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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
pratikvimal.iitk
Posts: 3
Joined: Tue Jul 13, 2010 8:11 pm

Cannot align caption to the center

Post by pratikvimal.iitk »

Code: Select all

Code, edit and compile here:
\documentclass[12pt,twocolumn,twoside,final]{IEEEtran}
\usepackage[dvips]{graphicx}
\usepackage[final]{graphicx}
\usepackage{amsmath,amsbsy}
\usepackage{subfigure}
\usepackage{paralist}
\usepackage{times}
\usepackage[english]{babel}
\usepackage{graphicx}
\bibliographystyle{unsrt}
\pagestyle{plain}
\renewcommand\floatpagefraction{.9}
\renewcommand\topfraction{.9}
\renewcommand\bottomfraction{.9}
%\renewcommand\textfraction{.1}
\renewcommand{\dbltopfraction}{0.9} % fit big float above 2-col. text
\renewcommand{\textfraction}{0.07} % allow minimal text w. figs
\setcounter{totalnumber}{50}
\setcounter{topnumber}{50}
\setcounter{bottomnumber}{50}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
My document class is IEEEtran as you can see in the code above.

...................................................

Code: Select all

Code, edit and compile here:
\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}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Please let me know if this helps
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Cannot align caption to the center

Post by localghost »

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.
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Cannot align caption to the center

Post by sommerfee »

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

Re: Cannot align caption to the center

Post by pratikvimal.iitk »

Thanks localghost and Axel :)
Post Reply