mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-28 09:20:42 +00:00
Merge "Make MathML mode work on mobile devices"
This commit is contained in:
commit
c1207937f5
|
@ -135,6 +135,7 @@ class MathHooks {
|
||||||
}
|
}
|
||||||
$parser->getOutput()->addModuleStyles( array( 'ext.math.styles' ) );
|
$parser->getOutput()->addModuleStyles( array( 'ext.math.styles' ) );
|
||||||
if ( $mode == MW_MATH_MATHML ) {
|
if ( $mode == MW_MATH_MATHML ) {
|
||||||
|
$parser->getOutput()->addModuleStyles( array( 'ext.math.desktop.styles' ) );
|
||||||
$parser->getOutput()->addModules( array( 'ext.math.scripts' ) );
|
$parser->getOutput()->addModules( array( 'ext.math.scripts' ) );
|
||||||
}
|
}
|
||||||
// Writes cache if rendering was successful
|
// Writes cache if rendering was successful
|
||||||
|
|
6
Math.php
6
Math.php
|
@ -240,6 +240,12 @@ $wgResourceModules['ext.math.styles'] = array(
|
||||||
'localBasePath' => __DIR__ . '/modules',
|
'localBasePath' => __DIR__ . '/modules',
|
||||||
'remoteExtPath' => 'Math/modules',
|
'remoteExtPath' => 'Math/modules',
|
||||||
'styles' => 'ext.math.css',
|
'styles' => 'ext.math.css',
|
||||||
|
'targets' => array( 'desktop', 'mobile' ),
|
||||||
|
);
|
||||||
|
$wgResourceModules['ext.math.desktop.styles'] = array(
|
||||||
|
'localBasePath' => __DIR__ . '/modules',
|
||||||
|
'remoteExtPath' => 'Math/modules',
|
||||||
|
'styles' => 'ext.math.desktop.css',
|
||||||
);
|
);
|
||||||
$wgResourceModules['ext.math.scripts'] = array(
|
$wgResourceModules['ext.math.scripts'] = array(
|
||||||
'localBasePath' => __DIR__ . '/modules',
|
'localBasePath' => __DIR__ . '/modules',
|
||||||
|
|
|
@ -26,13 +26,6 @@ m|math {
|
||||||
font-family: Cambria, Cambria Math, Latin Modern Math, STIX Math, LatinModernMathWOFF, serif;
|
font-family: Cambria, Cambria Math, Latin Modern Math, STIX Math, LatinModernMathWOFF, serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
|
||||||
/* WOFF version of Latin Modern Math.
|
|
||||||
See https://github.com/fred-wang/MathFonts */
|
|
||||||
font-family: LatinModernMathWOFF;
|
|
||||||
src: url(./LatinModern/latinmodern-math.woff);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Default style for the image fallback. */
|
/* Default style for the image fallback. */
|
||||||
/* Note: We had to use !important rules because of conflicts with the style
|
/* Note: We had to use !important rules because of conflicts with the style
|
||||||
generated by Mathoid. See https://gerrit.wikimedia.org/r/#/c/166213/ */
|
generated by Mathoid. See https://gerrit.wikimedia.org/r/#/c/166213/ */
|
||||||
|
|
14
modules/ext.math.desktop.css
Normal file
14
modules/ext.math.desktop.css
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
/*
|
||||||
|
Document : ext.math.
|
||||||
|
Created on : 20.10.2014, 22:00:00
|
||||||
|
Author : fredw (Frédéric Wang)
|
||||||
|
Description:
|
||||||
|
Additional style, to load only on desktop.
|
||||||
|
*/
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
/* WOFF version of Latin Modern Math.
|
||||||
|
See https://github.com/fred-wang/MathFonts */
|
||||||
|
font-family: LatinModernMathWOFF;
|
||||||
|
src: url(./LatinModern/latinmodern-math.woff);
|
||||||
|
}
|
Loading…
Reference in a new issue