MicroTeX
MicroTeX copied to clipboard
Peculiar linebreaking in long equations
We seem to get some peculiar linebreaking effects in long equations. Say we run it with
x = y + a + a + a + a + a + a + a + a + a + a + a + a + a + a + a + a + a + a + a + a + a + a + a + a + a + a + a
(enough to fill the drawing width on my screen), then the line never breaks, and we render out of bounds in the sample Cairo program.
(The canvas renders dark, I think because the line goes out of bounds.)
But if we add a + 3
somewhere in the middle, it breaks the line before the 3
:
x = y + a + a + a + a + a + a + a + a + a + a + a + a + a + a + a + a + 3 + a + a + a + a + a + a + a + a + a + a + a
With \breakEverywhere{true}
it seems to break at the correct point:
\breakEverywhere{true} x = y + a + a + a + a + a + a + a + a + a + a + a + a + a + b + a + a + a + b + b + b
But \breakEverywhere{true}
will probably cause some other issues, so it'd be good to figure out why the first equation isn't being split as one would expect.
I haven't had a chance to dig into the code to figure out what's special about the 3
, or why it doesn't break the original equation without breakEverywhere, but I figured I'd file this issue here for later.
I guess this bug is related to the item type. The character a
and 3
are different types, I'll check it soon.