-
-
Notifications
You must be signed in to change notification settings - Fork 699
[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
base: master
Are you sure you want to change the base?
Conversation
Hi, I think we discussed this, but if it does replace MathPlayer, can that be documented in the user guide or the math presentation section be rewritten to use MathCAT content? Thanks.
|
See test results for failed build of commit 28d9c66976 |
…to mathcat-integration Merging
…to mathcat-integration Merging
See test results for failed build of commit 4298ae7b2f |
See test results for failed build of commit 7445b8eba5 |
See test results for failed build of commit 9427fd7aa8 |
See test results for failed build of commit 4ba7a139a0 |
See test results for failed build of commit 27b2f891ff |
See test results for failed build of commit 0368c286bf |
See test results for failed build of commit 111a571a00 |
@@ -47,6 +47,7 @@ dependencies = [ | |||
"mdx_truly_sane_lists==1.3", | |||
"markdown-link-attr-modifier==0.2.1", | |||
"mdx-gh-links==0.4", | |||
"pyyaml==6.0.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hate to butt in on a draft PR, but can we consider using StrictYAML instead? It sidesteps several of the rather nasty issues with YAML while being mostly compatible with PyYAML.
(I'd suggest not using YAML at all, but I suspect that's rather out of scope)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that would require upstream changes to https://github.com/nsoiffer/MathCAT/, which we don't intended on maintaining. We're just parsing rules for math designed in YAML files as set by Neil. Since we don't have control over the source yaml, I don't think we can change our parsing rules.
[submodule "source/mathPres/MathCAT/nvda-mathcat"] | ||
path = source/mathPres/MathCAT/nvda-mathcat | ||
url = https://github.com/ryanmccleary/nvda-mathcat | ||
[submodule "include/nvda-mathcat"] | ||
path = include/nvda-mathcat | ||
url = https://github.com/ryanmccleary/nvda-mathcat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you update these to just a single submodule referencing https://github.com/nvaccess/nvda-mathcat/
|
||
[tool.uv.workspace] | ||
members = [ | ||
"miscDeps", | ||
"include/nvda-mathcat", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"include/nvda-mathcat", | |
"include/nvda-mathcat", |
return os.path.join(os.path.dirname(os.path.abspath(__file__)), "Rules", "Braille") | ||
|
||
@staticmethod | ||
def languagesDict() -> dict[str, str]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function should instead return a set of supported languages for MathCAT, and the language names should be derived from getLanguageDescription
.
Any language code which is not supported by getLanguageDescription
should get added to LANG_NAMES_TO_LOCALIZED_DESCS
.
@@ -47,6 +47,7 @@ dependencies = [ | |||
"mdx_truly_sane_lists==1.3", | |||
"markdown-link-attr-modifier==0.2.1", | |||
"mdx-gh-links==0.4", | |||
"pyyaml==6.0.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that would require upstream changes to https://github.com/nsoiffer/MathCAT/, which we don't intended on maintaining. We're just parsing rules for math designed in YAML files as set by Neil. Since we don't have control over the source yaml, I don't think we can change our parsing rules.
Hi Joseph,
Thanks for bringing this up. We can update the user docs with information
on MathCAT instead of mathPlayer. I'll add a note about that to this PR.
…On Tue, Jun 24, 2025 at 8:52 PM Joseph Lee ***@***.***> wrote:
*josephsl* left a comment (nvaccess/nvda#18323)
<#18323 (comment)>
Hi, I think we discussed this, but if it does replace MathPlayer, can that
be documented in the user guide or the math presentation section be
rewritten to use MathCAT content? Thanks.
—
Reply to this email directly, view it on GitHub
<#18323 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEFYRGABPBI2BH3SISCZ3L33FHXENAVCNFSM6AAAAACABZTVP2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAMBSGI3DIOJVG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
See test results for failed build of commit f7b9c5fce2 |
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 ininclude/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:
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:
libmathcat_py.pyd
was included in that MathCAT directory. Now, it is located ininclude/assets
, so it is not being imported correctly. This can be fixed by updatingpyproject.toml
with the new path.Code Review Checklist:
@coderabbitai summary