I'm building a table using input from a coma separated list. (See My previous question). Now, I would like to have a command with two arguments (one argument for each name and one argument for each definition):
For example:
\begin{document}
\chungeltable{One, Two, Three, Four}{this is the definition for the One, this is the definition for the Two, this is the definition for the Third, this is the definition for the fourth}
\end{document}
The following prints all items present in the second argument for each occurrence of the first argument given in \chungeltable.
\documentclass{article}
\usepackage[a4paper,landscape]{geometry}
\usepackage{multirow}
\usepackage{xparse}
\NewDocumentCommand{\chungeltable}{mm}
{%
\begin{center}\scriptsize
\begin{longtable}{ | p{4cm} | p{3cm} | *{13}{l|} p{3cm} | }
\hline
\multirow{3}{*}{Name} &
\multirow{3}{*}{Description} &
\multicolumn{14}{c|}{Observation} \\
\cline{3-16}
& & \multicolumn{3}{c|}{A} & \multicolumn{3}{c|}{B} & \multicolumn{2}{c|}{C} &
\multicolumn{2}{c|}{D} & E & \multirow{2}{*}{F} & \multirow{2}{*}{G} & \multirow{2}{*}{Other} \\
\cline{3-13}
& & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & & & \\ \hline
\endhead
\chungeltablebody{#1}{#2}
\end{longtable}
\end{center}
}
\ExplSyntaxOn
\NewDocumentCommand{\chungeltablebody}{mm}
{
\tl_clear:N \l_tmpa_tl
\clist_map_inline:nn {#1, #2}
{
\tl_put_right:Nn \l_tmpa_tl { ##1 & #2 & & & & & & & & & & & & & & \\\hline }
}
\tl_use:N \l_tmpa_tl
}
\ExplSyntaxOff
How can I fix this so that it prints each item of the first argument in the first column (Name) and each item of the second argument in the second column (Description)?

\chungletable{}{}– Chüngel May 12 '17 at 16:19longtablein\begin{center}it won't centre it, just add spurious vertical space. – David Carlisle May 12 '17 at 16:34