In PG, for an individual answer blank, you can pass:
mathQuillOpts => 'disabled'
to its cmp() routine.
In the case of a MathObject being used in PGML in a PG problem file, do like this:
$answer = Real(pi);
BEGIN_PGML
[_]{$answer->cmp(mathQuillOpts => 'disabled')}{5}
END_PGML
where the "5" is for the width of the answer blank.
In the In the case of a MathObject being used in the #pg-code of a #webwork:
$answer = Real(pi)->cmp(mathQuillOpts => 'disabled');
And then in the #statement:
The answer is <var name="$answer" width="5"/>.
It's also possible to change a Context so that MathObjects of a given type all have mathQuillOpts => 'disabled' by default passed to their cmp routines. The details differ but for Matrix MathObjects, put this in the #pg-code:
package Value::Matrix;
sub cmp_defaults {(
shift->SUPER::cmp_defaults(@_),
mathQuillOpts => 'disabled'
)}
package main;
And then make sure to use @form="array" like:
The answer is <var name="$answer" width="5" form="array"/>.
I used to disable MQ in two situations:
- When the answer had a single pipe character, but MQ treats a pipe like absolute value and always gives you a second one. But now there is a pipe character button for when you want a single pipe.
- When the answer had units, MQ would turn something like "1 m/s" into "(1 m)/s" behind the scenes and that would break things. But now MQ recognizes units better.
And you can always switch to Tt mode now. So my point is, I very rarely would disable MQ now. I think it would be better for the readers to just somehow know how to turn it off locally. But I know that's a reader education problem.