Skip to content

[Draft] Integrate the MathCAT add-on into NVDA #18323

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

Draft
wants to merge 74 commits into
base: master
Choose a base branch
from

Conversation

RyanMcCleary
Copy link
Contributor

@RyanMcCleary RyanMcCleary commented Jun 25, 2025

Link to issue number:

Closes #17667.

Summary of the issue:

The MathCAT add-on is not currently included in the core of NVDA. Integrating MathCAT into NVDA will give users access to mathematical content out of the box.

Description of user facing changes:

The core functionality of the add-on will remain the same, but MathCAT will be included without needing to install it as an add-on (replacing mathPlayer). An additional panel will be added in the NVDA preferences dialog containing the configuration that is currently handled in MathCAT's add-on configuration dialog. Additionally, the user docs will be updated to reflect the replacement of mathPlayer with MathCAT.

Description of developer facing changes:

The code from the MathCAT add-on has been refactored and cleaned up to conform to NVDA's coding standards, and that code is included in the mathPres/MathCAT directory with this PR. Dependencies have been added as a Git submodule in include/nvda-mathcat. Before this PR is ready for review, changes will also be made to the way MathCAT is initialized (currently, it is only set up to be loaded as an add-on), and YAML configuration will be replaced with configobj.

Description of development approach:

Developments will proceed in the following steps:

  • Update the initialization of MathCAT so that it is loading and running correctly in its current form.
  • Include MathCAT configuration into the NVDA preferences dialog.
  • Replace YAML configuration with configobj.
  • Add unit and system tests.

Testing strategy:

The add-on code after refactoring has been tested only by loading it into NVDA and testing it functionally. Discussion of more unit and system tests is ongoing.

Known issues with pull request:

  • Previously, libmathcat_py.pyd was included in that MathCAT directory. Now, it is located in include/assets, so it is not being imported correctly. This can be fixed by updating pyproject.toml with the new path.

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@coderabbitai summary

@RyanMcCleary RyanMcCleary requested a review from a team as a code owner June 25, 2025 00:40
@RyanMcCleary RyanMcCleary requested a review from seanbudd June 25, 2025 00:40
@RyanMcCleary RyanMcCleary marked this pull request as draft June 25, 2025 00:45
@josephsl
Copy link
Contributor

josephsl commented Jun 25, 2025 via email

@AppVeyorBot
Copy link

See test results for failed build of commit 28d9c66976

@AppVeyorBot
Copy link

  • Build execution time has reached the maximum allowed time for your plan (60 minutes).

See test results for failed build of commit 4298ae7b2f

@AppVeyorBot
Copy link

  • Build execution time has reached the maximum allowed time for your plan (60 minutes).

See test results for failed build of commit 7445b8eba5

@AppVeyorBot
Copy link

  • Build execution time has reached the maximum allowed time for your plan (60 minutes).

See test results for failed build of commit 9427fd7aa8

@AppVeyorBot
Copy link

  • Build execution time has reached the maximum allowed time for your plan (60 minutes).

See test results for failed build of commit 4ba7a139a0

@seanbudd seanbudd changed the title [Draft] Integrate the MathCAT add-on into NVDA [Draft] Integrate the MathCAT into NVDA Jul 18, 2025
@AppVeyorBot
Copy link

See test results for failed build of commit 4e97fcc661

@seanbudd seanbudd linked an issue Jul 20, 2025 that may be closed by this pull request
@RyanMcCleary RyanMcCleary changed the title [Draft] Integrate the MathCAT into NVDA [Draft] Integrate the MathCAT add-on into NVDA Jul 23, 2025
Comment on lines 341 to 345
elif isinstance(item, RateCommand):
if item.multiplier == 1:
textList.append("<prosody/>")
else:
textList.append(f"<prosody rate={int(item.multiplier * 100)}%>")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you see if this hack is still needed?
@NSoiffer - do you have any insights on this?
RateCommand shoukd be supported below in a similar manner in type(item) in self.PROSODY_ATTRS.
The only difference is adding textList.append("<prosody/>") whenever item.multiplier == 1.
I think we should fix up / integrate the fix into the below code if it's necessary, rather than just for the ratecommand separately

seanbudd pushed a commit that referenced this pull request Aug 5, 2025
This PR adds MathCAT assets under include/nvda-mathcat as a submodule.
We are opening this as a separate PR to create this submodule before the
main PR (#18323) is merged for the MathCAT integration project so that
we will have access to this submodule for testing the GitHub Actions
workflow in [the nvda-mathcat
repo](https://github.com/nvaccess/nvda-mathcat) that automatically
fetches assets from the latest MathCAT release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Version 2025.1.2 does not read the “Formula” tag. MathML is ignored by NVDA by default
5 participants