<mi>cos</mi> treated as a multi-character identifier<mi> are treated as identifiers. The TeX input jax places multi-letter sequences into a single <mi> element within macros such as \mathrm, \mathbf, and related commands. This behavior is configurable, but by default it applies to letter sequences.<mi>cos</mi> renders the text in italics as a variable name rather than as a function operator.<mi>cos</mi> with <mo>cos</mo> throughout the XML.


<mi>cos</mi> with <mo>cos</mo>, the rendering in version 4.1.1 appears correct 

In the existing code, <mo>cos</mo> is immediately followed by <mrow> without the invisible function-application operator ⁡. MathJax 4 appears to be stricter regarding this spacing.
To address this, we added <mo>⁡</mo> (invisible function apply) after each cos.




Issue 1 —<mi>cos</mi>treated as a multi-character identifierIn MathJax 4, multi-letter sequences inside<mi>are treated as identifiers. The TeX input jax places multi-letter sequences into a single<mi>element within macros such as\mathrm,\mathbf, and related commands. This behavior is configurable, but by default it applies to letter sequences.Because of this change, using<mi>cos</mi>renders the text in italics as a variable name rather than as a function operator.

To correct the rendering, we replaced<mi>cos</mi>with<mo>cos</mo>throughout the XML.
Issue 2 — Missing <mo> function-apply separator (invisible character)In the existing code, <mo>cos</mo> is immediately followed by <mrow> without the invisible function-application operator ⁡. MathJax 4 appears to be stricter regarding this spacing.
<math xmlns="http://www.w3.org/1998/Math/MathML"><mo>cos</mo><mrow><mi>ω</mi><mi>t</mi></mrow></math>
Issue 3 — Underscore symbol alignment
In MathJax 3.1.2, the underscore/underline renders correctly and is properly aligned under the character. ... However, in MathJax 4.1.1, the underscore appears slightly left-aligned compared to the base character.
Could you please confirm:
Whether these changes are expected behavior in MathJax 4.1.1.
Hi Davide,
Thanks for your feedback.
Please check the attached implementation screenshot for MathJax 4.x.
Also, we are not injecting any CSS from MathJax in our implementation.
We are comparing the results using the https://www.mathjax.org/#demo link. We copied the original MathML code from the equation rendered in OnProof and pasted the same code into the MathJax demo site.The same issue/error appears there as well.
Test link: Please check below. (Only the equations for which issues were reported via email are included in the link below.)
https://qaops2editor.pubmate.co.in/#/?templateID=5fd5e790c0274a93b6b9cd413887e64e071609633
Environment details:
OS: Windows 11
Browser used for rendering: Google Chrome Version 145.0.7632.160 (Official Build) (64-bit)
Please let us know if you need any additional information.
Best regards,
Akhil Joshi
mjx-c.mjx-c332.NCM-SO {margin-left: 0;}
we are not injecting any CSS from MathJax in our implementation.
We copied the original MathML code from the equation rendered in OnProof and pasted the same code into the MathJax demo site
On Mar 13, 2026, at 3:23 AM, akhil joshi <akkijo...@gmail.com> wrote:
Hi Davide,
Thanks for your feedback.
Please check the attached implementation screenshot for MathJax 4.x.
Also, we are not injecting any CSS from MathJax in our implementation.
We are comparing the results using the https://www.mathjax.org/#demo link. We copied the original MathML code from the equation rendered in OnProof and pasted the same code into the MathJax demo site.The same issue/error appears there as well.
Test link: Please check below. (Only the equations for which issues were reported via email are included in the link below.)
https://qaops2editor.pubmate.co.in/#/?templateID=5fd5e790c0274a93b6b9cd413887e64e071609633Environment details:
OS: Windows 11
Browser used for rendering: Google Chrome Version 145.0.7632.160 (Official Build) (64-bit)
Please let us know if you need any additional information.
Best regards,
Akhil Joshi
On Thursday, March 12, 2026 at 9:02:18 PM UTC+5:30 Davide Cervone wrote:
Issue 1 — <mi>cos</mi> treated as a multi-character identifierIn MathJax 4, multi-letter sequences inside <mi> are treated as identifiers. The TeX input jax places multi-letter sequences into a single <mi> element within macros such as \mathrm, \mathbf, and related commands. This behavior is configurable, but by default it applies to letter sequences.Because of this change, using <mi>cos</mi> renders the text in italics as a variable name rather than as a function operator.
Your observation is incorrect. In MathML, multi-letter identifiers are rendered in the upright font, not italics. E.g.renders as
<PastedGraphic-1.png>in v4.1.1. This has not changed in v4. Even your 4.1.1 rendering shows the cosine in an upright font:
<PastedGraphic-2.png>I'm wondering if the CSS on your page may be interfering with MathJax's output. You don't give the MathJax configuration you are using or the MathJax component you are loading (e.g., mml-chtml.js), so it is hard to test without making assumptions.The issue you don't discuss is the red "mfrac", which indicates a problem with that fraction's MathML structure. Often that means the number of children is incorrect. Using the MathJax contextual menu to Show Math As the MathML Code should an attribute on on <merror> element for the mfrac that shows the actual error message. It would help to see what that is.The equation you provided in the first image in your summary section renders properly for me in v4.1.1:
<mjx-4.1.1.png>so I'm wondering if the MathML is actually the same as the MathML in your v4.1.1 test. (Perhaps it was actually the result of your trying to replace the cosines with <mo> elements, but something has gone wrong?) Can you provide a link to a page that actually exhibits the problem?
To correct the rendering, we replaced <mi>cos</mi> with <mo>cos</mo> throughout the XML.That should not be necessary, as shown in my image above. If this is making a difference for you, then again I wonder about CSS that might be affecting the result.Issue 2 — Missing <mo> function-apply separator (invisible character)In the existing code, <mo>cos</mo> is immediately followed by <mrow> without the invisible function-application operator ⁡. MathJax 4 appears to be stricter regarding this spacing.
This is not true. For example,<math xmlns="http://www.w3.org/1998/Math/MathML"><mo>cos</mo><mrow><mi>ω</mi><mi>t</mi></mrow></math>produces
<PastedGraphic-3.png>which has the proper spacing after the "cos". Here is your equation with the <mo>cos</mi> replaced by <mo>cos</mo> without additional invisible function-apply:
<PastedGraphic-4.png>The spacing of the cosines is correct without the U+2061 characters.
Issue 3 — Underscore symbol alignment
In MathJax 3.1.2, the underscore/underline renders correctly and is properly aligned under the character. ... However, in MathJax 4.1.1, the underscore appears slightly left-aligned compared to the base character.I am not able to reproduce the issue you are seeing. Here is the expression rendered in v4.1.1 for me:
<PastedGraphic-5.png>Again, without more information about your setup,. it is hard to diagnose the problem. What OS and browser (and versions) are you using? If you remove (or disable) the CSS from your page, does that make a difference?
Could you please confirm:
Whether these changes are expected behavior in MathJax 4.1.1.No they are not, and I am not able to produce any of the issues you are seeing.If you can provide a test page that illustrates the problems, I can investigate further.Davide
--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mathjax-users/f8d306ad-26fa-4a26-baff-95ff86c0ecc2n%40googlegroups.com.
<sc2.png><sc3.png><sc4.png><sc1.png><PastedGraphic-1.png><PastedGraphic-2.png><mjx-4.1.1.png><PastedGraphic-3.png><PastedGraphic-4.png><PastedGraphic-5.png>