Closed Bug 27860 Opened 25 years ago Closed 25 years ago

Incorrect length/non-existence of bars over square roots (msqrt, mroot, radical)

Categories

(Core :: MathML, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: gartside, Assigned: rbs)

References

()

Details

Attachments

(5 files)

From Bug Helper: User-Agent: Mozilla/5.0 [en-US] (Linux; I) BuildID: 2000020310 The bars over square roots (used in place of brackets to group elements together) is: 1) too short (in my opinion) for the square root of a single element 2) non-existent for the square root of a <mrow> of elements. The url should make this clear. Reproducible: Always Steps to Reproduce: 1.Go to url 2. 3. Actual Results: Incorrect bar lengths over square roots Expected Results: Put in the correct lengths! (Please) Here is the complete code for the test page: <?xml version="1.0"?> <?xml-stylesheet href="mathml.css" type="text/css"?> <!DOCTYPE html SYSTEM "mathml.dtd"> <html xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns="http://www.w3.org/TR/REC-html40"> <head> <title>Square Roots</title> </head> <body> <p> Square root of x times y. Bar does not cover enough of x. </p> <math xmlns="http://www.w3.org/1998/Math/MathML"> <msqrt><mi>x</mi></msqrt><mo>.</mo><mi>y</mi> </math> <p> Square root of (x times y). No bar at all (should cover both x and y). </p> <math xmlns="http://www.w3.org/1998/Math/MathML"> <msqrt> <mrow><mi>x</mi><mo>.</mo><mi>y</mi></mrow> </msqrt> </math> </body> </html>
Accepting bug - work to be done with the enabling of Part II of TeX rendering rules.
Status: NEW → ASSIGNED
Part II of TeX rendering rules has landed. Testing on Win32 showed that the sqrt is handled OK. After installing the TeX's CMSY10 and CMEX10 fonts on your Linux box, do you still observe the problem reported in this bug? Note: it is not clear to me that there should be a fall-back to draw the branches of the sqrt explicitly in case the TeX fonts are not there. In general, I am not convinced that there should be fall-back(s) when some (freely-downloadable) fonts are missing in MathML. Otherwise, it will add much work and complexity to the code.
Unfortunately, your patch is not quite right for linux. Attachment follows. The over bar covers what it should, but is very thick. I think you are right about fonts.
This rendering suggests that TeX fonts are not selected. (There are some assumptions about the metrics of the sqrt char I get a similar thick line if the Symbol font is used when the TeX is expected). Have you updated mathml.css?
I think the stretchy.xml and screenshot show what is happening. 1) square roots dont seem to be considered stretchy (no green background). 2) the `secret' pua codes are not rendered (only a `?') 3) DoubleUpArrow, DoubleRightArrow and left arrow (&#x2192;) are recognised as stretchy (green background). Left arrow is correctly stretched. But DoubleUpArrow and DoubleRightArrow are not stretched.
What about LongDoubleRightArrow ?
Below are the lines I added to test DoubleLongRightArrow. And the previous attachment shows the result. In summary: DoubleLRA is recognised as stretchy (green background) but is not displayed ('?'). And is not stretched. <p> Now for the last possible combination!!</p> <p> DoubleLongRight arrow. Not recognised: `?'. Green background. No stretching.</p> <math xmlns="http://www.w3.org/1998/Math/MathML"> <mover> <mo>&DoubleLongRightArrow;</mo> <mtext>Because</mtext> </mover> </math>
All these symptoms are suggesting that TeX's fonts are not picked in your Linux box. The '?' represent the glyphs that would have come from TeX fonts. And consquently, if TeX's fonts are not picked, stretching of the glyphs whose parts are TeX's fonts do not work.
The fact that it is a font-selection problem is reinforced by the observation that the code (on screenshot id7271) that is successfully stretching the RightArrow (picked from the correctly installed Symbol font) is the same code that would be used to stretch the other chars --if they were picked in the TeX fonts. I guess there will be similar problems with the Mathematica fonts. I have assigned PUA codes to UnderCurlyBracket, OverCurlyBracket, UnderSquareBracket, OverSquareBracket, UnderParenthesis, OverParenthesis, so that Linux will also have the Mathematica glyphs that are in MT Extra. The correct stretching of the RightArrow means that the Symbol is setup correctly. How is the Symbol font setup? Perhaps there is something to be done in .Xdefaults to enable the other fonts in the browser?
BTW, I left a piece of debug code in nsMathMLChar.cpp to tell when an expected font is missing. http://lxr.mozilla.org/seamonkey/source/layout/mathml/base/src/nsMathMLChar.cpp 372 else { // the font is not installed 373 #ifdef NS_DEBUG 374 char str[50]; 375 localName.ToCString(str, sizeof(str)); 376 printf("WARNING *** Missing the %s font to stretch MathML symbols!\n", str); 377 printf(" Why don't you install the %s font on your system for a better MathML experience!\n", str); 378 #endif 379 } Temporarily commenting lines 373 & 378 in your optimized could confirm/deny whether or not Mozilla is detecting the fonts.
Roger, I commented out the debug ifdef - and your belief is confirmed. mozilla doesnt see my tex fonts. Ideas? Anything I can do to help? ****Gfx Scrollbar Special case hit!!***** in SetSecurityButton nsXMLContentSink::AddDocTypeDecl WARNING *** Missing the CMSY10 font to stretch MathML symbols! Why don't you install the CMSY10 font on your system for a better MathML experience! WARNING *** Missing the CMEX10 font to stretch MathML symbols! Why don't you install the CMEX10 font on your system for a better MathML experience! WARNING *** Missing the MT Extra font to stretch MathML symbols! Why don't you install the MT Extra font on your system for a better MathML experience! failed to set the page title. Document file:///home/paul/mozml/tests/stretchybug.xml loaded successfully Document: Done (0.876 secs)
I am feeling very pleased!! I've fixed my problem with getting mozilla to `see' my tex fonts. And it isnt a mozilla problem. It is a question of persuading X-windows to see the tex fonts. I've done this. (Perhaps only temporarily.) When I work out what I did, I'll write it up. It would still be interesting to know whether this is a problem for all linux users, or just my set up. ...Now I am sad I `optimised' DynHieruni.xml to work with the fonts (Symbol) I had. Stretchy union and intersection symbols, \preceq and quite a bit else are *so* nice now!
Marking the bug as fixed since the reporter is now satisfied with the solution to the original problem of the bug. The font problem that has now surfaced on Linux is to be covered by bug 35236 which shows that other people are experiencing the same problem.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Rubber-stamping verified based on last two comments.
Status: RESOLVED → VERIFIED
*** Bug 100550 has been marked as a duplicate of this bug. ***
*** Bug 107749 has been marked as a duplicate of this bug. ***
*** Bug 119855 has been marked as a duplicate of this bug. ***
Summary: Incorrect length/non-existence of bars over square roots → Incorrect length/non-existence of bars over square roots (msqrt, mroot, radical)
*** Bug 156291 has been marked as a duplicate of this bug. ***
*** Bug 165430 has been marked as a duplicate of this bug. ***
*** Bug 263937 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: