3

I am trying to insert a rather complex table in Latex. The problem is that the table actually consists of different tables in one. I am trying to create something like this (the difference in line weight is not important): enter image description here

I manage to create each table separately using \multirow and \multicolumn. This is what I have so far:

\documentclass[12pt,twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage[dutch]{babel}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage[singlelinecheck=false]{caption}
\captionsetup{position=top, skip=0.5ex}

....

\begin{table}[h]
\caption{Descriptieve statistieken van de leerling- en schoolkenmerken}
\label{lsk_descr}
\begin{tabular} {l c c c c c c c c c}
    \hline
    \multirow{2}{1cm}{Variabele} & \multicolumn{4}{c}{1999} & & \multicolumn{4}{c}{2015} \\
    \cline{2-5} \cline{7-10} 
     & GEM & SD & MIN & MAX & & GEM & SD & MIN & MAX \\
    \hline
    X1 & 10,0405 & 0,4987 & 8,17 & 13,50 & & 10,1208 & 0,6365 & 8,42 & 14,17 \\
    X2 & 2,0011 & 1,0672 & 0,00 & 4,00 & & 1,9776 & 1,1012 & 0,00 & 4,00 \\
    X3 & . & . & . & . & & 4,7423 & 1,8267 & 0,00 & 7,00 \\
    X4 & 0,1443 & 0,1512 & 0,00 & 0,87 & & 0,2124 & 0,2014 & 0,00 & 0,94 \\
    GEM\_X1 & 1,9955 & 0,3579 & 0,56 & 2,85 & & 1,9463 & 0,4395 & 0,36 & 3,40 \\
    GEM\_X2 & 0,0924 & 0,1356 & 0,00 & 0,80 & & 0,1333 & 0,3013 & 0,00 & 1,45 \\
    GEM\_X3 & . & . & . & . & & 4,7199 & 0,8183 & 1,63 & 6,69 \\
    \hline
\end{tabular}
\begin{tabular} {l c c c c}
    \multirow{2}{1cm}{Variabele} & \multicolumn{4}{c}{Totaal} \\
    \cline{2-5}
    & GEM & SD & MAX & MIN \\
    Leeftijd & 10,0834 & 0,5778 & 8,1667 & 14,1700 \\
    Aantal & 1,9894 & 1,0842 & 0,0000 & 4,0000 \\
    GEM\_Y1 & 0,1782 & 0,1812 & 0,0000 & 0,9355 \\
    GEM\_Y2 & 1,9710 & 0,4013 & 0,3636 & 3,4000 \\
    GEM\_Y3 & 0,1128 & 0,2342 & 0,0000 & 1,4545 \\
    \hline
\end{tabular}
\begin{tabular} {l c c c c c c c c}
    \multirow{2}{1cm}{Variabele} & \multicolumn{2}{c}{1999} & & \multicolumn{2}{c}{2015} & & \multicolumn{2}{c}{Totaal} \\
    \cline{2-3} \cline{5-6} \cline{8-9}
    & N & \% & & N & \% & & N & \% \\
    Geslacht & & & & & & & & \\
    \quad Jongen & 2227 & 48,38 & & 2161 & 48,38 & & 4388 & 48,88 \\
    \quad Meisje & 2283 & 50,62 & & 2306 & 51,62 & & 4589 & 51,12 \\
    Thuistaal & & & & & & & & \\
    \quad Test & 3870 & 85,81 & 3594 & 80,46 & & 7464 & 8315 \\
    \quad Anders & 640 & 14,19 & 873 & 19,54 & & 1513 & 16,85 \\
    Migratie & & & & & & & & \\
    \quad Autochtoon & 4098 & 90,86 & & 3901 & 87,33 & & 7999 & 89,11 \\
    \quad G1 & 256 & 5,68 & & 388 & 8,69 & & 644 & 7,17 \\
    \quad G2 & 156 & 3,46 & & 178 & 3,98 & & 334 & 3,72 \\
    \hline
\end{tabular}
\end{table}

This gives me the following result in latex: enter image description here

I still see two problems:

  1. the two tables are placed next to each other instead of underneath each other
  2. I would like to set the tables at textwidth, I tried \resizebox{\textwidth} but then I get the three tables next to each other.
  • 3
    Welcome to TeX.SX! You can use several \begin{tabular}...\end{tabular} in one \begin{table}...\end{table} to do that. – Phelype Oleinik May 29 at 15:11
  • Regarding problem #1, tabular acts like an inline box. So you can just use \\ to go to the next line. – Teepeemm May 29 at 18:51
4

Use three distinct tabular* environments wrapped in an overall tabular.

\documentclass[12pt,twoside]{report}
\usepackage[dutch]{babel}

\usepackage{booktabs,array,siunitx}
\usepackage[singlelinecheck=false]{caption}

\captionsetup{position=top, skip=0.5ex}
\sisetup{group-separator={,}}

\begin{document}

\begin{table}[htp]
\footnotesize

\caption{Descriptieve statistieken van de leerling- en schoolkenmerken}
\label{lsk_descr}

\begin{tabular}{@{}c@{}}
\toprule
\begin{tabular*}{\textwidth}{
  w{l}{6em}
  @{\extracolsep{\fill}}
  S[table-format=2.4]
  S[table-format=1.4]
  S[table-format=1.2]
  S[table-format=2.2]
  S[table-format=2.4]
  S[table-format=1.4]
  S[table-format=1.2]
  S[table-format=2.2]
  @{\hspace{\tabcolsep}}
}
Variabele & \multicolumn{4}{c}{1999} & \multicolumn{4}{c}{2015} \\
\cmidrule(r){2-5} \cmidrule(l){6-9} 
& {GEM} & {SD} & {MIN} & {MAX} & {GEM} & {SD} & {MIN} & {MAX} \\
\midrule
X1      & 10,0405 & 0,4987 & 8,17 & 13,50 & 10,1208 & 0,6365 & 8,42 & 14,17 \\
X2      &  2,0011 & 1,0672 & 0,00 &  4,00 &  1,9776 & 1,1012 & 0,00 &  4,00 \\
X3      & {.}     & {.}    & {.}  & {.}   &  4,7423 & 1,8267 & 0,00 &  7,00 \\
X4      &  0,1443 & 0,1512 & 0,00 &  0,87 &  0,2124 & 0,2014 & 0,00 &  0,94 \\
GEM\_X1 &  1,9955 & 0,3579 & 0,56 &  2,85 &  1,9463 & 0,4395 & 0,36 &  3,40 \\
GEM\_X2 &  0,0924 & 0,1356 & 0,00 &  0,80 &  0,1333 & 0,3013 & 0,00 &  1,45 \\
GEM\_X3 & {.}     & {.}    & {.}  & {.}   &  4,7199 & 0,8183 & 1,63 &  6,69 \\
\end{tabular*}
\\\midrule[\heavyrulewidth]
\begin{tabular*}{\textwidth}{
  w{l}{6em}
  S[table-format=2.4]
  @{\extracolsep{\fill}}
  S[table-format=1.4]
  S[table-format=1.4]
  S[table-format=2.4]
}
Variabele & \multicolumn{4}{c}{Totaal} \\
\cmidrule{2-5}
& {GEM} & {SD} & {MAX} & {MIN} \\
\midrule
Leeftijd & 10,0834 & 0,5778 & 8,1667 & 14,1700 \\
Aantal   &  1,9894 & 1,0842 & 0,0000 &  4,0000 \\
GEM\_Y1  &  0,1782 & 0,1812 & 0,0000 &  0,9355 \\
GEM\_Y2  &  1,9710 & 0,4013 & 0,3636 &  3,4000 \\
GEM\_Y3  &  0,1128 & 0,2342 & 0,0000 &  1,4545 \\
\end{tabular*}
\\\midrule[\heavyrulewidth]
\begin{tabular*}{\textwidth}{
  w{l}{6em}
  @{\extracolsep{\fill}}
  S[table-format=4.0]
  S[table-format=2.2]
  S[table-format=4.0]
  S[table-format=2.2]
  S[table-format=4.0]
  S[table-format=2.2]
  @{\hspace{\tabcolsep}}
}
Variabele & \multicolumn{2}{c}{1999} & \multicolumn{2}{c}{2015} & \multicolumn{2}{c}{Totaal} \\
\cmidrule(r){2-3} \cmidrule(lr){4-5} \cmidrule(l){6-7}
& {N} & {\%} & {N} & {\%} & {N} & {\%} \\
Geslacht \\
\quad Jongen     & 2227 & 48,38 & 2161 & 48,38 & 4388 & 48,88 \\
\quad Meisje     & 2283 & 50,62 & 2306 & 51,62 & 4589 & 51,12 \\
Thuistaal \\
\quad Test       & 3870 & 85,81 & 3594 & 80,46 & 7464 & 83,15 \\
\quad Anders     &  640 & 14,19 &  873 & 19,54 & 1513 & 16,85 \\
Migratie \\
\quad Autochtoon & 4098 & 90,86 & 3901 & 87,33 & 7999 & 89,11 \\
\quad G1         &  256 &  5,68 &  388 &  8,69 &  644 &  7,17 \\
\quad G2         &  156 &  3,46 &  178 &  3,98 &  334 &  3,72 \\
\end{tabular*}
\\\bottomrule
\end{tabular}
\end{table}

\end{document}

enter image description here

3

This might be a start:

\documentclass{article}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{array}
\usepackage{multirow}

\newcolumntype{C}{>{\centering\arraybackslash}X}
\begin{document}

\begin{table}
    \centering\sffamily
    \caption{The Table Caption}
    %%%%%%%%%%%%%%
    %%% Part 1 %%%
    %%%%%%%%%%%%%%
    \begin{tabularx}{1\linewidth}{@{} l @{\quad} *{4}{C} >{\hspace{1cm}}c *{4}{C}@{}}
        \toprule
        \multirow{2}{.15\linewidth}{\bfseries Variabele}& 
        \multicolumn{4}{c}{\bfseries 1999} && 
        \multicolumn{4}{c}{\bfseries 2015}\\\cmidrule(r){2-5}\cmidrule(l){7-10}
        & GEM & SD & MIN & MAX && GEM & SD & MIN & MAX \\\midrule
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        X1 & 1 & 2 & 3 & 4   && 5 & 6 & 7 & 8 \\
        \multicolumn{10}{c}{\dots} %<-- Add data!
    \end{tabularx}
    %%%%%%%%%%%%%%
    %%% Part 2 %%%
    %%%%%%%%%%%%%%
    \begin{tabularx}{1\linewidth}{@{} l @{\quad} *{4}{C}}
        \toprule
        \multirow{2}{.15\linewidth}{\bfseries Variabele}& 
        \multicolumn{4}{c}{\bfseries Totaal}\\\cmidrule{2-5}
        & GEM & SD & MIN & MAX \\\midrule
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        Leeftijd & 1 & 2 & 3 & 4 \\
        \multicolumn{5}{c}{\dots} %<-- Add data!
    \end{tabularx}
    %%%%%%%%%%%%%%
    %%% Part 3 %%%
    %%%%%%%%%%%%%%
    \begin{tabularx}{1\linewidth}{@{} l @{\quad} *{2}{C} >{\hspace{1cm}}c *{2}{C}@{} >{\hspace{1cm}}c *{2}{C}@{}}
        \toprule
        \multirow{2}{.15\linewidth}{\bfseries Variabele} & 
        \multicolumn{2}{c}{\bfseries 1999} && 
        \multicolumn{2}{c}{\bfseries 2015} && 
        \multicolumn{2}{c}{\bfseries Totaal}\\\cmidrule(r){2-3}\cmidrule(lr){5-6}\cmidrule(l){8-9}
        & N & \% && N & \% && N & \% \\\midrule
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        Geslacht &&&&&&&&\\
        \quad Jongen & 1 & 2 && 3 & 4 && 5 & 6\\
        \multicolumn{9}{c}{\dots}\\ %<-- Add data
        \bottomrule 
    \end{tabularx}
\end{table}
\end{document}

It leads to: Table

But: I had problems with the \cmidrule-Command and the space between the columns.(Adding @{<space>} in to the table-setup didn't work properly). Right now I just an additional column. (You have to keep it in mind while adding the data!).

Anyway: On this site are many many intelligent people, who might have an idea to solve it in a more elegant way!

2

If you use the package cals, you may typeset your three tabular as one. Use either minipage and capt-of, a table-environment or a document class from the KOMA-Script bundle to make caption and label that is not separated from the tabular body. The tabulars are set \footnotesize, if not the tabulars are too wide to fit inside the margins.

In addition, I have fine tuned the columnwidths to avoid bad hbox warnings. Also, I added some \hbox{<wd> some places to line up the columns.

\documentclass[12pt,twoside]{report}
\usepackage[utf8]{inputenc}
%\usepackage[dutch]{babel}
\usepackage{graphicx}
\usepackage{cals}
\usepackage[singlelinecheck=false]{caption}
\captionsetup{position=top, skip=0.75ex}

\let\nc=\nullcell
\let\sc=\spancontent

\begin{document}
\enlargethispage{\baselineskip}
\begin{table}[htp]% not h on its own
\caption{Descriptieve statistieken van de leerlingen schoolkenmerken}
\label{lsk_descr}
\footnotesize
\begin{calstable}
\colwidths{{\dimexpr(\columnwidth/120 *19)\relax}
            {\dimexpr(\columnwidth/120 *13)\relax}
            {\dimexpr(\columnwidth/120 *12)\relax}
            {\dimexpr(\columnwidth/120 *11)\relax}
            {\dimexpr(\columnwidth/120 *11)\relax}
            {\dimexpr(\columnwidth/120 *11)\relax}
            {\dimexpr(\columnwidth/120 *13)\relax}
            {\dimexpr(\columnwidth/120 *12)\relax}
            {\dimexpr(\columnwidth/120 *11)\relax}
            {\dimexpr(\columnwidth/120 *12)\relax}
            }

\makeatletter
\def\cals@framers@width{0.8pt}
\cals@setpadding{Ag}
\cals@setcellprevdepth{Al}
\def\cals@cs@width{0pt}

\def\bb{\ifx\cals@borderB\relax     % Border switch (on of)
    \def\cals@borderB{0pt}
\else \let\cals@borderB\relax\fi}

% R1 Heading
\thead{
\brow
    \setlength\cals@paddingL{0pt}
    \nc{lrt}
    \cals@setpadding{Ag}
    \nc{ltb}
    \nc{tb}
    \nc{tb}
    \setlength\cals@paddingR{0pt}
    \nc{rtb}\alignC\sc{\vfil 1999}
    \cals@setpadding{Ag}
    \bb\cell{}\bb
    \setlength\cals@paddingL{0pt}
    \nc{ltb}
    \cals@setpadding{Ag}
    \nc{tb}
    \nc{tb}
    \setlength\cals@paddingR{0pt}
    \nc{rtb}\alignC\sc{\vfil 2015}
    \cals@setpadding{Ag}
\erow
% R2
\brow
    \setlength\cals@paddingL{0pt}
    \nc{lrb}\alignL\sc{\vfil Variabele}
    \alignC\cell{\vfil GEM}
    \cals@setpadding{Ag}
    \alignC\cell{\vfil SD}
    \alignC\cell{\vfil MIN}
    \setlength\cals@paddingR{0pt}
    \alignC\cell{\vfil MAX}
    \cals@setpadding{Ag}
    \alignC\cell{}
    \setlength\cals@paddingL{0pt}
    \alignC\cell{\vfil GEM}
    \cals@setpadding{Ag}
    \alignC\cell{\vfil SD}
    \alignC\cell{\vfil MIN}
    \setlength\cals@paddingR{0pt}
    \alignR\cell{\vfil MAX}
    \cals@setpadding{Ag}
\erow
}
% R3
\brow
    \bb\setlength\cals@paddingL{0pt}
    \alignL\cell{X1}
    \cals@setpadding{Ag}
    \alignR\cell{10,0405}
    \alignR\cell{0,4987}
    \alignR\cell{8,17}
    \alignR\cell{13,50}
    \alignR\cell{}
    \alignR\cell{10,1208}
    \alignR\cell{0,6365}
    \alignR\cell{8,42}
    \setlength\cals@paddingR{0pt}
    \alignR\cell{14,17}
    \cals@setpadding{Ag}
\erow
% R4
\brow
    \setlength\cals@paddingL{0pt}
    \alignL\cell{X2}
    \cals@setpadding{Ag}
    \alignR\cell{2,0011}
    \alignR\cell{1,0672}
    \alignR\cell{0,00}
    \alignR\cell{4,00}
    \cell{}
    \alignR\cell{1,9776}
    \alignR\cell{1,1012}
    \alignR\cell{0,00}
    \setlength\cals@paddingR{0pt}
    \alignR\cell{4,00}
    \cals@setpadding{Ag}
\erow
% R5
\brow
    \setlength\cals@paddingL{0pt}
    \alignL\cell{X3}
    \cals@setpadding{Ag}
    \cell{}
    \cell{}
    \cell{}
    \cell{}
    \cell{}
    \alignR\cell{4,7423}
    \alignR\cell{1,8267}
    \alignR\cell{0,00}
    \setlength\cals@paddingR{0pt}
    \alignR\cell{7,00}
    \cals@setpadding{Ag}
\erow
% R6
\brow
    \setlength\cals@paddingL{0pt}
    \alignL\cell{X4}
    \cals@setpadding{Ag}
    \alignR\cell{0,1443}
    \alignR\cell{0,1512}
    \alignR\cell{0,00}
    \alignR\cell{0,87}
    \cell{}
    \alignR\cell{0,2124}
    \alignR\cell{0,2014}
    \alignR\cell{0,00}
    \setlength\cals@paddingR{0pt}
    \alignR\cell{0,94}
    \cals@setpadding{Ag}
\erow
% R7
\brow
    \setlength\cals@paddingL{0pt}
    \alignL\cell{GEM\_X1}
    \cals@setpadding{Ag}
    \alignR\cell{1,9955}
    \alignR\cell{0,3579}
    \alignR\cell{0,56}
    \alignR\cell{2,85}
    \cell{}
    \alignR\cell{1,9463}
    \alignR\cell{0,4395}
    \alignR\cell{0,36}
    \setlength\cals@paddingR{0pt}
    \alignR\cell{3,40}
    \cals@setpadding{Ag}
\erow
% R8
\brow
    \setlength\cals@paddingL{0pt}
    \alignL\cell{GEM\_X2}
    \cals@setpadding{Ag}
    \alignR\cell{0,0924}
    \alignR\cell{0,1356}
    \alignR\cell{0,00}
    \alignR\cell{0,80}
    \cell{}
    \alignR\cell{0,1333}
    \alignR\cell{0,3013}
    \alignR\cell{0,00}
    \setlength\cals@paddingR{0pt}
    \alignR\cell{1,45}
    \cals@setpadding{Ag}
\erow
% R9
\brow
    \bb\setlength\cals@paddingL{0pt}
    \alignL\cell{GEM\_X2}
    \cals@setpadding{Ag}
    \cell{}
    \cell{}
    \cell{}
    \cell{}
    \cell{}
    \alignR\cell{4,7199}
    \alignR\cell{0,8183}
    \alignR\cell{1,63}
    \setlength\cals@paddingR{0pt}
    \alignR\cell{6,688}
    \cals@setpadding{Ag}
\erow
% T2R1 Heading
\thead{
\brow
    \setlength\cals@paddingL{0pt}
    \nc{lrt}
    \cals@setpadding{Ag}
    \nc{ltb}
    \nc{tb}
    \nc{tb}
    \nc{tb}
    \nc{tb}
    \nc{tb}
    \nc{tb}
    \nc{tb}
    \setlength\cals@paddingR{0pt}
    \nc{rtb}\alignC\sc{\vfil Totaale}
    \cals@setpadding{Ag}
\erow
% T2R2
\brow
    \setlength\cals@paddingL{0pt}
    \nc{lrb}\alignL\sc{\vfil Variabele}
    \nc{ltb}
    \nc{rtb}\alignC\sc{\hspace{4em}GEM}
    \cals@setpadding{Ag}
    \nc{ltb}
    \setlength\cals@paddingR{0pt}
    \nc{rtb}\alignC\sc{\hspace{2em}SD}
    \cals@setpadding{Ag}
    \cell{}
    \nc{ltb}
    \setlength\cals@paddingL{0pt}
    \nc{rtb}\alignC\sc{\hspace{5em}MIN}
    \cals@setpadding{Ag}
    \nc{ltb}
    \setlength\cals@paddingR{0pt}
    \nc{rtb}\alignR\sc{\hspace{2em}GEM}
    \cals@setpadding{Ag}
\erow
}
% T2R3
\brow
    \bb\setlength\cals@paddingL{0pt}
    \alignL\cell{Leeftijd}
    \cals@setpadding{Ag}
    \nc{ltb}
    \nc{rtb}\alignR\sc{10,0834}
    \nc{ltb}
    \nc{rtb}\alignR\sc{0,5778}
    \cell{}
    \nc{ltb}
    \nc{rtb}\alignR\sc{8,1667}
    \nc{ltb}
    \setlength\cals@paddingR{0pt}
    \nc{rtb}\alignR\sc{14,1700}
    \cals@setpadding{Ag}
\erow
% T2R4
\brow
    \setlength\cals@paddingL{0pt}
    \alignL\cell{Aantal}
    \cals@setpadding{Ag}
    \nc{ltb}
    \nc{rtb}\alignR\sc{1,9804}
    \nc{ltb}
    \nc{rtb}\alignR\sc{1,0842}
    \cell{}
    \nc{ltb}
    \nc{rtb}\alignR\sc{0,0000}
    \nc{ltb}
    \setlength\cals@paddingR{0pt}
    \nc{rtb}\alignR\sc{4,000}
    \cals@setpadding{Ag}
\erow
% T2R5
\brow
    \setlength\cals@paddingL{0pt}
    \alignL\cell{GEM\_Y1}
    \cals@setpadding{Ag}
    \nc{ltb}
    \nc{rtb}\alignR\sc{0,1782}
    \nc{ltb}
    \nc{rtb}\alignR\sc{0,1812}
    \cell{}
    \nc{ltb}
    \nc{rtb}\alignR\sc{0,0000}
    \nc{ltb}
    \setlength\cals@paddingR{0pt}
    \nc{rtb}\alignR\sc{0,9355}
    \cals@setpadding{Ag}
\erow
% T2R6
\brow
    \setlength\cals@paddingL{0pt}
    \alignL\cell{GEM\_Y1}
    \cals@setpadding{Ag}
    \nc{ltb}
    \nc{rtb}\alignR\sc{1,9710}
    \nc{ltb}
    \nc{rtb}\alignR\sc{0,4013}
    \cell{}
    \nc{ltb}
    \nc{rtb}\alignR\sc{0,3636}
    \nc{ltb}
    \setlength\cals@paddingR{0pt}
    \nc{rtb}\alignR\sc{3,4000}
    \cals@setpadding{Ag}
\erow
% T2R7
\brow
    \bb\setlength\cals@paddingL{0pt}
    \alignL\cell{GEM\_Y3}
    \cals@setpadding{Ag}
    \nc{ltb}
    \nc{rtb}\alignR\sc{0,1128}
    \nc{ltb}
    \nc{rtb}\alignR\sc{0,2342}
    \cell{}
    \nc{ltb}
    \nc{rtb}\alignR\sc{0,0000}
    \nc{ltb}
    \setlength\cals@paddingR{0pt}
    \nc{rtb}\alignR\sc{1,4545}
    \cals@setpadding{Ag}
\erow
% T3R1 Heading
\thead{
\brow
    \setlength\cals@paddingL{0pt}
    \nc{lrt}
    \cals@setpadding{Ag}
    \bb\cell{}\bb
    \nc{ltb}
    \nc{rtb}\alignC\sc{\vfil 1999}
    \bb\cell{}\bb
    \nc{ltb}
    \nc{rtb}\alignC\sc{\vfil 2015}
    \bb\cell{}\bb
    \nc{ltb}
    \setlength\cals@paddingR{0pt}
    \nc{rtb}\alignC\sc{\vfil Totaale}
    \cals@setpadding{Ag}
\erow
% T3R2
\brow
    \setlength\cals@paddingL{0pt}
    \nc{lrb}\alignL\sc{\vfil Variabele}
    \cals@setpadding{Ag}
    \cell{}
    \alignC\cell{\vfil N}
    \alignC\cell{\vfil\%}
    \cell{}
    \alignC\cell{\vfil N}
    \alignC\cell{\vfil\%}
    \cell{}
    \alignC\cell{\vfil N}
    \setlength\cals@paddingR{0pt}
    \alignC\cell{\vfil\%}
    \cals@setpadding{Ag}
\erow
}
% T3R3
\brow
    \bb\setlength\cals@paddingL{0pt}
    \alignL\cell{Geslacht}
    \cals@setpadding{Ag}
    \cell{}
    \cell{}
    \cell{}
    \cell{}
    \cell{}
    \cell{}
    \cell{}
    \cell{}
    \setlength\cals@paddingR{0pt}
    \cell{}
    \cals@setpadding{Ag}
\erow
% T3R4
\brow
    \setlength\cals@paddingL{0pt}
    \alignL\cell{\hspace{0.5em}Jongen}
    \cals@setpadding{Ag}
    \cell{}
    \alignC\cell{2227}
    \cell{49,38}
    \cell{}
    \cell{2161}
    \cell{48,38}
    \cell{}
    \cell{4388}
    \setlength\cals@paddingR{0pt}
    \cell{48,88}
    \cals@setpadding{Ag}
\erow
% T3R5
\brow
    \setlength\cals@paddingL{0pt}
    \alignL\cell{\hspace{0.5em}Meisje}
    \cals@setpadding{Ag}
    \cell{}
    \alignC\cell{2283}
    \cell{50,62}
    \cell{}
    \cell{2306}
    \cell{51,62}
    \cell{}
    \cell{4589}
    \setlength\cals@paddingR{0pt}
    \cell{51,12}
    \cals@setpadding{Ag}
\erow
% T3R6
\brow
    \setlength\cals@paddingL{0pt}
    \alignL\cell{Thuistaal}
    \cals@setpadding{Ag}
    \cell{}
    \cell{}
    \cell{}
    \cell{}
    \cell{}
    \cell{}
    \cell{}
    \cell{}
    \setlength\cals@paddingR{0pt}
    \cell{}
    \cals@setpadding{Ag}
\erow
% T3R7
\brow
    \setlength\cals@paddingL{0pt}
    \alignL\cell{\hspace{0.5em}Test}
    \cals@setpadding{Ag}
    \cell{}
    \alignC\cell{3870}
    \cell{85,81}
    \cell{}
    \cell{3594}
    \cell{80,64}
    \cell{}
    \cell{7464}
    \setlength\cals@paddingR{0pt}
    \cell{83,15}
    \cals@setpadding{Ag}
\erow
% T3R8
\brow
    \setlength\cals@paddingL{0pt}
    \alignL\cell{\hspace{0.5em}Anders}
    \cals@setpadding{Ag}
    \cell{}
    \alignC\cell{640}
    \cell{14,19}
    \cell{}
    \cell{873}
    \cell{19,54}
    \cell{}
    \cell{1513}
    \setlength\cals@paddingR{0pt}
    \cell{16,85}
    \cals@setpadding{Ag}
\erow
% T39
\brow
    \setlength\cals@paddingL{0pt}
    \alignL\cell{Migratiea}
    \cals@setpadding{Ag}
    \cell{}
    \cell{}
    \cell{}
    \cell{}
    \cell{}
    \cell{}
    \cell{}
    \cell{}
    \setlength\cals@paddingR{0pt}
    \cell{}
    \cals@setpadding{Ag}
\erow
% T3R10
\brow
    \setlength\cals@paddingL{0pt}
    \alignL\cell{\hspace{0.5em}Autochtoon}
    \cals@setpadding{Ag}
    \cell{}
    \alignC\cell{4098}
    \cell{90,86}
    \cell{}
    \cell{3901}
    \cell{87,33}
    \cell{}
    \cell{7999}
    \setlength\cals@paddingR{0pt}
    \cell{89,11}
    \cals@setpadding{Ag}
\erow
% T3R11
\brow
    \setlength\cals@paddingL{0pt}
    \alignL\cell{\hspace{0.5em}G1}
    \cals@setpadding{Ag}
    \cell{}
    \alignC\cell{256}
    \cell{5,68}
    \cell{}
    \cell{388}
    \cell{8,69}
    \cell{}
    \cell{644}
    \setlength\cals@paddingR{0pt}
    \cell{7,17}
    \cals@setpadding{Ag}
\erow
% T3R12
\brow
    \bb\setlength\cals@paddingL{0pt}
    \alignL\cell{\hspace{0.5em}22}
    \cals@setpadding{Ag}
    \cell{}
    \alignC\cell{156}
    \cell{3,46}
    \cell{}
    \cell{178}
    \cell{3,98}
    \cell{}
    \cell{334}
    \setlength\cals@paddingR{0pt}
    \cell{3,72}
    \cals@setpadding{Ag}
\erow

\makeatother

\end{calstable}
\end{table}

\end{document}

enter image description here

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.