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

Inconsistency in Rendering of the <math> Tag with Complex MathML Content #1402

Open
yihong1120 opened this issue Dec 28, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@yihong1120
Copy link

Dear flutter_html Maintainers,

I hope this message finds you well. I am reaching out to report an issue I've encountered whilst utilising the flutter_html package, specifically concerning the rendering of MathML content within the <math> tag.

Upon integrating complex MathML equations into my application, I observed that certain elements are not rendered as anticipated. This is particularly evident when dealing with intricate formulas that include nested fractions, matrices, and stretchy operators. The rendered output occasionally exhibits misalignment and incorrect scaling, which detracts from the readability and professional appearance of the mathematical expressions.

To illustrate, consider the following MathML snippet:

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <mrow>
    <msup>
      <mi>a</mi>
      <mn>2</mn>
    </msup>
    <mo>+</mo>
    <msup>
      <mi>b</mi>
      <mn>2</mn>
    </msup>
    <mo>=</mo>
    <msup>
      <mi>c</mi>
      <mn>2</mn>
    </msup>
  </mrow>
</math>

While the above example is relatively straightforward, it serves to demonstrate the type of content that, when expanded upon, leads to the aforementioned rendering issues.

I understand that the flutter_html_math extension leverages the flutter_math_fork plugin to parse MathML into TeX, which may not fully support all MathML features. However, I believe that enhancing the robustness of MathML rendering could significantly benefit users who require precise and accurate display of mathematical content.

Might I suggest a review of the current MathML to TeX parsing logic, or potentially exploring alternative rendering engines that offer more comprehensive MathML support? Additionally, it would be beneficial to provide users with guidance on how to handle or work around unsupported MathML elements within the current framework.

I appreciate the effort that has gone into developing this package and its extensions, and I am looking forward to any improvements that could be made in this area.

Thank you for your time and consideration.

Best regards,
yihong1120

@yihong1120 yihong1120 added the bug Something isn't working label Dec 28, 2023
@wattfarnas97
Copy link

Hello @yihong1120 did you find a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants