\registerctxluafile{table}{}

%%% Example 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\typesetatable{%
  \ctxlua{userdata.do_typesetatable(userdata.t)}%
}

%%% Example 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\typesetcldtable{%
  \ctxlua{userdata.do_typesetcldtable(userdata.t)}%
}

\starttext

%%% Demo 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\placetable[here]{Concatenation based}{\typesetatable}

%%% Demo 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\placetable[here]{CLD-based}{\typesetcldtable}

\stoptext \endinput
