Page MenuHomePhabricator

wrap math formulas in a div for easy styling
Closed, ResolvedPublic

Description

Long formulas are creating horizontal scrollbars in small screens. If formulas are wrapped in a div with a certain class then we'd be able to style them accordingly. Please see this bug for extra information: https://bugzilla.wikimedia.org/show_bug.cgi?id=66679


Version: master
Severity: normal
See Also:
https://bugzilla.mozilla.org/show_bug.cgi?id=534962

Details

Reference
bz72165

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:44 AM
bzimport added a project: Math.
bzimport set Reference to bz72165.
bzimport added a subscriber: Unknown Object (MLST).

physik wrote:

Can you add a screenshot of the problem. For example http://math-preview.wmflabs.org/wiki/Main_Page
has a lot of formula and uses the most recent version of the Math extension.

physik wrote:

screenshot Labelled_enumeration_theorem firefox windows small window

Attached:

long_equations.png (1×472 px, 124 KB)

physik wrote:

*** Bug 66679 has been marked as a duplicate of this bug. ***

physik wrote:

Probably this is the designated test page:
http://math-preview.wmflabs.org/wiki/Linebreaking

I see a challanging problem of formula linbreaking discussed here https://bugzilla.mozilla.org/show_bug.cgi?id=534962

But I think we can do nothing about it within the Math extension.
I need to understand the bug description a little bit better:

Long formulas are creating horizontal scrollbars in small screens.

Isn't that the expected behaiviour.

If formulas are wrapped in a div with a certain class

OK. Let's assume formulae that are now represented as

<span><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML"> ...
</math></span><meta class="mwe-math-fallback-image-inline" style="background-image: url ... />
</span>

would be wrapped in a div element with class=tex for example

then we'd be able to style them accordingly.

How should they look like? If you'd scale them down they'd probably not be readable.

Created attachment 16804
there should be a horizontal scroll bar to allow me to see whole formula on https://en.m.wikipedia.org/wiki/Labelled_enumeration_theorem

Attached:

Screenshot_2014-10-18-12-34-03.png (1×768 px, 186 KB)

physik wrote:

missing formulae with ff mobile on Android

Attached:

Screenshot_2014-10-18-22-01-37.png (1×768 px, 208 KB)

I guess the changes are due to the new <meta> tag with background.

For Firefox for Android, perhaps it's a problem with missing math font (and use of LatinModernWOFF). What do you get with https://addons.mozilla.org/en-US/firefox/addon/mathml-fonts/?

physik wrote:

In 72229 I added mobile support to math-preview. Now, we have a testing environment. At a first glance it looks like the new MathML mode does not work with any mobile browsers see the screenshot attached to 72229.
Since this seems much more fundamental we should figure out what's the reason for that before caring about the scroll bar.

physik wrote:

It seems that all the custom css an js files defined in the resource loader of the math extension are not loaded.

(In reply to physikerwelt from comment #10)

It seems that all the custom css an js files defined in the resource loader
of the math extension are not loaded.

See my guess in bug 71787 comment 2.

Is this still reproducible since the mobile fixes?

mobile fixes were hacky and abandoned so yes :)

Joyceg set Security to None.