![双列超级表格输出重叠](https://linux22.com/image/302181/%E5%8F%8C%E5%88%97%E8%B6%85%E7%BA%A7%E8%A1%A8%E6%A0%BC%E8%BE%93%E5%87%BA%E9%87%8D%E5%8F%A0.png)
我在将表格设置为两列时遇到了问题。我尝试使用 longtable 和 supertabular,但到目前为止收效甚微。我目前有一个包含两列的 supertabular,但输出重叠。
我的代码如下:
\twocolumn
\tablefirsthead{%
& & \multicolumn{1}{c}{N} &
\multicolumn{1}{c}{\%}\tabularnewline
\hline}
\tablelasttail{\hline}
%
\begin{supertabular}{llrr}
\multicolumn{2}{l}{Totaal} & 83.063 & 100,0 \tabularnewline
\multicolumn{2}{l}{Verzekeringsdekking} & & \tabularnewline
& Verzekerd & 65.455 & 78,8 \tabularnewline
& Onverzekerd & 17.608 & 21,2 \tabularnewline
\multicolumn{2}{l}{Zorguitgaven} & & \tabularnewline
& Geen zorguitgaven & 15.414 & 18,6 \tabularnewline
& Minder dan \$1.000 & 30.014 & 36,1 \tabularnewline
& $1.000-$2.000 & 11.473 & 13,8 \tabularnewline
& $2.000-$5.000 & 13.626 & 16,4 \tabularnewline
& $5.000-$10.000 & 6.797 & 8,2 \tabularnewline
& Meer dan \$10.000 & 5.739 & 6,9 \tabularnewline
\multicolumn{2}{l}{Scholing} & & \tabularnewline
& Minder dan high school & 15.527 & 18,7 \tabularnewline
& High school & 26.175 & 31,5 \tabularnewline
& College of hoger & 41.361 & 49,8 \tabularnewline
\multicolumn{2}{l}{Leeftijd} & & \tabularnewline
& Jonger dan 40 jaar & 31.853 & 38,3 \tabularnewline
& 40-49 jaar & 20.639 & 24,8 \tabularnewline
& Ouder dan 50 jaar & 30.571 & 36,8 \tabularnewline
\multicolumn{2}{l}{Inkomen} & & \tabularnewline
& Minder dan \$20.000 & 31.571 & 38,0 \tabularnewline
& $20.000-$30.000 & 14.762 & 17,8 \tabularnewline
& $30.000-$50.000 & 19.372 & 23,3 \tabularnewline
& Meer dan \$50.000 & 17.358 & 20,9 \tabularnewline
\multicolumn{2}{l}{Geslacht} & & \tabularnewline
& Man & 39.825 & 47,9 \tabularnewline
& Vrouw & 43.238 & 52,1 \tabularnewline
\multicolumn{2}{l}{Etniciteit} & & \tabularnewline
& Blank & 66.290 & 79,8 \tabularnewline
& Niet-blank & 16.773 & 20,2 \tabularnewline
\multicolumn{2}{l}{Aantal aandoeningen} & & \tabularnewline
& 0 & 52.950 & 63,7 \tabularnewline
& 1 & 19.853 & 23,9 \tabularnewline
& 2 of meer & 10.260 & 12,4 \tabularnewline
\multicolumn{2}{l}{Roker} & & \tabularnewline
& Ja & 16.942 & 20,4 \tabularnewline
& Nee & 66.121 & 79,6 \tabularnewline
\multicolumn{2}{l}{Huwelijkse staat} & & \tabularnewline
& Getrouwd & 53.564 & 64,5 \tabularnewline
& Niet getrouwd & 29.499 & 35,5 \tabularnewline
\multicolumn{2}{l}{Grootte van de familie} & & \tabularnewline
& 1 of 2 & 37.246 & 44,8 \tabularnewline
& 2 tot 4 & 31.458 & 37,9 \tabularnewline
& 5 of hoger & 14.359 & 17,3 \tabularnewline
\multicolumn{2}{l}{Regio} & & \tabularnewline
& Noordoost & 12.058 & 14,5 \tabularnewline
& Zuidwest & 17.597 & 21,2 \tabularnewline
& Zuid & 32.606 & 39,3 \tabularnewline
& West & 20.802 & 25,0 \tabularnewline
\multicolumn{2}{l}{BMI} & & \tabularnewline
& \textless25 & 28.176 & 33,9 \tabularnewline
& 25-30 & 30.708 & 37,0 \tabularnewline
& 30-40 & 20.918 & 25,2 \tabularnewline
& \textgreater40 & 3.261 & 3,9 \tabularnewline
\multicolumn{2}{l}{Werkstatus} & & \tabularnewline
& Werkloos & 20.987 & 25,3 \tabularnewline
& Werknemer & 54.461 & 65,6 \tabularnewline
& Zelfstandig & 7.615 & 9,2 \tabularnewline
\multicolumn{2}{l}{Gezondheidsstatus} & & \tabularnewline
& Excellent/Very good & 49.711 & 59,8 \tabularnewline
& Good & 23.426 & 28,2 \tabularnewline
& Fair/Poor & 9.926 & 11,9 \tabularnewline
\hline
\end{supertabular}
\onecolumn
答案1
\tabcolsep
将控制列间空白量的参数的值从默认值减小6pt
到2pt
,再加上完全消除第一列左侧和最后一列右侧的空白,便可使表格适合可用空间。
另外两条评论:(i)如果您想打印美元符号,则应小心书写。 (ii)如果您想生成印刷破折号,\$
请确保键入--
而不是。-
\documentclass{article}
\usepackage{supertabular}
\begin{document}
\twocolumn
\setlength\tabcolsep{2pt} % default value: 6pt
\tablefirsthead{%
&
& \multicolumn{1}{c}{N}
& \multicolumn{1}{c}{\%}
\tabularnewline \hline}
\tablelasttail{\hline}
%
\begin{supertabular}{@{} l @{\hspace*{5pt}} l rr @{}}
\multicolumn{2}{@{}l}{Totaal} & 83.063 & 100,0 \tabularnewline
\multicolumn{2}{@{}l}{Verzekeringsdekking} & & \tabularnewline
& Verzekerd & 65.455 & 78,8 \tabularnewline
& Onverzekerd & 17.608 & 21,2 \tabularnewline
\multicolumn{2}{@{}l}{Zorguitgaven} & & \tabularnewline
& Geen zorguitgaven & 15.414 & 18,6 \tabularnewline
& Minder dan \$1.000 & 30.014 & 36,1 \tabularnewline
& \$1.000--\$2.000 & 11.473 & 13,8 \tabularnewline
& \$2.000--\$5.000 & 13.626 & 16,4 \tabularnewline
& \$5.000--\$10.000 & 6.797 & 8,2 \tabularnewline
& Meer dan \$10.000 & 5.739 & 6,9 \tabularnewline
\multicolumn{2}{@{}l}{Scholing} & & \tabularnewline
& Minder dan high school & 15.527 & 18,7 \tabularnewline
& High school & 26.175 & 31,5 \tabularnewline
& College of hoger & 41.361 & 49,8 \tabularnewline
\multicolumn{2}{@{}l}{Leeftijd} & & \tabularnewline
& Jonger dan 40 jaar & 31.853 & 38,3 \tabularnewline
& 40--49 jaar & 20.639 & 24,8 \tabularnewline
& Ouder dan 50 jaar & 30.571 & 36,8 \tabularnewline
\multicolumn{2}{@{}l}{Inkomen} & & \tabularnewline
& Minder dan \$20.000 & 31.571 & 38,0 \tabularnewline
& \$20.000--\$30.000 & 14.762 & 17,8 \tabularnewline
& \$30.000--\$50.000 & 19.372 & 23,3 \tabularnewline
& Meer dan \$50.000 & 17.358 & 20,9 \tabularnewline
\multicolumn{2}{@{}l}{Geslacht} & & \tabularnewline
& Man & 39.825 & 47,9 \tabularnewline
& Vrouw & 43.238 & 52,1 \tabularnewline
\multicolumn{2}{@{}l}{Etniciteit} & & \tabularnewline
& Blank & 66.290 & 79,8 \tabularnewline
& Niet-blank & 16.773 & 20,2 \tabularnewline
\multicolumn{2}{@{}l}{Aantal aandoeningen} & & \tabularnewline
& 0 & 52.950 & 63,7 \tabularnewline
& 1 & 19.853 & 23,9 \tabularnewline
& 2 of meer & 10.260 & 12,4 \tabularnewline
\multicolumn{2}{@{}l}{Roker} & & \tabularnewline
& Ja & 16.942 & 20,4 \tabularnewline
& Nee & 66.121 & 79,6 \tabularnewline
\multicolumn{2}{@{}l}{Huwelijkse staat} & & \tabularnewline
& Getrouwd & 53.564 & 64,5 \tabularnewline
& Niet getrouwd & 29.499 & 35,5 \tabularnewline
\multicolumn{2}{@{}l}{Grootte van de familie} & & \tabularnewline
& 1 of 2 & 37.246 & 44,8 \tabularnewline
& 2 tot 4 & 31.458 & 37,9 \tabularnewline
& 5 of hoger & 14.359 & 17,3 \tabularnewline
\multicolumn{2}{@{}l}{Regio} & & \tabularnewline
& Noordoost & 12.058 & 14,5 \tabularnewline
& Zuidwest & 17.597 & 21,2 \tabularnewline
& Zuid & 32.606 & 39,3 \tabularnewline
& West & 20.802 & 25,0 \tabularnewline
\multicolumn{2}{@{}l}{BMI} & & \tabularnewline
& \textless25 & 28.176 & 33,9 \tabularnewline
& 25--30 & 30.708 & 37,0 \tabularnewline
& 30--40 & 20.918 & 25,2 \tabularnewline
& \textgreater40 & 3.261 & 3,9 \tabularnewline
\multicolumn{2}{@{}l}{Werkstatus} & & \tabularnewline
& Werkloos & 20.987 & 25,3 \tabularnewline
& Werknemer & 54.461 & 65,6 \tabularnewline
& Zelfstandig & 7.615 & 9,2 \tabularnewline
\multicolumn{2}{@{}l}{Gezondheidsstatus} & & \tabularnewline
& Excellent/Very good & 49.711 & 59,8 \tabularnewline
& Good & 23.426 & 28,2 \tabularnewline
& Fair/Poor & 9.926 & 11,9 \tabularnewline
\hline
\end{supertabular}
\onecolumn
\end{document}