Last Comment Bug 209693 - (linebreaksAroundMath) Bad line breaks before and after MathML insertions
(linebreaksAroundMath)
: Bad line breaks before and after MathML insertions
Status: NEW
[see comment 13]
:
Product: Core
Classification: Components
Component: MathML (show other bugs)
: Trunk
: All All
: P5 normal with 3 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Anthony Jones (:kentuckyfriedtakahe, :k17e)
Mentors:
http://www.w3.org/TR/MathML3/chapter2...
: 422619 (view as bug list)
Depends on:
Blocks: line-breaking mathml-3 mathml-in-mathjax
  Show dependency treegraph
 
Reported: 2003-06-17 13:41 PDT by Torsten Bronger
Modified: 2012-12-01 13:41 PST (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Testcase ... (613 bytes, application/xhtml+xml)
2004-06-27 11:14 PDT, Wolfgang Uhr
no flags Details
Test vertical alignement with stretchy ops (1.75 KB, application/xhtml+xml)
2009-10-16 14:14 PDT, Frédéric Wang (:fredw)
no flags Details
Updated Testcase (613 bytes, application/xhtml+xml)
2009-10-16 14:17 PDT, Frédéric Wang (:fredw)
no flags Details
Screenshot of the testcase (14.55 KB, image/png)
2009-10-16 14:18 PDT, Frédéric Wang (:fredw)
no flags Details
Updated testcase (594 bytes, application/xhtml+xml)
2009-10-20 12:22 PDT, Frédéric Wang (:fredw)
no flags Details
Testcase, with <math/> replaced by a <span/> (564 bytes, application/xhtml+xml)
2009-10-20 12:25 PDT, Frédéric Wang (:fredw)
no flags Details
Testcase (671 bytes, application/xhtml+xml)
2010-02-02 13:51 PST, Frédéric Wang (:fredw)
no flags Details
Expected result (Amaya) (17.19 KB, image/png)
2010-02-02 13:51 PST, Frédéric Wang (:fredw)
no flags Details

Description Torsten Bronger 2003-06-17 13:41:02 PDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826

Theoretically, a <mml:math><mml:mi>x</mml:mi></mml:math>-Achse can be broken
into two lines: the "x", and the "-Achse"

Reproducible: Always

Steps to Reproduce:



Expected Results:  
The whole expression must be kept together.  If non-whitespace is directly
attached to the inline formula, the must not be any break between the
non-whitespace and the formula.

May be related to bug 172819.
Comment 1 Wolfgang Uhr 2004-06-27 11:14:05 PDT
Created attachment 151823 [details]
Testcase ...

This is a testcase which demonstrates, that this error has been solved. ...
Comment 2 Gervase Markham [:gerv] 2005-09-27 02:06:15 PDT
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
Comment 3 Torsten Bronger 2005-09-27 04:14:53 PDT
It's reproducible with Firefox 1.0.7, it's still a bug, it still should be
fixed, and this is a stange method for finding bugs that are worth being fixed
(whatever this means).
Comment 4 Frédéric Wang (:fredw) 2009-10-16 14:14:39 PDT
Created attachment 406778 [details]
Test vertical alignement with stretchy ops

In the case symmetric="false", I suppose the vertical bar should have its center aligned with the centers of red mspace's, but here the bottoms are aligned.
Comment 5 Frédéric Wang (:fredw) 2009-10-16 14:17:37 PDT
Created attachment 406781 [details]
Updated Testcase
Comment 6 Frédéric Wang (:fredw) 2009-10-16 14:18:36 PDT
Created attachment 406782 [details]
Screenshot of the testcase
Comment 7 Frédéric Wang (:fredw) 2009-10-16 14:19:50 PDT
(Please ignore comment 4)

I attached an updated testcase and a screenshot that shows that the bug still happens. But is it really a bug? I've not checked what the spec says.
Comment 8 Bruce Miller 2009-10-20 12:02:42 PDT
This still happens in firefox 3.5.3 (fedora 11, x86_64).

Is it a bug? Yes; the intent is that <math display="inline"> should
act like any inline element; <math display="block"> like a block element.
The MathML 2 specification perhaps wasn't as explicit about this
as it could have been, but we are hoping the MathML 3 spec
(currently in last call) will be clearer.
Comment 9 Frédéric Wang (:fredw) 2009-10-20 12:22:30 PDT
Created attachment 407349 [details]
Updated testcase

Sorry, I previously attached the wrong file.
Comment 10 Frédéric Wang (:fredw) 2009-10-20 12:25:07 PDT
Created attachment 407350 [details]
Testcase, with <math/> replaced by a <span/>
Comment 11 Frédéric Wang (:fredw) 2010-02-02 13:51:12 PST
Created attachment 424860 [details]
Testcase
Comment 12 Frédéric Wang (:fredw) 2010-02-02 13:51:42 PST
Created attachment 424861 [details]
Expected result (Amaya)
Comment 13 Frédéric Wang (:fredw) 2010-02-02 13:54:19 PST
MathML3:

"Moreover, when the math element is embedded in a larger document, a block math element should be treated as a block element as appropriate for the document type (typically as a new vertical block), whereas an inline math element should be treated as inline (typically exactly as if it were a sequence of words in normal text). In particular, this applies to spacing and linebreaking: for instance, there should not be spaces or line breaks inserted between inline math and any immediately following punctuation."
Comment 14 Frédéric Wang (:fredw) 2010-02-02 13:55:19 PST
*** Bug 422619 has been marked as a duplicate of this bug. ***
Comment 15 Frédéric Wang (:fredw) 2010-03-12 10:36:16 PST
BTW, another quite common situation is when the inline math is followed by a punctuation marks. For example a comma or a period can be moved at the beginning of a new line, which is really not expected.
Comment 16 Matthew Cargo 2010-03-14 12:50:16 PDT
Let me add some real cases, from the journal I work for:

http://pjm.math.berkeley.edu/pjm/2010/244-2/p04.xhtml

In Firefox that the renderer is inconsistent in deciding whether 
to break before or after a relational operator. In TeX, inline math 
breaks after. Also it allows breaks just before the argument of a 
function. Finally (a different bug), the delimiters in the displayed 
equation are sometimes ridiculously large.

In 
http://pjm.math.berkeley.edu/pjm/2009/242-2/p02.xhtml
one can see a break just _after_ a parenthesis.

I would emphasize that the desired solution to this is _not_ to 
add additional tags in the mathml such as nobreak. Mathml is supposed 
to describe the math content, not how it is laid out.  It is the 
browser's job to render it correctly. I assume this is possible in 
the cases above, because TeX is perfectly capable of choosing the 
correct breaks in (say) $(x+y)+z=x+(y+z)$ (with much less verbosity).
Comment 17 Torsten Bronger 2010-03-14 13:08:02 PDT
(In reply to comment #16)
> Let me add some real cases, from the journal I work for:
> 
> http://pjm.math.berkeley.edu/pjm/2010/244-2/p04.xhtml
> 
> In Firefox that the renderer is inconsistent in deciding whether 
> to break before or after a relational operator. In TeX, inline math 
> breaks after. Also it allows breaks just before the argument of a 
> function. Finally (a different bug), the delimiters in the displayed 
> equation are sometimes ridiculously large.
> 
> In 
> http://pjm.math.berkeley.edu/pjm/2009/242-2/p02.xhtml
> one can see a break just _after_ a parenthesis.

Okay, but this is another bug.  What you desire is better line breaks *within* the inline MathML.  This is probably even a very different place in the source code.
Comment 18 Frédéric Wang (:fredw) 2010-03-14 14:54:38 PDT
> Okay, but this is another bug.  What you desire is better line breaks *within*
> the inline MathML.  This is probably even a very different place in the source
> code.

Right, this is what Matthew reported in bug 508120 (that I've just renamed to make clear it is about line break within MathML formulas)

Note You need to log in before you can comment on or make changes to this bug.