daisy / daisy/MathCAT

Awkward speech and navigation from MathML generated by tex4ebook/make4ht (TeX4ht)

Open
#536 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
114
Forks
85
Avg merge
1d 11h
Merged PRs (30d)
42

Description

## Description

Institutions trying to meet the new Title II ADA regs and wishing to generate HTML or EPUB3 files from .tex sources are developing processes built upon make4ht and tex4ebook. These tools appear to use TeX4ht to generate MathML for the math expressions. While the math appears to render correctly visually it often yields awkward speech and navigation patterns from MathCAT.

For example, the MathML generated by TeX4ht for the LaTeX `\[ \lim_{x\to 2}\frac{x^2-4}{x-2} \]` yields this speech from MathCAT ClearSpeak Verbose:
```txt
quantity lim of with x right arrow 2 below of; the fraction with numerator; x squared minus 4; and denominator x minus 2; end fraction
```
Expand to see MathML from TeX4ht

<?xml version="1.0" encoding="UTF-8"?>

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<munder class="msub">
<mrow>
<mi class="qopname">lim</mi>
<mo>

<!-- FUNCTION APPLICATION -->
</mo>
</mrow>
<mrow>
<mi>x</mi>
<mo class="MathClass-rel" stretchy="false"></mo>
<mn>2</mn>
</mrow>
</munder>
<mfrac>
<mrow>
<msup>
<mrow>
<mi>x</mi>
</mrow>
<mrow>
<mn>2</mn>
</mrow>
</msup>
<mo class="MathClass-bin" stretchy="false"></mo>
<mn>4</mn>
</mrow>
<mrow>
<mi>x</mi>
<mo class="MathClass-bin" stretchy="false"></mo>
<mn>2</mn>
</mrow>
</mfrac>
</mrow>
</math>

Compare that to the speech text generated by MathCAT when MathJax 4.1.1 produces the MathML:
```txt
the limit as x approaches 2, of; the fraction with numerator; x squared minus 4; and denominator x minus 2; end fraction
```
Expand to see MathML from MathJax 4.1.1

<?xml version="1.0" encoding="UTF-8"?>

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<munder>
<mo movablelimits="true">lim</mo>
<mrow>
<mi>x</mi>
<mo accent="false" stretchy="false"></mo>
<mn>2</mn>
</mrow>
</munder>
<mo></mo>
<mfrac>
<mrow>
<msup>
<mi>x</mi>
<mn>2</mn>
</msup>
<mo></mo>
<mn>4</mn>
</mrow>
<mrow>
<mi>x</mi>
<mo></mo>
<mn>2</mn>
</mrow>
</mfrac>
</math>

## Expected

It is desirable to hear more naturally sounding speech "The limit as x approaches 2, of..."

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.