File tree Expand file tree Collapse file tree
source/NVDAObjects/IAccessible Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -171,13 +171,19 @@ def _getNodeMathMl(self, node: IPDDomElement) -> str:
171171
172172 def _get_mathMl (self ) -> str :
173173 """Return the MathML associated with a Formula tag"""
174- # There are two ways that MathML can be represented in a PDF:
174+ # There are three ways that MathML can be represented in a PDF:
175175 # 1. As a series of nested tags, each with a MathML element as the value.
176176 # 2. As a Formula tag with MathML as the value (comes from MathML in an Associated File)
177+ # 3. As a custom Microsoft Office attribute (MSFT_MathML) on the Formula tag.
177178 if self .pdDomNode is None :
178179 log .debugWarning ("_get_mathMl: self.pdDomNode is None!" )
179180 raise LookupError
180181
182+ # First, fetch and return the MSFT_MathML attribute if it exists.
183+ math = self .pdDomNode .GetAttribute ("MSFT_MathML" , "MSFT_Office" )
184+ if math :
185+ return math
186+
181187 # see if it is MathML tagging is used
182188 for childNum in range (self .pdDomNode .GetChildCount ()):
183189 try :
Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ Please responsibly disclose security issues following NVDA's [security policy](h
8585* Added a general setting to prevent the display turning off during say all or reading with braille.
8686This option is enabled by default, but may result in increased battery depletion. (#17649 , @LeonarddeR )
8787* NVDA is now translated into Bosnian. (#17953 )
88+ * In Adobe Acrobat, NVDA can now read and interact with math equations in PDF documents generated by recent versions of Microsoft Word. (#18056 )
8889
8990### Changes
9091
You can’t perform that action at this time.
0 commit comments