Closed kohlhase closed 9 years ago
I think I know the culprit: in sTeX/sty/modules/modules.dtx
line 386ff we find
if (scalar(@bvars) || scalar(@bargs)) {
$document->openElement('om:OMBVAR');
if ((scalar(@bvars)==1) && ($bvars[0] != $assocarg)) {
$document->insertElement('omdoc:expr',undef,(name=>"arg".$bvars[0]));
} else {
$document->openElement('omdoc:exprlist',(name=>"args"));
$document->insertElement('omdoc:expr',undef,(name=>"arg"));
$document->closeElement('omdoc:exprlist');
}
$document->closeElement('om:OMBVAR');
}
this generates the <om:OMBVAR>
element in the prototype. It is missing a case: the case where scalar(@bvars)
> 1, but they are a list. I think the code must be generalized to the following (pseudocode)
foreach i in @bvars {
{if $i = $assocarg
<omdoc:exprlist name="args"><omdoc:expr name="arg"/></omdoc:exprlist>
else
<omdoc:expr name="arg$i"/>
end}
that should be all that is needed. The generation of the <rendering>
should be unaffected, since there is always only one assocarg
. And that is treated as before.
Your solution sounds just right, I have implemented it.
In
smlomg/linear-algebra/source/matrix.en
we haveand that generates
(elided the variant, since it is similar). It seems that the treatment of
bvar={2,3}
is wrong, since that should generateinstead of an expression ist. Correspondingly, the generated semantic macro does not work, used in
this generates