LaTeX 表格中 \addlinespace 报错及解决方法
LaTeX 表格中 \addlinespace 报错及解决方法
在 LaTeX 中创建表格时,你可能会遇到使用 \addlinespace 命令报错的情况。这是因为 \addlinespace 不是 LaTeX 中的有效命令。
如果想要增加表格行间距,可以使用 \renewcommand{\arraystretch}{value} 命令,其中 value 是你想要设置的行间距倍数。
以下是使用 \renewcommand{\arraystretch}{1.5} 命令将表格行间距设置为默认值的 1.5 倍的示例代码:
\begin{table}[H]
\renewcommand\arraystretch{1.5}
\centering % Label your table accordingly
\setlength{\abovecaptionskip}{5pt}
\caption{\label{tab2} The final MIMO scores of each model in two datasets}
\begin{tabular}{ccccc}
\toprule[0.35mm]
\multirow{2}{*}{\textbf{Models}} & \multicolumn{2}{c}{\textbf{Usability and comprehensiveness}}\\
\cmidrule[0.25mm](lr){2-3} \cmidrule[0.25mm](lr){4-5}
& BTCV & AMOS 2022\\
\midrule[0.15mm]
U-Net & 0.128 & 0.238 \\
V-Net & 0.615 & 0.664 \\
nnU-Net & 0.513 & 0.830 \\
Attention u-net & 0.705 & 0.679 \\
Transunet & 0.346 & 0.757 \\
Swin-unet & 0.295 & 0.340 \\
Unetr & 0.564 & 0.372 \\
Swin unetr & \bf{0.769} & \bf{0.851}\\
\bottomrule[0.35mm]
\end{tabular}
\end{table}
通过使用 \renewcommand{\arraystretch}{value} 命令,你可以轻松地控制 LaTeX 表格中的行间距,使表格更易读和美观。
原文地址: https://www.cveoy.top/t/topic/fAFf 著作权归作者所有。请勿转载和采集!