- Use span with a background-image instead of <img> for the fallback SVG so
that they don't load in Gecko.
- Make the image fallback a span inline-block so that it can have a dimension.
Bug: 71929
Change-Id: I7f820cd5766db1fece452ebfc72915a55e42c82e
- Merge fallback-svg and fallback-png into one fallback-image class.
- Move the vertical centering of PNG to MathTexvc and ext.math.js.
- Remove "img" from ext.math.css to reduce CSS specificity and make
style easier to override by user stylesheets.
- Add a comment about the !important rules for centering in
display mode.
- Only load ext.math.scripts in MathML mode.
Bug: 71955
Change-Id: If8ee1cf6453257a0a2f6aa186d4007954a8e5d8e
- remove the default "display: none" style on the SVG fallback
- remove the IE CSS hacks from ext.math.css
- add a client-side implementation of the PNG fallback
Bug: 71912
Change-Id: I91b11313aae25c4d05f8f2333d2f21537c9b8887
When MathPlayer is installed, we show the MathML instead of the SVG fallback.
This will in particular allow the sync highlighting feature of MathPlayer.
This also introduces a module ext.math.js that could be used to do some
Javascript postprocessing.
Bug: 71748
Change-Id: I438a20032c312d12321ca4c5686bcfd107656b37
- add "Cambria" to workaround a bug on Firefox Windows.
- remove obsolete local fonts (MathJax and STIXGeneral).
Change-Id: I06e757b029b8778b88bc6e75e20929e0c945e364
- Mark the png and svg fallback as aria-hidden="true".
- For browsers without good enough MathML visual rendering,
hide the <math> tag in a way that still makes it accessible to
screen readers.
Bug: 66537
Change-Id: I7ecf07a4da669d927e11265fd497a813786c6410
In some cases for example if the vagrant role
mobilefrontend is enabled the stylesheets are not
processed on mobile devices.
Without a default setting for the display attribute
all elements are displayed at the same time.
Change-Id: Ic0e95effaf0b413ec4c5878e1cfd5c269daa44c3
Currently, the PNG fallback is hidden in the MathML mode and the MathML & SVG
are respectively hidden and visible by default; the visibility of the
SVG/MathML output is only changed for Gecko. This does not work well for
IE < 9, which does not support SVG. This commit tries to improve the selection
of PNG, SVG or MathML according to the browser capatibility.
Change-Id: Ie9b0fdb66c51fbf6be98df092ce4de29fbba6068
In the MathML mode, the SVG is always visible and for Gecko the MathML
output is visible too. This commit modifies ext.math.css to hide redundant
output for a given mathematical formula.
Change-Id: I5d48ec4f2a40246567b201e82444e61d408cb3b5
This sets the default font-family on <math> elements so that we try to use
OpenType MATH fonts that are likely to be installed or fallback to WOFF and
obsolete mathematical fonts.
Bug: 65532
Change-Id: Id4517a3ce5eab4acdf2264712ba132b972120042
Currently the method render always returns
a html string that can be a string that
represents the correct result or a rendered
error message.
This change adds a mechanism that allows
to fetch the HTML output.
In a followup commit the rendering function
is changed to return a boolean value rather
than the rendering result.
This will simplify the error handling and caching.
Change-Id: I80760493e391911c41eb69d75a93c6a34db8852e
* Removes the MathJax heuristics that decides
if equations are centered or left-aligned.
* Introduces the attribute display to specify
if the math element is rendered in inline,
display, or inline-displaystyle.
* add css rules for display / inline math images
Bug: 61051
Change-Id: Iba69903f781f0cb1606b8ddcffb90fb86c9b229b