如何在带有多幅图像的表格中插入居中垂直点以表达省略

如何在带有多幅图像的表格中插入居中垂直点以表达省略

我有一个关于垂直点的问题,一般我现在\vdot在表格中用它来表示省略,但我想让它们集中起来表示省略,目前的代码如下:

\documentclass{article}

\usepackage{amssymb} % Add
\usepackage{bbding} % Add
\usepackage[export]{adjustbox}
\usepackage{array}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{cellspace}
\def\tabularxcolumn#1{m{#1}}

\begin{document}

\begin{table*}[htbp]
    \caption{Text.}
    \begin{tabularx}{\textwidth}{ l Sl X }
    \toprule
        Iterations & Samples & Comments \\
    \midrule
        0     & $\includegraphics[width=.6\textwidth,valign=M]{000000.png}$ & Text is always being here\\
        32    & $\includegraphics[width=.6\textwidth,valign=M]{000000.png}$ & Text \\ 
        64    & $\includegraphics[width=.6\textwidth,valign=M]{000000.png}$ & Text \\
        128   & $\includegraphics[width=.6\textwidth,valign=M]{000000.png}$ & Text \\
        192   & $\includegraphics[width=.6\textwidth,valign=M]{000000.png}$ & Text \\
        \vdots & \vdots & \vdots \\
        3200  & $\includegraphics[width=.6\textwidth,valign=M]{000000.png}$ & Text \\
    \bottomrule
    \end{tabularx}
    \label{tab4}
\end{table*}

\end{document}

我试过\usepackage{mathtools}但似乎不起作用,有谁熟悉这个吗?提前谢谢!

答案1

有几个问题:

  • 包裹siunitx丢失

  • 指定的列数与表中实际的列数不匹配

  • S列缺少有关如何对齐数字的说明

  • 要使 vdot 居中,同时使列的其余部分对齐,可以使用\makecell同名包中的宏

  • 图像不是数学,不要把它们放在数学模式中


\documentclass{article}

\usepackage{amssymb} % Add
\usepackage{bbding} % Add
\usepackage[export]{adjustbox}
\usepackage{array}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{graphicx}
%\usepackage{cellspace}
\def\tabularxcolumn#1{m{#1}}
\usepackage{siunitx}
\usepackage{makecell}

\begin{document}

\begin{table*}[htbp]
    \caption{Text.}
    \begin{tabularx}{\textwidth}{ @{} S[table-format=4.0] c X @{} }
    \toprule
        {Iterations} & Samples & Comments \\
    \midrule
        0     & \includegraphics[width=.6\textwidth,valign=M]{example-image-duck} & Text is always being here\\
        32    & \includegraphics[width=.6\textwidth,valign=M]{example-image-duck} & Text \\ 
        {$\vdots$} & $\vdots$ & \makecell[c]{$\vdots$} \\
        3200  & \includegraphics[width=.6\textwidth,valign=M]{example-image-duck} & Text \\
    \bottomrule
    \end{tabularx}
    \label{tab4}
\end{table*}

\end{document}

在此处输入图片描述

相关内容