Not signed in (Sign In)

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthordanlec
    • CommentTimeNov 24th 2009 edited
     

    Okay, after everyone got frustrated with the scriptlet, I've tried out some other ways of integrating live preview.

    Can folks (especially those who have "slow" computers that were bogged down with the scriptlet stuff) check

    http://math-preview.stackexchange.com/

    or more specifically

    http://math-preview.stackexchange.com/questions/ask

    If that's working out for people, then I won't feel bad about offering the code to mathoverflow.net.

    (Note that if you have a slow connection, the page will probably be slow to load at first, as your browser's cache gets filled. Also, if you have a slow internet connection, it is totally worth downloading the jsMath fonts; your browser won't have to download as much stuff to get the math to display)

  1.  

    The speed is OK, but I am getting a lot of other odd problems. I don't know if these are reproducible but:

    (1) When I entered my answer and was first brought back to the main page for this question, jsmath didn't run, so I just saw the underlying LaTeX code. Reloading didn't help, but going to another page and coming back fixed it.

    (2) When previewing this question, jsmath didn't seem to recognize double dollarsigns. That is to say, when I had entered

    <latex>\pi^2/6=\sum_{n=1}^{\infty} 1/n^2</latex>

    the preview was a textstyle sum, enclosed in a single pair of dollarsigns.

    When I went on to enter

    <latex>\pi^2/6=\sum_{n=1}^{\infty} 1/n^2</latex>

    and

    <latex>\pi^4/90=\sum_{n=1}^{\infty} 1/n^4</latex>

    the preview showed "and" in italics, with no line breaks. Presumably, jsmath had paired the fourth and fifth dollarsigns with each other.

    • CommentAuthordanlec
    • CommentTimeNov 25th 2009 edited
     

    @David: Thanks for taking a look; there are certainly several general formatting issues ... but I didn't want to bother chasing them all down if the speed was still an issue. I'll see what I can do to start addressing these other things (because fast and broken isn't any good either!)

    For one thing it doesn't recognize the <latex>math</latex> format, just the $math$ format, but that's an easy fix!

  2.  
    Thanks! Just to clarify, the examples I was giving were with double dollarsigns. Apparently, this forum's preview is also bewildering, even when I say to format comments as text. I've tried an failed numerous times to fix this, so I'll just say that
    every occurence of <latex> and </latex> above were originally double dollar signs.
  3.  

    The preview for this answer looks wrong in two ways:

    1. in the indented code, dollar signs are converted to <math> and </math>, but left alone in the final output
    2. within <pre> tags, stuff between dollar signs is processed, but not in the final output

    The existing auto-preview on MO doesn't share these errors. Are you processing the math before Markdown processing? If yes, it would be better to do it after, because that's the way it actually happens (the server does Markdown conversion before jsMath gets to do anything).

    I've tweaked the italics/bold function in wmd.js so that it matches the server side implementation almost exactly, so people should now be getting a fairly accurate preview of which math will work properly (e.g. \sum_n a_n is fine) and which math they need to do something about (e.g. f'n=g{n-1} won't work correctly, so you should add some backquotes).

  4.  

    See my comments over here. In the preview, before jsmath runs, something is turning "&" into "&amp;". This does not happen when the answer is displayed on the answer page.

    I would say that this is a bug in Anton's wmd clone except that this problem doesn't happen on math.MO. So I am puzzled.

    (Sorry about using capitalization to escape special characters, but I don't have time to fight with markdown on this forum right now.) Edit: I (Anton) edited this post to fix this.

    • CommentAuthordanlec
    • CommentTimeNov 25th 2009 edited
     
    I wasn't clear on the function of $$math$$, but it should be working now
    • CommentAuthordanlec
    • CommentTimeDec 3rd 2009
     
    I stuck some more stuff on http://math-preview.stackexchange.com, including an example of live comment previewing (although I suspect that it may be slow on some people's machines). Again, if it's useful then I offer the code to MO.

    (I know no-one has any rep on that server, but you can always make a comment against your own question)
  5.  

    The speed seems fine to me. But I think you are not quite handling mboxes correctly. See this question.

    • CommentAuthordanlec
    • CommentTimeDec 4th 2009
     
    @David: It seems like the input mixes $ and ` in a way that doesn't *preview* correctly on MO (i.e. I get the same missing braces complaints)... I'm afraid to actually try to post it because I don't want to spam the site...

    `$\sum_{\mbox{$`p$ is prime}} 1/p$
  6.  
    You're right. I thought I tested this on math.MO, but I was wrong. math-preview and math.MO both handle this correctly in displaymath mode and wrongly for inline math. See this "answer": http://mathoverflow.net/questions/16/how-do-i-typeset-mathematics-on-mathoverflow-net/4370#4370