-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path for adding semantics #84
Comments
I'm still a little new on this so I apologize if this seems remedial or something but let me ask anyways since it is inline with some things I want to ask in the next meeting...
This seems to imply a number of kind of key things -- MathJax, as you say, ultimately converts to HTML. Lots of things could potentially create 'mathy' HTML that involves no actual So... It seems then what to some extent you are desiring "new magic" here that isn't about MathML as much as the platform capabilities/architectures themselves? That's not a statement as much as a question trying to help me understand: Where does this role play in specifically? If there was no MathML, where would this 'fit'? |
I also am new to these discussions, and I think I have the same question:
how does this capability fit with MathML, MathJax and other technology?
I'll try to answer the specific question: what if there were no MathML?
Whether or not there was MathML, I could write Javascript that
took (well-written, semantic) math content on the web page,
looked up pronunciation and other information about those
macros (look up in the repository I postulated),
assembled that information and inserted it on the web page
in some hidden div, and then give people a way to access that
pronunciation information (say, a "pronounce the math" button).
This could be done in a way that does not disturb however that
math was going to be rendered visually (whether MathML or otherwise).
And that would be a terrible solution to the problem I have described,
because it would be some home-grown hacky solution that could
not be widely adopted because it does not mesh with the established
technology. The "pronounce the math" button would not be good for
someone using a screen reader, for example.
On the other hand, if the 'hidden div' mentioned above were replaced
by some official way to incorporate that information into the
MathML which is used to render the math, then it could be useful to
a screen reader.
Whether it is MathJax that converts the LaTeX to MathML in the browser,
or that conversion is done offline before sending the HTML, I don't
think is relevant to my question.
I want to make this happen, and my guess is that doing it in the
MathML is the best option for having it work properly and be widely
useful. So I want to know if that is likely to be the case, or if I
should start thinking about other options.
…On Thu, 18 Apr 2019, Brian Kardell wrote:
I'm still a little new on this so I apologize if this seems remedial or something but let me ask
anyways since it is inline with some things I want to ask in the next meeting...
Once converted to HTML (say, using MathJax to convert the math)
This seems to imply a number of kind of key things -- MathJax, as you say, ultimately converts to
HTML. Lots of things could potentially create 'mathy' HTML that involves no actual <math> element.
Part of what we are doing is trying to describe the underlying 'plumbing' of MathML and the platform
so that we solve both ends of that problem.
So... It seems then what to some extent you are desiring "new magic" here that isn't about MathML as
much as the platform capabilities/architectures themselves? That's not a statement as much as a
question trying to help me understand: Where does this role play in specifically? If there was no
MathML, where would this 'fit'?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the
thread.[AABTULAC4527KQBCCGUGYA3PRCQZPANCNFSM4HCLOO4Q.gif]
|
I think that this is essentially a duplicate of #64. Of course if we define a system of roles, there has to be a pipeline from some authoring enviornment (including conversions from latex) that adds the roles in the right places, but in general the mathml spec can't say a lot about how the mathml is created, so perhaps a TeX fragment of |
Sorry if I am only adding confusion and not help here - I'm not sure exactly... but.. are there efforts in aria to define said roles we would need? if so, is it worth linking up here? |
@davidfarmer I think Neil or others can better comment on the status and plan to add semantic information. As @davidcarlisle noted, there are discussions to add more semantic via roles. However, I think your comment is interesting and actually goes further. In any case, I think this discussion has a place in this CG and probably the ARIA WG should be involved too. Quoting Abraham Nemeth from the book "Braille into the next millenium":
Many people disagree with Abraham Nemeth here and want to add information to describe the different meanings (pair, point, interval, gcd...) in order to make formulas less ambiguous and "readable". However, math notations are really open-ended and it's quite common for authors to introduce their own very field-specialized notations at the beginning of papers. As I see, your proposal has the advantage to let authors explicitly provide the way they want the notations to be read, instead of relying on a fixed set of known definitions (if I understand #64 correctly). One possible limitation though: Are people really going to define macros for pair, point, interval, gcd etc? I suspect authors would just write Anyway, this is just my two cents on this... I think I would be happy if we had at least a standard and cross-platform way to read presentation MathML that addresses Nemeth's minimal need. Currently we even don't have this minimal support AFAIK. |
I am hopeful of implementing these ideas for the math that The ingredients are:
Note that this is about pronunciation, not Braille, We could The context in which I am sure I can accomplish 1)-4) is
Differences you might notice from typical LaTeX:
If
\functionDomainCodomain[3] function #1 from #2 to #3 Unfolding all of those pronunciations gives the An enhancement I plan is a "simple argument" version of
One example of the semantic macros: \definiteIntegralLimits[4] \int_{#1}^{#2} #3 \measureD #4 \measureD ,d Note that those macros address the LaTeX shortcoming that The publisher is free to redefine the semantic macros. Another example is \functionApply. I will not give The above is supposed to illustrate the possibility of |
Thanks for the detailed explanation. I think restricting to a subset of math taught at college + asking authors to always use explicit macros addressed my concerns. For the missing bit, I personally don't know if there is any standard way to tell screen readers how to pronounce the text so I'll let others reply. |
Sorry for the slow response -- I'm catching up after a month long (great) vacation... Also, this is a very long comment that has taken a while to write For me, a goal of MathML 4 is to allow, but not require, some semantic enrichment of presentation MathML. The primary use case I see is for accessibility, but I'm sure that are others such as computation. I like @davidfarmer's ideas for using more semantic LaTeX and it fits in well with my goal of finding a way of putting that into the MathML. We might want to allow for explicit text or braille, but doing so has a number of drawbacks:
IMHO, providing explicit text should be done only in exceptional cases (e.g, a test where you don't want to hint at answer). Instead, it would be better to embed the meaning and let the renderer choose the proper speech based on user preferences. This is similar to saying the visual renderer shouldn't use an image but instead should render the math to match the font size (etc) that the user has chosen. MathML provided a fallback Note that some of these problems exist for braille also. Nemeth was the standard for braille in the US and some other countries for many years. Recently, Unified English Braille (UEB) has come along which defines its own math codes. Most English speaking countries have adopted UEB; the US allows both. It's a very contentious topic because UEB uses many more characters than Nemeth to encode math. If the braille is author generated, both would need to be included in the MathML somehow. Because braille is syntax-based, I believe it can be generated from presentation MathML for both codes. I wouldn't be surprised if there were one or two problems areas that should be fixed for good braille generation from MathML, but I haven't heard of them yet. MathPlayer uses liblouis for its MathML to Nemeth conversion and although there are bugs in the conversion, AFAIK, none are due to a problem with MathML. So far, MathML to UEB in liblouis is very incomplete. What I like more (or in addition to text) is providing a way to embed semantics. Some options are:
As mentioned in #64, we should talk to the ARIA WG after we have some proposal or set of questions to ask them. I hope I'm correctly representing ARIA in the following simplified description of what it is... When a web page is read, the DOM is created and from the DOM, and simplified view of the DOM called the accessibility tree is created. HTML elements map to various things in the accessibility tree; ARIA provides a way to override those mappings. Those are particularly useful for If we are thinking of having screen readers directly read MathML, it would be by providing a means for MathML elements to set the accessible names in the accessibility tree. In some sense, that's already possible because you can add aria-label to an element and that will override/set any text for the name. Just as I'm not a fan of authors setting the text, I'm also not a fan of this although potentially the text could be generated by client software based on user preferences. Math has it's own braille code, so braille is lost. There is a suggestion to add a new aria feature aria-label-braille that would provide braille, so that would remedy that problem. Synchronized highlighting remains a problem though. Perhaps we should be thinking about what to add to ARIA to solve that? Alternatively, maybe we should be looking at other ways to allow screen readers, or more likely, third party libraries that screen readers can call such as Volker Sorge's SRE, to produce speech better. Enchancing ARIA's role is one possibility, but to me, adding a bunch of math related things "pollutes" that attribute. As I mention earlier, Whatever we come up (potentially more than one idea), once we have discussed it and come to some conclusions, we should bring those to the ARIA WG for their feedback. Finally, I want to digress a little and explain why Dr. Nemeth wanted syntax, not semantics when he heard speech. I had the privilege of meeting him when he was 92. Although blind (and 92), he traveled by himself via plane to a workshop I was at. He was as sharp as anyone in their 20s and had a keen sense of humor also. However, the technology he used was not modern. As he explained, he developed MathSpeak as a one-to-one way of speaking his Nemeth braille code (which encodes syntax, just like sighted math notation). There were two reasons for his design of MathSpeak:
Most work on speech has been trying to have math speak like someone would normally speak it -- i.e, have it spoken semantically. I tried to find a study that compared syntactic speech versus semantic speech but couldn't find any. It would be good to validate whether all the work being done for semantic speech actually does aid understanding. Anecdotally, several students have said they want math to be read the same way their teacher reads it, so the reason for generating semantic speech isn't completely made up. Apologies for the extremely long comment. There was a lot to respond to and to explain. |
Thanks for the detailed reply, @NSoiffer. Just to add some comment regarding how browser pass info to assistive technologies:
Of course whatever the method used by browsers to pass the information, work is still needed on the author side and on the assistive technology side to get good rendering of the math... Should we close this issue and mark it as a duplicate of #64 ? |
I think I want to second Fred's proposal, given the 3 year silence here. |
Solved by using |
This is related to issue #64 but is more about the pipeline
from source to MathML in the browser.
I believe it is possible to have many authors use a standard
set of semantic LaTeX macros. Well, maybe not most authors,
but a significant subset of those who write in PreTeXt
(https://pretextbook.org/) . This includes some popular
textbooks.
For example, they would use
\abs{x}
for the absolute valueof
x
, instead of writing|x|
.There would be a repository which contains information about
that macro. For example, "in LaTeX the macro has the definition
\newcommand{\abs}[1]{|#1|}
"But more significantly (this is the point of this issue)
the repository also has information such as:
Pronounce this as: "absolute value of
#1
" or "begin absolutevalue
#1
end absolute value" or whatever is the right thingto say, possibly with variations.
Write this in braille as: [whatever it should be]
What I would like to see happen is: author writes their source
using the standard macros. Once converted to HTML (say, using
MathJax to convert the math), a screen reader makes the correct
pronunciation of
$|x|$
without the need for any guessingabout what "vertical line x vertical line" means. The key to
making this happen is the repository associated with the macro.
Is it reasonable to hope that things will be able to work
that way? I am pretty sure that authors can be persuaded to
write their books with standard macros, since it is not really
any extra work, and the benefits would be significant.
The text was updated successfully, but these errors were encountered: