IEEE 出版物的 Latex 表格对齐错误

IEEE 出版物的 Latex 表格对齐错误

您好,我正在尝试将 IEEE 论文的表格缩小到半列。为了复制该问题,我准备了一个小示例:

这是不正确的行为,请注意空格未正确对齐,表格末尾的行中断以及表头应全部居中:

在此处输入图片描述

以下是我所寻找的正确行为,没有多余的空间,\midrule没有中断,所有标题都居中:

在此处输入图片描述

我多次检查了表格的格式,但找不到额外空间问题和中断的原因\midrule。到目前为止,我所得到的是:

\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
\begin{tabularx}{\linewidth}{@{}X c !{\qquad}Xc!{\qquad}Xc}
    \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*}

编辑问题

除此之外,我刚刚注意到与表格标题相关的非常奇怪的行为。一旦我将标题拉长,它就会将右侧的所有内容推开,从而导致以下奇怪的效果:

\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} \\

在此处输入图片描述

我查阅过的帮助我找到解决方案的帖子有这个这个我还遇到了非常有用的源代码,并应用了此解决方案的一部分,使我非常接近我正在寻找的表格的最终解决方案。一切都很有帮助,但我仍然无法理解我遇到的格式问题。

肯定有什么地方我没有正确理解,请指出正确的方向以找到解决方案。

答案1

  • 你的 MWE 不可编译...错过了\begin{document},等等
  • 你定义表格布局,这样在某些列之间有很大的空白空间,而\cmidrule(r{1.8em}){1-6}不是简单的使用\midrule
  • 我猜想你喜欢以下格式的表格:

在此处输入图片描述

梅威瑟:

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

\begin{document} % added

\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}

相关内容