Test it. Comment here with a formula. Reload the site. Edit. Note you'd have to retype the formulae.
2 Answers
Reproduced. The problem is again because TeXification is too aggressive.
The raw code of the comment you're going to edit is stored in a hidden <div>
:
<form class="dno" id="edit-comment-1029" style="display: none;">
<div class="dno">
Testing $\LaTeX$ **and** `formatting`.
</div>
</form>
the text content of this <div>
is retrieved and put in the comment editing text box when you click "edit".
However, a <div class="dno">
is not one of the exclusion in TeXification, so the script will turn the $\LaTeX$
into an image in this hidden <div>
:
<form class="dno" id="edit-comment-1029" style="display: none;">
<div class="dno">
Testing
<img src="http://chart.apis.google.com/..." alt="$\LaTeX$">
**and** `formatting`.
</div>
</form>
Because an image is not text, when retrieving the text content the formula will be gone.
You can try to adblock http://sstatic.net/js/third-party/math-tex.js (thus disable TeXifying) and see that the problem is “fixed”.
Edit: Problem still exists in MathJax, but instead of just the image, it becomes this mess:
<div class="dno">
Testing
<span class="MathJax_Preview" style="display: none;"></span><span class="MathJax" role="textbox" aria-readonly="true" style=""><nobr style=""><span class="math" id="MathJax-Span-26"><span style="display: inline-block; position: relative; width: 2.603em; height: 0pt; font-size: 128%;"><span style="position: absolute; top: -2.757em; left: 0em; clip: rect(1.845em, 1000em, 3.169em, -0.554em);"><span class="mrow" id="MathJax-Span-27"><span class="mi" id="MathJax-Span-28" style="font-family: MathJax_Math; font-style: italic;">L</span><span class="mspace" id="MathJax-Span-29" style="height: 0em; vertical-align: 0em; margin-left: -0.325em;"></span><span class="mpadded" id="MathJax-Span-30"><span style="display: inline-block; position: relative; width: 0.521em; height: 0pt;"><span style="position: absolute; top: -2.967em; left: 0em; clip: rect(2.055em, 1000em, 2.952em, -0.561em);"><span class="mrow" id="MathJax-Span-31"><span class="texatom" id="MathJax-Span-32"><span class="mrow" id="MathJax-Span-33"><span class="mrow" id="MathJax-Span-34"><span class="texatom" id="MathJax-Span-35"><span class="mrow" id="MathJax-Span-36"><span class="mi" id="MathJax-Span-37" style="font-size: 70.7%; font-family: MathJax_Math; font-style: italic;">A</span></span></span></span></span></span></span><span style="display: inline-block; width: 0pt; height: 2.757em;"></span></span></span></span><span class="mspace" id="MathJax-Span-38" style="height: 0em; vertical-align: 0em; margin-left: -0.17em;"></span><span class="mi" id="MathJax-Span-39" style="font-family: MathJax_Math; font-style: italic;">T</span><span class="mspace" id="MathJax-Span-40" style="height: 0em; vertical-align: 0em; margin-left: -0.14em;"></span><span class="mpadded" id="MathJax-Span-41"><span style="display: inline-block; position: relative; width: 0.716em; height: 0pt;"><span style="position: absolute; top: -2.542em; left: 0em; clip: rect(1.882em, 1000em, 2.953em, -0.556em);"><span class="mrow" id="MathJax-Span-42"><span class="texatom" id="MathJax-Span-43"><span class="mrow" id="MathJax-Span-44"><span class="mi" id="MathJax-Span-45" style="font-family: MathJax_Math; font-style: italic;">E</span></span></span></span><span style="display: inline-block; width: 0pt; height: 2.757em;"></span></span></span></span><span class="mspace" id="MathJax-Span-46" style="height: 0em; vertical-align: 0em; margin-left: -0.115em;"></span><span class="mi" id="MathJax-Span-47" style="font-family: MathJax_Math; font-style: italic;">X</span></span><span style="display: inline-block; width: 0pt; height: 2.757em;"></span></span></span><span style="border-left: 0em solid; display: inline-block; overflow: hidden; width: 0pt; height: 1.152em; vertical-align: -0.276em;"></span></span></nobr></span>
<script type="math/tex" id="MathJax-Element-2">\LaTeX</script>
**and** `formatting`.
</div>
This leads to Testing LATEX\LaTeX **and** ‘formatting‘
in the text box. The first LATEX
is the TeXified result, and second \LaTeX
is from the <script type="math/tex">
.
While this does not happen for me with editing a question, it does happen for me when editing a comment.
-
1$\begingroup$ Isaac, as moderator, can you remove the status-completed tag from this question? $\endgroup$ Commented Aug 4, 2010 at 17:26
-
$\begingroup$ @ShreevastsaR: I've instead asked a new question for reasons described within to increase the chances one of the StackExchange team will notice it. $\endgroup$ Commented Aug 4, 2010 at 18:46
[status-completed]
. Now when I edit “Testing $\LaTeX$” I gotTesting LATEX\LaTeX
in the textbox. $\endgroup$($x^2 + x - 3x$)
is displayed asx2+x−3xx^2 + x - 3x
, i.e. instead of the source surrounded by $'s we get the displayed text with lost formatting plus the source (@KennyTM, too) $\endgroup$status-completed
(probably based on the title, which does seem to be a resolved issue), I posted the real issue in this question. $\endgroup$