- load ext.math.css on mobile devices
- move the @font-face rules for the Latin Modern WOFF fonts into a separate
Desktop-only stylesheet.
Change-Id: Ifca3679185a4675bc31dff99a086fef740b9dab5
While the combination of all redering modes, might
be useful for some power users it will confuse the
average user and makes bug reporting harder.
Therefore, source rendering on the server side is
used when MathJax is enabled on the client side.
Change-Id: I05a20d7c2298115dbf0429db6c107e8132cc15ff
- 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
- create a new <img> tag to avoid copying unwanted style from the SVG fallback.
- keep the legacy tex class for consistency with the PNG mode.
Bug: 71912
Change-Id: Ibe4683d2898b49fda190e2f1535cab1b952250b0
- 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
This commit separates the files wiki2jax.js and texvc.js from the
MathJax modules. This allows for MathJax updates without affecting
MediaWiki files. It also defines the MediaWiki path configuration,
although this will really only be usable in MathJax 2.4. Finally,
it fixes jshint errors in texvc.js and wiki2jax.js
Moved texvc.js and wiki2jax.js to extensions/Math/modules/mediawiki-extensions directory
Change-Id: I97d68c0555bc9fbdd6bf42912aa249d57b3d9359
The signal 'ext.math.mathjax.customize' is added to the
mathJax.Init function. Extensions can call this signal for
modifications to MathJax.
Change-Id: Ia2bae50cd1fcd15d4775d7b9666679c477060659
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
this.$element is no longer a wrapper, so use .filter instead
of .find. Don't use domElements argument as this has already
been written to this.$element at this stage (will remove this
argument in VE core).
Change-Id: If24580102201e2b83b57c63d85335bd728a28784
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
These files were added in but the change was totally unrelated to the
AsciiMath issue mentioned there and moreover this commit bypassed review.
These entity references are useless for LaTeXML
(which does not generate entity names), for the client-side MathJax
(which does not use MathML input) and for mathoid (which uses
phantomjs=webkit and thus already parses the HTML5 entity names correctly).
Finally, these files are likely to disappear in future MathJax versions.
So let's remove these files until it is clear what the intention was.
Change-Id: Iee875632411b98d1e86d3bb10f69ae3797105de7
some files required for Mathoid were missing in the
modules/MahtJax folder
For example I15cb2d1cb0533a2fa0e21012198387501a3b42ea
requires AsciiMath and LaTeXML requires named entities
Change-Id: Ib7f2e4b8eb7250ea4fc24aac3cedf196211f38c2
All live preview logic has been moved to ve.ui.MWLiveExtensionInspector so
so this can be simplified down to just static configuration.
Depends on I708c4cb012be in VE-MW.
Change-Id: I24b4788e97411eec18161709ca5d47c87d3f64da
As we can't access the view node we have to use stagin transactions
to apply changes to the real document node.
In all cases we can now bypass the parent teardown method as the
model has already been updated.
Depends on If1250402f266 being pulled through to the VE extension.
Bug: 63785
Change-Id: Ic42db8531a5119e8454fb26c80565cef656d3a80
To adjust the selectable math rendering modes in user preferences $wgMathValidModes
is introduced.
* $wgUseLaTeXML becomes unnecessary use $wgMathValidModes[] = MW_MATH_LATEXML;
to enable the LaTeXML rendering mode
* add $wgMathValidModes[] = MW_MATH_MATHJAX; to enable MathJax
Currently, MathJax is bound to the MW_MATH_SOURCE rendering mode.
This change makes the base mode user configurable.
That means before MathJax is loaded the png fallback image could
be displayed.
ATTENTION: This change modifies global variables as follows:
* MW_MATH_MATHJAX is deprecated.
Bug: 57981
Change-Id: Ibf705cb66754d04e4c7eafd1e98608b25d7dbb94
This brings us one step closer to solving the JS rendering bug. The
remaining issue is how to know that the enabler script needs to be
loaded.
Bug: 36060
Change-Id: I9cbd032afaf90a735c92f055c2bf82766e9acbe0
Declare that ext.math.editbutton.enabler depends on
mediawiki.action.edit.
Follow up to: I3d126c1c252c27fa65ab8fb42ffab66a2d99cfa8
Bug: 60471
Change-Id: Ibcda91bbb164b0b896d4c3f5f7c2c6ea6658468e
I didn't really intend to make this strict yet, but since I did,
better make it work
Follow up to: I679246089ec485678088ff08f3a46d8b74a262c5
Change-Id: Ic6180b3188d46ce92e0547b0fbb6c333906c49f6
Move the code that creates the Editbutton for math from core,
where it is removed in Ib17aa47c7d647e1ed293541adbdd1aa77e25e59e.
Imported button image from:
ssh://gerrit.wikimedia.org:29418/mediawiki/core.git/skins/common/button_math.png
We don't need to vary the icon per language, because there is not a
single language that has a non default icon.
Bug: 60471
Change-Id: I3d126c1c252c27fa65ab8fb42ffab66a2d99cfa8
* 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
I suspect we retained this of the import of Nageh's option, it was
never really a conscious decision. This makes is to so that locally
installed fonts are preferred over the Tex webfont.
Bug: 63016
Change-Id: I6876f4969314b2feea01ecfef29f98dcd5f1056a