Bug 267882 -
 Summary: Make http://www.mozilla.org/projects/mathml/demo/texvsmml.xhtml validate
 Status: RESOLVED FIXED www.mozilla.org Other General (show other bugs) other All All -- normal --- Gérard Talbot (view as bug list) validate Show dependency tree / graph

Reported: 2004-11-05 00:29 PST by Jan Egil Kristiansen
Modified: 2012-08-23 00:16 PDT (History)
9 users (show)
Locale:
QA Whiteboard:
Iteration: ---
Points: ---

Attachments
Make the torture test valid (7.09 KB, patch)
2007-11-10 05:48 PST, Frédéric Wang (:fredw)
no flags Details | Diff | Splinter Review
W3C-valid, but with the hack (7.46 KB, patch)
2007-11-10 10:14 PST, Frédéric Wang (:fredw)
no flags Details | Diff | Splinter Review
Screenshot of the hack (7.17 KB, image/png)
2008-07-15 01:04 PDT, Frédéric Wang (:fredw)
no flags Details
Hack with mo (7.23 KB, image/png)
2008-07-15 01:05 PDT, Frédéric Wang (:fredw)
no flags Details
No hack (7.64 KB, image/png)
2008-07-15 01:05 PDT, Frédéric Wang (:fredw)
no flags Details

 Jan Egil Kristiansen 2004-11-05 00:29:34 PST The page is still at its old URL at http://www.mozilla.org/projects/mathml/demo/texvsmml.xhtml. (But that page doesn't validate, is 'torture' also including invalid markup?) dolphinling 2004-11-09 18:26:50 PST *** Bug 268750 has been marked as a duplicate of this bug. *** Anne (:annevk) 2004-11-20 02:45:34 PST Since the link part has been fixed, I'm turning this into a "make valid" bug. Someone with suggestions for the ALT text? Jan Egil Kristiansen 2004-11-20 04:49:27 PST As far as validation is concerned, alt="" will do. What about alt="Formula screenshot"? Going for alt="(x+y**2)/k+1" etc., is probably too farfetched? Anne (:annevk) 2004-11-20 05:19:23 PST Maybe an empty OBJECT element should be used instead? Or an OBJECT element with as alternative content MathML or a description of the formula (so not 'F = m * a'). Jacques Distler, do you have any suggestions? distler 2004-11-20 07:38:56 PST Good Alt text? For those of us who use mathematics on the web, the best Alt text would be a (La)TeX representation of the same formula. That's what I would put as the Alt text for any GIF image representing a mathematical formula. But that page isn't called "torture test" for nothing. Here's the (AMS)LaTeX representation of #23: alt="\begin{pmatrix}\begin{pmatrix} a & b\\ c & d \end{pmatrix} & \begin{pmatrix} e & f\\ g & h \end{pmatrix} \\ 0 & \begin{pmatrix} i & j\\ k & l \end{pmatrix} \end{pmatrix}" Plain LaTeX would be even more convoluted: alt="\left(\begin{array}\left(\begin{array}\right) a & b\\ c & d \end{array}\right) & \left(\begin{array} e & f\\ g & h \end{array}\right) \\ 0 & \left(\begin{array} i & j\\ k & l \end{array}\right) \end{array}\right)" And I like plain TeX even less. Jan Egil Kristiansen 2004-11-21 03:42:40 PST For a serious MathML page, having a MathML object failback to TeX, which failbacks to a GIF object, with failback to HTML is a good idea. But this page - being a test - will be better served with alt="load this GIF to see what the formula should look like". distler 2004-11-21 08:03:41 PST We all know that
alt="&x2082;F&x2083;" />
becomes then subscripts and superscripts: U2070 to U2094: 0 to 9 and some others mathematical symbols: U2200 to U23DB E.g.: large left parenthesis upper hook, extension and lower hook: U239B, U239C, U239D miscellaneous mathematical symbols A: U27C0 to U27FF For a majority of the examples in the webpage, it's not possible to construct an alternate text's alt attribute value. I think it's not that important since the image is there to graphically render what the rendered text should be or look like... and alt attribute value is there to provide a textual equivalent, a text rendering of a non-text content (image, audio, video). - I'll include the width and height values in their correspondent attribute value then - the link href value at line 84 should rather be - at line 60 should be instead and in the part, we could (and should!) just include In that spirit, I suggest changing line 1 into - at line 42 and 43, tr { vertical-align: middle; } should be entirely removed since vertical-align only applies to table-cells and inline elements "vertical-align Applies to: inline-level and 'table-cell' elements " http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align and because the default vertical alignement of table cells [in all browsers too] is middle. "middle: Cell data is centered vertically within the cell. This is the default value." http://www.w3.org/TR/html4/struct/tables.html#adef-valign - "I don't know if the hack is still relevant" Ok, then. I will leave line 802 and line 822 in the source code as they are: ( We can later reevaluate or make corrections once we clarify that issue. Agreed?  Gérard Talbot 2008-07-13 12:33:49 PDT Argh... Doh! x&x2082;y&x2082; or x₂y₂ is for subscripts, not superscript which is what is in the example. Correction: Line 98: becomes then (or x²y² for hexadecimal)  Gérard Talbot 2008-07-13 12:41:17 PDT Line 116: becomes then Line 138: becomes then etc.. for cases which are possible to do.  Gérard Talbot 2008-07-14 01:42:28 PDT > Line 116: > > becomes then > I tried that in a local version and I must do instead. With all the changes discussed, I go from 31 errors to 2 errors only... which correspond to the "hacks" discussed before: (  Gérard Talbot 2008-07-14 02:07:18 PDT Patched webpage (intermediary stage), which include all changes discussed (except the 2 "hacks"): http://www.gtalbot.org/BugzillaSection/Bug267882-new-version-inter.xhtml What I wanted to test is if HTML Tidy was able to pretty print that XHTML + MathML code. Note that 5 images have relevant non-empty alt attribute values. Gérard Talbot 2008-07-14 02:28:34 PDT In this webpage: http://www.gtalbot.org/BugzillaSection/Bug267882-new-version-inter.xhtml on top of the changes and corrections discussed and submitted, - I tweaked the local stylesheet code a bit - I added scope="col" for the table headers - I converted " -> " into " -> " - code outside the has been re-indented to 2 characters (just like default code indentation value in HTML Tidy) - code outside the line-wraps at 76 characters. This helps code maintenance and eventual code review, code comparison with previous versions. - added around user_pref("font.minimum-size.x-western", 10) http://validator.w3.org/check?uri=http%3A%2F%2Fwww.gtalbot.org%2FBugzillaSection%2FBug267882-new-version-inter.xhtml&charset=(detect+automatically)&doctype=Inline&group=0  Gérard Talbot 2008-07-14 02:46:14 PDT Another thing. The content of items 3 and 4 (about font size, minimal font size and how to text zoom) should be updated and be on par with Firefox 3 and not with the old Mozilla suite or previous versions of Firefox. Current text: " (...) this can be set with, e.g, user_pref("font.minimum-size.x-western", 10). (...) to increase your default font size in the menu: 'Edit -> Preferences -> Appearance -> Fonts'. (...) 4. You can use 'View -> Text Zoom' in the usual way to zoom the MathML text " Suggested changes: " (...) this can be set with Tools/Options.../Content tab/Fonts and colors/Advanced button/ (...) to increase your default font size in the menu: 'Tools -> Options... -> Content tab -> Fonts and colors, size' (...) 4. You can use 'View -> Zoom, Text Zoom only checked' to zoom the MathML text "  Frédéric Wang (:fredw) 2008-07-15 01:04:54 PDT Created attachment 329632 [details] Screenshot of the hack Frédéric Wang (:fredw) 2008-07-15 01:05:28 PDT Created attachment 329633 [details] Hack with mo Frédéric Wang (:fredw) 2008-07-15 01:05:43 PDT Created attachment 329634 [details] No hack Frédéric Wang (:fredw) 2008-07-15 01:06:01 PDT - "the webpage is served as utf-8. One thing we can do for simple mathematical expressions is to find the correspondent utf-8 (numerical) character entity references". Just a small remark: It seems that you believe serving the page as UTF-8 is mandatory in order to use the entity references. It is not true, since characters used to encode entity references in XML are all ASCII (digits, sharp etc). Actually, serving the page as UTF-8 allows to directly write these characters in the page, without using entity references! By the way I don't see why you fail using hexadecimal entity references in alt text. Is it a bug of Firefox? - I've just made some tests with the hack, using the new configuration of Firefox 3 (Gecko 1.9 + STIX fonts). As I said before, the purpose of this hack was to fix a problem of layout: alignment of the two braces (see the screenshots). I remember that adding arround the parenthesis did not fix the problem, but it seems that it does with the new configuration. Hence I suppose you can make this correction to make the page valid. However, I still think we should find a way to do the alignment properly... I guess we should look to http://www.w3.org/TR/MathML3/chapter3.html#presm.malign - For alt text, I'm not sure that your idea of using utf-8 characters is good and you admit yourself that it can not be applied for all tests. Some people proposed TeX syntax but the problem is that it is not universally understood. In my opinion there are two main cases where the alt text is useful for people: when they have visual disabilities or when their browsers are not able to display images. Ideally, if they use tools that can deal with MathML, such as speech synthesizers, they don't need a non-empty alt text attached to the image of the formula (after all, replacing image was one of the reason MathML was done!). Nevertheless, we have to remember that it is a test page and so these tools may fail, just like a browser may not render the formulae properly. Finally, I believe that we can leave the alt text empty (or if we really want to, write how the formula is read in english) but we must add a column that describes the test rather than the formula. For instance "variables with exponents" (1), "variable with multiscripts" (2) etc. Gérard Talbot 2008-07-15 09:42:37 PDT > serving the page as > UTF-8 is mandatory in order to use the entity references. It is not true, > (...) Actually, serving the page as UTF-8 allows to directly write these > characters in the page, without using entity references! Yes. Correct. You are right. The use of character entity references is mainly, only limited by the capabilities (Unicode range support) of the font in use. > I don't see > why you fail using hexadecimal entity references in alt text. Is it a bug of > Firefox? I have no idea. > - For alt text, I'm not sure that your idea of using utf-8 characters is good > and you admit yourself that it can not be applied for all tests. I agree with you that if a found solution can not be applied to all 28 test-lines, then it may not be a suitable solution. > I believe that we can leave the alt text empty (or if we really want > to, write how the formula is read in english) Yes. Writing how the whole formula would be read in english is most likely a better solution and a solution which would work for all 28 test-lines. So the table of that "MathML Torture Test" needs a 3rd column now. > but we must add a column that > describes the test rather than the formula. For instance "variables with > exponents" (1), "variable with multiscripts" (2) etc. I agree. A column describing what each test-line is doing will be useful in such "MathML Torture Test". So, that would be a 4th column. Gérard Talbot 2008-07-15 09:56:55 PDT Ok, here's what I'll do. I'll make a first patch this weekend and apply it. It won't have any alt text. It will have all of the issues, corrections discussed and agreed so far, including the one in comment #32. It will have what you proposed in attachment 288149 [details] [diff] [review] regarding line (802 and 822 in source code) of code + + + \mathstrut + After such patch, we can tackle issues which may be remaining. So, if anyone has objections or issues, they have until this weekend to speak up in this bug. ------------- As for another column indicating how the formula is read in english, I can not do that. And another bug report should be created specifically for that. As for another column describing the test, I can not do that and again, best would be to create another bug. I took assignment of bug 151557 and wanted to see if I could help fix this 267882 bug. Gérard Talbot 2008-07-15 09:57:59 PDT -> me Frédéric Wang (:fredw) 2008-07-15 23:40:23 PDT For the hack, you can replace ( by ( Gérard Talbot 2008-07-18 21:28:17 PDT Patched submitted and checked in Checking in mozilla-org/html/projects/mathml/demo/texvsmml.xhtml; /www/mozilla-org/html/projects/mathml/demo/texvsmml.xhtml,v <-- texvsmml.xhtml new revision: 1.4; previous revision: 1.3 done Let me know if anything is wrong or missing. Gérard Gérard Talbot 2008-07-19 10:34:14 PDT Checking in mozilla-org/html/projects/mathml/demo/texvsmml.xhtml; /www/mozilla-org/html/projects/mathml/demo/texvsmml.xhtml,v <-- texvsmml.xhtml new revision: 1.5; previous revision: 1.4 done Added intra-project [crumbs] navigation links as recommended by http://www.mozilla.org/contribute/writing/guidelines and at http://www.mozilla.org/contribute/writing/markup; added s for Site navigation toolbar for the same reasons; made "ViewView -> Zoom, Text Zoom only checked" styled as .menu; replaced single quote around strechy='false' with double quotes. Unless I hear something from someone about something missing or wrong, I will resolve this bug as FIXED in 4 days or so. Regards, Gérard Joe Java 2008-07-21 11:58:59 PDT http://www.mozilla.org/projects/mathml/demo/texvsmml.xhtml validates as XHTML with This Page Is Valid XHTML 1.1 plus MathML 2.0! but fails CSS validation at ( http://jigsaw.w3.org/css-validator/ ) with Target: http://www.mozilla.org/projects/mathml/demo/texvsmml.xhtml Please, validate your XML document first! Line 239 Column 15 A colon is not allowed in the name 'IS10744:arch' when namespaces are enabled.  Gérard Talbot 2008-07-23 20:07:03 PDT The error message regarding the colon and the IS10744:arch have nothing to do with the actual CSS code of local embedded stylesheet and alternate stylesheets but rather with namespace support. Resolving as FIXED

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