mathjax / mathjax/MathJax

Displaystyle="true" does not apply to all elements within an mrow

Open
#3,595 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Code Example Expected Behavior v4
Dominant language
JavaScript
Stars
10.9k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Issue Summary

When mrow is given the attribute displaystyle="true" it should apply to all elements within said mrow. This does not happen with MathJax.

Both of the summation expressions are nested inside an mrow element with the attribute displaystyle="true". Visually both of them should appear as uppercase symbols (as if they were block equations), where the numbers 5 and 6 should be under them, not as subscripts.

MathJax 4 output:

Summation signs appearing lower case with subscripts.

Firefox's native output:

Correct output of uppercase summation and under, rather than sub.

OS: Windows 11
Browser: Mozilla Firefox 153.0

Steps to Reproduce:

Use the code to render:

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <mrow displaystyle="true">
  <munder>
    <mo>∑</mo>
    <mn>5</mn>
  </munder>
  <munder>
    <mo>∑</mo>
    <mn>6</mn>
  </munder>
  </mrow>
</math>
Technical details:
  • MathJax Version: 4
  • OS: Windows 11
  • Browser: Mozilla Firefox 153.0

I am using the default MathJax configuration and loading MathJax via

<script src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js" defer></script>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the MathJax 4 MathML rendering path for mrow, displaystyle, and munder, using the HTML reproduction in the issue with the default tex-mml-chtml.js configuration. Compare the rendered result with Firefox's native MathML output; done means both summation symbols render in display style with 5 and 6 underneath rather than as subscripts.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
56/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.