Hi!
I'm trying to use a custom layout, placing checkboxes in a bunch of columns
to have an ID mechanism. But I'm having this result:
[image: image.png]
What could be the cause? (column lines used to inspect the alignment)
As you know, I'm not very proficient with LaTex and you'll probably find
this code quite nasty...
\ExplSyntaxOn
\newcommand{\idprefix}[2]{
\sdaps_qobject_begin:nnn { } { Option } {idprefix}
\sdaps_qobject_append_var:n {idprefix}
\sdaps_checkbox_set_type:n {singlechoice}
#1
\sdaps_answer:n { idprefix} \sdaps_checkbox:nn {} {#2}
\sdaps_qobject_end:n {}
}
\newcommand{\iddigits}[1]{
\sdaps_qobject_begin:nnn {iddigits}{Option}{iddigits_#1}
\sdaps_qobject_append_var:n {iddigits_#1}
\sdaps_checkbox_set_type:n {singlechoice}
\int_step_inline:nnnn { 0 } { 1 } { 9 } {\sdaps_answer:n { 1_##1}
\sdaps_checkbox:nn{2_##1}{} & \int_compare:nT { ##1 < 9 } { ~ } }
\sdaps_qobject_end:n {iddigits}
}
\newcommand{\idheader}{
& \int_step_inline:nnnn { 0 } { 1 } { 9 } { ##1 & \int_compare:nT {
##1 < 9 } { ~ }}
& \int_step_inline:nnnn { 0 } { 1 } { 9 } { ##1 & \int_compare:nT {
##1 < 9 } { ~ }}
& \int_step_inline:nnnn { 0 } { 1 } { 9 } { ##1 & \int_compare:nT {
##1 < 9 } { ~ }} \\
}
\ExplSyntaxOff
\question{Person-ID}
\qbegin{sid}{Option}{Subject ID}
\begin{tabular}{l
|m{1pt}|m{1pt}m{1pt}m{1pt}m{1pt}m{1pt}m{1pt}m{1pt}m{1pt}m{1pt} c
m{1pt}m{1pt}m{1pt}m{1pt}m{1pt}m{1pt}m{1pt}m{1pt}m{1pt}m{1pt} c
m{1pt}m{1pt}m{1pt}m{1pt}m{1pt}m{1pt}m{1pt}m{1pt}m{1pt}m{1pt} c}
\idheader
\idprefix{D10 }{10} &\iddigits{1} & \iddigits{2} &
\iddigits{3}\\
\idprefix{D20 }{20} \\
\idprefix{D21 }{21} \\
\idprefix{D30 }{30} \\
\idprefix{D40 }{40}
\end{tabular}
\qend{sid}
Is there anything I'm missing?
Thanks!
--
Santi