MathQuill disablement for WeBWorK

12 views
Skip to first unread message

Oscar Levin

unread,
Jan 28, 2026, 5:20:17 PMJan 28
to PreTeXt support
Does anyone know if there is a way to turn of the MathQuill feature for specific webwork problems?  I googled a bit, and found an old issue saying this was addressed in WeBWorK 2.16 (https://github.com/openwebwork/webwork2/pull/1288), but the suggested fix did not have any effect for me.

The reason I bring this up is that I was trying to enter the solution to one of my truth table problems.  It felt very natural to me to simply tab through the entry boxes, but hitting tab after entering a "T" focusses me on the MathQuill toolbar, and then I have to hit tab another 2 million times before I get to the next entry box.  This almost seems like an accessibility issue (although of course a user who needs to use the keyboard might want to get to that menu).  It would be nice if I could disable it on problems that don't need it.

Oscar.

Chrissy Safranski

unread,
Jan 28, 2026, 5:30:42 PMJan 28
to PreTeXt support
If you right click (cmd click on a mac I believe) in any webwork answer box you can disable the toolbar, and in Runestone at least, this preference will be remembered until you right click again and enable it. You still get the mathquill formatting, just not the toolbar itself.  If the toolbar is disabled, do you still have this issue?

Chrissy

Alex Jordan

unread,
Jan 28, 2026, 6:24:58 PMJan 28
to pretext...@googlegroups.com
Chrissy is right. It is a user setting, stored locally by the web browser. And it's not something you can disable in source for the problem (unless you want to disable MQ entirely for the problem, which is possible). 

From the Student Orientation in WeBWorK:

The palette tool might be a distraction, especially to keyboard-only users. You can disable it by right-clicking (or control-clicking) in an answer blank. To “right click” without a mouse:
  • on Windows or Linux, use shift F10.
  • on a Mac, you must first enable Mouse Keys in System Settings, and then use control m.


--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/fd42c24e-783c-437c-9a95-d369d9be649an%40googlegroups.com.

Oscar Levin

unread,
Jan 28, 2026, 8:43:10 PMJan 28
to PreTeXt support
Oh, that's good to know!  

Out of curiosity, how would I disable MQ entirely for a problem?

Alex Jordan

unread,
Jan 29, 2026, 12:13:32 AMJan 29
to pretext...@googlegroups.com
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:
  1. 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.
  2. 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.


Oscar Levin

unread,
Feb 1, 2026, 9:09:05 PM (14 days ago) Feb 1
to PreTeXt support
Thanks, this is super helpful.
Reply all
Reply to author
Forward
0 new messages