13

There is a problem on the main site with alignment in code blocks that include the dollar sign.

Without $:

Mathematica graphics

With $:

Mathematica graphics

Code is from this post. I will add examples as I find them.

13
  • Can you link to an example of the problem, or give a sample code block that illustrates it (not just a screenshot but something to test with)? Does it happen in the preview as well, or only after saving the edit?
    – Szabolcs
    Commented Jul 4, 2012 at 16:48
  • Yes, please give actual text, no screenshots. Images aren't helpful for reproducing, let alone fixing, such issues.
    – balpha StaffMod
    Commented Jul 4, 2012 at 16:52
  • @balpha sorry, I don't know what I was thinking. I've seen this happen a couple of times but I can only link to the one answer of mine at this time. I'll look for the other instances.
    – Mr.Wizard
    Commented Jul 4, 2012 at 16:54
  • That example is enough already, thanks. Reproduced.
    – balpha StaffMod
    Commented Jul 4, 2012 at 16:56
  • @balpha okay, great. For reference, is there a way I can search for symbols/strings in a code block? I tried code: but it appears to search strings escaped with backticks rather than indented code blocks.
    – Mr.Wizard
    Commented Jul 4, 2012 at 16:58
  • 1
    The reason I couldn't reproduce was that I didn't put in a closing $. It is important to have two $ signs in the example and at least one newline. Thanks for taking a look @balpha!
    – Szabolcs
    Commented Jul 4, 2012 at 16:58
  • @balpha here's another example where the effect occurs. Look at the code block after the edit.
    – rcollyer
    Commented Jul 4, 2012 at 21:28
  • @balpha Any update on this?
    – rm -rf Mod
    Commented Sep 27, 2012 at 17:45
  • 1
    This is a currently-unavoidable side-effect of mixing code blocks and MathJax together. Eventually, it should be possible to avoid it, but until then...
    – Shog9
    Commented Feb 15, 2013 at 23:06
  • Another example, in the code block for parseBegin and parseExit. Should we respect the alignment in mardown (so in the future when the bug is fixed, the post will be right automatically), or should we respect the alignment in rendered result?
    – Silvia
    Commented Jun 17, 2013 at 9:43
  • @Silvia I'll leave it to your discretion. I am hoping that "eventually" will be some time soon but it might be years for all I know.
    – Mr.Wizard
    Commented Jun 17, 2013 at 10:23
  • Years... OK I think I have to reformat it for good looking..
    – Silvia
    Commented Jun 17, 2013 at 10:30
  • @Shog9 Any news regarding a fix for this?
    – Mr.Wizard
    Commented Aug 26, 2013 at 17:04

0

You must log in to answer this question.

Browse other questions tagged .