Thank you for the detailed reply leathrum.
I'm trying save in Latex source code a content rendered in MathJax;
basically I'd like to do what "show source" does via javascript.
Here are the steps:
!) The equation is written in the html page as a Latex and is rendered
on the screen in MathJax format
<div id="equation"> $$ \hbar $$ </div>
2) If I try to get the content of by
document.getElementById("equation").innerHTML I don't get the clean
source code in Latex but I get the Mathjax scripts:
<span class="MathJax_Preview" style="display: none; "></span><div
class="MathJax_Display" style="width: 100%; position: relative; text-
align: center; " role="textbox" aria-readonly="true"><span
class="MathJax" style=""><nobr><span class="math" id="MathJax-
Span-10"><span style="display: inline-block; position: relative;
height: 0px; font-size: 121%; width: 0.573em; "><span style="position:
absolute; top: -2.527em; left: 0em; clip: rect(1.653em 1000em 2.728em
-0.526em); "><span class="mrow" id="MathJax-Span-11"><span class="mi"
id="MathJax-Span-12" style="font-family: STIXVariants; ">ℏ</span></
span><span style="display: inline-block; width: 0px; height: 2.527em;
"></span></span></span><span style="border-left-width: 0em; border-
left-style: solid; border-left-color: initial; display: inline-block;
overflow-x: hidden; overflow-y: hidden; width: 0px; height: 0.838em;
vertical-align: -0.012em; "></span></span></nobr></span></div><script
type="math/tex; mode=display" id="MathJax-Element-1"> \hbar </script>
So basically if there would be a way of 'undoing' the rendering before
trying to get the html code it would solve the problem.Is the
SourceCode method supposed to do something similar? If so is there any
simple example on how to use it?
Thanks again!
Enrico