Skip to content
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

Set TeX class OP for multi-letter mo elements, as in v2. (mathjax/MathJax#3095) #998

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

dpvc
Copy link
Member

@dpvc dpvc commented Aug 27, 2023

In version 2, an mo with multiple letters, like <mo>Hom</mo>, would be given the TeX class of OP when it doesn't appear explicitly in the operator table. This was lost in the v3 translation, and this PR reinstates that. In addition, it refactors the code that does the checking, since it is used in two places (the get texClass() getter, and the checkOperatorTable() initialization routine. It also adjusts the getRange() function in the OperatorTable.ts to always return a value.

The pattern used to identify a multi-letter operator is a property of the MmlMo object, so that it can be adjusted during initialization, if desired.

Resolves issue mathjax/MathJax#3095.

@dpvc dpvc requested a review from zorkow August 27, 2023 18:32
@dpvc dpvc added this to the v4.0 milestone Aug 27, 2023
Copy link
Member

@zorkow zorkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

@dpvc dpvc merged commit ec419a0 into develop Sep 15, 2023
@dpvc dpvc deleted the issue3095 branch September 15, 2023 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants