[Tex/LaTex] How to centered the table caption in IEEEtran class file

floatsieeetrantables

I need to place the caption of a table in the center in the ieeetran class file. Is there exist any way? I have tried a lot, but failed in every aspect. Any help will be appreciated. Thanks in advance.

I am using the document class named as:

\documentclass[journal,compsoc]{IEEEtran}

The MWE for my table is as follows:

\documentclass[journal,compsoc]{IEEEtran}
\usepackage{caption,graphicx}
\begin{document}
\title{ABC Study}
\section{RM}
\begin{table}
\centering
\caption{Results of the search process.}
\label{ts}
\renewcommand{\arraystretch}{1.2}
\small
\scalebox{0.65}{
\begin{tabular}{|p{5cm}|l|p{4.7cm}|p{3cm}|p{3.9cm}|p{3.7cm}|p{3.5cm}|}
\hline
Authors with Ref. & Year & Theme & Parameter & Technique & Method Validation & Dimension \\ 
\hline
B.~Tansey, E.~Stroulia & 2007 & Estimation of potential business value of evolving SOA applications & effort estimation & COCOMO2 and real options theory & not shown & \\ \hline
L.~Santillo & 2007 & Discusses the boundary problem from the software measurement and estimation perspective & size estimation & COSMIC functional size measurement for SOA environment & not shown & \\ \hline
J.~Lee et al. & 2008 & Estimating project plans and service costs of packaged business process applications & cost estimation & Normative and constructive models & not shown & \\ \hline
\end{tabular}
}
\end{table}
\end{document}

I want to display the caption of the current table like all other previous tables.

enter image description here

The suggestion aligned the table caption at center, but like this format.

enter image description here

Best Answer

To solve your initial problem, replace table by table*. Your caption is actually centered, but only centered with respect to one column, since table marks a one-column float, whereas table* is a float spanning both columns.

The code below suggests two further changes. First, do not rescale the table, but instead avoid vertical bars (they just take up space and rather distract than help in orientation) and use the tabularx environment that allows you to automatically have equally spaced columns. Moreover, the booktabs package results in nicely spaced rows and lines.

enter image description here

\listfiles
\documentclass[journal,compsoc]{IEEEtran}
\usepackage{graphicx}
\usepackage{tabularx,booktabs}
\usepackage{blindtext}% Only needed for dummy text
\begin{document}
\title{ABC Study}
\author{The author}
\maketitle
\section{RM}

For the results of the search process, see table~\ref{ts}.

\begin{table*}
\centering
\caption{Results of the search process.}\label{ts}

\begin{tabularx}{\textwidth}{XlXXXXX}
\toprule
  Authors with Ref. & Year & Theme & Parameter & Technique & Method Validation & Dimension
\\\midrule
  B.~Tansey, E.~Stroulia & 2007
  & Estimation of potential business value of evolving SOA applications
  & effort estimation & COCOMO2 and real options theory & not shown &
\\\midrule
  L.~Santillo & 2007
  & Discusses the boundary problem from the software measurement and estimation perspective
  & size estimation & COSMIC functional size measurement for SOA environment & not shown &
\\\midrule
  J.~Lee et al. & 2008
  & Estimating project plans and service costs of packaged business process applications
  & cost estimation & Normative and constructive models & not shown &
\\\bottomrule
\end{tabularx}
\end{table*}
\Blindtext

\Blindtext
\end{document}

In the code above I have added \listfiles as the first line. This makes LaTeX write the list of used files to the log file (including version infos). The code above works for the following versions of the packages:

 *File List*
IEEEtran.cls    2015/08/26 V1.8b by Michael Shell
  ot1ppl.fd    2001/06/04 font definitions for OT1/ppl.
graphicx.sty    2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
graphics.sty    2016/10/09 v1.0u Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg    2016/06/04 v1.11 sample graphics configuration
  pdftex.def    2017/01/12 v0.06k Graphics/color for pdfTeX
infwarerr.sty    2016/05/16 v1.4 Providing info/warning/error messages (HO)
 ltxcmds.sty    2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
tabularx.sty    2016/02/03 v2.11 `tabularx' package (DPC)
   array.sty    2016/10/06 v2.4d Tabular extension package (FMi)
booktabs.sty    2016/04/27 v1.618033 publication quality tables
blindtext.sty    2012/01/06 V2.0 blindtext-Package
  xspace.sty    2014/10/28 v1.13 Space after command names (DPC,MH)
supp-pdf.mkii
pdftexcmds.sty    2017/03/19 v0.25 Utility functions of pdfTeX for LuaTeX (HO)
ifluatex.sty    2016/05/16 v1.4 Provides the ifluatex switch (HO)
   ifpdf.sty    2017/03/15 v3.2 Provides the ifpdf switch
epstopdf-base.sty    2016/05/15 v2.6 Base part for package epstopdf
  grfext.sty    2016/05/16 v1.2 Manage graphics extensions (HO)
kvdefinekeys.sty    2016/05/16 v1.4 Define keys (HO)
kvoptions.sty    2016/05/16 v3.12 Key value format for package options (HO)
kvsetkeys.sty    2016/05/16 v1.17 Key value parser (HO)
etexcmds.sty    2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
  ot1phv.fd    2001/06/04 scalable font definitions for OT1/phv.
    upzd.fd    2001/06/04 font definitions for U/pzd.
 ***********