-1

MathJax fails to convert below mathml into SVG

<math>
  <semantics>
    <!-- Content MathML -->
    <annotation-xml encoding="MathML-Content">
    <apply><min/>
        <bvar><ci>x</ci></bvar>
        <condition>
        <apply><notin/><ci>x</ci><ci type="set">B</ci></apply>
        </condition>
        <apply><power/><ci>x</ci><cn>2</cn></apply>
    </apply>
    </annotation-xml >
  </semantics>
</math>

Does it failing because of incorrect encoding encoding="MathML-Content"? What could be the reason behind the failure of MathJax.

Pavan Tiwari
  • 3,077
  • 3
  • 31
  • 71
  • You might want to add a note when you post to multiple forums. – Peter Krautzberger Aug 22 '17 at 16:26
  • I've down voted because your question does not provide enough information to give you an answer other than "it works for me". You don't even say what "fails to covert" means. Do you get a MathJax "Math Processing Error"? Do you get a console error from MathJax? Does any other math on the page process? Are you using MathJax in a browser or mathjax-node? What is the configuration you have used? – Davide Cervone Aug 23 '17 at 22:02

1 Answers1

1

As I mentioned in my response to your post in the MathJax forum, MathJax renders your expression perfectly fine. I've included a snippet below that shows it rendering this expression into SVG.

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    MathML: {extensions: ["content-mathml.js"]}
  });
</script>
<script type="text/javascript"
   src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=MML_SVG"></script>
   
<math>
  <semantics>
    <!-- Content MathML -->
    <annotation-xml encoding="MathML-Content">
      <apply><min/>
        <bvar><ci>x</ci></bvar>
        <condition>
          <apply><notin/><ci>x</ci><ci type="set">B</ci></apply>
        </condition>
        <apply><power/><ci>x</ci><cn>2</cn></apply>
      </apply>
    </annotation-xml>
  </semantics>
</math>

You have done something wrong on your end, but have not given us enough information to help you figure out what. Cross posting here after your question was already answered in the MathJax forum is not likely to get you a better answer.

Davide Cervone
  • 11,211
  • 1
  • 28
  • 48