Open
Bug 236963
(stretch-mtd-math)
Opened 20 years ago
Updated 2 years ago
Stretchy characters don't stretch in mtd/math elements
Categories
(Core :: MathML, defect, P4)
Core
MathML
Tracking
()
NEW
People
(Reporter: gemi, Unassigned)
References
Details
Attachments
(2 files, 4 obsolete files)
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040116 Galeon/1.3.13 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040116 Galeon/1.3.13 Style attributes like fontfamily, fontweight or color are not respected. On the other fontstyle="normal" is respected, but mathvariant="normal" is not, neither is mathvariant="fraktur" and mathvariant="script", see http://www.w3.org/Math/testsuite/testsuite/Presentation/TokenElements/mi/mimathvariant13.xml Stretchy arrows don't work in: http://www.w3.org/Math/testsuite/testsuite/Presentation/TablesAndMatrices/mtable/mtableBsize2.xml Reproducible: Always Steps to Reproduce:
>Style attributes like fontfamily, fontweight or color are not respected. These attributes are supported. It is only the mathvariant attribute that doesn't work yet -- and that's bug 114365. > Stretchy arrows don't stretch in table cells. That's a separate issue. The usual practice is to report one issue per bug. I am mutating this bug because there is nothing yet in bugzilla about strecthy characters in math table cells. This bug is now meant for the problem that "stretchy characters don't stretch in mtable cells".
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: style attributes in mathml tags not respected → Stretchy characters don't stretch in mtable cells
Reporter | ||
Comment 2•20 years ago
|
||
Sorry about mixing issues. However I beg to disagree about the style attributes. The attached image shows the rendering of the following: <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <mi fontfamily="Courier">A</mi> <mi fontstyle="normal">A</mi> <mi mathstyle="normal">A</mi> <mi color="blue">A</mi> <mi mathcolor="blue">A</mi> <mi fontweight="bold">A</mi> <mi mathvariant="bold">A</mi> </math>
Reporter | ||
Comment 3•20 years ago
|
||
Works for me on Win2K. Not sure why there should be any difference with the Galeon build. Note: |mathstyle| is an invalid attribute and is ignored. Also note that mathvariant="bold" resets everything except the font-size, i.e., in the terminlogy of CSS, mathvariant="bold" is equivalent to style="font: medium serif bold; font-size: inherit;" That's why there is a difference between <mi fontweight="bold">A</mi> and <mi mathvariant="bold">A</mi>.
Comment 5•20 years ago
|
||
Also, stretching doesn't happen in a <math> tag if there's no enclosing mrow. This is contrary to the MathML spec since a math tag acts as an implied mrow. (I've known about this problem for a few years, but it was recently brought to my attention again. Kind of a pain for automatic generation of MathML: is <math> an implied mrow or not? My guess is that the <math> tag generates a frame which is not a nsMathMLContainerFrame, hence doesn't participate in the stretchy computation. If this testcase/bug is cluttering up this bug, I'd be happy to make a new bug. But this bug seemed a bit confused anyway.)
Comment 6•20 years ago
|
||
On further thought, it may be that the problem mentioned in Comment #5 is the same as bug 219873. (math tag doesn't know its height)
Comment 7•19 years ago
|
||
Getting the discussion back to the original title "Stretchy characters don't stretch in mtable cells". I have observed this also. For example, the following two blocks should look the same: <mtable> <mtr> <mtd> <mrow> <mo stretchy="true">(</mo> <mfrac><mi>x</mi><mi>y</mi></mfrac> <mo stretchy="true">)</mo> </mrow> </mtd> </mtr> </mtable> and <mtable> <mtr> <mtd> <mo stretchy="true">(</mo> <mfrac><mi>x</mi><mi>y</mi></mfrac> <mo stretchy="true">)</mo> </mtd> </mtr> </mtable> because the <mtd> should contain an implied <mrow>. However, they render differently (Firefox 1.5); the parentheses stretch in the first one but not in the second.
Stretching in the case of table cells is complicated by the fact that it has to be resolved based on the height of the whole row (or the width of the whole column). For example, if you have: <mtable> <mtr> <mtd> <mo>(</mo> <mfrac><mn>1</mn><mn>2</mn></mfrac> </mtd> <mtd> <mfrac> <mfrac><mn>1</mn><mn>2</mn></mfrac> <mfrac><mn>3</mn><mn>4</mn></mfrac> </mfrac> <mo>)</mo> </mtd> </mtr> </mtable> Then, the left paranthesis and the right parenthesis should stretch to the same height. Picture the left/right/up/downarrows of a commutative diagram for example. They should stretch automatically if at least the minsizes of one vertical arrow and one horizontal are given. That is, the stretching will be passed on to the other arrows to make the whole thing look uniform. That's why this bug is quite involved.
I don't see why this bug, narrowly construed, is so "involved." If the Spec says: <math> (or <mtd> or whatever) has an implied <mrow>, then the behaviour should be the same whether one places an explicit <mrow> or one doesn't. But the behaviour is not the same. Which is a bug.
Comment 10•16 years ago
|
||
Details on stretching operators within tables are here: http://www.w3.org/TR/MathML3/chapter3.html#id.3.2.5.8.2
Comment 11•15 years ago
|
||
The special rules for operator stretching in tables seem to only apply when the operator is the "sole direct sub-expression of an mtd element". http://www.w3.org/TR/MathML3/chapter3.html#presm.inferredmrow implies that <mtd> <mo>&stretchyoperator;</mo> </mtd> "is treated as if it were" <mtd> <mrow> <mo>&stretchyoperator;</mo> </mrow> </mtd> which seems contradictory as the operator would no longer be a direct sub-expression. I guess the intention is that we should read the inferred mrow statement backwards and treat the form with the explicit mrow in the same manner as is specified for the form with and inferred mrow. The operators for parentheses in comment 8 are not sole direct sub-expressions, so they should only stretch to the height of the implied mrow within their individual mtd.
Comment 12•15 years ago
|
||
(In reply to comment #11) > The special rules for operator stretching in tables seem to only apply when the > operator is the "sole direct sub-expression of an mtd element". > > http://www.w3.org/TR/MathML3/chapter3.html#presm.inferredmrow implies that > > <mtd> > <mo>&stretchyoperator;</mo> > </mtd> > > "is treated as if it were" > > <mtd> > <mrow> > <mo>&stretchyoperator;</mo> > </mrow> > </mtd> > > which seems contradictory as the operator would no longer be a direct > sub-expression. > > I guess the intention is that we should read the inferred mrow statement > backwards and treat the form with the explicit mrow in the same manner as is > specified for the form with and inferred mrow. > Actually, according to the section "inferred <mrow>s" the children are treated as a single mrow only "if the number of children is 0, or is more than 1". Hence the rule of the "sole direct sub-expression" still applies. Moreover it is also the case with the explicit mrow, according to the rule of the "<mrow> of one argument": http://www.w3.org/TR/MathML3/chapter3.html#id.3.3.1.3.1
Updated•15 years ago
|
QA Contact: ian → mathml
Updated•14 years ago
|
Assignee: rbs → nobody
Updated•14 years ago
|
Alias: stretchy-in-cells
Updated•12 years ago
|
Attachment #143511 -
Attachment is obsolete: true
Updated•12 years ago
|
Attachment #143558 -
Attachment is obsolete: true
Comment 14•12 years ago
|
||
Here is a testcase for mtd. It seems that MathJax uses mfenced.
Updated•12 years ago
|
Alias: stretchy-in-cells → stretch-mtd-math
Summary: Stretchy characters don't stretch in mtable cells → Stretchy characters don't stretch in mtd/math elements
Updated•12 years ago
|
Priority: -- → P5
Comment 16•11 years ago
|
||
Making this blocking MathJax as I suggested the team to use <mrow>+<mo> instead of <mfenced>.
Blocks: mathml-in-mathjax
Priority: P5 → P4
Updated•10 years ago
|
See Also: → https://github.com/gvanas/blahtexml/issues/4
Comment 17•10 years ago
|
||
Attachment #687059 -
Attachment is obsolete: true
Comment 18•10 years ago
|
||
Updated•10 years ago
|
Attachment #8499983 -
Attachment is obsolete: true
Updated•10 years ago
|
Assignee: nobody → jkitch.bug
Updated•10 years ago
|
Depends on: mathml-linebreaking
Updated•9 years ago
|
Assignee: jkitch.bug → nobody
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•