Skip to content

Commit

Permalink
Give explicit multiplication the special mq_precedence as well.
Browse files Browse the repository at this point in the history
Implied multiplication ` *` currently has the precedence of 2.9 when
MathQuill is used.  This means that `(x-3)/4 (x+8)/7` is interpreted as
`\frac{(x-3)}{4} * \frac{(x+8)}{7}`.

However, `(x-3)/4 * (x+8)/7` is interpreted as
`\frac{\frac{(x-3)/4 * (x+8)}{7}`.  That should also be interpreted as
`\frac{(x-3)}{4} * \frac{(x+8)}{7}` and is with the mq_precendence for
`* ` also set to 2.9.
  • Loading branch information
drgrice1 committed Jan 14, 2025
1 parent e35b78d commit 79f9625
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Parser/Context.pm
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ sub usePrecedence {
/^Standard/i and do {
$self->operators->set(
' *' => { precedence => 3, mq_precedence => 2.9 },
'* ' => { precedence => 3 },
'* ' => { precedence => 3, mq_precedence => 2.9 },
' /' => { precedence => 3 },
'/ ' => { precedence => 3 },
fn => { precedence => 7.5 },
Expand Down

0 comments on commit 79f9625

Please sign in to comment.