-
MathType
-
WirisQuizzes
-
Nubric
-
CalcMe
-
MathPlayer
-
Store FAQ
-
MathFlow
-
BF FAQ
-
Miscellaneous
-
Wiris Integrations
Improving readability of MathType for Microsoft 365 equations with NVDA
Reading time: 2minMathType for Microsoft 365 generates accessible descriptions for equations in Microsoft Word. To keep each equation editable, MathType also adds a block of MathML metadata after its accessible description. As a result, NVDA may announce the equation description and then continue reading a long string of code beginning with {"mathml":....
You can configure NVDA's Speech Dictionary with a regular expression that detects and silences the complete metadata block. NVDA will then announce the accessible equation description without reading the MathML, while the metadata remains available for MathType to reopen and edit the equation.
Although the examples in this article use MathType for Microsoft 365 in Word, the same NVDA Speech Dictionary configuration also applies when reading MathType equations in Google Docs and Google Slides.
Before you begin
Requirements
- NVDA 2022.1 or newer.
- Equations created with MathType for Microsoft 365 in Word or MathType for Google Workspace.
Do not remove or edit the MathML in the equation's alternative text. MathType requires this metadata to reopen and edit the equation. The following configuration changes only what NVDA announces.
Steps
Step 1: Open the Default Speech Dictionary
- Press
NVDA+Nto open the NVDA menu. - Go to Preferences > Speech Dictionaries > Default dictionary.

Step 2: Add a dictionary entry
- Press
Tabuntil you reach the Add button. - Press
Enter.

Step 3: Configure the dictionary entry
Complete the fields in the dictionary entry as follows:
-
Pattern: Paste the following regular expression:
\{\s*"mathml"\s*:[\s\S]*\}\s*$ - Type: Select Regular Expression. This setting is required for NVDA to interpret the pattern correctly. You can use the arrow keys to select it.
- Replacement: Leave this field empty.
This pattern detects the beginning of the MathType metadata at {"mathml": and matches everything through the final closing curly brace at the end of the alternative text. It therefore silences the complete metadata object, including the mathml, origin, and version properties. Curly braces contained within the MathML do not interrupt the match, even when an equation contains several of them.

Step 4: Save the dictionary entry
- Press
Enterto select OK and close the dictionary-entry dialog. - Press
Enteragain to select OK and save the Default dictionary.
Verify it worked
- Open a Microsoft Word document containing equations created with the MathType for Microsoft 365. You can download this example document.
- Start NVDA if it is not already running.
- Use the arrow keys to navigate through the document until NVDA reaches an equation.
- Listen to the equation announcement.
- If possible, repeat the test with an equation containing one or more closing curly braces.
NVDA should announce the accessible equation description without continuing to read the MathML metadata. Equations containing curly braces should be announced in the same way.
Common errors
NVDA still announces all or part of the MathML
Open the Default dictionary and check that:
- The pattern is exactly
\{\s*"mathml"\s*:[\s\S]*\}\s*$. - The entry type is set to Regular Expression. If another type is selected, NVDA will not interpret the special characters in the pattern.
- The Replacement field is empty.
- You selected OK in both dialogs to save the entry and the dictionary.
The Speech Dictionary options are different
Make sure you are using NVDA 2022.1 or newer. The location or appearance of the controls may vary between NVDA versions.