Can I provide text to the SRE?

19 views
Skip to first unread message

Alex Jordan

unread,
May 19, 2022, 3:09:40 AM5/19/22
to MathJax Users
I have a macro for creating "fill-in-the-blanks" within a math expression, \fillin{}. The argument is some math content that will be wrapped in \phantom{}, and then maybe there is a box around it, or it is underlined, or the box is shaded.

Is there any way I can declare a word/phrase like "blank" so that the speech for:
\sin(\fillin{x})
comes out like
sine left parenthesis blank right parenthesis
?

Rob Beezer

unread,
May 19, 2022, 12:36:21 PM5/19/22
to mathja...@googlegroups.com
In the course of other business, I asked Volker Sorge, Michael Cantino, and Al
Maneki about this one.

Michael and Al like the single braille character dot-1-2-3-4-5-6 which is used
for "general omission". Not speech (which is a different problem) but a good
indicator for a braille reader that there is a fill-in location. Of course, the
2d-spatial aspects are irrelevant here.

So see if the *Unicode* symbol for dot-1-2-3-4-5-6 (+20xx?) can go in the raw
LaTeX and survive the trip through MJ and SRE. It should behave well when hit
by liblouis. A diff on the produced BRF (or intermediate Nemeth for math) with
an answer versus a fill-in might be illuminating.

Rob
> --
> You received this message because you are subscribed to the Google Groups
> "MathJax Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to mathjax-user...@googlegroups.com
> <mailto:mathjax-user...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mathjax-users/7e979e49-5253-48cf-b064-36928f141dd5n%40googlegroups.com
> <https://groups.google.com/d/msgid/mathjax-users/7e979e49-5253-48cf-b064-36928f141dd5n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Peter Krautzberger

unread,
May 20, 2022, 4:59:17 AM5/20/22
to MathJax Users
Hi Alex,

A while back I wrote a demo extension providing a TeX macro that allows specifying the aria-label https://github.com/krautzource/mathjax-aria-label/ - this is preserved by SRE.

Volker would have to add something new to SRE to allow specifying braille labels.

Peter.

Alex Jordan

unread,
May 21, 2022, 1:23:26 AM5/21/22
to MathJax Users
Thanks Peter! I remember that you did this now. I had totally forgotten about it. I may be about to put it to use with a PreTeXt element, so I shouldn't forget it again :)

Alex Jordan

unread,
May 21, 2022, 2:14:45 AM5/21/22
to MathJax Users
What I am experiencing is that if I use it like these:

\(\arialabel{blank}{x}\)
\(\sin(\arialabel{blank}{x})\)
then it works as expected. The speech is:
blank
sine left parenthesis blank right parenthesis

but if I use it like this:
\(\sin(\arialabel{blank}{\phantom{x}})\)
then I get
sine left parenthesis right parenthesis

It's like the \phantom is overruling \arialabel and forcing the speech to be empty there instead of using "blank". Even:
\(\sin(\arialabel{blank}{\phantom{x}x})\)
(with an additional x outside of the \phantom) makes:
sine left parenthesis right parenthesis

If it's not clear, the use case is to print things like:
sin(   )
and have it be read in a way that makes it clear the reader is supposed to fill in the blank. Currently, we think \phantom is needed to do this well. Do you have any insight as to why \phantom{} is messing with \arialabel{}{}?


Reply all
Reply to author
Forward
0 new messages