- 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
In the first period we set the caching time for server-side
caching to 1 week and the value for client-side caching
to 1 hour.
Change-Id: Ieab63dfe9a00f31d64945180d7b0d98b9fe62b39
Chrome in particular would end up with fairly small and inconsistent
background sizes when using background-size: contain;. This makes sense
according to the docs at
https://developer.mozilla.org/en-US/docs/Web/CSS/background-size, which
doesn't specify that the background actually has to fill the entire element.
background-size: 100% 100%; does force full-size scaling, which is what we
want. Verified to work as expected in Chrome 38 on Linux.
Change-Id: I508e08dac1480491efcd1d27cfac16187bfbd4fe
HTML tidy will strip empty spans, so don't use one for the fallback image. We
use a meta element instead, as that does not normally render at all & doesn't
have any default styling coming with it.
Change-Id: I5bcbbc9468433e3c8722c09ce813a6f5ac741333
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
Tweak the position of spaces between function invocations and arguments
so that the expansion of mediawiki-specific functions (`\Rho`, etc) is
consistent with how spacing is added to normal function invocations.
This helps ensure that `texvc`/`texvccheck` is idempotent -- that is,
that it can parse what it emits, and render it without change.
Change-Id: I05fc8fa0201debf611ed4900d3cc953a6a8188ac
The \overbrace, \overleftarrow, \overleftrightarrow, \overline,
\overrightarrow, \underbrace, \underline, \widehat, and \widetilde
commands take a single mandatory argument. Move \overbrace and
\underbrace to the fun_ar1nb list, since they handle trailing
subscripts and superscripts specially. Move the other functions to
the fun_ar1 list.
Change-Id: I449c8611eeb2eaa7ccb30d3b325975868a160f95
It is impossible to take the empty alternative for this production,
since any input which matches `litsq_aq` would instead match `lit_aq`
if the empty alternative is used. In addition, there is no action
clause for the empty alternative, so it wouldn't typecheck if the
empty alternative was possible.
This has no effect on the generated parser, but clarifies the grammar.
This commit matches a25078ff9d to
texvccheck.
Change-Id: I52eddd7321bd8450b47a5d57f2d704f0dd669f16
The \AA and \textvisible space commands aren't valid in math mode.
Surround them with \mbox so that we switch to text mode before
emitting them.
Change-Id: I36c23c80751401be4bbce6aca6c3333912f67add
- 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 special handling for the PNG fallback in
getFallbackImageUrl, getFallbackImage and getClassName.
- Make these functions private and remove useless parameters.
Bug: 71912
Change-Id: I569f2dd3d32a0c9690a5d9674a1c6ae0b8698f08
- 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
Add new option to filter only new input.
Now the complete list of possible settings is:
MW_MATH_CHECK_ALWAYS backwards compatible to false
MW_MATH_CHECK_NEVER backwards compatible to true
MW_MATH_CHECK_NEW new option
Change-Id: I455b41c8b8d918f4c34f6c115194d227a8394e0a
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
The style would set a margin both on the SVG & the surrounding img. We
transfer the styles to the image, so don't want them on the SVG. This avoids
applying margins twice, which led to clipping.
Change-Id: I89ab3f6727d978d64df6f97f30decf5cb9c0bc92
- add "Cambria" to workaround a bug on Firefox Windows.
- remove obsolete local fonts (MathJax and STIXGeneral).
Change-Id: I06e757b029b8778b88bc6e75e20929e0c945e364
- These images currently return server errors
- We don't really want to load PNG images for browsers that support MathML or
SVG.
Bug: 69702
Change-Id: Idd339623efd19a0726b43a6c4adc2fcd832511f6