Adding annotation to HTML/CSS output?

11 views
Skip to first unread message

David Lippman

unread,
Apr 6, 2015, 8:18:52 PM4/6/15
to mathja...@googlegroups.com
Is there a configuration option that will add a source format annotation into the main <span class="MathJax"> element created by the HTML/CSS output jax?  Something so it will look like <span class="MathJax" data-asciimath="x^2-4"> or whatever?

I am trying to write a paste handler for tinymce that can handle a copy-pasted equation generated by MathJax and convert it back into the source AsciiMath.  The problem is that currently the annotation only seems to be recorded in a <script> element, and that isn't included in the copied HTML, so there's no way to extract the original asciimath or tex.

Peter Krautzberger

unread,
Apr 7, 2015, 3:54:55 AM4/7/15
to mathja...@googlegroups.com
Hi David,

There is no configuration option of this sort but we're planning on embedding MathML via data attributes so adding other formats would fit naturally (there's already the vague https://github.com/mathjax/MathJax/issues/1105 which suggests the same approach).

Best
Peter.



On Tue, Apr 7, 2015 at 2:18 AM, David Lippman <drli...@gmail.com> wrote:
Is there a configuration option that will add a source format annotation into the main <span class="MathJax"> element created by the HTML/CSS output jax?  Something so it will look like <span class="MathJax" data-asciimath="x^2-4"> or whatever?

I am trying to write a paste handler for tinymce that can handle a copy-pasted equation generated by MathJax and convert it back into the source AsciiMath.  The problem is that currently the annotation only seems to be recorded in a <script> element, and that isn't included in the copied HTML, so there's no way to extract the original asciimath or tex.

--
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-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages