9

I am currently developing a web app where users should be able to type math formulas using MathJax and LaTeX commands. I have encountered an issue when typing very long commands within a single pair of delimiters to break the design of my application. So I decided to look up how does math.exchange behave in such scenario. I posted an answer to a random question (which I deleted instantly, of course) containing the \frac{a}{b} command within $$ multiple times and the result I got: enter image description here

I can scroll horizontally till the end of the equation: enter image description here

7
  • Can you please reproduce it in the sandbox, so that we can see it live? May 31, 2015 at 13:34
  • link here it is, but I can see that others have done similar things already... May 31, 2015 at 13:39
  • Thanks, reproduced! :) May 31, 2015 at 13:42
  • 1
    I don't think this is a bug report for SE. All they do is load MathJax script. The script is free to rewrite the whole page in any way, breaking everything in its path. Of course, it tries not to do that... for example, by linebreaking long in-line formulas such as yours. But the line breaks are allowed only in certain places, such as binary relation symbols (I expanded your example to illustrate this). If you give MathJax an insanely long input with no such structure, you get an insane output.
    – user259867
    May 31, 2015 at 20:53
  • @HomegrownTomato Yes, of course, but shouldn't this be treated somehow? Isn't that a type of an invalid user input? Jun 2, 2015 at 6:30
  • Please let me know if you've found a workaround for this problem :) Jun 2, 2015 at 6:30
  • Retagging, as this isn't a bug Stack Exchange can fix...
    – Oded
    Jun 9, 2015 at 15:17

1 Answer 1

5

This seems to be due to a bug in MathJax's line-breaking algorithm.

I've filed a bug upstream at https://github.com/mathjax/MathJax/issues/1198.

2
  • Will accept answer if something comes up. Jun 3, 2015 at 9:01
  • 2
    It is definitely a bug. The question is only if we can fix it easily. FYI I'm on the MathJax team. Jun 3, 2015 at 9:13

You must log in to answer this question.

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