我想使两列之间选定框的宽度更大。
\begin{table}[H]
\centering
\begin{tabularx}{\columnwidth}{@{}XXX@{}}
\toprule
\textbf{Parameter} & Description & Unit\\
\toprule
\textbf{Task} & Total number of task in the system & numeric count\\
\textbf{VM} & Total number of VM in the system & numeric count\\
\textbf{Time} & Average required time to complete a task & milisec\\
\textbf{Utilization} & Resource utilization & \%\\
\textbf{VM's BW} & Bandwidth allocated for each VM & MB\\
\textbf{VM's CPU} & Number of CPU in a VM & Numeric Count\\
\textbf{Utilization Model} & CloudSim utilization model & Stochastic\\
\bottomrule
\end{tabularx}
\caption{Difference performance metrics \label{tab:difMetrics}}
\end{table}
答案1
列间空间不匹配是由于您使用的X
列应该是l
。
您可以像下面这样增加第二列和第三列之间的间距,但这只能治标不治本。
在下表中,您可以看到如何增加单个表的列间距(在环境中);如果您希望全局增加,请\tabcolsep
在序言中设置所需的宽度。即使对于当前的表,您也可能需要这样做。
\documentclass{article}
\usepackage{tabularx,booktabs}
\begin{document}
\begin{table}[htp]
\centering
\begin{tabularx}{\columnwidth}{@{}XX@{\hspace{2em}}X@{}}
\toprule
\textbf{Parameter} & Description & Unit\\
\toprule
\textbf{Task} & Total number of task in the system & numeric count\\
\textbf{VM} & Total number of VM in the system & numeric count\\
\textbf{Time} & Average required time to complete a task & milisec\\
\textbf{Utilization} & Resource utilization & \%\\
\textbf{VM's BW} & Bandwidth allocated for each VM & MB\\
\textbf{VM's CPU} & Number of CPU in a VM & Numeric Count\\
\textbf{Utilization Model} & CloudSim utilization model & Stochastic\\
\bottomrule
\end{tabularx}
\caption{Difference performance metrics\label{tab:difMetrics}}
\end{table}
\begin{table}[htp]
\centering
\setlength{\tabcolsep}{1em}
\begin{tabularx}{\columnwidth}{
@{}
>{\bfseries}l
X
l
@{}
}
\toprule
Parameter & Description & Unit\\
\toprule
Task & Total number of task in the system & numeric count\\
VM & Total number of VM in the system & numeric count\\
Time & Average required time to complete a task & milisec\\
Utilization & Resource utilization & \%\\
VM's BW & Bandwidth allocated for each VM & MB\\
VM's CPU & Number of CPU in a VM & Numeric Count\\
Utilization Model & CloudSim utilization model & Stochastic\\
\bottomrule
\end{tabularx}
\caption{Difference performance metrics}
\end{table}
\end{document}