Closed jwmerrill closed 2 years ago
@sclower can you audit the aria behavior of limit here? See instructions in the description for how to test this out.
The ARIA behavior is close. The over-all mathspeak version of the limit expression for the example comes out to be "limit as x to 0, end limit." For this case, I think we want the \to arrow to be interpreted as the word "approaches." I also notice with sums and products that we explicitly call out when you enter the lower and upper bound of the expression. Could we do something similar here?
For this case, I think we want the \to arrow to be interpreted as the word "approaches."
Are we able to change the mathspeak for a symbol based on the context it shows up in? I.e. read something different for \to
depending on whether it is in a limit subscript or not?
I'm worried that always reading it as "approaches" will be strange from Desmos's action syntax (for example, a\to 1
is an action that sets a
to 1
.
I think maybe "goes to" would actually work ok in both contexts.
I also notice with sums and products that we explicitly call out when you enter the lower and upper bound of the expression. Could we do something similar here?
I'm attempting to do that here: https://github.com/desmosinc/mathquill/pull/252/files#diff-7aeebe17a151b8ce239722cb1752b2c30d0b0da19ab746b9e63bc976b4acd600R908
The analogous logic for sums and products is https://github.com/desmosinc/mathquill/blob/main/src/commands/math/commands.ts#L766-L767
One tricky thing here is I'm not actually sure what the best mathematical terminology is for the limit subscript. We could say 'limit subscript' instead of just 'limit' here. Does MathSpeak offer any guidance for this case?
CC @srkondam
@sclower mind taking another look at the aria speech here after the latest?
There are a couple examples of the speech we're now producing in this test: https://github.com/desmosinc/mathquill/pull/252/files#diff-84a41230faa4a7d06fd935a666c1d17126b86acccc3d032e52d880f0d991af2bR1234-R1241
Hmm, any ideas on how to fix the “of” in those before/after cases? Do you think we should just say “end limit” instead of “of” so that it doesn’t end up sounding funny if nothing is spoken afterward?
After having some time to mull over this question, I think we could get away with omitting the trailing “of.” Our mathspeak implementation already omits it for other functions, e.g. “sinx” is spoken as “sine x” and not “sine of x.” To me, the meaning is still clear enough.
— Stephen Clower Software Engineer, Accessibility Desmos Studio, PBC Email: @. @.> Tel: +1 (503) 482-9426 Web: www.desmos.com https://www.desmos.com/
On Oct 21, 2022, at 5:19 PM, Jason Merrill @.***> wrote:
Hmm, any ideas on how to fix the “of” in those before/after cases? Do you think we should just say “end limit” instead of “of” so that it doesn’t end up sounding funny if nothing is spoken afterward?
— Reply to this email directly, view it on GitHub https://github.com/desmosinc/mathquill/pull/252#issuecomment-1287445857, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEB4PITXLECG3Z6JCVNPUADWEMCGNANCNFSM6AAAAAARKSJO5Y. You are receiving this because you were mentioned.
I think this case is a little different because you need to know where the limit underscript ends to prevent ambiguity.
Consider something like
\lim_{x\to 2y} \sin(xy)
vs.
\lim_{x\to 2} y \sin(xy)
We need a way to know whether the y
that comes after the 2
is part of the limit underscript or part of the expression following the limit.
I think a good analogy is other places that subscripts are used, where we need to say "baseline" or "end subscript" to clarify where the subscript ends.
I think this is basically good to go, but I'm going to close without merging because it turns out we don't actually have an immediate need to have this here.
I'd love to coordinate getting this upstream eventually.
In "displaystyle" (as apposed to "textstyle") the limit expression is placed directly below the "lim" symbol instead of to its right. This is analogous to how upper and lower bounds are placed for sums and products in displaystyle and textstyle.
Heavily based on https://github.com/mathquill/mathquill/pull/545.
Switches
lim
from a defaultautoOperatorName
to a command that automatically adds a subscript and places the cursor in the subscript. This is analogous to how\sum
and\prod
work in MathQuill.If using this with a "basic" build of MathQuill, you'll likely want to add
lim
to your list ofautoCommands
.Adds a new public API option,
limStartsWithArrow: boolean
.Setting
will cause the limit subscript to automatically be populated with a
\to
arrow when the limit is created. The cursor is placed to the left of this arrow.This option is analogous to the existing
sumStartsWithNEquals
public API option.Seeing behavior changes
Easiest way to test this is to check out this branch, and then run
and type something like
lim
x
Right-Arrow
0
Right-Arrow
f
(
x
)
.Screenshot:
Mathquill Issues