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

mfenced element is not equivalent to its expanded form #478

Closed
fred-wang opened this issue May 22, 2013 · 3 comments

Comments

Projects
None yet
2 participants
@fred-wang
Copy link
Contributor

commented May 22, 2013

Per the MathML spec
http://www.w3.org/TR/MathML3/chapter3.html#presm.mfenced

<math>
  <mfenced open="&#x2225;" close="&#x2223;">
    <mfrac>
      <mi>x</mi>
      <mi>y</mi>
    </mfrac>
  </mfenced>
</math>

should be equivalent to

<math>
  <mrow>
   <mo fence="true">&#x2225;</mo>
   <mrow>
     <mfrac>
       <mi>x</mi>
       <mi>y</mi>
     </mfrac>
   </mrow>
   <mo fence="true">&#x2223;</mo>
  </mrow>
</math>

but that's not the case (spacing, strechiness). This is the cause of regression #475.

(in general inconsistency between mfenced and the mrow equivalent construction in all MathML implementations is one reason that motivates deprecating mfenced and working only on mrow+mo)

@dpvc

This comment has been minimized.

Copy link
Member

commented May 22, 2013

The HTML-CSS and SVG renderers do use <mo> elements internally to do the rendering of the fences and separators, but you are right, they do force stretchy=true and force the tex-class to be open and close rather than letting the dictionary decide, which is where the stretchy and spacing differences come from.

This would not be hard to fix, and I agree that it should be done in the next release. Now that the TeX input doesn't use <mfenced> directly, that will be easier to do (TeX used to map \left...\right directly to <mfenced>, which is why they were forced to be stretchy and spaced properly for that).

dpvc pushed a commit to dpvc/MathJax that referenced this issue Feb 11, 2014

Davide P. Cervone
Make mfenced match mrow+mo form, and make U+2223 and U+2225 stretchy …
…in pre- and postfix positions (to match Firefox). Resolves issue mathjax#478.

dpvc pushed a commit to dpvc/MathJax that referenced this issue Feb 12, 2014

@dpvc dpvc added Merged and removed Ready for Review labels Feb 12, 2014

@dpvc

This comment has been minimized.

Copy link
Member

commented Feb 12, 2014

=> Merged.

@dpvc dpvc closed this Feb 12, 2014

dpvc pushed a commit to mathjax/MathJax-test that referenced this issue Apr 21, 2014

@dpvc

This comment has been minimized.

Copy link
Member

commented Apr 21, 2014

=> In Test Suite.

MathMLToDisplay/Presentation/GeneralLayout/mfenced/issue478.html

@dpvc dpvc added v2.4 and removed Merged labels Jun 30, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.