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

Can I display mathml block in an inline?

RESOLVED INVALID

Status

()

Core
MathML
RESOLVED INVALID
3 years ago
3 years ago

People

(Reporter: Ng Chin Keong, Unassigned)

Tracking

({dev-doc-complete})

36 Branch
x86_64
Windows 8
dev-doc-complete
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 20150305021524

Steps to reproduce:

I try to use display: inline-block in mathml. Is there a way to do that in mathml specification?


Actual results:

It was display as inline


Expected results:

the block of mathml should be in a line, something like display: inline-block for other elements of html5

Comment 1

3 years ago
Is this a specific problem about Firefox? Does it work in other browsers?
If it does, can you please provide the code for a minimal testcase here?
Flags: needinfo?(ngchinkeong)
(Reporter)

Comment 2

3 years ago
The problem only exist in firefox, since other browsers don't support mathml natively.

The thing is, when I use inline display and block display, I will get different result for a algebraic fraction. the one using block display is larger, which I think is better and easier to read. The one displayed using inline is too tiny.

But when I display it in block, it couldn't inserted in a line.

Is there a way that I can get the display effect of block display (which is bigger compare to inline display) in a line?

I tried inline-block, but it displays it inline, but the result of the mathml is not the one I got from using block.
Flags: needinfo?(ngchinkeong)

Comment 3

3 years ago
Can you please provide the code for a minimal testcase here?
Flags: needinfo?(ngchinkeong)
(Reporter)

Comment 4

3 years ago
Created attachment 8581235 [details]
html file to show the problem
Flags: needinfo?(ngchinkeong)
"inline-block" does not exist in MathML. What you probably want is <math displaystyle="true">...</math> instead.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → INVALID
Component: Untriaged → Untriaged
Product: Firefox → Core
Component: Untriaged → MathML
(Reporter)

Comment 6

3 years ago
(In reply to Frédéric Wang (:fredw) from comment #5)
> "inline-block" does not exist in MathML. What you probably want is <math
> displaystyle="true">...</math> instead.

This works for a single line mathml element, but it seems that it doesn't work for contents in mtable. (I use mtable to align the equal sign for a block of working steps of mathematics question, since malign is not yet implemented)
mtable (and other elements) resets displaystyle to false (this is not documented on https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mtable though). So you need to do

<mtable displaystyle="true">...</mtable>
Keywords: dev-doc-needed
I added a note to https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mtable
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.