4
$\begingroup$

Test it. Comment here with a formula. Reload the site. Edit. Note you'd have to retype the formulae.

$\endgroup$
  • $\begingroup$ I think this is fixed with the new MathJax script. Is it fixed for you? $\endgroup$ – Isaac Aug 3 '10 at 2:29
  • 1
    $\begingroup$ @Isaac, @Jeff: No it's not yet [status-completed]. Now when I edit “Testing $\LaTeX$” I got Testing LATEX\LaTeX in the textbox. $\endgroup$ – kennytm Aug 3 '10 at 8:13
  • 3
    $\begingroup$ $x^2 + x - 3x$ ($x^2 + x - 3x$) is displayed as x2+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$ – Tobias Kienzler Aug 4 '10 at 11:27
  • $\begingroup$ Since this question got marked status-completed (probably based on the title, which does seem to be a resolved issue), I posted the real issue in this question. $\endgroup$ – Larry Wang Aug 4 '10 at 18:47
  • $\begingroup$ Works fine for me. $\endgroup$ – Robert Smith Oct 26 '10 at 19:36
  • $\begingroup$ @Robert Smith: that's why the tag [status-completed] has been added, this bug has been fixed $\endgroup$ – Tobias Kienzler Oct 29 '10 at 10:30
  • $\begingroup$ Yes, sorry. I was directed to this post from another bug, so I was testing and I didn't want the leave a misleading comment. $\endgroup$ – Robert Smith Oct 29 '10 at 15:43
  • $\begingroup$ @Robert Smith: no problem. although "testing" isn't really misleading :p $\endgroup$ – Tobias Kienzler Nov 1 '10 at 8:53
4
$\begingroup$

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">.

$\endgroup$
1
$\begingroup$

While this does not happen for me with editing a question, it does happen for me when editing a comment.

$\endgroup$
  • 1
    $\begingroup$ Isaac, as moderator, can you remove the status-completed tag from this question? $\endgroup$ – ShreevatsaR Aug 4 '10 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$ – Larry Wang Aug 4 '10 at 18:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .