After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 599508 - Misrendering of itex equations including newline characters
Misrendering of itex equations including newline characters
Status: RESOLVED FIXED
Product: lasem
Classification: Other
Component: Mathml
git master
Other Linux
: Normal normal
: ---
Assigned To: Emmanuel Pacaud
Depends on:
Blocks:
 
 
Reported: 2009-10-24 20:19 UTC by Jorn Baayen
Modified: 2009-11-04 20:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
SVG illustrating the problem (43.00 KB, image/svg+xml)
2009-10-24 20:19 UTC, Jorn Baayen
  Details
Crude patch to lasemrender illustrating the problem (947 bytes, patch)
2009-10-31 21:34 UTC, Jorn Baayen
none Details | Review

Description Jorn Baayen 2009-10-24 20:19:41 UTC
Created attachment 146183 [details]
SVG illustrating the problem

For example:

$$
f(x|\lambda) =
\begin{cases}
\lambda e^{-\lambda x} & x \geq 0, \\
0 & \text{otherwise}
\end{cases}
$$

(from http://xbeta.org/wiki/show/itex+environments)
Comment 1 Emmanuel Pacaud 2009-10-26 16:14:50 UTC
I can't replicate this bug. The sample renders fine using lasemtest or lasemrender (except for a minor error on the vertical bar which is rendered slightly slanted).

How did you obtain the attached output ?
Comment 2 Jorn Baayen 2009-10-27 15:28:57 UTC
The problem turned out to be newline characters in the string passed to mathml_document_new_from_itex. If they are stripped out, all works fine.
Comment 3 Emmanuel Pacaud 2009-10-28 12:47:24 UTC
Jorn, if you could attach a file that exhibits this behaviour using lasemrender, it would be great.

I'd like to try to make lasem strip this newline characters.
Comment 4 Jorn Baayen 2009-10-31 21:34:28 UTC
Created attachment 146659 [details] [review]
Crude patch to lasemrender illustrating the problem

As it turns out carriage returns are to blame. I'm not sure why Python adds these to multiline literals ..
Comment 5 Emmanuel Pacaud 2009-11-04 20:42:50 UTC
Thanks Jorn.

I've pushed a fix that strips \r characters from the itex strings. Given my knowledge of flex/bison, I may have broken something else. But at least the itex files in the lasem test suite are rendered correctly.