LaTeX 表格行间距调整 - 如何缩小行间距
要修改代码使得表格的行间距变小,可以使用\renewcommand{\arraystretch}{}命令来设置行间距的倍数。通过将其设置为小于1的值,可以使行间距变小。
以下是修改后的代码示例:
\documentclass{article}
\usepackage{float}
\begin{document}
\begin{table}[H]
\renewcommand{\arraystretch}{0.8} % 设置行间距的倍数为0.8
\centering
\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}
\end{document}
通过设置\renewcommand{\arraystretch}{0.8},行间距的倍数变为0.8,可以看到表格的行间距变小了。你可以根据需要调整\renewcommand{\arraystretch}{}命令中的参数值来控制行间距的大小。
原文地址: https://www.cveoy.top/t/topic/p6Fi 著作权归作者所有。请勿转载和采集!