Skip to content

Old display_matrix macro from PGmatrixmacros causes issues with BEGIN_TEXT/END_TEXT #1498

Description

@somiaj

There are probably some problems like this in the OPL, but something broke this macro when using old problem methods.

This fails to render correctly.

DOCUMENT();
loadMacros(qw(
    PGstandard.pl
    PGML.pl
    PGmatrixmacros.pl
));

BEGIN_TEXT
\{ display_matrix([
   [ans_rule(5),ans_rule(5),ans_rule(5),ans_rule(5)],
   [ans_rule(5),ans_rule(5),ans_rule(5),ans_rule(5)],
   [ans_rule(5),ans_rule(5),ans_rule(5),ans_rule(5)]
],
'align'=>"ccc|c") \}
END_TEXT
ENDDOCUMENT();

For some reason mathjax is creating a very large vertical bar and the matrix doesn't really render.

Image

This renders fine:

DOCUMENT();
loadMacros(qw(
    PGstandard.pl
    PGML.pl
    PGmatrixmacros.pl
));

BEGIN_PGML
[@ display_matrix([
   [ans_rule(5),ans_rule(5),ans_rule(5),ans_rule(5)],
   [ans_rule(5),ans_rule(5),ans_rule(5),ans_rule(5)],
   [ans_rule(5),ans_rule(5),ans_rule(5),ans_rule(5)]
],
'align'=>"ccc|c") @]*
END_PGML
ENDDOCUMENT();

We should probably fix this method as it is used in the OPL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions