I think this may be a case of abusing the power that one has been given, without considering if the use is strictly appropriate. I'm trying to get some nesting of arrays of answer blanks in a problem, and while it displays fine on the screen it chokes in hardcopy. This is the outline of what I'm doing in the PG file (for brevity I've omitted the arguments of various function calls).
loadMacros( "unionTables.pl", "parserMultiAnswer.pl" ); ... $m1 = Matrix(...); $chk = MultiAnswer(...)->with(...); ... Context()->texStrings; BEGIN_TEXT \( $m1 \) $BR \{ BeginTable(...) . AlignedRow( [ "\(\qquad\sim \Bigg[\)", BeginTable(...) . AlignedRow( [ 1, $chk->ans_rule(5), $chk->ans_rule(5), $chk->ans_rule(5) ], align=>'CENTER', separation=>0 ) . AlignedRow( [ 0, 1, $chk->ans_rule(5), $chk->ans_rule(5) ], align=>'CENTER', separation=>0 ) . EndTable(), "\(\Bigg]\)" ], align=>'CENTER', valign=>'MIDDLE', separation=>0 ) . EndTable() \}
The problem is that the BeginTable
calls insert a paragraph break, which trips TeX by inserting a \par in the midst of a \centerline. Hopefully that's clear. Is there an easy work-around for this?
Thanks,
Gavin