3

How do I convert Content MathML (example below), in to an infix or math notation string. For example converting this:

      <math xmlns="http://www.w3.org/1998/Math/MathML">
        <apply>
          <times/>
          <ci> compartment </ci>
          <ci> k1 </ci>
          <ci> S1 </ci>
          <ci> S2 </ci>
        </apply>
      </math>

into: compartment*k1*S1*S2

I have looked at MathJax, but they do not appear to support Content MathML nor conversion to infix strings.

1 Answer 1

0

There are several XSLT files around the web which turn content MathML into presentation MathML. One “official” example is this file written by David Carlisle. Perhaps you can take that as the basis and adjust it to generate plain text instead of cMathML. You would need to call XSLT from JavaScript.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.