我想\rule
在每个分隔符后的第一行前面添加一个,以将其与 进一步区分开\hline
。我可以在第一行对其进行硬编码,但分隔符是动态的,因此在那里不可能。
该表位于twocolumn
环境中。
我尝试将添加rule
到末尾\tablehead
,但是这给了我一个misplaced \noalign
:
\tablehead{\rule{0pt}{13pt}Name~~~~~~~~~~~~~~~~~~~~~~~ & Value\\\hline\rule{0pt}{13pt}}
以下是 MWE:
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 unicode
\documentclass[a4paper, 12pt]{article}
\usepackage{supertabular}
\usepackage{lipsum}
\setlength\columnsep{40pt}
\setlength\columnseprule{0.1mm}
\begin{document}
\twocolumn[
\section{Section}
{\lipsum*[2]}
\bigskip
]
\tablefirsthead{\rule{0pt}{13pt}Name~~~~~~~~~~~~~~~~~~~~~~~ & Value\\\hline}
\tablehead{\rule{0pt}{13pt}Name~~~~~~~~~~~~~~~~~~~~~~~ & Value\\\hline}
\tablelasttail{\hline}
\begin{supertabular}{lr}
\rule{0pt}{13pt}First & 1\\ Second & 2\\ Third & 3\\ Forth & 4\\ Fifth & 5\\
Sixth & 6\\ Seventh & 7\\ Eighth & 8\\ Ninth & 9\\ Tenth & 10\\
Eleventh & 11\\ Twelfth & 12\\ Thirteenth & 13\\ Fourteenth & 14\\ Fifteenth & 15\\
Sixteenth & 16\\ Seventeenth & 17\\ Eighteenth & 18\\ Nineteenth & 19\\ Twentieth & 20\\
Twenty-first & 21\\ Twenty-second & 22\\ Twenty-third & 23\\ Twenty-fourth & 24\\ Twenty-fifth & 25\\
Twenty-sixth & 26\\ Twenty-seventh & 27\\ Twenty-eighth & 28\\ Twenty-ninth & 29\\ Thirtieth & 30\\
Thirty-first & 31\\ Thirty-second & 32\\ Thirty-third & 33\\ Thirty-fourth & 34\\ Thirty-fifth & 35\\
Thirty-sixth & 36\\ Thirty-seventh & 37\\ Thirty-eighth & 38\\ Thirty-ninth & 39\\ Fortieth & 40\\
Forty-first & 41\\ Forty-second & 42\\ Forty-third & 43\\ Forty-fourth & 44\\ Forty-fifth & 45\\
Forty-sixth & 46\\ Forty-seventh & 47\\ Forty-eighth & 48\\ Forty-ninth & 49\\ Fiftieth & 50\\
Fifty-first & 51\\ Fifty-second & 52\\ Fifty-third & 53\\ Fifty-fourth & 54\\ Fifty-fifth & 55\\
Fifty-sixth & 56\\ Fifty-seventh & 57\\ Fifty-eighth & 58\\ Fifty-ninth & 59\\ Sixtieth & 60\\
\end{supertabular}
\end{document}
答案1
这可以通过在头部定义之后替换\rule{0pt}{13pt}
每个第一行来实现:\noalign{\vskip 3pt}
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 unicode
\documentclass[a4paper, 12pt]{article}
\usepackage{supertabular}
\usepackage{lipsum}
\setlength\columnsep{40pt}
\setlength\columnseprule{0.1mm}
\begin{document}
\twocolumn[
\section{Section}
{\lipsum*[2]}
\bigskip
]
\tablefirsthead{\rule{0pt}{13pt}Name~~~~~~~~~~~~~~~~~~~~~~~ & Value\\\hline\noalign{\vskip 3pt}}
\tablehead{\rule{0pt}{13pt}Name~~~~~~~~~~~~~~~~~~~~~~~ & Value\\\hline\noalign{\vskip 3pt}}
\tablelasttail{\hline}
\begin{supertabular}{lr}
First & 1\\ Second & 2\\ Third & 3\\ Forth & 4\\ Fifth & 5\\
Sixth & 6\\ Seventh & 7\\ Eighth & 8\\ Ninth & 9\\ Tenth & 10\\
Eleventh & 11\\ Twelfth & 12\\ Thirteenth & 13\\ Fourteenth & 14\\ Fifteenth & 15\\
Sixteenth & 16\\ Seventeenth & 17\\ Eighteenth & 18\\ Nineteenth & 19\\ Twentieth & 20\\
Twenty-first & 21\\ Twenty-second & 22\\ Twenty-third & 23\\ Twenty-fourth & 24\\ Twenty-fifth & 25\\
Twenty-sixth & 26\\ Twenty-seventh & 27\\ Twenty-eighth & 28\\ Twenty-ninth & 29\\ Thirtieth & 30\\
Thirty-first & 31\\ Thirty-second & 32\\ Thirty-third & 33\\ Thirty-fourth & 34\\ Thirty-fifth & 35\\
Thirty-sixth & 36\\ Thirty-seventh & 37\\ Thirty-eighth & 38\\ Thirty-ninth & 39\\ Fortieth & 40\\
Forty-first & 41\\ Forty-second & 42\\ Forty-third & 43\\ Forty-fourth & 44\\ Forty-fifth & 45\\
Forty-sixth & 46\\ Forty-seventh & 47\\ Forty-eighth & 48\\ Forty-ninth & 49\\ Fiftieth & 50\\
Fifty-first & 51\\ Fifty-second & 52\\ Fifty-third & 53\\ Fifty-fourth & 54\\ Fifty-fifth & 55\\
Fifty-sixth & 56\\ Fifty-seventh & 57\\ Fifty-eighth & 58\\ Fifty-ninth & 59\\ Sixtieth & 60\\
\end{supertabular}
\end{document}