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

Problem with Missing Characters in MathJax Formula After Saving #3313

Open
FehNeves01 opened this issue Dec 3, 2024 · 1 comment
Open

Problem with Missing Characters in MathJax Formula After Saving #3313

FehNeves01 opened this issue Dec 3, 2024 · 1 comment
Labels
Cannot Reproduce Insufficient information You have not provided enough information to diagnose the problem.

Comments

@FehNeves01
Copy link

FehNeves01 commented Dec 3, 2024

As previously mentioned, I am starting this issue to report an error I have been facing. When I start the CKEditor and enter the formula I intend to use, it is displayed correctly. However, when I save the project and try to render it using MathJax on my regular page, some characters and layout elements disappear.
When I reported this issue earlier, I was asked for some additional information. Below are the details:

Framework:
Vue 2.6.14

Dependencies:

  • "vue-mathjax": "^0.1.1"
  • "mathjax": "^3.2.2"
  • "mathjax-full": "^3.2.2"
  • "@wiris/mathtype-ckeditor5": "^8.11.1"

Component Import:

import { VueMathjax } from 'vue-mathjax';

Component Construction:

<vue-mathjax v-show="!isEditingQuestion" :formula="enunciado.enunciado" :safe="false" ></vue-mathjax>

Formula Property Value:

<p>
<math xmlns="http://www.w3.org/1998/Math/MathML">
  <mi>r</mi>
  <mfenced open="{" close="">
    <mtable columnalign="left">
      <mtr>
        <mtd>
          <mn>2</mn>
          <mi>x</mi>
          <mo>+</mo>
          <mn>3</mn>
          <mi>y</mi>
          <mo>=</mo>
          <mn>5</mn>
        </mtd>
      </mtr>
      <mtr>
        <mtd>
          <mi>p</mi>
          <mi>x</mi>
          <mo>+</mo>
          <mi>q</mi>
          <mi>y</mi>
          <mo>=</mo>
          <mn>2</mn>
        </mtd>
      </mtr>
    </mtable>
  </mfenced>
</math>
</p>
@dpvc
Copy link
Member

dpvc commented Dec 3, 2024

This is helpful, though you haven't said what browser or OS you are using, or what the MathJax configuration is, or what version of MathJax you are loading, etc., so I'm making a few guesses, here.

I suspect that what is happening is that MathJax isn't actually loading, or is not loading the MathML input processor, and that what you are seeing is not MathJax output, but rather than browser's native MathML rendering. Most browsers only implement MathML-Core (and since you haven't said which on you are using, I can't tell whether that is true for you); but MathML-Core does not include the <mfenced> element, so it is being ignored in the browser's rendering. Since that element is the one that includes the brace, that is why the brace isn't being displayed.

I did some quick checking, and the vue-mathjax quick-start document suggests using the TeX-AMS_HTML configuration, which includes TeX notation, but not MathML notation, so that would account for why MathJax isn't processing this math. (It is also suggesting a very old version of MathJax, v2.7.2. The current version is 3.2.2, with v4.0 out in beta release, though you may not be able to move to v3 as the API has changed. But you should be able to use v2.7.9, which is the highest v2 version.)

If you are using MathML notation, you should try MML_CHTML instead of TeX-AMS_HTML, or TeX-AMS-MML_HTMLorMML if you are using both TeX and MathML. See if that doesn't clear it up for you.

@dpvc dpvc added Insufficient information You have not provided enough information to diagnose the problem. Cannot Reproduce labels Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cannot Reproduce Insufficient information You have not provided enough information to diagnose the problem.
Projects
None yet
Development

No branches or pull requests

2 participants