我有一个关于垂直点的问题,一般我现在\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}