daisy / math-a11y

5 stars 2 forks source link

Math AutoCorrect Codes at the End of an Expression Should Be Considered Terminated When Building Up an Expression into Professional Form #34

Open brichwin opened 3 weeks ago

brichwin commented 3 weeks ago

Description

When using Microsoft Word's Equation Editor in UnicodeMath linear mode, Math AutoCorrect codes typically require a space after them to be recognized and converted into their corresponding symbols. However, if an AutoCorrect code appears at the very end of an expression, it is easy for the user to forget to add this terminating space, as there is no subsequent character to separate the code from.

As a result, the AutoCorrect code remains unconverted when the expression is built into professional form, leaving the typed characters (e.g., backslash followed by the code name) instead of the desired symbol.

Example

When entering the following into the Equation Editor in UnicodeMath Linear mode (quotes used to show lack of space at the end; they would not be entered):

"\angle A + \angle B = 90\degree"

The expected result is: $$\angle A+\angle B=90°$$

However, because the AutoCorrect code \degree is at the end of the expression and no space follows it, the result is: $$\angle A+\angle B=90\textrm{\\degree}$$

Expected Behavior

The Equation Editor should automatically treat an AutoCorrect code at the end of an expression as terminated, even if the user forgets to add a trailing space. For instance, in the example above, the code \degree should still convert to ° without requiring the user to enter a space after it.

Impact

This change would prevent incorrect rendering of math expressions when AutoCorrect codes are used at the end of an equation, reducing the likelihood of errors and enhancing usability.

jenmarsala commented 2 weeks ago

I verify that this issue is occurring.