In Ifdd75ce51076b098af67a96b5dcb0fc0726d2b00
I missed to update the png fallback mechanism
given the fact that SVG is now a <img element
as well and no longer a <meta tag.
Bug: T136905
Change-Id: If1b4fb11cfb50eab98f847674fdbef2cd0e43e37
1) Because enabling native MathML now requires special configuration steps
from the users, they can as well just check their math font setup. Hence we
remove the Web font fallback.
2) We then can actually just remove ext.math.desktop.css since no specific
style is necessary any more on desktop.
3) We also no longer need to add the Web font to the list of font-family on
the <math> element. We actually just remove the whole font-family rule so
that it is up to web engines developers & users to decide the best math font
to use (e.g. via the "Fonts for mathematics" option in the font preference
menu of Firefox).
Change-Id: I1818d288b0f28715a460e3163590e4d0374c42b4
The Firefox specific CSS changes require a special
setup of math fonts on the system. To avoid problems
OS dependent behavior, this browser specific modifications
are removed from the ext.math.css file.
There are a couple of places, where people can overwrite
their CSS rules individually.
For example from version 1.8 the plugin
cf. de1eec2f0d
Note that this change will make things worse for users
that chose the MathML rendering option and managed to
configure their font setup right.
Change-Id: I5a376904a01a46634eea2160e02736df74cd0b5f
When the math dialog's menuLayout height is below 450 px,
make the symbol menu and the preview element shorter, so
the input is still in view. (This works until about
280px, below which the user will need to scroll down to
use the input.
Bug: T121150
Change-Id: I9e41cce80c3f770b1e3d0e7b133470045a1afe67
InternetExplorer versions that do support SVG images
have problems rendering these in meta tags.
Replacing meta tags with img elements resolves the problem.
Bug: T132491
Change-Id: I353e911a8e2066c10d8df583cae88861a8623816
This attribute was added in Ia0f601c1d5. Use it instead of
extracting the information from the SVG.
Change-Id: Ib6d6f4c9480ae00ccb2977b57c7b93de8ebb03f2
Sub-pixel alignment errors are unavoidable as the browser will rasterise
the SVG then round percentage offsets to the pixel grid.
Change-Id: I704db755d49be189db9670594e2ae2f193e6052d
This was set low to avoid issues with local servers, but the new default
server (wmflabs.org) can handle a higher value, and the script runs
much faster.
Change-Id: I69b06c59fc03c4c4b15619e8dff7bfc904dba96f
If a symbol has "backgroundPosition" set to true, adjust
its vertical position in the button, according to the
vertical-align property on the SVG, by adding a
background-position property on its CSS rule.
Also set "backgroundPosition" to true for a number of
symbols and generate a new CSS file.
Bug: T123397
Change-Id: Ic9bbb65d2bedf38f569d8922599a2e3d2575f153
Every time the math dialog is resized, calculate the
vertical space available to the input and resize the
input to fill this space.
Bug: T123891
Depends-On: Ia2e094071f385628449f1935f0250cbeb75196f0
Change-Id: I3f3c915469f282a6e0459a7e4d10e19bee68b8db
The context item for math nodes now has two edit buttons,
one for the inspector (edit inline) and one for the dialog
(edit). Creating a new math node automatically opens the
dialog.
Bug: T120382
Change-Id: Icd3ec75262fcc5e0cbc304051c651278b0d8b01c
Also make input widget height respond to its contents. These two
changes address the problems of overlapping when the screen
height is limited.
Bug: T119900
Change-Id: Ie21c141673a9343d05da05cdbd2eaa96efff0a58
The formula preview is not centered when the display attribute
is set to block. Correct this by enforcing display: inline-block
when the math image is inside the preview element.
Bug: T119670
Change-Id: I77d9b213a31d3005212c8c11874112ddb64aa74a
The main components are:
- a menu of formula fragment buttons
- an ace editor text input into which LaTeX commands are
inserted on clicking the buttons
- a preview of the formula
The deviations from the draft design (full-width menu,
smaller buttons, dialog is 'larger' instead of 'large')
are so that more buttons can be seen at once.
Depends on Ia0f46da2d4 in ve-mw
Depends on Ib75fb7b087 in ve-mw
Depends on I758f90abb9 in ve-mw
Depends on Ibcd941d938 in CodeEditor
Depends on Ie814f59086 in oojs-ui
Depends on If540670bf2 in oojs-ui
Depends on I5f70f133b7 in ve core
Bug: T114163
Bug: T118617
Bug: T118618
Change-Id: I96d4b72f2e49ad3f43a2e5c71f0d348fdfb35503
Also keep the CSS file in alphabetical order so additions make
for clean diffs. (The async built file had a pseudo-random order)
Change-Id: Iad76ef36c90f42ba3232f135b05465408f42b2ba
Also produces a CSS file for the symbol buttons, using the
SVG filenames. Gets the list of symbols from symbols.json.
Bug: T118660
Change-Id: Iaa792418d870a7e266b6455ef037994e31278278
* With the current settings for example the distance between
matrix rows is too large.
Bug: T106890
Change-Id: Iffa2534f7d39e9faf41ab11124c9b9ff571988d2
Also modify method that formats the error so only
the text is appended.
Depends on Ie84130d4ac0 in VE-MW.
Bug: T113172
Change-Id: I5310f22877f56d1828a9d1782ee335d5793700df
An error will contain an element with class "error".
Relies on I3f4ba354a in visual editor core in order to work.
Also remove old afterRender method.
Bug: T112610
Change-Id: Ie681806aebfdd7de918685c9343f5e176baaf517
Also adds the corrections made to various js files when jscs
was run, and removes an old version of .jshintrc. Only
VisualEditor files are checked by csshint due to clashes with
an upstream bug in the csslint parser. This could be looked
into in the future.
Bug: T112576
Change-Id: I611901040d3b38ae3ef707deb8d25771f043b1d8
Because the id doesn't affect the rendering of a
math node, it is not needed in the hash object.
Also removed event listener from the id input for
the same reason.
Bug: T112466
Change-Id: I4da07cb7c112ce9ab449a060132856a2d054e57f
* Use string constants instead of integers
* Derive new names from old via conversion of constant
naming convention to CamelCase.
* Replace old constant string e.g. 'MW_MATH_ABC_DEF'
with new string 'abcDef'
* Replace old constant value with new string.
* Tests to demonstrates what is actually done.
* Rename constants
Bug: T106630
Bug: T106631
Bug: T87941
Change-Id: I6d1094ece79e912d9ddbef6681a25196c7a6e801
wikipage.content hook is fired before the new content is attached, but
MathJax cannot deal with that. Use setTimeout to delay execution until
next execution run.
Bug: T90808
Change-Id: I02178bfd61d34dff49435f3a17a0ce385b37d14d
Force display:none on a hidden MathML rendering to avoid generating
focusable node highlights.
Move adding of class to setup to ensure it persists after render.
Bug: T87007
Change-Id: I5fc21afa61ccc07e9d2126846cf29ee898182a7c
Follows-up Ibcda91bbb164b0.
ext.math.editbutton.enabler uses mw.toolbar. The toolbar interface
used to be part of mediawiki.action.edit but is now in its own module.
Bug: T86235
Change-Id: I37a0b8e84a9bd6a0de0386d5b9924bbbbbd7249c
- 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