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.
The suggestion aligned the table caption at center, but like this format.
Best Answer
To solve your initial problem, replace
table
bytable*
. Your caption is actually centered, but only centered with respect to one column, sincetable
marks a one-column float, whereastable*
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, thebooktabs
package results in nicely spaced rows and lines.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: