Closed Bug 334203 Opened 16 years ago Closed 12 years ago

line underneath inline mathml isn't shifted down resulting in text overlap

Categories

(Core :: MathML, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: chris.chiasson, Assigned: rbs)

References

()

Details

Attachments

(1 file)

1.64 KB, application/xhtml+xml
Details
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2

Find the paragraph that begins:
The objective function is minimized at

After that text is a MathML equation. Back when I made this page a month ago, that MathML rendered correctly. Now, there is a problem with the line below it not being shifted down, so the text overlaps. This problem is not present on other pages on my site, like this one:

http://chris.chiasson.name/Engineering_Optimization/ch01.xhtml

Anyway, has something changed about the MathML rendering in recent FF updates? Am I just loony? :-/

Reproducible: Always

Steps to Reproduce:
1. Load http://chris.chiasson.name/Engineering_Optimization/ch04.xhtml
2. Find "The objective function is minimized at" and look at the equation after it.
3. The equation overlaps the text below.

Actual Results:  
The equation overlaps the text below it.

Expected Results:  
The equation should cause a shift in the line height of the line below it, adjusting the text so it doesn't overlap.

http://chris.chiasson.name/Engineering_Optimization/ch01.xhtml

^^ doesn't have this problem but I don't know why.
Assignee: nobody → rbs
Component: General → MathML
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → Trunk

*** This bug has been marked as a duplicate of 324857 ***
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Can't be Cairo, since both the reporter and I see it with Firefox 1.5.0.2 (this is probably where I get yelled at for choosing Trunk while moving out of Firefox, but then, either choice gets me yelled at).
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Ah, good, trunk: it works in a 20051231 trunk build, and fails in a 20060128 build.
(In reply to comment #2)
> Can't be Cairo, since both the reporter and I see it with Firefox 1.5.0.2 

I can't see it with 1.5.0.2
I'd blame fonts, but I see the same thing on a Mac where I just installed the Mathematica 4.1 fonts and on Windows where I've had a full load of working math fonts for years.
In reply to comment #4, make sure you loaded the correct page - I gave an example of a page where the bug did not appear and an example of a page where the bug did appear.
Phil, are you using Mathematica or another program that generates <semantics> elements? I just noticed a formatting problem, where a table border was overlapping MathML, that went away when I used some XSLT to remove the <semantics> elements.
QA Contact: ian → mathml
The link is currently broken. Can someone gives a testcase that demonstrates the bug?
I think the correct URL is now http://test.chris.chiasson.name/Engineering_Optimization/Linear_Programming_HW3.xhtml. However, I may have changed the page in the intervening time, as the text I pointed out doesn't appear verbatim. The part of the page I think I was referring to now occurrs in the paragraph following 
Table 4.5. P 4-4 Canonical Form of Initial Tableau. It has a vector solution to an optimization problem in the middle of the paragraph, so Firefox has to adjust the line heights. I think I may have worked around the problem back then by removing the semantics tag, since I don't see it anymore. BTW, perhaps the status of this bug should have been "confirmed" based on others comments above.
Thanks.

I'm not able to reproduce this bug. According to comment 2, this bug happens before the switch to Cairo, so it may have been fixed. How did you generate the <semantics/> tag?
Attached file Testcase
If you have Mathematica, you can create markup similar to what I originally had using the following command:

ExportString[{{Subscript[X, 1]}, {Subscript[X, 2]}} == {{2/3}, {2/3}},
   "MathML", {"Semantics" -> True, 
   "NamespacePrefixes" -> {"http://www.w3.org/1998/Math/MathML" -> 
      "ns303"}, "ElementFormatting" -> None}] /. 
 x_String :> StringReplace[x, "&#63449;" -> ""]

It produces the following output, which still doesn't break the current Firefox.

<ns303:math xmlns:ns303='http://www.w3.org/1998/Math/MathML' \
xmlns='http://www.w3.org/1998/Math/MathML'><ns303:semantics><ns303:\
mrow><ns303:mrow><ns303:mo>(</ns303:mo><ns303:mtable rowspacing='1ex' \
columnspacing='1em' rowalign='baseline' \
columnalign='center'><ns303:mtr><ns303:mtd><ns303:msub><ns303:mi>X</\
ns303:mi><ns303:mn>1</ns303:mn></ns303:msub></ns303:mtd></ns303:mtr><\
ns303:mtr><ns303:mtd><ns303:msub><ns303:mi>X</ns303:mi><ns303:mn>2</\
ns303:mn></ns303:msub></ns303:mtd></ns303:mtr></ns303:mtable><ns303:\
mo>)</ns303:mo></ns303:mrow><ns303:mo></ns303:mo><ns303:mrow><ns303:\
mo>(</ns303:mo><ns303:mtable rowspacing='1ex' columnspacing='1em' \
rowalign='baseline' \
columnalign='center'><ns303:mtr><ns303:mtd><ns303:mfrac><ns303:mn>2</\
ns303:mn><ns303:mn>3</ns303:mn></ns303:mfrac></ns303:mtd></ns303:mtr><\
ns303:mtr><ns303:mtd><ns303:mfrac><ns303:mn>2</ns303:mn><ns303:mn>3</\
ns303:mn></ns303:mfrac></ns303:mtd></ns303:mtr></ns303:mtable><ns303:\
mo>)</ns303:mo></ns303:mrow></ns303:mrow><ns303:annotation-xml \
encoding='MathML-Content'><ns303:apply><ns303:eq \
/><ns303:list><ns303:list><ns303:apply><ns303:ci>Subscript</ns303:ci><\
ns303:ci>X</ns303:ci><ns303:cn \
type='integer'>1</ns303:cn></ns303:apply></ns303:list><ns303:list><\
ns303:apply><ns303:ci>Subscript</ns303:ci><ns303:ci>X</ns303:ci><\
ns303:cn type='integer'>2</ns303:cn></ns303:apply></ns303:list></\
ns303:list><ns303:list><ns303:list><ns303:cn \
type='rational'>2<ns303:sep \
/>3</ns303:cn></ns303:list><ns303:list><ns303:cn \
type='rational'>2<ns303:sep \
/>3</ns303:cn></ns303:list></ns303:list></ns303:apply></ns303:\
annotation-xml></ns303:semantics></ns303:math>

Maybe I am misremembering the example, but it just appears like Firefox is handling this correctly now.
BTW, that stringreplace rule is supposed to say "&#63449;" -> "=". It is replacing a character that most computers won't be able to display with a regular equal sign.
Thanks for these informations. I haven't got Mathematica. I copy your code inside an XHTML paragraph, but I still can't see the bug. I guess the bug has been fixed since your initial report.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.