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

(Migration) Red MathML text does not render as red on tokamak #4387

Closed
cjlim1092 opened this issue Nov 2, 2023 · 3 comments
Closed

(Migration) Red MathML text does not render as red on tokamak #4387

cjlim1092 opened this issue Nov 2, 2023 · 3 comments

Comments

@cjlim1092
Copy link

Describe the bug

SVN
Echo
Legacy
image
Tokamak
image

Environment (please complete the following information):

  • Version: 26

Additional context
High Priority course for India project

@eliknebel
Copy link
Contributor

eliknebel commented Nov 7, 2023

This is a MathJax issue, it may be related to the version mismatch between legacy and torus. Red color is specified in the MathML source via <m:mn style='bold' color='red'>... and this is migrating unchanged into the JSON source for the formula. However, at runtime, when the page is rendered in any mode (authoring, preview, delivery), using the MathJax Popup menu command Show Math As/Original MathML shows MathML expression with the color attribute removed.

@andersweinstein
Copy link
Contributor

andersweinstein commented Nov 14, 2023

Looks like torus' newer version of MathJax wants one to put all styling as css in the style attribute e.g. style='color:red' for red color, or, for both bold and red, style='fontweight=bold;color:red'. This fix might be made in the XML source, or fixed in torus authoring (though editing MathML in torus is painful.)

(While experimenting, I made this change in the authoring project for above course on tokamak, but have not published the change. However, if there are expected to be further ingestions, the change should be made in the SVN source.)

In theory migration tool could peek into MathML and try to make adjustments like this for obvious cases like color attributes. But if it is only going to affect a very small number of cases, this is not worth the effort.

@andersweinstein
Copy link
Contributor

andersweinstein commented Nov 16, 2023

A simpler change is to rename the color attribute to mathcolor wherever it occurs within a mathml element. For example, where you see <m:mn style='bold' color='red'> change it to <m:mn style='bold' mathcolor='red'>

I'm not sure if the bold style is having the desired effect. But changing color to mathcolor suffices for coloring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants