我正在尝试为一篇论文创建补充材料,该论文涉及一个跨越多页的超大表格。我正在使用 supertabular,但遇到了对齐问题:多行单元格会碰到前面的 \hline,我似乎无法修复它。我需要行向下对齐,并且(因为其中一些文本是从参考书目中填写的)可扩展到未知/引用的字符串。还要求列的宽度是固定的(如下所示)。我怎样才能阻止这些多行单元格与前一个 \hline 相邻?
梅威瑟:
\documentclass[english]{article}
\usepackage{supertabular}
\usepackage{array}
\begin{document}
\begin{center}
\tablefirsthead{%
Name & ID & Family & Geography & Citation \\
}
\topcaption{Language Sample}
\label{tab:languagesample}
\tablehead{%
\multicolumn{1}{l}{Name} &
\multicolumn{1}{l}{ID} &
\multicolumn{1}{l}{Family} &
\multicolumn{1}{l}{Geography} &
\multicolumn{1}{l}{Citation} \\}
\renewcommand{\arraystretch}{1.2}
\begin{supertabular}{>{\raggedright}b{0.22\textwidth}b{0.1\textwidth}>{\raggedright}b{0.15\textwidth}b{0.17\textwidth}>{\raggedright\arraybackslash}b{0.22\textwidth}}
\hline
Bangime & bang1363 & & Africa & Heath and Harrigan 2018 \\ \hline
Bench & benc1235 & Ta-Ne-Omotic & Africa & Rapold 2006 \\ \hline
\end{supertabular}
\end{center}
\end{document}
答案1
由于标准解决方案 - 使用该cellspace
包似乎不起作用supertabular
,我建议在相关单元格中插入一条不可见的规则:
\documentclass[english]{article}
\usepackage{supertabular}
\usepackage{array}
\begin{document}
\begin{center}
\tablefirsthead{%
Name & ID & Family & Geography & Citation \\
}
\topcaption{Language Sample}
\label{tab:languagesample}
\tablehead{%
\multicolumn{1}{l}{Name} &
\multicolumn{1}{l}{ID} &
\multicolumn{1}{l}{Family} &
\multicolumn{1}{l}{Geography} &
\multicolumn{1}{l}{Citation} \\}
\begin{supertabular}{>{\raggedright}b{0.22\textwidth}b{0.1\textwidth}>{\raggedright}b{0.15\textwidth}b{0.17\textwidth}%
>{\raggedright\arraybackslash}b{0.22\textwidth}}
\hline
Bangime & bang1363 & & Africa & Heath and Harrigan 2018 \\ \hline
Bench & benc1235 &\rule{0pt}{2.4ex} Ta-Ne-Omotic & Africa & Rapold 2006 \\ \hline
\end{supertabular}
\end{center}
\end{document}