Closed Bug 1140825 Opened 9 years ago Closed 9 years ago

Can I display mathml block in an inline?

Categories

(Core :: MathML, defect)

36 Branch
x86_64
Windows 8
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: ngchinkeong, Unassigned)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

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
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)
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)
Can you please provide the code for a minimal testcase here?
Flags: needinfo?(ngchinkeong)
Flags: needinfo?(ngchinkeong)
"inline-block" does not exist in MathML. What you probably want is <math displaystyle="true">...</math> instead.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Product: Firefox → Core
Component: Untriaged → MathML
(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
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: