# Latex Table alignment error for IEEE publication

Hello I am trying to fit a table into half column for a IEEE paper. In order to replicate the problem I prepared a small example:

This is the incorrect behavior, notice the spaces are not properly aligned and the interruption of the line at the end of the table and that the header should all be centered :

Below the correct behavior I am looking for with no extra space, \midrule with no interruption an all headers are centered:

I checked several times the format of the tables and I can't see the reason of the extra space problem and the interruption of the \midrule. So far is what I have:

\documentclass{ieeetran}
\usepackage{booktabs, makecell}
\setcellgapes{3pt}
\usepackage{siunitx} % consider is v3

% Some paragraphs...

\begin{table*}[ht]
\centering
\small
\setlength{\tabcolsep}{4pt}
\setcellgapes{3pt}
\makegapedcells
\toprule
\multicolumn{2}{l}{Most prolific scholar related to QUERY-1} \\
\cmidrule(r{1.8em}){1-6}
Journal & TP (\%) & TC & CiteScore 2020 & The most article & Time cited \\
\midrule
\emph{Ultrasound In Obstetrics And Gynecology} & 175 & 5606 & 9.8 & Maternal and perinatal outcomes of pregnant women with SARS-CoV-2 infection & 28 \\

\emph{Human Reproduction} & 205 & 6876 & 10.2 & Development of an artificial intelligence-based assessment model for prediction of embryo viability using static images captured by optical light microscopy during IVF & 22 \\

\emph{Medical Physics} & 359 & 10043 & 6.1 & Breast tumor segmentation in 3D automatic breast ultrasound using Mask scoring R-CNN & 14 \\

\emph{Medical Image Analysis} & 251 & 6794 & 24.2 & Deep neural network models for computational histopathology: A survey & 14 \\
\bottomrule
\end{tabularx}
\end{table*}


EDIT TO QUESTION

In addition to that I have a very strange behavior I just noticed related to the title of the table. As soon as I make the title longer it pushes everything on the right causing the strange effect below:

\begin{tabularx}{\linewidth}{@{}X c !{\qquad}Xc!{\qquad}Xc}
\toprule
\multicolumn{2}{l}{Top 10 most cited journals with their most cited article related to QUERY-1} \\


Posts that I consulted to help me find a solutions are this one, this one and I also came across this very useful source and applied part of this solution which brought me very close to the final solution of the table I am looking for. All helpful but still couldn't understand the formatting issue I have.

There must be something that I am not catching properly, please point in the right direction for finding a solution.

• you specified !{\qquad}X which adds 2em extra space and then says the 4th column should be stretched as wide as needed to force the table to be full page width. As it is a numeric column you could use r or a decimal alignment column such as S from siunitx Jul 1, 2021 at 16:19
• Thanks for your comment and for stopping by! Gotcha! :) Jul 1, 2021 at 16:38

• your MWE is not compilable ... missed are \begin{document}, etc
• you define table layout so, that has big empty space between some columns and use \cmidrule(r{1.8em}){1-6} instead of simple \midrule
• I suspect, that you like to have table of the following format:

MWE:

\documentclass{ieeetran}
\usepackage{ragged2e}  % new
\usepackage{booktabs, makecell,
\newcolumntype{L}[1]{>{\RaggedRight\hspace{0pt}%
\hsize=#1\hsize}X} % new
\usepackage{siunitx} % consider is v3

\begin{table*}
\setlength{\tabcolsep}{4pt}
\setcellgapes{3pt}
\makegapedcells
\begin{tabularx}{\linewidth}{@{} >{\itshape}L{0.9}cc cL{1.1}c}
\toprule
\multicolumn{2}{@{} l}{Most prolific scholar related to QUERY-1} \\
\midrule
\normalfont{Journal}
& TP (\%) & TC & \makecell{CiteScore\\ 2020} & The most article & \makecell{Time\\ cited} \\
\midrule
Ultrasound In Obstetrics And Gynecology
& 175 & 5606 & 9.8 & Maternal and perinatal outcomes of pregnant women with SARS-CoV-2 infection & 28 \\

Human Reproduction
& 205 & 6876 & 10.2 & Development of an artificial intelligence-based assessment model for prediction of embryo viability using static images captured by optical light microscopy during IVF & 22 \\

Medical Physics
& 359 & 10043 & 6.1 & Breast tumor segmentation in 3D automatic breast ultrasound using Mask scoring R-CNN & 14 \\

Medical Image Analysis
& 251 & 6794 & 24.2 & Deep neural network models for computational histopathology: A survey & 14 \\
\bottomrule
\end{tabularx}
\end{table*}
\end{document}

• Thanks I appreciate your time in helping out! It works and yes that is the format I am looking for. Jul 1, 2021 at 16:36