title: capture MyScript Katex annotation encoding field for use elsewhere
body: <p>I am new to MyScript and Katex so this may be a really dumb question.  I apologise if it is.  I am playing around with an idea, call it NewApp.  I want users to be able to write formulae onto a screen, MyScript will convert it into Katex and display it back so user can confirm it is understood correctly and then send the result to the NewApp.  In order to check the user's response in the NewApp I'm thinking the best way is to send the Katex annotation encoding to NewApp which I think would need doing through some Javascript but I don't know how to pick up the Katex.  The HTML for the Katex would look something like the following, depending on the equation entered.</p>
  
  <pre><code>&lt;div id="resultField" class="style-scope myscript-math-web"&gt;
   &lt;span class="katex"&gt;
    &lt;span class="katex-mathml"&gt;
     &lt;math&gt;
      &lt;semantics&gt;
       &lt;mrow&gt;
        &lt;mfrac&gt;
         &lt;mrow&gt;
          &lt;mn&gt;2&lt;/mn&gt;
          &lt;mn&gt;1&lt;/mn&gt;
          &lt;mo&gt;−&lt;/mo&gt;
          &lt;mn&gt;3&lt;/mn&gt;
          &lt;mn&gt;5&lt;/mn&gt;
         &lt;/mrow&gt;
         &lt;mrow&gt;
          &lt;mn&gt;1&lt;/mn&gt;
          &lt;mn&gt;3&lt;/mn&gt;
         &lt;/mrow&gt;
        &lt;/mfrac&gt;
        &lt;annotation encoding="application/x-tex"&gt;\dfrac {21-35} {13}&lt;/annotation&gt;       
       &lt;/semantics&gt;
      &lt;/math&gt;
     &lt;/span&gt;
    &lt;/span&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>I do not know how to get started on the javascript for this because everything within the div is created on the hoof as the user writes but I am certain there will be a javascript approach that allows me to pick up the content of <code>&lt;annotation encoding="application/x-tex"&gt;\dfrac {21-35} {13}&lt;/annotation&gt;</code> within the javascript.</p>
  
  <p>Any help will be very appreciated.</p>