wgSmjDisplayAlign
这个提交包含在:
父节点
c4bd866a63
当前提交
2ea6ca3c06
|
@ -2,7 +2,9 @@
|
|||
class SimpleMathJax {
|
||||
|
||||
public static function onParserFirstCallInit( &$parser ) {
|
||||
global $wgOut, $wgSmjUseCdn, $wgSmjUseChem, $wgSmjEnableMenu, $wgSmjDisplayMath, $wgSmjExtraInlineMath, $wgSmjScale;
|
||||
global $wgOut, $wgSmjUseCdn, $wgSmjUseChem, $wgSmjEnableMenu,
|
||||
$wgSmjDisplayMath, $wgSmjExtraInlineMath,
|
||||
$wgSmjScale, $wgSmjDisplayAlign;
|
||||
|
||||
$wgOut->addJsConfigVars( 'wgSmjUseCdn', $wgSmjUseCdn );
|
||||
$wgOut->addJsConfigVars( 'wgSmjUseChem', $wgSmjUseChem );
|
||||
|
@ -10,6 +12,8 @@ class SimpleMathJax {
|
|||
$wgOut->addJsConfigVars( 'wgSmjDisplayMath', $wgSmjDisplayMath );
|
||||
$wgOut->addJsConfigVars( 'wgSmjExtraInlineMath', $wgSmjExtraInlineMath );
|
||||
$wgOut->addJsConfigVars( 'wgSmjScale', $wgSmjScale );
|
||||
$wgOut->addJsConfigVars( 'wgSmjDisplayAlign', $wgSmjDisplayAlign );
|
||||
|
||||
|
||||
$parser->setHook( 'math', __CLASS__ . '::renderMath' );
|
||||
if( $wgSmjUseChem ) $parser->setHook( 'chem', __CLASS__ . '::renderChem' );
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
"SmjEnableMenu": {"value":true, "description":"MathJax.options.enableMenu"},
|
||||
"SmjDisplayMath": {"value":[], "description":"MathJax.tex.displayMath"},
|
||||
"SmjExtraInlineMath": {"value":[], "description":"MathJax.tex.inlineMath"},
|
||||
"SmjScale": {"value":1, "description":"MathJax.chtml.scale"}
|
||||
"SmjScale": {"value":1, "description":"MathJax.chtml.scale"},
|
||||
"SmjDisplayAlign": {"value":"left", "description":"MathJax.chtml.displayAlign"}
|
||||
},
|
||||
"Hooks": {
|
||||
"ParserFirstCallInit": "SimpleMathJax::onParserFirstCallInit"
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
console.log( 'SmjExtraInlineMath', mw.config.get('SmjExtraInlineMath') );
|
||||
window.MathJax = {
|
||||
tex: {
|
||||
inlineMath: mw.config.get('wgSmjExtraInlineMath').concat([['[math]','[/math]']]),
|
||||
|
@ -6,7 +5,8 @@ window.MathJax = {
|
|||
packages: mw.config.get('wgSmjUseChem') ? {'[+]': ['mhchem']} : {}
|
||||
},
|
||||
chtml: {
|
||||
scale: mw.config.get('wgSmjScale')
|
||||
scale: mw.config.get('wgSmjScale'),
|
||||
displayAlign: mw.config.get('wgSmjDisplayAlign')
|
||||
},
|
||||
loader: {
|
||||
load: mw.config.get('wgSmjUseChem') ? ['[tex]/mhchem'] : []
|
||||
|
|
正在加载...
在新工单中引用