Add an option to use Word's native math speech in Word documents#19700
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request addresses issue #19670 where math speech in Microsoft Word was inconsistently switching between MathCAT and Word's native math speech. The solution adds a new user option to disable MathCAT while in Word, allowing Word's native math speech to be used instead.
Changes:
- Added
disable()andenable()functions tomathPres/__init__.pyto save and restore math presentation providers - Added event handlers in
winword.pyto disable/enable math providers when Word gains/loses focus - Added a new configuration option and UI checkbox in the Math settings panel
- Added user documentation for the new option
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| source/mathPres/init.py | Added disable() and enable() functions to manage math presentation providers with proper state guards |
| source/appModules/winword.py | Added event handlers to disable MathCAT when Word gains focus and re-enable when focus is lost or app terminates |
| source/config/configSpec.py | Added useWordNativeMath boolean configuration option under math.other section |
| source/gui/settingsDialogs.py | Added checkbox in Math settings panel to control the new option |
| user_docs/en/userGuide.md | Added documentation for the new option in the Math settings section |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
|
This option is called "Use native math speech in Word and Outlook" and is in the Speech section. Though, the user guide description of this options is:
If the option impacts speech, braille and interaction/navigation, it should be renamed and put out of the speech section. @RyanMcCleary which one is true? |
It's the former: the option does impact speech, braille and interaction/navigation. |
|
Can a new issue or PR be opened to fix this? |
|
Sure, do we want this fix to go into 2026.1? |
|
yes please |
Link to issue number:
Closes #19670
Summary of the issue:
A bug in Microsoft Word is causing math objects to be spoken inconsistently, sometimes using MathCAT and at other times using Word's native math speech.
Description of user facing changes:
An option is added to the math settings panel to use native math speech while in Word. When checked, MathCAT is disabled while in Word and re-enabled when another application gains focus.
Description of developer facing changes:
N/A
Description of development approach:
winword.pyfor thegainFocus,loseFocus, andterminateevents that disable and re-enable MathCAT.mathPres/__init__.py:disableandenable, which save and restore the three global provider objects.Testing strategy:
I set MathCAT's rate to the minimum value and pause factor to the maximum value to make it easy to tell if math is being spoken using word's native math or MathCAT. After that, I tested the following:
Known issues with pull request:
No known issues.
Code Review Checklist: