2

I'm having problems getting my table on two columns. I have tried using a longtable and supertabular but so far with little succes. I currently have a supertabular with two columns, but the output overlaps.

enter image description here

My code looks as follows:

\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
  • please make that into a complete document so people can reproduce the problem. at the very least page breaking depends on page size which you have not shown. – David Carlisle Nov 25 '14 at 12:39
  • From the image it looks like your table data is wider than your page column. That can't be fixed automatically, you need to use \small or some other font size to make it fit, or use shorter text, or use columns that line wrap so p[1cm] not l or ... – David Carlisle Nov 25 '14 at 12:44
2

Reducing the value of \tabcolsep -- the parameter that governs the amount of intercolumn whitespace -- from the default value of 6pt to 2pt, combined with eliminating the whitespace entirely to the left of the first column and to the right of the final column, succeeds in fitting the table into the available space.

Two additional comments: (i) You should take care to write \$ if you want to print the dollar symbol. (ii) Be sure to type -- instead of - if you want to generate typographic en-dashes.

enter image description here

\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}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.