If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Bad interaction of the mathvariant attribute with sub-, super-, under- and overscripts




14 years ago
12 years ago


(Reporter: Jan Kluka, Assigned: rbs)




Firefox Tracking Flags

(Not tracked)



(4 attachments, 3 obsolete attachments)



14 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031021
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031021

If an element which is used as a script in a msub/msup/msubsup/
munder/mover/munderover element has the attribute mathvariant set, it is rendered
in the font size of the parent msub/msup/msubsup element instead of a smaller

Reproducible: Always

Steps to Reproduce:
1. See the attached testcase.
Actual Results:  
Scripts in the second math display are set using the normal font size.

Expected Results:  
Scripts should be smaller.

The basic style rule for the mathvariant attribute in <mozilla>/res/mathml.css
is inadequate for scripts. Due to the rule:

[mathvariant] { /* shared and same as [mathvariant="normal"] */
  font: medium serif;
  font-size: inherit;
  font-size-adjust: inherit;
  font-stretch: inherit;

the font size of a sub/super/...script with the mathvariant attribute set is
reset to the font size of the parent (the msub/msup/... element).

The remedy is probably to change the above rule to:

[mathvariant] { /* shared and same as [mathvariant="normal"] */
  font-style: normal;
  font-weight: normal;
  font-family: serif;

Comment 1

14 years ago
Created attachment 134504 [details]

Comment 2

14 years ago
Created attachment 150639 [details]
Style-Sheet to test this function

The Error-Message above is incorrect or or and not complete. I have copied a
part from the w3c-mathvariant-sytle to my pc and manipulated the file (see
Attachment). So all italic, bold and bold-italic should show the same bold
character. But If I use that css-file, with thoose settings, than:

1. The style-sheet-characters will be ignored completely
2. The size of the charcter will be resseted to the normal size.

Comment 3

14 years ago
Created attachment 150640 [details]
X-HTML-File in my Example ...

Comment 4

14 years ago
Created attachment 150641 [details]
And the screenshoot in my Example

And I use W2000 tand 2004042119

Comment 5

14 years ago
Created attachment 150648 [details]
Style do demonstrate the error

Sorry, I have made a mistake. The including of a mathML-style-sheet is
something different than a normal style. So I have changed all 3 files again. -
first the syle
Attachment #150639 - Attachment is obsolete: true
Attachment #150640 - Attachment is obsolete: true
Attachment #150641 - Attachment is obsolete: true

Comment 6

14 years ago
Created attachment 150649 [details]
Page to demonstrate the error

Comment 7

14 years ago
Created attachment 150650 [details]
And the scrrenshoot

And at last the Screenshoot. 

The style is included in that page and contains new styles xmathvariant instead
of mathvariant. The styles are named italic, bold and italic-bold, but they are
all defined "bold". So the screenshoot should show a set of bold characters,
but it doesn't. 

Therefore the local style-sheet ist not evaluated. 

I assume that there is a second error and this will change the character size,
but up to now I can not localize or prove it.

Comment 8

14 years ago
confirming per above comments

keyword: testcase
Ever confirmed: true
Keywords: testcase

Comment 9

12 years ago
This was fixed by attachment 194890 [details] [diff] [review] on bug 114365.
Last Resolved: 12 years ago
Resolution: --- → FIXED

Comment 10

12 years ago
wow, thanks!
You need to log in before you can comment on or make changes to this bug.