In case this is helpful...
Using test3 as an example, it has this line:
$PGMLLabelTable = PGMLTable(~~@fLabelTable);
and further below:
[$PGMLLabelTable]**
You could change those (respectively) to the following. I laid it out here with extra line breaks and comments to help understand how it works, but it doesn't need all the line breaks and comments.
$PGMLLabelTable = DataTable(
# one big array ref containing the rows of the table
[
# each row of the table is an array ref with three things
map {[
$fLabel[$_],
'=',
$f[$_]->TeX
]} (0 .. $#f)
],
# wrap each cell's content with math delimiters
encase => [$BM,$EM]
);
and:
[$PGMLLabelTable]*
and the output is identical. The idea here is to directly use the DataTable() subroutine instead of using PGML markup. If you gave the same treatment to the other tables, you would not need the PGMLTable subroutine, nor the subroutines it depends on (PGMLopts, convertRow, wrapCell).
Of course this is just an option. It may be easier to debug things without all those helper subroutines.
Using test3 as an example, it has this line:
$PGMLLabelTable = PGMLTable(~~@fLabelTable);
and further below:
[$PGMLLabelTable]**
You could change those (respectively) to the following. I laid it out here with extra line breaks and comments to help understand how it works, but it doesn't need all the line breaks and comments.
$PGMLLabelTable = DataTable(
# one big array ref containing the rows of the table
[
# each row of the table is an array ref with three things
map {[
$fLabel[$_],
'=',
$f[$_]->TeX
]} (0 .. $#f)
],
# wrap each cell's content with math delimiters
encase => [$BM,$EM]
);
and:
[$PGMLLabelTable]*
and the output is identical. The idea here is to directly use the DataTable() subroutine instead of using PGML markup. If you gave the same treatment to the other tables, you would not need the PGMLTable subroutine, nor the subroutines it depends on (PGMLopts, convertRow, wrapCell).
Of course this is just an option. It may be easier to debug things without all those helper subroutines.