表格單元格內的文字定位

表格單元格內的文字定位

我建構的表結果如下:

在此輸入影像描述

但是,我想將複選標記和十字符號垂直居中放置。我該怎麼做?這是我的程式碼:

\begin{tabular}
   {|p{1.5cm}|p{3.5cm}|c|c|c|c|c|c|c|}
   \hline                                      
   Anonym & Precision degradation, Random shift, Black
   marker, Prefix preserving, Truncation  & \checkmark & \checkmark & \checkmark & \checkmark & \times & \times & \times\\ \hline

\end{tabular}

答案1

這邊走?

\documentclass{article}

\usepackage{array,amssymb, amstext}

\newcolumntype{C}{>{$}c<{$}} % math-mode version of "c" column type

\begin{document}
\begin{tabular}
{|p{1.5cm}|m{3.5cm}|C|C|C|C|C|C|C|}
   \hline                                      
Anonym & Precision degradation, Random shift, Black
marker, Prefix preserving, Truncation  & \checkmark & \checkmark & \checkmark & \checkmark & \times & \times & \times\\ \hline

 \end{tabular}
\end{document}

帶有數學列和 m 列的表格

相關內容