Mathml fails with semantics

35 views
Skip to first unread message

ppavan...@gmail.com

unread,
Aug 22, 2017, 9:36:13 AM8/22/17
to MathJax Users
Hi ,
MathJAX fail 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>

What could be workaround or reason for this.




Peter Krautzberger

unread,
Aug 22, 2017, 9:52:30 AM8/22/17
to mathja...@googlegroups.com
Hi,

Content MathML requires the appropriate extension to be loaded, cf. http://docs.mathjax.org/en/latest/mathml.html#content-mathml

Regards,
Peter.

--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pavan Tiwari

unread,
Aug 22, 2017, 1:37:22 PM8/22/17
to mathja...@googlegroups.com
Hi All,

I am using MathJax js with phantom JS to convert MathML in SVG. I have also tried the same expression with "content-mathml.js" but it failed. 

I have also tried with text/html encoding but facing the same issue.

You received this message because you are subscribed to a topic in the Google Groups "MathJax Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mathjax-users/gkiro1Hgn84/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mathjax-users+unsubscribe@googlegroups.com.

Davide Cervone

unread,
Aug 22, 2017, 3:37:07 PM8/22/17
to mathja...@googlegroups.com
You have not given your MathJax configuration or how you are calling MathJax, or what error messages (if any) you are getting, or any other details about your situation, so it is hard to diagnose the issue you are having.

All I can say is that

<!DOCTYPE html>
<html>
<head>
<title>Semantics with annotation-xml as first child</title>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    MathML: {extensions: ["content-mathml.js"]}
  });
</script>
<script type="text/javascript"
</head>
<body>

<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>

</body>
</html>

works correctly for me, so I suspect there is something wrong at your end.

Davide


To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.

ppavan...@gmail.com

unread,
Oct 9, 2017, 10:36:43 AM10/9/17
to MathJax Users
Hi Davide,

I am loading mathjax dynamically in phantomjs, so when should I load MathML-Content extension. I  wanted to load the extension from local file system. I have mathjax at local file system.

I have tried this option MathJax.Hub.Config({
    MathML: {extensions: ["content-mathml.js"]}
  });
but no luck.

Davide Cervone

unread,
Oct 19, 2017, 2:15:33 PM10/19/17
to mathja...@googlegroups.com
Its hard to tell without the actual code you are using.  The MathJax.Hub.Config() has to be in a <script type="text/x-mathjax-config"> that comes BEFORE the script that loads MathJax.js itself.  That's the best I can tell you with the information provided.

On the other hand, if you are doing this on a server, you might consider mathjax-node instead.


Davide


Reply all
Reply to author
Forward
0 new messages