如何删除第一行和第二行文本之间的多余空格?提前感谢!
\documentclass[jou]{apa7}
\usepackage{siunitx}
\usepackage{textcomp}
\begin{document}
\begin{tabular}{m{13em}m{1cm}m{1cm}m{1cm}m{13em}m{1cm}m{1cm}m{1cm}} \hline
& A & B & C & & D & E & F \\ \hline
Model 1: Name of the first model inserted here & & & & Model 2: Name of the second model inserted here & & & & \\
\hspace{3mm} Integration strategies & .03 & .10 & .000 & Integration strategies & .34 & .08 & .000 \\
\hspace{3mm} Integration strategies & .12 & .03 & .56 & Integration strategies & .12 & .19 & .404\\
\end{tabular}
\end{document}
发布于 2020-08-02 03:29:51
您的表定义了9列,但在第二行中使用了10列。您将得到有关这方面的错误,因此您甚至不应该查看什么可能是或可能不是有效的pdf。
如果错误已修复,表格将如下所示:
\documentclass[jou]{apa7}
\usepackage{siunitx}
\usepackage{textcomp}
\begin{document}
\begin{tabular}{m{13em}m{1cm}m{1cm}m{1cm}m{13em}m{1cm}m{1cm}m{1cm}} \hline
& A & B & C & & D & E & F \\ \hline
Model 1: Name of the first model inserted here & & & & Model 2: Name of the second model inserted here & & & \\
\hspace{3mm} Integration strategies & .03 & .10 & .000 & Integration strategies & .34 & .08 & .000 \\
\hspace{3mm} Integration strategies & .12 & .03 & .56 & Integration strategies & .12 & .19 & .404\\
\end{tabular}
\end{document}
与硬编码所有列的宽度相比,使用tabularx
包(也许还有booktabs
包以获得更好的间距)可能更容易:
\documentclass[jou]{apa7}
\usepackage{siunitx}
\usepackage{textcomp}
\usepackage{tabularx}
\usepackage{booktabs}
\begin{document}
\begin{tabularx}{\linewidth}{XlllXlll}
\toprule
& A & B & C & & D & E & F \\
\midrule
Model 1: Name of the first model inserted here & & & & Model 2: Name of the second model inserted here & & & \\
\quad Integration strategies & .03 & .10 & .000 & Integration strategies & .34 & .08 & .000 \\
\quad Integration strategies & .12 & .03 & .56 & Integration strategies & .12 & .19 & .404\\
\bottomrule
\end{tabularx}
\end{document}
通常,我还建议使用@{}XlllXlll@{}
删除列前面和后面的空格,但对于这个特定示例,这会导致非常糟糕的换行
https://stackoverflow.com/questions/63207930
复制相似问题