[MediaWiki-commits] [Gerrit] Merge recent changes to settings from master - change (mediawiki...Math)
Physikerwelt has uploaded a new change for review. https://gerrit.wikimedia.org/r/132366 Change subject: Merge recent changes to settings from master .. Merge recent changes to settings from master Change-Id: Ib014ef515e324d95a058e9bb9d5ee16a3e3a7dd0 --- M Math.php 1 file changed, 80 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math refs/changes/66/132366/1 diff --git a/Math.php b/Math.php index 00dc3a6..8bcfe55 100644 --- a/Math.php +++ b/Math.php @@ -41,14 +41,26 @@ define( 'MW_MATH_LATEXML', 7 ); /**@}*/ +/**@{ + * Mathstyle constants + */ +define( 'MW_MATHSTYLE_INLINE_DISPLAYSTYLE', 0 ); //default large operator inline +define( 'MW_MATHSTYLE_DISPLAY', 1 ); // large operators centered in a new line +define( 'MW_MATHSTYLE_INLINE', 2 ); // small operators inline +// There is no style which renders small operators +// but display the equation centered in a new line. +/**@}*/ + /**@var array defines the mode allowed on the server */ $wgMathValidModes = array( MW_MATH_PNG, MW_MATH_SOURCE, MW_MATH_MATHML ); /* * The default rendering mode for anonymous users. + * Valid options are defined in $wgMathValidModes. */ $wgDefaultUserOptions['math'] = MW_MATH_MATHML; - +/** @var boolean $wgDefaultUserOptions['mathJax'] determines if client-side MathJax is enabled by default */ +$wgDefaultUserOptions['mathJax'] = false; /** Stores debug information in the database and proviedes more detailed debug output*/ $wgMathDebug = false; /** @@ -103,7 +115,8 @@ * Setting for the LaTeXML renderer. * See http://dlmf.nist.gov/LaTeXML/manual/commands/latexmlpost.xhtml for details. */ -$wgMathDefaultLaTeXMLSetting = array( 'format' = 'xhtml', +$wgMathDefaultLaTeXMLSetting = array( + 'format' = 'xhtml', 'whatsin' = 'math', 'whatsout' = 'math', 'pmml', @@ -121,12 +134,12 @@ 'hyperref.sty', '[ids]latexml.sty', 'texvc' ), - ); +); /** - * The link to the texvc executable + * The link to the texvccheck executable */ -$wgMathTexvcCheckExecutable = dirname( __FILE__ ) . '/texvccheck/texvccheck'; +$wgMathTexvcCheckExecutable = __DIR__ . '/texvccheck/texvccheck'; // end of config settings. @@ -140,7 +153,7 @@ $wgHooks['UnitTestsList'][] = 'MathHooks::onRegisterUnitTests'; $wgHooks['PageRenderingHash'][] = 'MathHooks::onPageRenderingHash'; -$dir = dirname( __FILE__ ) . '/'; +$dir = __DIR__ . '/'; $wgAutoloadClasses['MathHooks'] = $dir . 'Math.hooks.php'; $wgAutoloadClasses['MathRenderer'] = $dir . 'MathRenderer.php'; $wgAutoloadClasses['MathSource'] = $dir . 'MathSource.php'; @@ -161,12 +174,12 @@ $wgSpecialPages['MathShowImage'] = 'SpecialMathShowImage'; $wgResourceModules['ext.math.styles'] = array( - 'localBasePath' = dirname( __FILE__ ) . '/modules', + 'localBasePath' = __DIR__ . '/modules', 'remoteExtPath' = 'Math/modules', 'styles' = 'ext.math.css', ); $wgResourceModules['ext.math.styles.fonts'] = array( - 'localBasePath' = dirname( __FILE__ ) . '/modules', + 'localBasePath' = __DIR__ . '/modules', 'remoteExtPath' = 'Math/modules', 'styles' = 'ext.math.fonts.css', ); @@ -174,25 +187,25 @@ $wgResourceModules += array( // Module to choose the best rendering option. 'ext.math.selector' = array( - 'localBasePath' = dirname( __FILE__ ) . '/modules', + 'localBasePath' = __DIR__ . '/modules', 'remoteExtPath' = 'Math/modules', 'scripts' = 'ext.math.selector.js' ), // Standard rendering with MathML. 'ext.math.mathml' = array( - 'localBasePath' = dirname( __FILE__ ) . '/modules', + 'localBasePath' = __DIR__ . '/modules', 'remoteExtPath' = 'Math/modules', 'styles' = 'ext.math.mathml.css' ), // Fallback rendering with SVG. 'ext.math.svg' = array( - 'localBasePath' = dirname( __FILE__ ) . '/modules', + 'localBasePath' = __DIR__ . '/modules', 'remoteExtPath' = 'Math/modules', 'styles' = 'ext.math.svg.css' ), // Web Fonts for native MathML. 'ext.math.fonts' = array( - 'localBasePath' = dirname( __FILE__ ) . '/modules', + 'localBasePath' = __DIR__ . '/modules', 'remoteExtPath' = 'Math/modules', 'styles' = 'ext.math.fonts.css' ) @@ -204,20 +217,20 @@ $wgResourceModules += array( // This enables MathJax. 'ext.math.mathjax.enabler' = array( - 'localBasePath' = dirname( __FILE__ ) . '/modules', + 'localBasePath' = __DIR__ . '/modules', 'remoteExtPath' = 'Math/modules', 'scripts' = 'ext.math.mathjax.enabler.js' ),
[MediaWiki-commits] [Gerrit] Merge recent changes to settings from master - change (mediawiki...Math)
jenkins-bot has submitted this change and it was merged. Change subject: Merge recent changes to settings from master .. Merge recent changes to settings from master Change-Id: Ib014ef515e324d95a058e9bb9d5ee16a3e3a7dd0 --- M Math.php 1 file changed, 80 insertions(+), 33 deletions(-) Approvals: Physikerwelt: Looks good to me, approved jenkins-bot: Verified diff --git a/Math.php b/Math.php index 00dc3a6..8bcfe55 100644 --- a/Math.php +++ b/Math.php @@ -41,14 +41,26 @@ define( 'MW_MATH_LATEXML', 7 ); /**@}*/ +/**@{ + * Mathstyle constants + */ +define( 'MW_MATHSTYLE_INLINE_DISPLAYSTYLE', 0 ); //default large operator inline +define( 'MW_MATHSTYLE_DISPLAY', 1 ); // large operators centered in a new line +define( 'MW_MATHSTYLE_INLINE', 2 ); // small operators inline +// There is no style which renders small operators +// but display the equation centered in a new line. +/**@}*/ + /**@var array defines the mode allowed on the server */ $wgMathValidModes = array( MW_MATH_PNG, MW_MATH_SOURCE, MW_MATH_MATHML ); /* * The default rendering mode for anonymous users. + * Valid options are defined in $wgMathValidModes. */ $wgDefaultUserOptions['math'] = MW_MATH_MATHML; - +/** @var boolean $wgDefaultUserOptions['mathJax'] determines if client-side MathJax is enabled by default */ +$wgDefaultUserOptions['mathJax'] = false; /** Stores debug information in the database and proviedes more detailed debug output*/ $wgMathDebug = false; /** @@ -103,7 +115,8 @@ * Setting for the LaTeXML renderer. * See http://dlmf.nist.gov/LaTeXML/manual/commands/latexmlpost.xhtml for details. */ -$wgMathDefaultLaTeXMLSetting = array( 'format' = 'xhtml', +$wgMathDefaultLaTeXMLSetting = array( + 'format' = 'xhtml', 'whatsin' = 'math', 'whatsout' = 'math', 'pmml', @@ -121,12 +134,12 @@ 'hyperref.sty', '[ids]latexml.sty', 'texvc' ), - ); +); /** - * The link to the texvc executable + * The link to the texvccheck executable */ -$wgMathTexvcCheckExecutable = dirname( __FILE__ ) . '/texvccheck/texvccheck'; +$wgMathTexvcCheckExecutable = __DIR__ . '/texvccheck/texvccheck'; // end of config settings. @@ -140,7 +153,7 @@ $wgHooks['UnitTestsList'][] = 'MathHooks::onRegisterUnitTests'; $wgHooks['PageRenderingHash'][] = 'MathHooks::onPageRenderingHash'; -$dir = dirname( __FILE__ ) . '/'; +$dir = __DIR__ . '/'; $wgAutoloadClasses['MathHooks'] = $dir . 'Math.hooks.php'; $wgAutoloadClasses['MathRenderer'] = $dir . 'MathRenderer.php'; $wgAutoloadClasses['MathSource'] = $dir . 'MathSource.php'; @@ -161,12 +174,12 @@ $wgSpecialPages['MathShowImage'] = 'SpecialMathShowImage'; $wgResourceModules['ext.math.styles'] = array( - 'localBasePath' = dirname( __FILE__ ) . '/modules', + 'localBasePath' = __DIR__ . '/modules', 'remoteExtPath' = 'Math/modules', 'styles' = 'ext.math.css', ); $wgResourceModules['ext.math.styles.fonts'] = array( - 'localBasePath' = dirname( __FILE__ ) . '/modules', + 'localBasePath' = __DIR__ . '/modules', 'remoteExtPath' = 'Math/modules', 'styles' = 'ext.math.fonts.css', ); @@ -174,25 +187,25 @@ $wgResourceModules += array( // Module to choose the best rendering option. 'ext.math.selector' = array( - 'localBasePath' = dirname( __FILE__ ) . '/modules', + 'localBasePath' = __DIR__ . '/modules', 'remoteExtPath' = 'Math/modules', 'scripts' = 'ext.math.selector.js' ), // Standard rendering with MathML. 'ext.math.mathml' = array( - 'localBasePath' = dirname( __FILE__ ) . '/modules', + 'localBasePath' = __DIR__ . '/modules', 'remoteExtPath' = 'Math/modules', 'styles' = 'ext.math.mathml.css' ), // Fallback rendering with SVG. 'ext.math.svg' = array( - 'localBasePath' = dirname( __FILE__ ) . '/modules', + 'localBasePath' = __DIR__ . '/modules', 'remoteExtPath' = 'Math/modules', 'styles' = 'ext.math.svg.css' ), // Web Fonts for native MathML. 'ext.math.fonts' = array( - 'localBasePath' = dirname( __FILE__ ) . '/modules', + 'localBasePath' = __DIR__ . '/modules', 'remoteExtPath' = 'Math/modules', 'styles' = 'ext.math.fonts.css' ) @@ -204,20 +217,20 @@ $wgResourceModules += array( // This enables MathJax. 'ext.math.mathjax.enabler' = array( - 'localBasePath' = dirname( __FILE__ ) . '/modules', + 'localBasePath' = __DIR__ . '/modules', 'remoteExtPath' = 'Math/modules', 'scripts' = 'ext.math.mathjax.enabler.js' ), // Main MathJax file