Featured Book

LaTeX Beginners Guide

Who is online

In total there are 9 users online :: 0 registered, 0 hidden and 9 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 9 guests

Partner Sites

TeXwelt - Fragen und Antworten goLaTeX
TeXblog
TeXnicCenter
TeXample

Cannot align caption to the center

Add tags Information and discussion about graphics, figures & tables in LaTeX documents.

Cannot align caption to the center

Postby pratikvimal.iitk on Tue Jul 13th, 2010

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  •  Open in writeLaTeX
\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
}
pratikvimal.iitk
 
Posts: 3
Joined: Tue Jul 13th, 2010

Re: Cannot align caption to the center

Postby localghost on Tue Jul 13th, 2010

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  •  Open in writeLaTeX
\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
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses
User avatar
localghost
Site Moderator
 
Posts: 9219
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

Re: Cannot align caption to the center

Postby pratikvimal.iitk on Tue Jul 13th, 2010

Code: Select all  •  Open in writeLaTeX
\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
}


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

...................................................
Code: Select all  •  Open in writeLaTeX
\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
pratikvimal.iitk
 
Posts: 3
Joined: Tue Jul 13th, 2010

Re: Cannot align caption to the center

Postby localghost on Tue Jul 13th, 2010

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
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses
User avatar
localghost
Site Moderator
 
Posts: 9219
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

Re: Cannot align caption to the center

Postby sommerfee on Tue Jul 13th, 2010

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
User avatar
sommerfee
 
Posts: 493
Joined: Mon Apr 9th, 2007

Re: Cannot align caption to the center

Postby pratikvimal.iitk on Tue Jul 13th, 2010

Thanks localghost and Axel :)
pratikvimal.iitk
 
Posts: 3
Joined: Tue Jul 13th, 2010


Return to Graphics, Figures & Tables

Who is online

Users browsing this forum: No registered users and 9 guests