LaTeX 表格列间距调整 - 如何让表格更易读
\begin{table}[H]\centering\setlength{\tabcolsep}{12pt} % 设置列间距为 12pt \caption{优化后的耗材尺寸}\begin{tabular}{cccccccccc}\hline\textbf{容器编号} & \textbf{1} & \textbf{2} & \textbf{3} & \textbf{4} & \textbf{5} & \textbf{6} & \textbf{7} & \textbf{8}& \textbf{9} \textbf{长($L_{i}$)} & 200 & 250 & 270 & 310 & 150 & 175 & 200 & 250 & 280 \textbf{宽($W_{i}$)} & 100 & 150 & 180 & 210 & 100 & 120 & 150 & 170 & 200 \textbf{高($H_{i}$)} & 1 & 1 & 1 & 1 & 50 & 70 & 100 & 80 & 150 \\hline\end{tabular}\end{table} \ 在 LaTeX 中,可以使用 \tabcolsep 命令来控制表格列间距的大小。默认情况下, \tabcolsep 的值为 6pt。我们可以将其修改为较大的值,例如 12pt,来增大列间距。修改后的代码如下: \ latex \\ \begin{table}[H] \centering \setlength{\tabcolsep}{12pt} % 设置列间距为 12pt \caption{优化后的耗材尺寸} \begin{tabular}{cccccccccc} \hline \textbf{容器编号} & \textbf{1} & \textbf{2} & \textbf{3} & \textbf{4} & \textbf{5} & \textbf{6} & \textbf{7} & \textbf{8}& \textbf{9} \\textbf{长($L_{i}$)} & 200 & 250 & 270 & 310 & 150 & 175 & 200 & 250 & 280 \\textbf{宽($W_{i}$)} & 100 & 150 & 180 & 210 & 100 & 120 & 150 & 170 & 200 \\textbf{高($H_{i}$)} & 1 & 1 & 1 & 1 & 50 & 70 & 100 & 80 & 150 \\\hline \end{tabular} \end{table} \\ \ 编译后的表格将具有较大的列间距。你可以根据需要调整 \tabcolsep 的值来获得合适的列间距。
原文地址: https://www.cveoy.top/t/topic/p6Fa 著作权归作者所有。请勿转载和采集!