我正在使用 tabularx,并将我的表格格式化为我想要的大小,但是每个单元格中的文本的排列有点奇怪 - 单词溢出到新行,但我宁愿整个单词都转到新行,不太清楚如何改变这一点,任何帮助都值得赞赏:
\begin{table}[h]
\centering
\footnotesize
\begin{tabularx}{\textwidth}{|X| X| X|| X| X |X|}
\hline
\textbf{Criteria} & \textbf{Criteria Detail} & \textbf{Weight} & \textbf{Symphony AI Summit Service Management} & \textbf{InvGate Service Desk} & \textbf{Proactivanet} \\
\hline
Feature Suitability & IT Support Enablement/ Multichannel Engagement & 10 & 9.2 & 9 & 9.9 \\
\hline
Incident Management & Case Management & 5 & 4.6 & 4.6 & 4.8 \\
\hline
Change Management & Adaptive Change \& Release & 5 & 4.5 & 4.3 & 4.9 \\
\hline
Problem Management & case Managment/IT Support Enablement & 10 & 9.2 & 9.2 & 9.8 \\
\hline
Knowledge Management & IT Knowledge Management & 5 & 4.5 & 4.5 & 4.8 \\
\hline
Usability and User Experience & User Experience & 5 & 4.5 & 4.9 & 4.7 \\
\hline
Interface and Navigation & User Experience/ Overhead & 10 & 8.9 & 9.3 & 9.6 \\
\hline
User Training and Documentation & Quality of End-User Training/ Service Reporting and Resource Management & 10 & 9.2 & 8.9 & 9.7 \\
\hline
Integration and Compatibility & Integrated AI/Workflow Automation \& Integration/Ease of Deployment & 15 & 13.3 & 13 & 14.5 \\
\hline
\end{tabularx}
\end{table}
答案1
我建议您允许在第 1、2 和 4 列中自动换行;禁用完全对齐;将四个数据列中的数字与其显式或隐式的小数点标记对齐;不要将标题行的内容呈现为粗体;最后但并非最不重要的是,删除所有垂直线并使用更少但间距适当的水平线。
\documentclass{article}
\usepackage[letterpaper,margin=1in]{geometry} % set suitably
\usepackage{tabularx,booktabs}
\newcolumntype{L}{>{\raggedright\arraybackslash\hspace{0pt}}X}
\newcolumntype{C}{>{\centering\arraybackslash\hspace{0pt}}X}
\usepackage{siunitx}
\newcolumntype{T}[1]{S[table-format=#1]}
\newcommand\mcC[1]{\multicolumn{1}{C}{#1}}
\begin{document}
\begin{table}[h]
\setlength{\tabcolsep}{4pt}
\small
\begin{tabularx}{\textwidth}{@{} LL T{2.0} *{3}{T{2.1}} @{}}
\toprule
Criteria & Criteria Detail & {Weight} &
\mcC{Symphony AI Summit Service Management} &
{InvGate Service Desk} & {Proactivanet} \\
\midrule
Feature Suitability & IT Support Enablement\slash Multichannel Engagement & 10 & 9.2 & 9.0 & 9.9 \\
\addlinespace
Incident Management & Case Management & 5 & 4.6 & 4.6 & 4.8 \\
\addlinespace
Change Management & Adaptive Change \& Release & 5 & 4.5 & 4.3 & 4.9 \\
\addlinespace
Problem Management & Case Managment\slash IT Support Enablement & 10 & 9.2 & 9.2 & 9.8 \\
\addlinespace
Knowledge Management & IT Knowledge Management & 5 & 4.5 & 4.5 & 4.8 \\
\addlinespace
Usability and User Experience & User Experience & 5 & 4.5 & 4.9 & 4.7 \\
\addlinespace
Interface and Navigation & User Experience/ Overhead & 10 & 8.9 & 9.3 & 9.6 \\
\addlinespace
User Training and Documentation & Quality of End-User Training\slash Service Reporting and Resource Management & 10 & 9.2 & 8.9 & 9.7 \\
\addlinespace
Integration and Compatibility & Integrated AI/ Workflow Automation \& Integration\slash Ease of Deployment & 15 & 13.3 & 13.0 & 14.5 \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}
答案2
tabularray
很好的@Mico 答案的变体(+1) :
\documentclass{article}
\usepackage[letterpaper,margin=1in]{geometry} % set suitably
\usepackage{tabularray}
\UseTblrLibrary{booktabs, siunitx}
\begin{document}
\begin{table}[ht]
\begin{tblr}{colsep = 4pt,
colspec = {@{} X[1.5,l] X[2.5,l]
X[0.9,c,si={table-format=2.0}]
X[1.3,c,si={table-format=2.0}]
*{2}{X[0.9,c,si={table-format=2.1}]}
@{}},
cells = {font=\small\linespread{0.84}\relax},
row{1} = {guard, m}
}
\toprule
Criteria
& Criteria Detail & Weight
& Symphony AI Summit Service Management
& InvGate Service Desk
& Proacti\-vanet \\
\midrule
Feature Suitability
& IT Support Enablement\slash Multichannel Engagement & 10 & 9.2 & 9.0 & 9.9 \\
Incident Management
& Case Management & 5 & 4.6 & 4.6 & 4.8 \\
Change Management
& Adaptive Change \& Release & 5 & 4.5 & 4.3 & 4.9 \\
Problem Management
& Case Managment\slash IT Support Enablement & 10 & 9.2 & 9.2 & 9.8 \\
Knowledge Management
& IT Knowledge Management & 5 & 4.5 & 4.5 & 4.8 \\
Usability and User Experience
& User Experience & 5 & 4.5 & 4.9 & 4.7 \\
Interface and Navigation
& User Experience/ Overhead & 10 & 8.9 & 9.3 & 9.6 \\
User Training and Documentation
& Quality of End-User Training\slash Service Reporting and Resource Management
& 10 & 9.2 & 8.9 & 9.7 \\
Integration and Compatibility
& Integrated AI/ Workflow Automation \& Integration\slash Ease of Deployment
& 15 & 13.3 & 13.0 & 14.5 \\
\bottomrule
\end{tblr}
\end{table}
\end{document}