Skip to content

SVG Renderer: Vertical misalignment of \rightleftarrows when used with \underset and \stackrel #3526

@hbghlyj

Description

@hbghlyj

Issue Summary

In MathJax v4.1.0 using the SVG renderer, the \rightleftarrows symbol is rendered significantly lower than its expected baseline when nested between \stackrel and \underset. This issue does not appear when using the CHTML renderer, where the arrows remain correctly centered between the top and bottom scripts.

Steps to Reproduce:

  1. Go to the MathJax Live Demo.
  2. Select the SVG output renderer.
  3. Enter the following LaTeX code:
$L \underset{\rho}{\stackrel{\alpha}{\rightleftarrows}} M \underset{\sigma}{\stackrel{\beta}{\rightleftarrows}} N$
  1. Observe that the arrows are shifted downwards, overlapping or sitting too close to the bottom script. The symbol is pushed downwards in the SVG output, creating an uneven vertical distribution.
Image
  1. Switch to the CHTML renderer and observe that the alignment is correct.
Image

Technical details:

  • MathJax Version: 4.1.0
  • Client OS: Windows 11
  • Browser: Chrome v145.0.7632.76
  • Renderer: SVG (Issue present) vs. CHTML (Issue absent)

Metadata

Metadata

Assignees

No one assigned

    Labels

    AcceptedIssue has been reproduced by MathJax teamCode ExampleContains an illustrative code example, solution, or work-aroundMergedMerged into develop branchv4

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions