Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#536 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
latex, rust
Domain
accessibility

Research direction

Start by reproducing the TeX4ht output from the LaTeX limit example and comparing MathCAT ClearSpeak Verbose speech and navigation with the MathJax 4.1.1 MathML output. Trace how MathCAT handles the shown MathML structures, then define completion as improved speech and navigation for the reported expression without regressions in related cases.

Written by the indexing model from the issue text.

Description

bug

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:

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:

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..."

Dominant language
Rust
Stars
114
Forks
85
Avg merge
1d 11h
Merged PRs (30d)
66

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from daisy/MathCAT

All issues in daisy/MathCAT

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.