Skip to content

Write a browser extension to convert "HTML Math" for chemistry into MathML #130

Description

@NSoiffer

This isn't really a MathCAT project, but it would open up more content to be available for MathCAT and I don't know where else to put it.

Currently there is an accessible-wikipedia-math extension that reverse engineers the HTML math used in Wikipedia for some inline math. That makes the inline math accessible (correct speech and correct braille). The idea here is to either add to that extension or create a new one. For example, $[\mathrm{SO}_4]^{2-}$ is encoded as:

<span class="chemf nowrap">[SO
     <sub class="template-chem2-sub">4</sub>
     ]
     <sup class="template-chem2-sup">2−</sup>
</span>

The classes above (and maybe some others) can be searched for and turned back into MathML's mmultscripts tag.

Note: for chemistry, mmultscripts should be used and not msub, etc., because mmultscripts will get the sub and superscript alignments right across multiple sub/superscripts.

This is a good project for someone who knows JavaScript because it is very similar to the math extension mentioned above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersintegrationsregarding other software such as screen readers, operating systems, ...

    Type

    No type

    Projects

    Status
    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions