diff --git a/.gitignore b/.gitignore
index 321734c..3923841 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,41 +4,6 @@
*.kate-swp
.*.swp
/nbproject/private/
-# Add some files from the official MathJax distribution so that they will be
-# ignored when we copy the upstream version during an upgrade.
-modules/MathJax/.gitignore # .gitignore from the MathJax repository
-modules/MathJax/bower.json # bower.json from the MathJax repository
-modules/MathJax/MathJax.js # packed file
-modules/MathJax/config/ # packed files
-modules/MathJax/docs
-modules/MathJax/extensions/ # packed files
-modules/MathJax/fonts/HTML-CSS/TeX/png # We don't use the image fallback
-modules/MathJax/fonts/HTML-CSS/Asana-Math
-modules/MathJax/fonts/HTML-CSS/Gyre-Pagella
-modules/MathJax/fonts/HTML-CSS/Gyre-Termes
-modules/MathJax/fonts/HTML-CSS/Latin-Modern
-modules/MathJax/fonts/HTML-CSS/Neo-Euler
-modules/MathJax/fonts/HTML-CSS/STIX-Web
-modules/MathJax/jax/ # packed files
-modules/MathJax/localization/ # packed files
-modules/MathJax/test
-modules/MathJax/unpacked/config/ # We don't use predefined config files
-modules/MathJax/unpacked/jax/input/MathML/entities # We don't use MathML entity names
-modules/MathJax/unpacked/jax/output/HTML-CSS/fonts/STIX
-modules/MathJax/unpacked/jax/output/HTML-CSS/fonts/Asana-Math/ # We don't use the Asana-Math fonts
-modules/MathJax/unpacked/jax/output/HTML-CSS/fonts/Gyre-Pagella/ # We don't use the Gyre-Pagella
-ts
-modules/MathJax/unpacked/jax/output/HTML-CSS/fonts/Gyre-Termes/ # We don't use the Gyre
-modules/MathJax/unpacked/jax/output/HTML-CSS/fonts/Latin-Modern/ # We don't use the Latin-Modern
-modules/MathJax/unpacked/jax/output/HTML-CSS/fonts/Neo-Euler/ # We don't use the Neo-Euler fonts
-modules/MathJax/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/ # We don't use the STIX-Web fonts
-modules/MathJax/unpacked/jax/output/SVG/fonts/STIX
-modules/MathJax/unpacked/jax/output/SVG/fonts/Asana-Math
-modules/MathJax/unpacked/jax/output/SVG/fonts/Gyre-Pagella
-modules/MathJax/unpacked/jax/output/SVG/fonts/Gyre-Termes
-modules/MathJax/unpacked/jax/output/SVG/fonts/Latin-Modern
-modules/MathJax/unpacked/jax/output/SVG/fonts/Neo-Euler
-modules/MathJax/unpacked/jax/output/SVG/fonts/STIX-Web
tests/browser/.bundle
tests/browser/.gem
node_modules/
diff --git a/Math.hooks.php b/Math.hooks.php
index 04ee31f..16a14b3 100644
--- a/Math.hooks.php
+++ b/Math.hooks.php
@@ -37,7 +37,6 @@ class MathHooks {
)
) {
// The math part of cache key starts with "math=" followed by a star or a number for the math mode
- // and the optional letter j that indicates if clientside MathJax rendering is used.
if ( preg_match( '/(^|!)' . self::mathCacheKey . '[*\d]m?(!|$)/', $confstr ) ) {
$confstr = preg_replace(
'/(^|!)' . self::mathCacheKey . '[*\d]m?(!|$)/',
@@ -128,9 +127,6 @@ class MathHooks {
}
Hooks::run( 'MathFormulaPostRender',
array( $parser, &$renderer, &$renderedMath ) );// Enables indexing of math formula
- if ( $mode == MW_MATH_MATHJAX || $mode == MW_MATH_LATEXML_JAX ) {
- $parser->getOutput()->addModules( array( 'ext.math.mathjax.enabler' ) );
- }
$parser->getOutput()->addModuleStyles( array( 'ext.math.styles' ) );
if ( $mode == MW_MATH_MATHML ) {
$parser->getOutput()->addModuleStyles( array( 'ext.math.desktop.styles' ) );
diff --git a/Math.php b/Math.php
index 79c021b..2b467e5 100644
--- a/Math.php
+++ b/Math.php
@@ -59,7 +59,7 @@ define( 'MW_MATHSTYLE_INLINE', 2 ); // small operators inline
/**@}*/
/**@var array defines the mode allowed on the server */
-$wgMathValidModes = array( MW_MATH_PNG, MW_MATH_SOURCE, MW_MATH_MATHML, MW_MATH_MATHJAX );
+$wgMathValidModes = array( MW_MATH_PNG, MW_MATH_SOURCE, MW_MATH_MATHML );
/*
* The default rendering mode for anonymous users.
@@ -257,241 +257,6 @@ $wgResourceModules['ext.math.scripts'] = array(
'scripts' => 'ext.math.js',
);
-// MathJax module
-// If you modify these arrays, update ext.math.mathjax.enabler.js to ensure
-// that getModuleNameFromFile knows how to map files to MediaWiki modules.
-$wgResourceModules += array(
- // This enables MathJax.
- 'ext.math.mathjax.enabler' => array(
- 'localBasePath' => __DIR__ . '/modules',
- 'remoteExtPath' => 'Math/modules',
- 'scripts' => 'ext.math.mathjax.enabler.js'
- ),
- // Main MathJax file
- 'ext.math.mathjax.mathjax' => array(
- 'localBasePath' => __DIR__ . '/modules/MathJax/unpacked',
- 'remoteExtPath' => 'Math/modules/MathJax/unpacked',
- 'scripts' => 'MathJax.js'
- ),
-
- // Localization data for the current language
- 'ext.math.mathjax.localization' => array(
- 'localBasePath' => __DIR__ . '/modules/MathJax/unpacked/localization',
- 'remoteExtPath' => 'Math/modules/MathJax/unpacked/localization',
- 'languageScripts' => array(
- // The localization data for 'en' are actually never used since an English fallback is always specified in MathJax's code when a string is used.
- 'br' => array ( 'br/br.js', 'br/HelpDialog.js', 'br/MathMenu.js', 'br/TeX.js', 'br/FontWarnings.js', 'br/HTML-CSS.js', 'br/MathML.js' ),
- 'cdo' => array ( 'cdo/cdo.js', 'cdo/HelpDialog.js', 'cdo/MathMenu.js', 'cdo/TeX.js', 'cdo/FontWarnings.js', 'cdo/HTML-CSS.js', 'cdo/MathML.js' ),
- 'cs' => array ( 'cs/cs.js', 'cs/HelpDialog.js', 'cs/MathMenu.js', 'cs/TeX.js', 'cs/FontWarnings.js', 'cs/HTML-CSS.js', 'cs/MathML.js' ),
- 'da' => array ( 'da/da.js', 'da/HelpDialog.js', 'da/MathMenu.js', 'da/TeX.js', 'da/FontWarnings.js', 'da/HTML-CSS.js', 'da/MathML.js' ),
- 'de' => array ( 'de/de.js', 'de/HelpDialog.js', 'de/MathMenu.js', 'de/TeX.js', 'de/FontWarnings.js', 'de/HTML-CSS.js', 'de/MathML.js' ),
- 'eo' => array ( 'eo/eo.js', 'eo/HelpDialog.js', 'eo/MathMenu.js', 'eo/TeX.js', 'eo/FontWarnings.js', 'eo/HTML-CSS.js', 'eo/MathML.js' ),
- 'es' => array ( 'es/es.js', 'es/HelpDialog.js', 'es/MathMenu.js', 'es/TeX.js', 'es/FontWarnings.js', 'es/HTML-CSS.js', 'es/MathML.js' ),
- 'fa' => array ( 'fa/fa.js', 'fa/HelpDialog.js', 'fa/MathMenu.js', 'fa/TeX.js', 'fa/FontWarnings.js', 'fa/HTML-CSS.js', 'fa/MathML.js' ),
- 'fi' => array ( 'fi/fi.js', 'fi/HelpDialog.js', 'fi/MathMenu.js', 'fi/TeX.js', 'fi/FontWarnings.js', 'fi/HTML-CSS.js', 'fi/MathML.js' ),
- 'fr' => array ( 'fr/fr.js', 'fr/HelpDialog.js', 'fr/MathMenu.js', 'fr/TeX.js', 'fr/FontWarnings.js', 'fr/HTML-CSS.js', 'fr/MathML.js' ),
- 'gl' => array ( 'gl/gl.js', 'gl/HelpDialog.js', 'gl/MathMenu.js', 'gl/TeX.js', 'gl/FontWarnings.js', 'gl/HTML-CSS.js', 'gl/MathML.js' ),
- 'he' => array ( 'he/he.js', 'he/HelpDialog.js', 'he/MathMenu.js', 'he/TeX.js', 'he/FontWarnings.js', 'he/HTML-CSS.js', 'he/MathML.js' ),
- 'ia' => array ( 'ia/ia.js', 'ia/HelpDialog.js', 'ia/MathMenu.js', 'ia/TeX.js', 'ia/FontWarnings.js', 'ia/HTML-CSS.js', 'ia/MathML.js' ),
- 'it' => array ( 'it/it.js', 'it/HelpDialog.js', 'it/MathMenu.js', 'it/TeX.js', 'it/FontWarnings.js', 'it/HTML-CSS.js', 'it/MathML.js' ),
- 'ja' => array ( 'ja/ja.js', 'ja/HelpDialog.js', 'ja/MathMenu.js', 'ja/TeX.js', 'ja/FontWarnings.js', 'ja/HTML-CSS.js', 'ja/MathML.js' ),
- 'ko' => array ( 'ko/ko.js', 'ko/HelpDialog.js', 'ko/MathMenu.js', 'ko/TeX.js', 'ko/FontWarnings.js', 'ko/HTML-CSS.js', 'ko/MathML.js' ),
- 'lb' => array ( 'lb/lb.js', 'lb/HelpDialog.js', 'lb/MathMenu.js', 'lb/TeX.js', 'lb/FontWarnings.js', 'lb/HTML-CSS.js', 'lb/MathML.js' ),
- 'mk' => array ( 'mk/mk.js', 'mk/HelpDialog.js', 'mk/MathMenu.js', 'mk/TeX.js', 'mk/FontWarnings.js', 'mk/HTML-CSS.js', 'mk/MathML.js' ),
- 'nl' => array ( 'nl/nl.js', 'nl/HelpDialog.js', 'nl/MathMenu.js', 'nl/TeX.js', 'nl/FontWarnings.js', 'nl/HTML-CSS.js', 'nl/MathML.js' ),
- 'oc' => array ( 'oc/oc.js', 'oc/HelpDialog.js', 'oc/MathMenu.js', 'oc/TeX.js', 'oc/FontWarnings.js', 'oc/HTML-CSS.js', 'oc/MathML.js' ),
- 'pl' => array ( 'pl/pl.js', 'pl/HelpDialog.js', 'pl/MathMenu.js', 'pl/TeX.js', 'pl/FontWarnings.js', 'pl/HTML-CSS.js', 'pl/MathML.js' ),
- 'pt' => array ( 'pt/pt.js', 'pt/HelpDialog.js', 'pt/MathMenu.js', 'pt/TeX.js', 'pt/FontWarnings.js', 'pt/HTML-CSS.js', 'pt/MathML.js' ),
- 'pt-br' => array ( 'pt-br/pt-br.js', 'pt-br/HelpDialog.js', 'pt-br/MathMenu.js', 'pt-br/TeX.js', 'pt-br/FontWarnings.js', 'pt-br/HTML-CSS.js', 'pt-br/MathML.js' ),
- 'ru' => array ( 'ru/ru.js', 'ru/HelpDialog.js', 'ru/MathMenu.js', 'ru/TeX.js', 'ru/FontWarnings.js', 'ru/HTML-CSS.js', 'ru/MathML.js' ),
- 'sl' => array ( 'sl/sl.js', 'sl/HelpDialog.js', 'sl/MathMenu.js', 'sl/TeX.js', 'sl/FontWarnings.js', 'sl/HTML-CSS.js', 'sl/MathML.js' ),
- 'sv' => array ( 'sv/sv.js', 'sv/HelpDialog.js', 'sv/MathMenu.js', 'sv/TeX.js', 'sv/FontWarnings.js', 'sv/HTML-CSS.js', 'sv/MathML.js' ),
- 'tr' => array ( 'tr/tr.js', 'tr/HelpDialog.js', 'tr/MathMenu.js', 'tr/TeX.js', 'tr/FontWarnings.js', 'tr/HTML-CSS.js', 'tr/MathML.js' ),
- 'uk' => array ( 'uk/uk.js', 'uk/HelpDialog.js', 'uk/MathMenu.js', 'uk/TeX.js', 'uk/FontWarnings.js', 'uk/HTML-CSS.js', 'uk/MathML.js' ),
- 'zh-hans' => array ( 'zh-hans/zh-hans.js', 'zh-hans/HelpDialog.js', 'zh-hans/MathMenu.js', 'zh-hans/TeX.js', 'zh-hans/FontWarnings.js', 'zh-hans/HTML-CSS.js', 'zh-hans/MathML.js' )
- ),
- 'dependencies' => 'ext.math.mathjax.mathjax'
- ),
-
- // Configuration files for the MathJax input/output processors
- 'ext.math.mathjax.jax.config' => array(
- 'localBasePath' => __DIR__ . '/modules/MathJax/unpacked/jax',
- 'remoteExtPath' => 'Math/modules/MathJax/unpacked/jax',
- 'scripts' => array( 'input/TeX/config.js', 'input/MathML/config.js', 'output/HTML-CSS/config.js', 'output/NativeMML/config.js', 'output/SVG/config.js' ),
- 'dependencies' => 'ext.math.mathjax.mathjax'
- ),
-
- // MathJax Extensions used in MediaWiki
- //
- // Note that these extensions wait to receive 'ready' signals from their
- // dependencies. Hence we only specify 'ext.math.mathjax.mathjax' here so that
- // we can load them in MathJax.Hub.Startup.Extensions.
- 'ext.math.mathjax.extensions.ui' => array(
- 'localBasePath' => __DIR__ . '/modules/MathJax/unpacked/extensions',
- 'remoteExtPath' => 'Math/modules/MathJax/unpacked/extensions',
- 'scripts' => array( 'MathEvents.js', 'MathZoom.js', 'MathMenu.js', 'toMathML.js' ),
- 'dependencies' => 'ext.math.mathjax.mathjax'
- ),
- 'ext.math.mathjax.extensions.TeX' => array(
- 'localBasePath' => __DIR__ . '/modules/MathJax/unpacked/extensions',
- 'remoteExtPath' => 'Math/modules/MathJax/unpacked/extensions',
- 'scripts' => array( 'TeX/noUndefined.js', 'TeX/AMSmath.js', 'TeX/AMSsymbols.js', 'TeX/boldsymbol.js', 'TeX/color.js', 'TeX/cancel.js', 'TeX/mathchoice.js' ),
- 'dependencies' => array( 'ext.math.mathjax.mathjax' )
- ),
- 'ext.math.mathjax.extensions.mediawiki' => array(
- 'localBasePath' => __DIR__ . '/modules/mediawiki-extensions',
- 'remoteExtPath' => 'Math/modules/mediawiki-extensions',
- 'scripts' => array( 'wiki2jax.js', 'texvc.js' ),
- 'dependencies' => array( 'ext.math.mathjax.mathjax' )
- ),
- 'ext.math.mathjax.extensions.mml2jax' => array(
- 'localBasePath' => __DIR__ . '/modules/MathJax/unpacked/extensions',
- 'remoteExtPath' => 'Math/modules/MathJax/unpacked/extensions',
- 'scripts' => array( 'mml2jax.js' ),
- 'dependencies' => 'ext.math.mathjax.mathjax'
- ),
- 'ext.math.mathjax.extensions' => array(
- 'dependencies' => array( 'ext.math.mathjax.extensions.ui', 'ext.math.mathjax.extensions.TeX', 'ext.math.mathjax.extensions.mediawiki', 'ext.math.mathjax.extensions.mml2jax' )
- ),
-
- // MathJax module for representing MathML elements
- 'ext.math.mathjax.jax.element.mml.optable' => array(
- 'localBasePath' => __DIR__ . '/modules/MathJax/unpacked/jax/element/mml/optable',
- 'remoteExtPath' => 'Math/modules/MathJax/unpacked/jax/element/mml/optable',
- 'scripts' => array( 'Arrows.js', 'BasicLatin.js', 'CombDiacritMarks.js', 'CombDiactForSymbols.js', 'Dingbats.js', 'GeneralPunctuation.js', 'GeometricShapes.js', 'GreekAndCoptic.js', 'Latin1Supplement.js', 'LetterlikeSymbols.js', 'MathOperators.js', 'MiscMathSymbolsA.js', 'MiscMathSymbolsB.js', 'MiscSymbolsAndArrows.js', 'MiscTechnical.js', 'SpacingModLetters.js', 'SupplementalArrowsA.js', 'SupplementalArrowsB.js', 'SuppMathOperators.js' ),
- 'dependencies' => array( 'ext.math.mathjax.jax.element.mml' )
- ),
- 'ext.math.mathjax.jax.element.mml' => array(
- 'localBasePath' => __DIR__ . '/modules/MathJax/unpacked/jax/element/mml',
- 'remoteExtPath' => 'Math/modules/MathJax/unpacked/jax/element/mml',
- 'scripts' => array( 'jax.js' ),
- 'dependencies' => 'ext.math.mathjax.mathjax'
- ),
-
- // MathJax MathML input processor
- //
- // Note that upstream has an entities/ directory with Javascript files
- // defining entity names of http://www.w3.org/TR/xml-entity-names/
- // We don't use these files because these entities are now well
- // supported by modern HTML5 rendering engines anyway.
- 'ext.math.mathjax.jax.input.MathML' => array(
- 'localBasePath' => __DIR__ . '/modules/MathJax/unpacked/jax/input/MathML',
- 'remoteExtPath' => 'Math/modules/MathJax/unpacked/jax/input/MathML',
- 'scripts' => array( 'jax.js' ),
- 'dependencies' => array( 'ext.math.mathjax.jax.config', 'ext.math.mathjax.jax.element.mml' )
- ),
-
- // MathJax TeX input processor
- 'ext.math.mathjax.jax.input.TeX' => array(
- 'localBasePath' => __DIR__ . '/modules/MathJax/unpacked/jax/input/TeX',
- 'remoteExtPath' => 'Math/modules/MathJax/unpacked/jax/input/TeX',
- 'scripts' => array( 'jax.js' ),
- 'dependencies' => array( 'ext.math.mathjax.jax.config', 'ext.math.mathjax.jax.element.mml' )
- ),
-
- // MathJax NativeMML output processor
- 'ext.math.mathjax.jax.output.NativeMML' => array(
- 'localBasePath' => __DIR__ . '/modules/MathJax/unpacked/jax/output/NativeMML',
- 'remoteExtPath' => 'Math/modules/MathJax/unpacked/jax/output/NativeMML',
- 'scripts' => array( 'jax.js' ),
- 'dependencies' => array( 'ext.math.mathjax.jax.config', 'ext.math.mathjax.jax.element.mml' )
- ),
-
- // MathJax HTML-CSS output processor
- // Note: at the moment, we use neither image fonts nor STIX/STIX-Web/Asana/GyrePagella/GyreTermes/NeoEuler/LatinModern fonts.
- 'ext.math.mathjax.jax.output.HTML-CSS.autoload' => array(
- 'localBasePath' => __DIR__ . '/modules/MathJax/unpacked/jax/output/HTML-CSS/autoload',
- 'remoteExtPath' => 'Math/modules/MathJax/unpacked/jax/output/HTML-CSS/autoload',
- 'scripts' => array( 'annotation-xml.js', 'maction.js', 'menclose.js', 'mglyph.js', 'mmultiscripts.js', 'ms.js', 'mtable.js', 'multiline.js' ),
- 'dependencies' => array( 'ext.math.mathjax.jax.output.HTML-CSS' )
- ),
- 'ext.math.mathjax.jax.output.HTML-CSS' => array(
- 'localBasePath' => __DIR__ . '/modules/MathJax/unpacked/jax/output/HTML-CSS',
- 'remoteExtPath' => 'Math/modules/MathJax/unpacked/jax/output/HTML-CSS',
- 'scripts' => array( 'jax.js' ),
- 'dependencies' => array( 'ext.math.mathjax.jax.config', 'ext.math.mathjax.jax.element.mml' )
- ),
- 'ext.math.mathjax.jax.output.HTML-CSS.fonts.TeX.fontdata' => array(
- 'localBasePath' => __DIR__ . '/modules/MathJax/unpacked/jax/output/HTML-CSS/fonts/TeX',
- 'remoteExtPath' => 'Math/modules/MathJax/unpacked/jax/output/HTML-CSS/fonts/TeX',
- 'scripts' => array( 'fontdata.js', 'fontdata-extra.js' ),
- 'dependencies' => array( 'ext.math.mathjax.jax.output.HTML-CSS' )
- ),
-
- // MathJax SVG output processor
- 'ext.math.mathjax.jax.output.SVG.autoload' => array(
- 'localBasePath' => __DIR__ . '/modules/MathJax/unpacked/jax/output/SVG/autoload',
- 'remoteExtPath' => 'Math/modules/MathJax/unpacked/jax/output/SVG/autoload',
- 'scripts' => array( 'annotation-xml.js', 'maction.js', 'menclose.js', 'mglyph.js', 'mmultiscripts.js', 'ms.js', 'mtable.js', 'multiline.js' ),
- 'dependencies' => array( 'ext.math.mathjax.jax.output.SVG' )
- ),
- 'ext.math.mathjax.jax.output.SVG' => array(
- 'localBasePath' => __DIR__ . '/modules/MathJax/unpacked/jax/output/SVG',
- 'remoteExtPath' => 'Math/modules/MathJax/unpacked/jax/output/SVG',
- 'scripts' => array( 'jax.js' ),
- 'dependencies' => array( 'ext.math.mathjax.jax.config', 'ext.math.mathjax.jax.element.mml' )
- ),
- 'ext.math.mathjax.jax.output.SVG.fonts.TeX.fontdata' => array(
- 'localBasePath' => __DIR__ . '/modules/MathJax/unpacked/jax/output/SVG/fonts/TeX',
- 'remoteExtPath' => 'Math/modules/MathJax/unpacked/jax/output/SVG/fonts/TeX',
- 'scripts' => array( 'fontdata.js', 'fontdata-extra.js' ),
- 'dependencies' => array( 'ext.math.mathjax.jax.output.SVG' )
- )
-);
-
-// MathJax TeX Fonts
-// - The two sets for HTML-CSS and SVG are slightly different, so we can't really use a foreach loop.
-// - the Main.js files must be executed before the other files (the former define the MathJax.OutputJax[*].FONTDATA.FONTS[*] object while the latter extend that object). Hence we create separate *MainJS modules for them.
-$moduleTemplateHTMLCSS = array(
- 'localBasePath' => __DIR__ . '/modules/MathJax/unpacked/jax/output/HTML-CSS/fonts/TeX',
- 'remoteExtPath' => 'Math/modules/MathJax/unpacked/jax/output/HTML-CSS/fonts/TeX',
- 'dependencies' => array( 'ext.math.mathjax.jax.output.HTML-CSS.fonts.TeX.fontdata' )
-);
-$wgResourceModules += array(
- 'ext.math.mathjax.jax.output.HTML-CSS.fonts.TeX.MainJS' => array(
- 'scripts' => array( 'Size1/Regular/Main.js', 'Size2/Regular/Main.js', 'Size3/Regular/Main.js', 'Size4/Regular/Main.js', 'Main/Bold/Main.js', 'Main/Italic/Main.js', 'Main/Regular/Main.js', 'AMS/Regular/Main.js', 'Caligraphic/Bold/Main.js', 'Caligraphic/Regular/Main.js', 'Fraktur/Bold/Main.js', 'Fraktur/Regular/Main.js', 'Greek/BoldItalic/Main.js', 'Greek/Bold/Main.js', 'Greek/Italic/Main.js', 'Greek/Regular/Main.js', 'Math/BoldItalic/Main.js', 'Math/Italic/Main.js', 'SansSerif/Bold/Main.js', 'SansSerif/Italic/Main.js', 'SansSerif/Regular/Main.js', 'Script/Regular/Main.js', 'Typewriter/Regular/Main.js', 'WinChrome/Regular/Main.js', 'WinIE6/Regular/Main.js' )
- ) + $moduleTemplateHTMLCSS
-);
-$wgResourceModules += array(
- 'ext.math.mathjax.jax.output.HTML-CSS.fonts.TeX.Main' => array(
- 'scripts' => array( 'Main/Bold/Arrows.js', 'Main/Bold/CombDiacritMarks.js', 'Main/Bold/CombDiactForSymbols.js', 'Main/Bold/GeneralPunctuation.js', 'Main/Bold/GeometricShapes.js', 'Main/Bold/Latin1Supplement.js', 'Main/Bold/LatinExtendedA.js', 'Main/Bold/LatinExtendedB.js', 'Main/Bold/LetterlikeSymbols.js', 'Main/Bold/MathOperators.js', 'Main/Bold/MiscMathSymbolsA.js', 'Main/Bold/MiscSymbols.js', 'Main/Bold/MiscTechnical.js', 'Main/Bold/SpacingModLetters.js', 'Main/Bold/SupplementalArrowsA.js', 'Main/Bold/SuppMathOperators.js', 'Main/Italic/CombDiacritMarks.js', 'Main/Italic/GeneralPunctuation.js', 'Main/Italic/Latin1Supplement.js', 'Main/Italic/LetterlikeSymbols.js', 'Main/Regular/CombDiacritMarks.js', 'Main/Regular/GeometricShapes.js', 'Main/Regular/MiscSymbols.js', 'Main/Regular/SpacingModLetters.js' )
- ) + $moduleTemplateHTMLCSS
-);
-$wgResourceModules += array(
- 'ext.math.mathjax.jax.output.HTML-CSS.fonts.TeX.AMS' => array(
- 'scripts' => array( 'AMS/Regular/Arrows.js', 'AMS/Regular/BBBold.js', 'AMS/Regular/BoxDrawing.js', 'AMS/Regular/CombDiacritMarks.js', 'AMS/Regular/Dingbats.js', 'AMS/Regular/EnclosedAlphanum.js', 'AMS/Regular/GeneralPunctuation.js', 'AMS/Regular/GeometricShapes.js', 'AMS/Regular/GreekAndCoptic.js', 'AMS/Regular/Latin1Supplement.js', 'AMS/Regular/LatinExtendedA.js', 'AMS/Regular/LetterlikeSymbols.js', 'AMS/Regular/MathOperators.js', 'AMS/Regular/MiscMathSymbolsB.js', 'AMS/Regular/MiscSymbols.js', 'AMS/Regular/MiscTechnical.js', 'AMS/Regular/PUA.js', 'AMS/Regular/SpacingModLetters.js', 'AMS/Regular/SuppMathOperators.js' )
- ) + $moduleTemplateHTMLCSS
-);
-$wgResourceModules += array(
- 'ext.math.mathjax.jax.output.HTML-CSS.fonts.TeX.Extra' => array(
- 'scripts' => array( 'Fraktur/Bold/BasicLatin.js', 'Fraktur/Bold/Other.js', 'Fraktur/Bold/PUA.js', 'Fraktur/Regular/BasicLatin.js', 'Fraktur/Regular/Other.js', 'Fraktur/Regular/PUA.js', 'SansSerif/Bold/BasicLatin.js', 'SansSerif/Bold/CombDiacritMarks.js', 'SansSerif/Bold/Other.js', 'SansSerif/Italic/BasicLatin.js', 'SansSerif/Italic/CombDiacritMarks.js', 'SansSerif/Italic/Other.js', 'SansSerif/Regular/BasicLatin.js', 'SansSerif/Regular/CombDiacritMarks.js', 'SansSerif/Regular/Other.js', 'Script/Regular/BasicLatin.js', 'Script/Regular/Other.js', 'Typewriter/Regular/BasicLatin.js', 'Typewriter/Regular/CombDiacritMarks.js', 'Typewriter/Regular/Other.js', 'WinIE6/Regular/AMS.js', 'WinIE6/Regular/Bold.js' )
- ) + $moduleTemplateHTMLCSS
-);
-$moduleTemplateSVG = array(
- 'localBasePath' => __DIR__ . '/modules/MathJax/unpacked/jax/output/SVG/fonts/TeX',
- 'remoteExtPath' => 'Math/modules/MathJax/unpacked/jax/output/SVG/fonts/TeX',
- 'dependencies' => array( 'ext.math.mathjax.jax.output.SVG.fonts.TeX.fontdata' )
-);
-$wgResourceModules += array(
- 'ext.math.mathjax.jax.output.SVG.fonts.TeX.MainJS' => array(
- 'scripts' => array( 'Size1/Regular/Main.js', 'Size2/Regular/Main.js', 'Size3/Regular/Main.js', 'Size4/Regular/Main.js', 'Main/Bold/Main.js', 'Main/Italic/Main.js', 'Main/Regular/Main.js', 'AMS/Regular/Main.js', 'Caligraphic/Bold/Main.js', 'Caligraphic/Regular/Main.js', 'Fraktur/Bold/Main.js', 'Fraktur/Regular/Main.js', 'Math/BoldItalic/Main.js', 'Math/Italic/Main.js', 'SansSerif/Bold/Main.js', 'SansSerif/Italic/Main.js', 'SansSerif/Regular/Main.js', 'Script/Regular/Main.js', 'Typewriter/Regular/Main.js' )
- ) + $moduleTemplateSVG
-);
-$wgResourceModules += array(
- 'ext.math.mathjax.jax.output.SVG.fonts.TeX.Main' => array(
- 'scripts' => array( 'Main/Bold/Arrows.js', 'Main/Bold/BasicLatin.js', 'Main/Bold/CombDiacritMarks.js', 'Main/Bold/CombDiactForSymbols.js', 'Main/Bold/GeneralPunctuation.js', 'Main/Bold/GeometricShapes.js', 'Main/Bold/GreekAndCoptic.js', 'Main/Bold/Latin1Supplement.js', 'Main/Bold/LatinExtendedA.js', 'Main/Bold/LatinExtendedB.js', 'Main/Bold/LetterlikeSymbols.js', 'Main/Bold/MathOperators.js', 'Main/Bold/MiscMathSymbolsA.js', 'Main/Bold/MiscSymbols.js', 'Main/Bold/MiscTechnical.js', 'Main/Bold/SpacingModLetters.js', 'Main/Bold/SupplementalArrowsA.js', 'Main/Bold/SuppMathOperators.js', 'Main/Italic/BasicLatin.js', 'Main/Italic/CombDiacritMarks.js', 'Main/Italic/GeneralPunctuation.js', 'Main/Italic/GreekAndCoptic.js', 'Main/Italic/LatinExtendedA.js', 'Main/Italic/LatinExtendedB.js', 'Main/Italic/LetterlikeSymbols.js', 'Main/Italic/MathOperators.js', 'Main/Regular/BasicLatin.js', 'Main/Regular/CombDiacritMarks.js', 'Main/Regular/GeometricShapes.js', 'Main/Regular/GreekAndCoptic.js', 'Main/Regular/LatinExtendedA.js', 'Main/Regular/LatinExtendedB.js', 'Main/Regular/LetterlikeSymbols.js', 'Main/Regular/MathOperators.js', 'Main/Regular/MiscSymbols.js', 'Main/Regular/SpacingModLetters.js', 'Main/Regular/SuppMathOperators.js' )
- ) + $moduleTemplateSVG
-);
-$wgResourceModules += array(
- 'ext.math.mathjax.jax.output.SVG.fonts.TeX.AMS' => array(
- 'scripts' => array( 'AMS/Regular/Arrows.js', 'AMS/Regular/BoxDrawing.js', 'AMS/Regular/CombDiacritMarks.js', 'AMS/Regular/Dingbats.js', 'AMS/Regular/EnclosedAlphanum.js', 'AMS/Regular/GeneralPunctuation.js', 'AMS/Regular/GeometricShapes.js', 'AMS/Regular/GreekAndCoptic.js', 'AMS/Regular/Latin1Supplement.js', 'AMS/Regular/LatinExtendedA.js', 'AMS/Regular/LetterlikeSymbols.js', 'AMS/Regular/MathOperators.js', 'AMS/Regular/MiscMathSymbolsB.js', 'AMS/Regular/MiscSymbols.js', 'AMS/Regular/MiscTechnical.js', 'AMS/Regular/PUA.js', 'AMS/Regular/SpacingModLetters.js', 'AMS/Regular/SuppMathOperators.js' )
- ) + $moduleTemplateSVG
-);
-$wgResourceModules += array(
- 'ext.math.mathjax.jax.output.SVG.fonts.TeX.Extra' => array(
- 'scripts' => array( 'Fraktur/Bold/BasicLatin.js', 'Fraktur/Bold/Other.js', 'Fraktur/Bold/PUA.js', 'Fraktur/Regular/BasicLatin.js', 'Fraktur/Regular/Other.js', 'Fraktur/Regular/PUA.js', 'SansSerif/Bold/BasicLatin.js', 'SansSerif/Bold/CombDiacritMarks.js', 'SansSerif/Bold/Other.js', 'SansSerif/Italic/BasicLatin.js', 'SansSerif/Italic/CombDiacritMarks.js', 'SansSerif/Italic/Other.js', 'SansSerif/Regular/BasicLatin.js', 'SansSerif/Regular/CombDiacritMarks.js', 'SansSerif/Regular/Other.js', 'Script/Regular/BasicLatin.js', 'Typewriter/Regular/BasicLatin.js', 'Typewriter/Regular/CombDiacritMarks.js', 'Typewriter/Regular/Other.js' )
- ) + $moduleTemplateSVG
-);
$moduleTemplate = array(
'localBasePath' => __DIR__ . '/modules',
diff --git a/modules/MathJax/LICENSE b/modules/MathJax/LICENSE
deleted file mode 100644
index d645695..0000000
--- a/modules/MathJax/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/modules/MathJax/README-branch.txt b/modules/MathJax/README-branch.txt
deleted file mode 100644
index 3cd8925..0000000
--- a/modules/MathJax/README-branch.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is release branch v2.3 of MathJax.
diff --git a/modules/MathJax/README.md b/modules/MathJax/README.md
deleted file mode 100644
index 5ae9d8b..0000000
--- a/modules/MathJax/README.md
+++ /dev/null
@@ -1,52 +0,0 @@
-# MathJax
-
-## Beautiful math in all browsers
-
-MathJax is an open-source JavaScript display engine for LaTeX, MathML, and
-AsciiMath notation that works in all modern browsers. It was designed with
-the goal of consolidating the recent advances in web technologies into a
-single, definitive, math-on-the-web platform supporting the major browsers
-and operating systems. It requires no setup on the part of the user (no
-plugins to download or software to install), so the page author can write
-web documents that include mathematics and be confident that users will be
-able to view it naturally and easily. Simply include MathJax and some
-mathematics in a web page, and MathJax does the rest.
-
-Some of the main features of MathJax include:
-
-- High-quality display of LaTeX, MathML, and AsciiMath notation in HTML pages
-
-- Supported in most browsers with no plug-ins, extra fonts, or special
- setup for the reader
-
-- Easy for authors, flexible for publishers, extensible for developers
-
-- Supports math accessibility, cut-and-paste interoperability, and other
- advanced functionality
-
-- Powerful API for integration with other web applications
-
-See for additional details.
-
-
-## Installation and Usage
-
-The MathJax installation and usage documentation is available in the
-`docs/html` directory of the MathJax distribution (see
-`docs/html/index.html` for the starting point). The documents are also
-available on the MathJax web site on line at .
-
-
-## Community
-
-The main MathJax website is , and it includes
-announcements and other important information. MathJax is maintained and
-distributed on GitHub at . A user forum
-for asking questions and getting assistance is hosted at Google, and the
-bug tracker is hosted at GitHub:
-
-Bug tracker:
-MathJax-Users Group:
-
-Before reporting a bug, please check that it has not already been reported.
-Also, please use the bug tracker for reporting bugs rather than the help forum.
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_AMS-Regular.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_AMS-Regular.eot
deleted file mode 100644
index 6d8ab3c..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_AMS-Regular.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Caligraphic-Bold.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Caligraphic-Bold.eot
deleted file mode 100644
index 86ce034..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Caligraphic-Bold.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Caligraphic-Regular.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Caligraphic-Regular.eot
deleted file mode 100644
index 4d0cc8d..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Caligraphic-Regular.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Fraktur-Bold.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Fraktur-Bold.eot
deleted file mode 100644
index 2f194a1..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Fraktur-Bold.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Fraktur-Regular.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Fraktur-Regular.eot
deleted file mode 100644
index c4bcbd8..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Fraktur-Regular.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Main-Bold.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Main-Bold.eot
deleted file mode 100644
index 99ac10d..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Main-Bold.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Main-Italic.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Main-Italic.eot
deleted file mode 100644
index 9942105..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Main-Italic.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Main-Regular.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Main-Regular.eot
deleted file mode 100644
index 5e17ee7..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Main-Regular.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Math-BoldItalic.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Math-BoldItalic.eot
deleted file mode 100644
index f5c9471..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Math-BoldItalic.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Math-Italic.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Math-Italic.eot
deleted file mode 100644
index 4a62017..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Math-Italic.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Math-Regular.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Math-Regular.eot
deleted file mode 100644
index 1a13172..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Math-Regular.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Bold.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Bold.eot
deleted file mode 100644
index 963cb32..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Bold.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Italic.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Italic.eot
deleted file mode 100644
index 61967ad..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Italic.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Regular.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Regular.eot
deleted file mode 100644
index d9b9a41..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Regular.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Script-Regular.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Script-Regular.eot
deleted file mode 100644
index 3847044..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Script-Regular.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Size1-Regular.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Size1-Regular.eot
deleted file mode 100644
index 4895211..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Size1-Regular.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Size2-Regular.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Size2-Regular.eot
deleted file mode 100644
index 98ea93e..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Size2-Regular.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Size3-Regular.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Size3-Regular.eot
deleted file mode 100644
index bcaae4b..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Size3-Regular.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Size4-Regular.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Size4-Regular.eot
deleted file mode 100644
index cd4552a..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Size4-Regular.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Typewriter-Regular.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Typewriter-Regular.eot
deleted file mode 100644
index 6e38b71..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Typewriter-Regular.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_WinIE6-Regular.eot b/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_WinIE6-Regular.eot
deleted file mode 100644
index 9ca11de..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_WinIE6-Regular.eot and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_AMS-Regular.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_AMS-Regular.otf
deleted file mode 100644
index 1f9599f..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_AMS-Regular.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Caligraphic-Bold.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Caligraphic-Bold.otf
deleted file mode 100644
index c916b80..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Caligraphic-Bold.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Caligraphic-Regular.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Caligraphic-Regular.otf
deleted file mode 100644
index 8b97a38..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Caligraphic-Regular.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Fraktur-Bold.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Fraktur-Bold.otf
deleted file mode 100644
index d1e654b..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Fraktur-Bold.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Fraktur-Regular.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Fraktur-Regular.otf
deleted file mode 100644
index 453a6eb..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Fraktur-Regular.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Main-Bold.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Main-Bold.otf
deleted file mode 100644
index d01cff3..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Main-Bold.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Main-Italic.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Main-Italic.otf
deleted file mode 100644
index 2da28b9..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Main-Italic.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Main-Regular.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Main-Regular.otf
deleted file mode 100644
index 7a5a36b..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Main-Regular.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Math-BoldItalic.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Math-BoldItalic.otf
deleted file mode 100644
index 166e193..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Math-BoldItalic.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Math-Italic.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Math-Italic.otf
deleted file mode 100644
index 5047bdc..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Math-Italic.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Math-Regular.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Math-Regular.otf
deleted file mode 100644
index 144cfad..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Math-Regular.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Bold.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Bold.otf
deleted file mode 100644
index 1e4c683..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Bold.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Italic.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Italic.otf
deleted file mode 100644
index b016289..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Italic.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Regular.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Regular.otf
deleted file mode 100644
index e690927..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Regular.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Script-Regular.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Script-Regular.otf
deleted file mode 100644
index 2da24cc..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Script-Regular.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Size1-Regular.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Size1-Regular.otf
deleted file mode 100644
index 70bbaff..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Size1-Regular.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Size2-Regular.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Size2-Regular.otf
deleted file mode 100644
index 270739b..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Size2-Regular.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Size3-Regular.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Size3-Regular.otf
deleted file mode 100644
index f3ab733..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Size3-Regular.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Size4-Regular.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Size4-Regular.otf
deleted file mode 100644
index fd84193..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Size4-Regular.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Typewriter-Regular.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Typewriter-Regular.otf
deleted file mode 100644
index becc64a..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Typewriter-Regular.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_WinChrome-Regular.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_WinChrome-Regular.otf
deleted file mode 100644
index 71bd7c0..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_WinChrome-Regular.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_WinIE6-Regular.otf b/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_WinIE6-Regular.otf
deleted file mode 100644
index 2bde816..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_WinIE6-Regular.otf and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_AMS-Regular.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_AMS-Regular.svg
deleted file mode 100644
index 9167cfd..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_AMS-Regular.svg
+++ /dev/null
@@ -1,765 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Caligraphic-Bold.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Caligraphic-Bold.svg
deleted file mode 100644
index edd4a15..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Caligraphic-Bold.svg
+++ /dev/null
@@ -1,136 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Caligraphic-Regular.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Caligraphic-Regular.svg
deleted file mode 100644
index e54a72c..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Caligraphic-Regular.svg
+++ /dev/null
@@ -1,134 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Fraktur-Bold.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Fraktur-Bold.svg
deleted file mode 100644
index d1c469b..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Fraktur-Bold.svg
+++ /dev/null
@@ -1,319 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Fraktur-Regular.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Fraktur-Regular.svg
deleted file mode 100644
index 1cbd94f..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Fraktur-Regular.svg
+++ /dev/null
@@ -1,309 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Main-Bold.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Main-Bold.svg
deleted file mode 100644
index 7579531..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Main-Bold.svg
+++ /dev/null
@@ -1,656 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Main-Italic.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Main-Italic.svg
deleted file mode 100644
index 93849a8..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Main-Italic.svg
+++ /dev/null
@@ -1,374 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Main-Regular.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Main-Regular.svg
deleted file mode 100644
index 9c257bb..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Main-Regular.svg
+++ /dev/null
@@ -1,659 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Math-BoldItalic.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Math-BoldItalic.svg
deleted file mode 100644
index 6a10532..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Math-BoldItalic.svg
+++ /dev/null
@@ -1,331 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Math-Italic.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Math-Italic.svg
deleted file mode 100644
index 4741efd..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Math-Italic.svg
+++ /dev/null
@@ -1,331 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Math-Regular.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Math-Regular.svg
deleted file mode 100644
index e05eeed..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Math-Regular.svg
+++ /dev/null
@@ -1,330 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Bold.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Bold.svg
deleted file mode 100644
index fc549da..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Bold.svg
+++ /dev/null
@@ -1,280 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Italic.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Italic.svg
deleted file mode 100644
index 782aa1b..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Italic.svg
+++ /dev/null
@@ -1,245 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Regular.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Regular.svg
deleted file mode 100644
index 17cf6f1..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Regular.svg
+++ /dev/null
@@ -1,211 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Script-Regular.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Script-Regular.svg
deleted file mode 100644
index d83a7bc..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Script-Regular.svg
+++ /dev/null
@@ -1,160 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Size1-Regular.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Size1-Regular.svg
deleted file mode 100644
index 6634725..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Size1-Regular.svg
+++ /dev/null
@@ -1,110 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Size2-Regular.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Size2-Regular.svg
deleted file mode 100644
index d3148ab..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Size2-Regular.svg
+++ /dev/null
@@ -1,109 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Size3-Regular.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Size3-Regular.svg
deleted file mode 100644
index a33e4ce..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Size3-Regular.svg
+++ /dev/null
@@ -1,49 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Size4-Regular.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Size4-Regular.svg
deleted file mode 100644
index 081f4a2..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Size4-Regular.svg
+++ /dev/null
@@ -1,102 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Typewriter-Regular.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Typewriter-Regular.svg
deleted file mode 100644
index deb15f0..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Typewriter-Regular.svg
+++ /dev/null
@@ -1,322 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_WinChrome-Regular.svg b/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_WinChrome-Regular.svg
deleted file mode 100644
index 1669056..0000000
--- a/modules/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_WinChrome-Regular.svg
+++ /dev/null
@@ -1,39 +0,0 @@
-
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_AMS-Regular.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_AMS-Regular.woff
deleted file mode 100644
index 7aff423..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_AMS-Regular.woff and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Bold.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Bold.woff
deleted file mode 100644
index 8f7552f..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Bold.woff and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Regular.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Regular.woff
deleted file mode 100644
index dcb26bb..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Regular.woff and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Bold.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Bold.woff
deleted file mode 100644
index 5c3c076..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Bold.woff and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Regular.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Regular.woff
deleted file mode 100644
index 4f8ea15..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Regular.woff and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Bold.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Bold.woff
deleted file mode 100644
index f6e65a5..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Bold.woff and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Italic.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Italic.woff
deleted file mode 100644
index f143cbb..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Italic.woff and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff
deleted file mode 100644
index 863f97d..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Math-BoldItalic.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Math-BoldItalic.woff
deleted file mode 100644
index 665421e..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Math-BoldItalic.woff and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff
deleted file mode 100644
index a1c3ce3..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Regular.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Regular.woff
deleted file mode 100644
index b7d94b0..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Regular.woff and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Bold.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Bold.woff
deleted file mode 100644
index 3276cda..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Bold.woff and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Italic.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Italic.woff
deleted file mode 100644
index 262b5dd..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Italic.woff and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Regular.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Regular.woff
deleted file mode 100644
index bd8891a..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Regular.woff and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Script-Regular.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Script-Regular.woff
deleted file mode 100644
index e26e10b..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Script-Regular.woff and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size1-Regular.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size1-Regular.woff
deleted file mode 100644
index 91132d2..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size1-Regular.woff and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size2-Regular.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size2-Regular.woff
deleted file mode 100644
index dabf024..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size2-Regular.woff and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff
deleted file mode 100644
index b96e627..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size4-Regular.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size4-Regular.woff
deleted file mode 100644
index ddb3f5d..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size4-Regular.woff and /dev/null differ
diff --git a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Typewriter-Regular.woff b/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Typewriter-Regular.woff
deleted file mode 100644
index b060489..0000000
Binary files a/modules/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Typewriter-Regular.woff and /dev/null differ
diff --git a/modules/MathJax/images/CloseX-31.png b/modules/MathJax/images/CloseX-31.png
deleted file mode 100644
index d6b8ab4..0000000
Binary files a/modules/MathJax/images/CloseX-31.png and /dev/null differ
diff --git a/modules/MathJax/images/MenuArrow-15.png b/modules/MathJax/images/MenuArrow-15.png
deleted file mode 100644
index d0d58d9..0000000
Binary files a/modules/MathJax/images/MenuArrow-15.png and /dev/null differ
diff --git a/modules/MathJax/unpacked/MathJax.js b/modules/MathJax/unpacked/MathJax.js
deleted file mode 100644
index e0095fc..0000000
--- a/modules/MathJax/unpacked/MathJax.js
+++ /dev/null
@@ -1,3095 +0,0 @@
-/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-
-/*************************************************************
- *
- * MathJax.js
- *
- * The main support code for the MathJax Hub, including the
- * Ajax, Callback, Messaging, and Object-Oriented Programming
- * libraries, as well as the base Jax classes, and startup
- * processing code.
- *
- * ---------------------------------------------------------------------
- *
- * Copyright (c) 2009-2013 The MathJax Consortium
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-if (window.MathJax) {window.MathJax = {AuthorConfig: window.MathJax}} else {window.MathJax = {}}
-
-// MathJax.isPacked = true; // This line is uncommented by the packer.
-
-if (document.getElementById && document.childNodes && document.createElement) {
-
-if (!MathJax.Hub) { // skip if already loaded
-
-MathJax.version = "2.3";
-MathJax.fileversion = "2.3";
-
-/**********************************************************/
-
-(function (BASENAME) {
- var BASE = window[BASENAME];
- if (!BASE) {BASE = window[BASENAME] = {}}
-
- var PROTO = []; // a static object used to indicate when a prototype is being created
- var OBJECT = function (def) {
- var obj = def.constructor; if (!obj) {obj = new Function("")}
- for (var id in def) {if (id !== 'constructor' && def.hasOwnProperty(id)) {obj[id] = def[id]}}
- return obj;
- };
- var CONSTRUCTOR = function () {
- return new Function ("return arguments.callee.Init.call(this,arguments)");
- };
- //
- // Test for Safari 2.x bug (can't replace prototype for result of new Function()).
- // (We don't use this version for everyone since it is a closure and we don't need that).
- //
- var BUGTEST = CONSTRUCTOR(); BUGTEST.prototype = {bug_test: 1};
- if (!BUGTEST.prototype.bug_test) {
- CONSTRUCTOR = function () {
- return function () {return arguments.callee.Init.call(this,arguments)};
- };
- };
-
- BASE.Object = OBJECT({
- constructor: CONSTRUCTOR(),
-
- Subclass: function (def,classdef) {
- var obj = CONSTRUCTOR();
- obj.SUPER = this; obj.Init = this.Init;
- obj.Subclass = this.Subclass; obj.Augment = this.Augment;
- obj.protoFunction = this.protoFunction;
- obj.can = this.can; obj.has = this.has; obj.isa = this.isa;
- obj.prototype = new this(PROTO);
- obj.prototype.constructor = obj; // the real constructor
- obj.Augment(def,classdef);
- return obj;
- },
-
- Init: function (args) {
- var obj = this;
- if (args.length === 1 && args[0] === PROTO) {return obj}
- if (!(obj instanceof args.callee)) {obj = new args.callee(PROTO)}
- return obj.Init.apply(obj,args) || obj;
- },
-
- Augment: function (def,classdef) {
- var id;
- if (def != null) {
- for (id in def) {if (def.hasOwnProperty(id)) {this.protoFunction(id,def[id])}}
- // MSIE doesn't list toString even if it is not native so handle it separately
- if (def.toString !== this.prototype.toString && def.toString !== {}.toString)
- {this.protoFunction('toString',def.toString)}
- }
- if (classdef != null) {
- for (id in classdef) {if (classdef.hasOwnProperty(id)) {this[id] = classdef[id]}}
- }
- return this;
- },
-
- protoFunction: function (id,def) {
- this.prototype[id] = def;
- if (typeof def === "function") {def.SUPER = this.SUPER.prototype}
- },
-
- prototype: {
- Init: function () {},
- SUPER: function (fn) {return fn.callee.SUPER},
- can: function (method) {return typeof(this[method]) === "function"},
- has: function (property) {return typeof(this[property]) !== "undefined"},
- isa: function (obj) {return (obj instanceof Object) && (this instanceof obj)}
- },
-
- can: function (method) {return this.prototype.can.call(this,method)},
- has: function (property) {return this.prototype.has.call(this,property)},
- isa: function (obj) {
- var constructor = this;
- while (constructor) {
- if (constructor === obj) {return true} else {constructor = constructor.SUPER}
- }
- return false;
- },
-
-
- SimpleSUPER: OBJECT({
- constructor: function (def) {return this.SimpleSUPER.define(def)},
-
- define: function (src) {
- var dst = {};
- if (src != null) {
- for (var id in src) {if (src.hasOwnProperty(id)) {dst[id] = this.wrap(id,src[id])}}
- // MSIE doesn't list toString even if it is not native so handle it separately
- if (src.toString !== this.prototype.toString && src.toString !== {}.toString)
- {dst.toString = this.wrap('toString',src.toString)}
- }
- return dst;
- },
-
- wrap: function (id,f) {
- if (typeof(f) === 'function' && f.toString().match(/\.\s*SUPER\s*\(/)) {
- var fn = new Function(this.wrapper);
- fn.label = id; fn.original = f; f = fn;
- fn.toString = this.stringify;
- }
- return f;
- },
-
- wrapper: function () {
- var fn = arguments.callee;
- this.SUPER = fn.SUPER[fn.label];
- try {var result = fn.original.apply(this,arguments)}
- catch (err) {delete this.SUPER; throw err}
- delete this.SUPER;
- return result;
- }.toString().replace(/^\s*function\s*\(\)\s*\{\s*/i,"").replace(/\s*\}\s*$/i,""),
-
- toString: function () {
- return this.original.toString.apply(this.original,arguments);
- }
- })
- });
-
-})("MathJax");
-
-/**********************************************************/
-
-/*
- * Create a callback function from various forms of data:
- *
- * MathJax.Callback(fn) -- callback to a function
- *
- * MathJax.Callback([fn]) -- callback to function
- * MathJax.Callback([fn,data...])
- * -- callback to function with given data as arguments
- * MathJax.Callback([object,fn])
- * -- call fn with object as "this"
- * MathJax.Callback([object,fn,data...])
- * -- call fn with object as "this" and data as arguments
- * MathJax.Callback(["method",object])
- * -- call method of object wth object as "this"
- * MathJax.Callback(["method",object,data...])
- * -- as above, but with data as arguments to method
- *
- * MathJax.Callback({hook: fn, data: [...], object: this})
- * -- give function, data, and object to act as "this" explicitly
- *
- * MathJax.Callback("code") -- callback that compiles and executes a string
- *
- * MathJax.Callback([...],i)
- * -- use slice of array starting at i and interpret
- * result as above. (Used for passing "arguments" array
- * and trimming initial arguments, if any.)
- */
-
-/*
- * MathJax.Callback.After([...],cb1,cb2,...)
- * -- make a callback that isn't called until all the other
- * ones are called first. I.e., wait for a union of
- * callbacks to occur before making the given callback.
- */
-
-/*
- * MathJax.Callback.Queue([callback,...])
- * -- make a synchronized queue of commands that process
- * sequentially, waiting for those that return uncalled
- * callbacks.
- */
-
-/*
- * MathJax.Callback.Signal(name)
- * -- finds or creates a names signal, to which listeners
- * can be attached and are signaled by messages posted
- * to the signal. Responses can be asynchronous.
- */
-
-(function (BASENAME) {
- var BASE = window[BASENAME];
- if (!BASE) {BASE = window[BASENAME] = {}}
- //
- // Create a callback from an associative array
- //
- var CALLBACK = function (data) {
- var cb = new Function("return arguments.callee.execute.apply(arguments.callee,arguments)");
- for (var id in CALLBACK.prototype) {
- if (CALLBACK.prototype.hasOwnProperty(id)) {
- if (typeof(data[id]) !== 'undefined') {cb[id] = data[id]}
- else {cb[id] = CALLBACK.prototype[id]}
- }
- }
- cb.toString = CALLBACK.prototype.toString;
- return cb;
- };
- CALLBACK.prototype = {
- isCallback: true,
- hook: function () {},
- data: [],
- object: window,
- execute: function () {
- if (!this.called || this.autoReset) {
- this.called = !this.autoReset;
- return this.hook.apply(this.object,this.data.concat([].slice.call(arguments,0)));
- }
- },
- reset: function () {delete this.called},
- toString: function () {return this.hook.toString.apply(this.hook,arguments)}
- };
- var ISCALLBACK = function (f) {
- return (typeof(f) === "function" && f.isCallback);
- }
- //
- // Evaluate a string in global context
- //
- var EVAL = function (code) {return eval.call(window,code)}
- EVAL("var __TeSt_VaR__ = 1"); // check if it works in global context
- if (window.__TeSt_VaR__) {
- try { delete window.__TeSt_VaR__; } // NOTE IE9 throws when in IE7 mode
- catch (error) { window.__TeSt_VaR__ = null; }
- } else {
- if (window.execScript) {
- // IE
- EVAL = function (code) {
- BASE.__code = code;
- code = "try {"+BASENAME+".__result = eval("+BASENAME+".__code)} catch(err) {"+BASENAME+".__result = err}";
- window.execScript(code);
- var result = BASE.__result; delete BASE.__result; delete BASE.__code;
- if (result instanceof Error) {throw result}
- return result;
- }
- } else {
- // Safari2
- EVAL = function (code) {
- BASE.__code = code;
- code = "try {"+BASENAME+".__result = eval("+BASENAME+".__code)} catch(err) {"+BASENAME+".__result = err}";
- var head = (document.getElementsByTagName("head"))[0]; if (!head) {head = document.body}
- var script = document.createElement("script");
- script.appendChild(document.createTextNode(code));
- head.appendChild(script); head.removeChild(script);
- var result = BASE.__result; delete BASE.__result; delete BASE.__code;
- if (result instanceof Error) {throw result}
- return result;
- }
- }
- }
- //
- // Create a callback from various types of data
- //
- var USING = function (args,i) {
- if (arguments.length > 1) {
- if (arguments.length === 2 && !(typeof arguments[0] === 'function') &&
- arguments[0] instanceof Object && typeof arguments[1] === 'number')
- {args = [].slice.call(args,i)}
- else {args = [].slice.call(arguments,0)}
- }
- if (args instanceof Array && args.length === 1) {args = args[0]}
- if (typeof args === 'function') {
- if (args.execute === CALLBACK.prototype.execute) {return args}
- return CALLBACK({hook: args});
- } else if (args instanceof Array) {
- if (typeof(args[0]) === 'string' && args[1] instanceof Object &&
- typeof args[1][args[0]] === 'function') {
- return CALLBACK({hook: args[1][args[0]], object: args[1], data: args.slice(2)});
- } else if (typeof args[0] === 'function') {
- return CALLBACK({hook: args[0], data: args.slice(1)});
- } else if (typeof args[1] === 'function') {
- return CALLBACK({hook: args[1], object: args[0], data: args.slice(2)});
- }
- } else if (typeof(args) === 'string') {
- return CALLBACK({hook: EVAL, data: [args]});
- } else if (args instanceof Object) {
- return CALLBACK(args);
- } else if (typeof(args) === 'undefined') {
- return CALLBACK({});
- }
- throw Error("Can't make callback from given data");
- };
-
- //
- // Wait for a given time to elapse and then perform the callback
- //
- var DELAY = function (time,callback) {
- callback = USING(callback);
- callback.timeout = setTimeout(callback,time);
- return callback;
- };
-
- //
- // Callback used by AFTER, QUEUE, and SIGNAL to check if calls have completed
- //
- var WAITFOR = function (callback,signal) {
- callback = USING(callback);
- if (!callback.called) {WAITSIGNAL(callback,signal); signal.pending++}
- };
- var WAITEXECUTE = function () {
- var signals = this.signal; delete this.signal;
- this.execute = this.oldExecute; delete this.oldExecute;
- var result = this.execute.apply(this,arguments);
- if (ISCALLBACK(result) && !result.called) {WAITSIGNAL(result,signals)} else {
- for (var i = 0, m = signals.length; i < m; i++) {
- signals[i].pending--;
- if (signals[i].pending <= 0) {signals[i].call()}
- }
- }
- };
- var WAITSIGNAL = function (callback,signals) {
- if (!(signals instanceof Array)) {signals = [signals]}
- if (!callback.signal) {
- callback.oldExecute = callback.execute;
- callback.execute = WAITEXECUTE;
- callback.signal = signals;
- } else if (signals.length === 1) {callback.signal.push(signals[0])}
- else {callback.signal = callback.signal.concat(signals)}
- };
-
- //
- // Create a callback that is called when a collection of other callbacks have
- // all been executed. If the callback gets called immediately (i.e., the
- // others are all already called), check if it returns another callback
- // and return that instead.
- //
- var AFTER = function (callback) {
- callback = USING(callback);
- callback.pending = 0;
- for (var i = 1, m = arguments.length; i < m; i++)
- {if (arguments[i]) {WAITFOR(arguments[i],callback)}}
- if (callback.pending === 0) {
- var result = callback();
- if (ISCALLBACK(result)) {callback = result}
- }
- return callback;
- };
-
- //
- // An array of prioritized hooks that are executed sequentially
- // with a given set of data.
- //
- var HOOKS = MathJax.Object.Subclass({
- //
- // Initialize the array and the auto-reset status
- //
- Init: function (reset) {
- this.hooks = [];
- this.reset = reset;
- },
- //
- // Add a callback to the list, in priority order (default priority is 10)
- //
- Add: function (hook,priority) {
- if (priority == null) {priority = 10}
- if (!ISCALLBACK(hook)) {hook = USING(hook)}
- hook.priority = priority;
- var i = this.hooks.length;
- while (i > 0 && priority < this.hooks[i-1].priority) {i--}
- this.hooks.splice(i,0,hook);
- return hook;
- },
- Remove: function (hook) {
- for (var i = 0, m = this.hooks.length; i < m; i++) {
- if (this.hooks[i] === hook) {this.hooks.splice(i,1); return}
- }
- },
- //
- // Execute the list of callbacks, resetting them if requested.
- // If any return callbacks, return a callback that will be
- // executed when they all have completed.
- //
- Execute: function () {
- var callbacks = [{}];
- for (var i = 0, m = this.hooks.length; i < m; i++) {
- if (this.reset) {this.hooks[i].reset()}
- var result = this.hooks[i].apply(window,arguments);
- if (ISCALLBACK(result) && !result.called) {callbacks.push(result)}
- }
- if (callbacks.length === 1) {return null}
- if (callbacks.length === 2) {return callbacks[1]}
- return AFTER.apply({},callbacks);
- }
- });
-
- //
- // Run an array of callbacks passing them the given data.
- // (Legacy function, since this has been replaced by the HOOKS object).
- //
- var EXECUTEHOOKS = function (hooks,data,reset) {
- if (!hooks) {return null}
- if (!(hooks instanceof Array)) {hooks = [hooks]}
- if (!(data instanceof Array)) {data = (data == null ? [] : [data])}
- var handler = HOOKS(reset);
- for (var i = 0, m = hooks.length; i < m; i++) {handler.Add(hooks[i])}
- return handler.Execute.apply(handler,data);
- };
-
- //
- // Command queue that performs commands in order, waiting when
- // necessary for commands to complete asynchronousely
- //
- var QUEUE = BASE.Object.Subclass({
- //
- // Create the queue and push any commands that are specified
- //
- Init: function () {
- this.pending = 0; this.running = 0;
- this.queue = [];
- this.Push.apply(this,arguments);
- },
- //
- // Add commands to the queue and run them. Adding a callback object
- // (rather than a callback specification) queues a wait for that callback.
- // Return the final callback for synchronization purposes.
- //
- Push: function () {
- var callback;
- for (var i = 0, m = arguments.length; i < m; i++) {
- callback = USING(arguments[i]);
- if (callback === arguments[i] && !callback.called)
- {callback = USING(["wait",this,callback])}
- this.queue.push(callback);
- }
- if (!this.running && !this.pending) {this.Process()}
- return callback;
- },
- //
- // Process the command queue if we aren't waiting on another command
- //
- Process: function (queue) {
- while (!this.running && !this.pending && this.queue.length) {
- var callback = this.queue[0];
- queue = this.queue.slice(1); this.queue = [];
- this.Suspend(); var result = callback(); this.Resume();
- if (queue.length) {this.queue = queue.concat(this.queue)}
- if (ISCALLBACK(result) && !result.called) {WAITFOR(result,this)}
- }
- },
- //
- // Suspend/Resume command processing on this queue
- //
- Suspend: function () {this.running++},
- Resume: function () {if (this.running) {this.running--}},
- //
- // Used by WAITFOR to restart the queue when an action completes
- //
- call: function () {this.Process.apply(this,arguments)},
- wait: function (callback) {return callback}
- });
-
- //
- // Create a named signal that listeners can attach to, to be signaled by
- // postings made to the signal. Posts are queued if they occur while one
- // is already in process.
- //
- var SIGNAL = QUEUE.Subclass({
- Init: function (name) {
- QUEUE.prototype.Init.call(this);
- this.name = name;
- this.posted = []; // the messages posted so far
- this.listeners = HOOKS(true); // those with interest in this signal
- },
- //
- // Post a message to the signal listeners, with callback for when complete
- //
- Post: function (message,callback,forget) {
- callback = USING(callback);
- if (this.posting || this.pending) {
- this.Push(["Post",this,message,callback,forget]);
- } else {
- this.callback = callback; callback.reset();
- if (!forget) {this.posted.push(message)}
- this.Suspend(); this.posting = true;
- var result = this.listeners.Execute(message);
- if (ISCALLBACK(result) && !result.called) {WAITFOR(result,this)}
- this.Resume(); delete this.posting;
- if (!this.pending) {this.call()}
- }
- return callback;
- },
- //
- // Clear the post history (so new listeners won't get old messages)
- //
- Clear: function (callback) {
- callback = USING(callback);
- if (this.posting || this.pending) {
- callback = this.Push(["Clear",this,callback]);
- } else {
- this.posted = [];
- callback();
- }
- return callback;
- },
- //
- // Call the callback (all replies are in) and process the command queue
- //
- call: function () {this.callback(this); this.Process()},
-
- //
- // A listener calls this to register intrest in the signal (so it will be called
- // when posts occur). If ignorePast is true, it will not be sent the post history.
- //
- Interest: function (callback,ignorePast,priority) {
- callback = USING(callback);
- this.listeners.Add(callback,priority);
- if (!ignorePast) {
- for (var i = 0, m = this.posted.length; i < m; i++) {
- callback.reset();
- var result = callback(this.posted[i]);
- if (ISCALLBACK(result) && i === this.posted.length-1) {WAITFOR(result,this)}
- }
- }
- return callback;
- },
- //
- // A listener calls this to remove itself from a signal
- //
- NoInterest: function (callback) {
- this.listeners.Remove(callback);
- },
-
- //
- // Hook a callback to a particular message on this signal
- //
- MessageHook: function (msg,callback,priority) {
- callback = USING(callback);
- if (!this.hooks) {this.hooks = {}; this.Interest(["ExecuteHooks",this])}
- if (!this.hooks[msg]) {this.hooks[msg] = HOOKS(true)}
- this.hooks[msg].Add(callback,priority);
- for (var i = 0, m = this.posted.length; i < m; i++)
- {if (this.posted[i] == msg) {callback.reset(); callback(this.posted[i])}}
- return callback;
- },
- //
- // Execute the message hooks for the given message
- //
- ExecuteHooks: function (msg,more) {
- var type = ((msg instanceof Array) ? msg[0] : msg);
- if (!this.hooks[type]) {return null}
- return this.hooks[type].Execute(msg);
- }
-
- },{
- signals: {}, // the named signals
- find: function (name) {
- if (!SIGNAL.signals[name]) {SIGNAL.signals[name] = new SIGNAL(name)}
- return SIGNAL.signals[name];
- }
- });
-
- //
- // The main entry-points
- //
- BASE.Callback = BASE.CallBack = USING;
- BASE.Callback.Delay = DELAY;
- BASE.Callback.After = AFTER;
- BASE.Callback.Queue = QUEUE;
- BASE.Callback.Signal = SIGNAL.find;
- BASE.Callback.Hooks = HOOKS;
- BASE.Callback.ExecuteHooks = EXECUTEHOOKS;
-})("MathJax");
-
-
-/**********************************************************/
-
-(function (BASENAME) {
- var BASE = window[BASENAME];
- if (!BASE) {BASE = window[BASENAME] = {}}
-
- var isSafari2 = (navigator.vendor === "Apple Computer, Inc." &&
- typeof navigator.vendorSub === "undefined");
- var sheets = 0; // used by Safari2
-
- //
- // Update sheets count and look up the head object
- //
- var HEAD = function (head) {
- if (document.styleSheets && document.styleSheets.length > sheets)
- {sheets = document.styleSheets.length}
- if (!head) {
- head = (document.getElementsByTagName("head"))[0];
- if (!head) {head = document.body}
- }
- return head;
- };
-
- //
- // Remove scripts that are completed so they don't clutter up the HEAD.
- // This runs via setTimeout since IE7 can't remove the script while it is running.
- //
- var SCRIPTS = []; // stores scripts to be removed after a delay
- var REMOVESCRIPTS = function () {
- for (var i = 0, m = SCRIPTS.length; i < m; i++) {BASE.Ajax.head.removeChild(SCRIPTS[i])}
- SCRIPTS = [];
- };
-
- BASE.Ajax = {
- loaded: {}, // files already loaded
- loading: {}, // files currently in process of loading
- loadHooks: {}, // hooks to call when files are loaded
- timeout: 15*1000, // timeout for loading of files (15 seconds)
- styleDelay: 1, // delay to use before styles are available
- config: {root: ""}, // URL of root directory to load from
-
- STATUS: {
- OK: 1, // file is loading or did load OK
- ERROR: -1 // file timed out during load
- },
-
- rootPattern: new RegExp("^\\["+BASENAME+"\\]"),
-
- //
- // Return a complete URL to a file (replacing the root pattern)
- //
- fileURL: function (file) {return file.replace(this.rootPattern,this.config.root)},
-
- //
- // Load a file if it hasn't been already.
- // Make sure the file URL is "safe"?
- //
- Require: function (file,callback) {
- callback = BASE.Callback(callback); var type;
- if (file instanceof Object) {
- for (var i in file)
- {if (file.hasOwnProperty(i)) {type = i.toUpperCase(); file = file[i]}}
- } else {type = file.split(/\./).pop().toUpperCase()}
- file = this.fileURL(file);
- // FIXME: check that URL is OK
- if (this.loaded[file]) {
- callback(this.loaded[file]);
- } else {
- var FILE = {}; FILE[type] = file;
- this.Load(FILE,callback);
- }
- return callback;
- },
-
- //
- // Load a file regardless of where it is and whether it has
- // already been loaded.
- //
- Load: function (file,callback) {
- callback = BASE.Callback(callback); var type;
- if (file instanceof Object) {
- for (var i in file)
- {if (file.hasOwnProperty(i)) {type = i.toUpperCase(); file = file[i]}}
- } else {type = file.split(/\./).pop().toUpperCase()}
- file = this.fileURL(file);
- if (this.loading[file]) {
- this.addHook(file,callback);
- } else {
- this.head = HEAD(this.head);
- if (this.loader[type]) {this.loader[type].call(this,file,callback)}
- else {throw Error("Can't load files of type "+type)}
- }
- return callback;
- },
-
- //
- // Register a load hook for a particular file (it will be called when
- // loadComplete() is called for that file)
- //
- LoadHook: function (file,callback,priority) {
- callback = BASE.Callback(callback);
- if (file instanceof Object)
- {for (var i in file) {if (file.hasOwnProperty(i)) {file = file[i]}}}
- file = this.fileURL(file);
- if (this.loaded[file]) {callback(this.loaded[file])}
- else {this.addHook(file,callback,priority)}
- return callback;
- },
- addHook: function (file,callback,priority) {
- if (!this.loadHooks[file]) {this.loadHooks[file] = MathJax.Callback.Hooks()}
- this.loadHooks[file].Add(callback,priority);
- },
-
- //
- // Used when files are combined in a preloading configuration file
- //
- Preloading: function () {
- for (var i = 0, m = arguments.length; i < m; i++) {
- var file = this.fileURL(arguments[i]);
- if (!this.loading[file]) {this.loading[file] = {preloaded: true}}
- }
- },
-
- //
- // Code used to load the various types of files
- // (JS for JavaScript, CSS for style sheets)
- //
- loader: {
- //
- // Create a SCRIPT tag to load the file
- //
- JS: function (file,callback) {
- var script = document.createElement("script");
- var timeout = BASE.Callback(["loadTimeout",this,file]);
- this.loading[file] = {
- callback: callback,
- timeout: setTimeout(timeout,this.timeout),
- status: this.STATUS.OK,
- script: script
- };
- // Add this to the structure above after it is created to prevent recursion
- // when loading the initial localization file (before loading messsage is available)
- this.loading[file].message = BASE.Message.File(file);
- script.onerror = timeout; // doesn't work in IE and no apparent substitute
- script.type = "text/javascript";
- script.src = file;
- this.head.appendChild(script);
- },
- //
- // Create a LINK tag to load the style sheet
- //
- CSS: function (file,callback) {
- var link = document.createElement("link");
- link.rel = "stylesheet"; link.type = "text/css"; link.href = file;
- this.loading[file] = {
- callback: callback,
- message: BASE.Message.File(file),
- status: this.STATUS.OK
- };
- this.head.appendChild(link);
- this.timer.create.call(this,[this.timer.file,file],link);
- }
- },
-
- //
- // Timing code for checking when style sheets are available.
- //
- timer: {
- //
- // Create the timing callback and start the timing loop.
- // We use a delay because some browsers need it to allow the styles
- // to be processed.
- //
- create: function (callback,node) {
- callback = BASE.Callback(callback);
- if (node.nodeName === "STYLE" && node.styleSheet &&
- typeof(node.styleSheet.cssText) !== 'undefined') {
- callback(this.STATUS.OK); // MSIE processes style immediately, but doesn't set its styleSheet!
- } else if (window.chrome && node.nodeName === "LINK") {
- callback(this.STATUS.OK); // Chrome doesn't give access to cssRules for stylesheet in
- // a link node, so we can't detect when it is loaded.
- } else if (isSafari2) {
- this.timer.start(this,[this.timer.checkSafari2,sheets++,callback],this.styleDelay);
- } else {
- this.timer.start(this,[this.timer.checkLength,node,callback],this.styleDelay);
- }
- return callback;
- },
- //
- // Start the timer for the given callback checker
- //
- start: function (AJAX,check,delay,timeout) {
- check = BASE.Callback(check);
- check.execute = this.execute; check.time = this.time;
- check.STATUS = AJAX.STATUS; check.timeout = timeout || AJAX.timeout;
- check.delay = check.total = delay || 0;
- if (delay) {setTimeout(check,delay)} else {check()}
- },
- //
- // Increment the time total, increase the delay
- // and test if we are past the timeout time.
- //
- time: function (callback) {
- this.total += this.delay;
- this.delay = Math.floor(this.delay * 1.05 + 5);
- if (this.total >= this.timeout) {callback(this.STATUS.ERROR); return 1}
- return 0;
- },
- //
- // For JS file loads, call the proper routine according to status
- //
- file: function (file,status) {
- if (status < 0) {BASE.Ajax.loadTimeout(file)} else {BASE.Ajax.loadComplete(file)}
- },
- //
- // Call the hook with the required data
- //
- execute: function () {this.hook.call(this.object,this,this.data[0],this.data[1])},
- //
- // Safari2 doesn't set the link's stylesheet, so we need to look in the
- // document.styleSheets array for the new sheet when it is created
- //
- checkSafari2: function (check,length,callback) {
- if (check.time(callback)) return;
- if (document.styleSheets.length > length &&
- document.styleSheets[length].cssRules &&
- document.styleSheets[length].cssRules.length)
- {callback(check.STATUS.OK)} else {setTimeout(check,check.delay)}
- },
- //
- // Look for the stylesheets rules and check when they are defined
- // and no longer of length zero. (This assumes there actually ARE
- // some rules in the stylesheet.)
- //
- checkLength: function (check,node,callback) {
- if (check.time(callback)) return;
- var isStyle = 0; var sheet = (node.sheet || node.styleSheet);
- try {if ((sheet.cssRules||sheet.rules||[]).length > 0) {isStyle = 1}} catch(err) {
- if (err.message.match(/protected variable|restricted URI/)) {isStyle = 1}
- else if (err.message.match(/Security error/)) {
- // Firefox3 gives "Security error" for missing files, so
- // can't distinguish that from OK files on remote servers.
- // or OK files in different directory from local files.
- isStyle = 1; // just say it is OK (can't really tell)
- }
- }
- if (isStyle) {
- // Opera 9.6 requires this setTimeout
- setTimeout(BASE.Callback([callback,check.STATUS.OK]),0);
- } else {
- setTimeout(check,check.delay);
- }
- }
- },
-
- //
- // JavaScript code must call this when they are completely initialized
- // (this allows them to perform asynchronous actions before indicating
- // that they are complete).
- //
- loadComplete: function (file) {
- file = this.fileURL(file);
- var loading = this.loading[file];
- if (loading && !loading.preloaded) {
- BASE.Message.Clear(loading.message);
- clearTimeout(loading.timeout);
- if (loading.script) {
- if (SCRIPTS.length === 0) {setTimeout(REMOVESCRIPTS,0)}
- SCRIPTS.push(loading.script);
- }
- this.loaded[file] = loading.status; delete this.loading[file];
- this.addHook(file,loading.callback);
- } else {
- if (loading) {delete this.loading[file]}
- this.loaded[file] = this.STATUS.OK;
- loading = {status: this.STATUS.OK}
- }
- if (!this.loadHooks[file]) {return null}
- return this.loadHooks[file].Execute(loading.status);
- },
-
- //
- // If a file fails to load within the timeout period (or the onerror handler
- // is called), this routine runs to signal the error condition.
- //
- loadTimeout: function (file) {
- if (this.loading[file].timeout) {clearTimeout(this.loading[file].timeout)}
- this.loading[file].status = this.STATUS.ERROR;
- this.loadError(file);
- this.loadComplete(file);
- },
-
- //
- // The default error hook for file load failures
- //
- loadError: function (file) {
- BASE.Message.Set(["LoadFailed","File failed to load: %1",file],null,2000);
- BASE.Hub.signal.Post(["file load error",file]);
- },
-
- //
- // Defines a style sheet from a hash of style declarations (key:value pairs
- // where the key is the style selector and the value is a hash of CSS attributes
- // and values).
- //
- Styles: function (styles,callback) {
- var styleString = this.StyleString(styles);
- if (styleString === "") {
- callback = BASE.Callback(callback);
- callback();
- } else {
- var style = document.createElement("style"); style.type = "text/css";
- this.head = HEAD(this.head);
- this.head.appendChild(style);
- if (style.styleSheet && typeof(style.styleSheet.cssText) !== 'undefined') {
- style.styleSheet.cssText = styleString;
- } else {
- style.appendChild(document.createTextNode(styleString));
- }
- callback = this.timer.create.call(this,callback,style);
- }
- return callback;
- },
-
- //
- // Create a stylesheet string from a style declaration object
- //
- StyleString: function (styles) {
- if (typeof(styles) === 'string') {return styles}
- var string = "", id, style;
- for (id in styles) {if (styles.hasOwnProperty(id)) {
- if (typeof styles[id] === 'string') {
- string += id + " {"+styles[id]+"}\n";
- } else if (styles[id] instanceof Array) {
- for (var i = 0; i < styles[id].length; i++) {
- style = {}; style[id] = styles[id][i];
- string += this.StyleString(style);
- }
- } else if (id.substr(0,6) === '@media') {
- string += id + " {"+this.StyleString(styles[id])+"}\n";
- } else if (styles[id] != null) {
- style = [];
- for (var name in styles[id]) {if (styles[id].hasOwnProperty(name)) {
- if (styles[id][name] != null)
- {style[style.length] = name + ': ' + styles[id][name]}
- }}
- string += id +" {"+style.join('; ')+"}\n";
- }
- }}
- return string;
- }
- };
-
-})("MathJax");
-
-/**********************************************************/
-
-MathJax.HTML = {
- //
- // Create an HTML element with given attributes and content.
- // The def parameter is an (optional) object containing key:value pairs
- // of the attributes and their values, and contents is an (optional)
- // array of strings to be inserted as text, or arrays of the form
- // [type,def,contents] that describes an HTML element to be inserted
- // into the current element. Thus the contents can describe a complete
- // HTML snippet of arbitrary complexity. E.g.:
- //
- // MathJax.HTML.Element("span",{id:"mySpan",style{"font-style":"italic"}},[
- // "(See the ",["a",{href:"http://www.mathjax.org"},["MathJax home page"]],
- // " for more details.)"]);
- //
- Element: function (type,def,contents) {
- var obj = document.createElement(type);
- if (def) {
- if (def.style) {
- var style = def.style; def.style = {};
- for (var id in style) {if (style.hasOwnProperty(id))
- {def.style[id.replace(/-([a-z])/g,this.ucMatch)] = style[id]}}
- }
- MathJax.Hub.Insert(obj,def);
- }
- if (contents) {
- if (!(contents instanceof Array)) {contents = [contents]}
- for (var i = 0; i < contents.length; i++) {
- if (contents[i] instanceof Array) {
- obj.appendChild(this.Element(contents[i][0],contents[i][1],contents[i][2]));
- } else if (type === "script") { // IE throws an error if script is added as a text node
- this.setScript(obj, contents[i]);
- } else {
- obj.appendChild(document.createTextNode(contents[i]));
- }
- }
- }
- return obj;
- },
- ucMatch: function (match,c) {return c.toUpperCase()},
- addElement: function (span,type,def,contents) {return span.appendChild(this.Element(type,def,contents))},
- TextNode: function (text) {return document.createTextNode(text)},
- addText: function (span,text) {return span.appendChild(this.TextNode(text))},
-
- //
- // Set and get the text of a script
- //
- setScript: function (script,text) {
- if (this.setScriptBug) {script.text = text} else {
- while (script.firstChild) {script.removeChild(script.firstChild)}
- this.addText(script,text);
- }
- },
- getScript: function (script) {
- var text = (script.text === "" ? script.innerHTML : script.text);
- return text.replace(/^\s+/,"").replace(/\s+$/,"");
- },
-
- //
- // Manage cookies
- //
- Cookie: {
- prefix: "mjx",
- expires: 365,
-
- //
- // Save an object as a named cookie
- //
- Set: function (name,def) {
- var keys = [];
- if (def) {
- for (var id in def) {if (def.hasOwnProperty(id)) {
- keys.push(id+":"+def[id].toString().replace(/&/g,"&&"));
- }}
- }
- var cookie = this.prefix+"."+name+"="+escape(keys.join('&;'));
- if (this.expires) {
- var time = new Date(); time.setDate(time.getDate() + this.expires);
- cookie += '; expires='+time.toGMTString();
- }
- try {document.cookie = cookie+"; path=/"} catch (err) {} // ignore errors saving cookies
- },
-
- //
- // Get the contents of a named cookie and incorporate
- // it into the given object (or return a fresh one)
- //
- Get: function (name,obj) {
- if (!obj) {obj = {}}
- var pattern = new RegExp("(?:^|;\\s*)"+this.prefix+"\\."+name+"=([^;]*)(?:;|$)");
- var match = pattern.exec(document.cookie);
- if (match && match[1] !== "") {
- var keys = unescape(match[1]).split('&;');
- for (var i = 0, m = keys.length; i < m; i++) {
- match = keys[i].match(/([^:]+):(.*)/);
- var value = match[2].replace(/&&/g,'&');
- if (value === "true") {value = true} else if (value === "false") {value = false}
- else if (value.match(/^-?(\d+(\.\d+)?|\.\d+)$/)) {value = parseFloat(value)}
- obj[match[1]] = value;
- }
- }
- return obj;
- }
- }
-
-};
-
-
-/**********************************************************/
-
-MathJax.Localization = {
-
- locale: "en",
- directory: "[MathJax]/localization",
- strings: {
- // Currently, this list is not modified by the MathJax-i18n script. You can
- // run the following command in MathJax/unpacked/localization to update it:
- //
- // find -name *.js | xargs grep menuTitle\: | grep -v qqq | sed "s/^\.\/\(.*\)\/.*\.js\: / \"\1\"\: \{/" | sed "s/,$/\},/" | sed "s/\"English\"/\"English\", isLoaded: true/" > tmp ; sort tmp > tmp2 ; sed "$ s/,$//" tmp2 ; rm tmp*
- //
- // This only takes languages with localization data so you must also add
- // the languages that use a remap but are not translated at all.
- //
- "br": {menuTitle: "brezhoneg"},
- "cdo": {menuTitle: "M\u00ECng-d\u0115\u0324ng-ng\u1E73\u0304"},
- "cs": {menuTitle: "\u010Desky"},
- "da": {menuTitle: "dansk"},
- "de": {menuTitle: "Deutsch"},
- "en": {menuTitle: "English", isLoaded: true},
- "eo": {menuTitle: "Esperanto"},
- "es": {menuTitle: "espa\u00F1ol"},
- "fa": {menuTitle: "\u0641\u0627\u0631\u0633\u06CC"},
- "fi": {menuTitle: "suomi"},
- "fr": {menuTitle: "fran\u00E7ais"},
- "gl": {menuTitle: "galego"},
- "he": {menuTitle: "\u05E2\u05D1\u05E8\u05D9\u05EA"},
- "ia": {menuTitle: "interlingua"},
- "it": {menuTitle: "italiano"},
- "ja": {menuTitle: "\u65E5\u672C\u8A9E"},
- "ko": {menuTitle: "\uD55C\uAD6D\uC5B4"},
- "lb": {menuTitle: "L\u00EBtzebuergesch"},
- "mk": {menuTitle: "\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438"},
- "nl": {menuTitle: "Nederlands"},
- "oc": {menuTitle: "occitan"},
- "pl": {menuTitle: "polski"},
- "pt-br": {menuTitle: "portugu\u00EAs do Brasil"},
- "pt": {menuTitle: "portugus\u00EA"},
- "ru": {menuTitle: "\u0440\u0443\u0441\u0441\u043A\u0438\u0439"},
- "sl": {menuTitle: "sloven\u0161\u010Dina"},
- "sv": {menuTitle: "svenska"},
- "tr": {menuTitle: "T\u00FCrk\u00E7e"},
- "uk": {menuTitle: "\u0443\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430"},
- "zh-hans": {menuTitle: "\u4E2D\u6587\uFF08\u7B80\u4F53\uFF09"}
- },
-
- //
- // The pattern for substitution escapes:
- // %n or %{n} or %{plural:%n|option1|option1|...} or %c
- //
- pattern: /%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g,
-
- SPLIT: ("axb".split(/(x)/).length === 3 ?
- function (string,regex) {return string.split(regex)} :
- //
- // IE8 and below don't do split() correctly when the pattern includes
- // parentheses (the split should include the matched exrepssions).
- // So implement it by hand here.
- //
- function (string,regex) {
- var result = [], match, last = 0;
- regex.lastIndex = 0;
- while (match = regex.exec(string)) {
- result.push(string.substr(last,match.index));
- result.push.apply(result,match.slice(1));
- last = match.index + match[0].length;
- }
- result.push(string.substr(last));
- return result;
- }),
-
- _: function (id,phrase) {
- if (phrase instanceof Array) {return this.processSnippet(id,phrase)}
- return this.processString(this.lookupPhrase(id,phrase),[].slice.call(arguments,2));
- },
-
- processString: function (string,args,domain) {
- //
- // Process arguments for substitution
- // If the argument is a snippet (and we are processing snippets) do so,
- // Otherwise, if it is a number, convert it for the lacale
- //
- var i, m;
- for (i = 0, m = args.length; i < m; i++) {
- if (domain && args[i] instanceof Array) {args[i] = this.processSnippet(domain,args[i])}
- }
- //
- // Split string at escapes and process them individually
- //
- var parts = this.SPLIT(string,this.pattern);
- for (i = 1, m = parts.length; i < m; i += 2) {
- var c = parts[i].charAt(0); // first char will be { or \d or a char to be kept literally
- if (c >= "0" && c <= "9") { // %n
- parts[i] = args[parts[i]-1];
- if (typeof parts[i] === "number") parts[i] = this.number(parts[i]);
- } else if (c === "{") { // %{n} or %{plural:%n|...}
- c = parts[i].substr(1);
- if (c >= "0" && c <= "9") { // %{n}
- parts[i] = args[parts[i].substr(1,parts[i].length-2)-1];
- if (typeof parts[i] === "number") parts[i] = this.number(parts[i]);
- } else { // %{plural:%n|...}
- var match = parts[i].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);
- if (match) {
- if (match[1] === "plural") {
- var n = args[match[2]-1];
- if (typeof n === "undefined") {
- parts[i] = "???"; // argument doesn't exist
- } else {
- n = this.plural(n) - 1; // index of the form to use
- var plurals = match[3].replace(/(^|[^%])(%%)*%\|/g,"$1$2%\uEFEF").split(/\|/); // the parts (replacing %| with a special character)
- if (n >= 0 && n < plurals.length) {
- parts[i] = this.processString(plurals[n].replace(/\uEFEF/g,"|"),args,domain);
- } else {
- parts[i] = "???"; // no string for this index
- }
- }
- } else {parts[i] = "%"+parts[i]} // not "plural", put back the % and leave unchanged
- }
- }
- }
- if (parts[i] == null) {parts[i] = "???"}
- }
- //
- // If we are not forming a snippet, return the completed string
- //
- if (!domain) {return parts.join("")}
- //
- // We need to return an HTML snippet, so buld it from the
- // broken up string with inserted parts (that could be snippets)
- //
- var snippet = [], part = "";
- for (i = 0; i < m; i++) {
- part += parts[i]; i++; // add the string and move on to substitution result
- if (i < m) {
- if (parts[i] instanceof Array) { // substitution was a snippet
- snippet.push(part); // add the accumulated string
- snippet = snippet.concat(parts[i]); // concatenate the substution snippet
- part = ""; // start accumulating a new string
- } else { // substitution was a string
- part += parts[i]; // add to accumulating string
- }
- }
- }
- if (part !== "") {snippet.push(part)} // add final string
- return snippet;
- },
-
- processSnippet: function (domain,snippet) {
- var result = []; // the new snippet
- //
- // Look through the original snippet for
- // strings or snippets to translate
- //
- for (var i = 0, m = snippet.length; i < m; i++) {
- if (snippet[i] instanceof Array) {
- //
- // This could be a sub-snippet:
- // ["tag"] or ["tag",{properties}] or ["tag",{properties},snippet]
- // Or it could be something to translate:
- // [id,string,args] or [domain,snippet]
- var data = snippet[i];
- if (typeof data[1] === "string") { // [id,string,args]
- var id = data[0]; if (!(id instanceof Array)) {id = [domain,id]}
- var phrase = this.lookupPhrase(id,data[1]);
- result = result.concat(this.processMarkdown(phrase,data.slice(2),domain));
- } else if (data[1] instanceof Array) { // [domain,snippet]
- result = result.concat(this.processSnippet.apply(this,data));
- } else if (data.length >= 3) { // ["tag",{properties},snippet]
- result.push([data[0],data[1],this.processSnippet(domain,data[2])]);
- } else { // ["tag"] or ["tag",{properties}]
- result.push(snippet[i]);
- }
- } else { // a string
- result.push(snippet[i]);
- }
- }
- return result;
- },
-
- markdownPattern: /(%.)|(\*{1,3})((?:%.|.)+?)\2|(`+)((?:%.|.)+?)\4|\[((?:%.|.)+?)\]\(([^\s\)]+)\)/,
- // %c or *bold*, **italics**, ***bold-italics***, or `code`, or [link](url)
-
- processMarkdown: function (phrase,args,domain) {
- var result = [], data;
- //
- // Split the string by the Markdown pattern
- // (the text blocks are separated by
- // c,stars,star-text,backtics,code-text,link-text,URL).
- // Start with teh first text string from the split.
- //
- var parts = phrase.split(this.markdownPattern);
- var string = parts[0];
- //
- // Loop through the matches and process them
- //
- for (var i = 1, m = parts.length; i < m; i += 8) {
- if (parts[i+1]) { // stars (for bold/italic)
- //
- // Select the tag to use by number of stars (three stars requires two tags)
- //
- data = this.processString(parts[i+2],args,domain);
- if (!(data instanceof Array)) {data = [data]}
- data = [["b","i","i"][parts[i+1].length-1],{},data]; // number of stars determines type
- if (parts[i+1].length === 3) {data = ["b",{},data]} // bold-italic
- } else if (parts[i+3]) { // backtics (for code)
- //
- // Remove one leading or trailing space, and process substitutions
- // Make a tag
- //
- data = this.processString(parts[i+4].replace(/^\s/,"").replace(/\s$/,""),args,domain);
- if (!(data instanceof Array)) {data = [data]}
- data = ["code",{},data];
- } else if (parts[i+5]) { // hyperlink
- //
- // Process the link text, and make an tag with the URL
- //
- data = this.processString(parts[i+5],args,domain);
- if (!(data instanceof Array)) {data = [data]}
- data = ["a",{href:this.processString(parts[i+6],args),target:"_blank"},data];
- } else {
- //
- // Escaped character (%c) gets added into the string.
- //
- string += parts[i]; data = null;
- }
- //
- // If there is a tag to insert,
- // Add any pending string, then push the tag
- //
- if (data) {
- result = this.concatString(result,string,args,domain);
- result.push(data); string = "";
- }
- //
- // Process the string that follows matches pattern
- //
- if (parts[i+7] !== "") {string += parts[i+7]}
- };
- //
- // Add any pending string and return the resulting snippet
- //
- result = this.concatString(result,string,args,domain);
- return result;
- },
- concatString: function (result,string,args,domain) {
- if (string != "") {
- //
- // Process the substutions.
- // If the result is not a snippet, turn it into one.
- // Then concatenate the snippet to the current one
- //
- string = this.processString(string,args,domain);
- if (!(string instanceof Array)) {string = [string]}
- result = result.concat(string);
- }
- return result;
- },
-
- lookupPhrase: function (id,phrase,domain) {
- //
- // Get the domain and messageID
- //
- if (!domain) {domain = "_"}
- if (id instanceof Array) {domain = (id[0] || "_"); id = (id[1] || "")}
- //
- // Check if the data is available and if not,
- // load it and throw a restart error so the calling
- // code can wait for the load and try again.
- //
- var load = this.loadDomain(domain);
- if (load) {MathJax.Hub.RestartAfter(load)}
- //
- // Look up the message in the localization data
- // (if not found, the original English is used)
- //
- var localeData = this.strings[this.locale];
- if (localeData) {
- if (localeData.domains && domain in localeData.domains) {
- var domainData = localeData.domains[domain];
- if (domainData.strings && id in domainData.strings)
- {phrase = domainData.strings[id]}
- }
- }
- //
- // return the translated phrase
- //
- return phrase;
- },
-
- //
- // Load a langauge data file from the proper
- // directory and file.
- //
- loadFile: function (file,data,callback) {
- callback = MathJax.Callback(callback||{});
- file = (data.file || file); // the data's file name or the default name
- if (!file.match(/\.js$/)) {file += ".js"} // add .js if needed
- //
- // Add the directory if the file doesn't
- // contain a full URL already.
- //
- if (!file.match(/^([a-z]+:|\[MathJax\])/)) {
- var dir = (this.strings[this.locale].directory ||
- this.directory + "/" + this.locale ||
- "[MathJax]/localization/" + this.locale);
- file = dir + "/" + file;
- }
- //
- // Load the file and mark the data as loaded (even if it
- // failed to load, so we don't continue to try to load it
- // over and over).
- //
- var load = MathJax.Ajax.Require(file,function () {data.isLoaded = true; return callback()});
- //
- // Return the callback if needed, otherwise null.
- //
- return (load.called ? null : load);
- },
-
- //
- // Check to see if the localization data are loaded
- // for the given domain; if not, load the data file,
- // and return a callback for the loading operation.
- // Otherwise return null (data are loaded).
- //
- loadDomain: function (domain,callback) {
- var load, localeData = this.strings[this.locale];
- if (localeData) {
- if (!localeData.isLoaded) {
- load = this.loadFile(this.locale,localeData);
- if (load) {
- return MathJax.Callback.Queue(
- load,["loadDomain",this,domain] // call again to load domain
- ).Push(callback);
- }
- }
- if (localeData.domains && domain in localeData.domains) {
- var domainData = localeData.domains[domain];
- if (!domainData.isLoaded) {
- load = this.loadFile(domain,domainData);
- if (load) {return MathJax.Callback.Queue(load).Push(callback)}
- }
- }
- }
- // localization data are loaded, so just do the callback
- return MathJax.Callback(callback)();
- },
-
- //
- // Perform a function, properly handling
- // restarts due to localization file loads.
- //
- // Note that this may return before the function
- // has been called successfully, so you should
- // consider fn as running asynchronously. (Callbacks
- // can be used to synchronize it with other actions.)
- //
- Try: function (fn) {
- fn = MathJax.Callback(fn); fn.autoReset = true;
- try {fn()} catch (err) {
- if (!err.restart) {throw err}
- MathJax.Callback.After(["Try",this,fn],err.restart);
- }
- },
-
- //
- // Reset the current language
- //
- resetLocale: function(locale) {
- // Selection algorithm:
- // 1) Downcase locale name (e.g. "en-US" => "en-us")
- // 2) Try a parent language (e.g. "en-us" => "en")
- // 3) Try the fallback specified in the data (e.g. "pt" => "pt-br")
- // 4) Otherwise don't change the locale.
- if (!locale) return;
- locale = locale.toLowerCase();
- while (!this.strings[locale]) {
- var dashPos = locale.lastIndexOf("-");
- if (dashPos === -1) return;
- locale = locale.substring(0, dashPos);
- }
- var remap = this.strings[locale].remap;
- this.locale = remap ? remap : locale;
- },
-
- //
- // Set the current language
- //
- setLocale: function(locale) {
- this.resetLocale(locale);
- if (MathJax.Menu) {this.loadDomain("MathMenu")}
- },
-
- //
- // Add or update a language or domain
- //
- addTranslation: function (locale,domain,definition) {
- var data = this.strings[locale], isNew = false;
- if (!data) {data = this.strings[locale] = {}; isNew = true}
- if (!data.domains) {data.domains = {}}
- if (domain) {
- if (!data.domains[domain]) {data.domains[domain] = {}}
- data = data.domains[domain];
- }
- MathJax.Hub.Insert(data,definition);
- if (isNew && MathJax.Menu.menu) {MathJax.Menu.CreateLocaleMenu()}
- },
-
- //
- // Set CSS for an element based on font requirements
- //
- setCSS: function (div) {
- var locale = this.strings[this.locale];
- if (locale) {
- if (locale.fontFamily) {div.style.fontFamily = locale.fontFamily}
- if (locale.fontDirection) {
- div.style.direction = locale.fontDirection;
- if (locale.fontDirection === "rtl") {div.style.textAlign = "right"}
- }
- }
- return div;
- },
-
- //
- // Get the language's font family or direction
- //
- fontFamily: function () {
- var locale = this.strings[this.locale];
- return (locale ? locale.fontFamily : null);
- },
- fontDirection: function () {
- var locale = this.strings[this.locale];
- return (locale ? locale.fontDirection : null);
- },
-
- //
- // Get the language's plural index for a number
- //
- plural: function (n) {
- var locale = this.strings[this.locale];
- if (locale && locale.plural) {return locale.plural(n)}
- // default
- if (n == 1) {return 1} // one
- return 2; // other
- },
-
- //
- // Convert a number to language-specific form
- //
- number: function(n) {
- var locale = this.strings[this.locale];
- if (locale && locale.number) {return locale.number(n)}
- // default
- return n;
- }
-};
-
-
-/**********************************************************/
-
-MathJax.Message = {
- ready: false, // used to tell when the styles are available
- log: [{}], current: null,
- textNodeBug: (navigator.vendor === "Apple Computer, Inc." &&
- typeof navigator.vendorSub === "undefined") ||
- (window.hasOwnProperty && window.hasOwnProperty("konqueror")), // Konqueror displays some gibberish with text.nodeValue = "..."
-
- styles: {
- "#MathJax_Message": {
- position: "fixed", left: "1px", bottom: "2px",
- 'background-color': "#E6E6E6", border: "1px solid #959595",
- margin: "0px", padding: "2px 8px",
- 'z-index': "102", color: "black", 'font-size': "80%",
- width: "auto", 'white-space': "nowrap"
- },
-
- "#MathJax_MSIE_Frame": {
- position: "absolute",
- top:0, left: 0, width: "0px", 'z-index': 101,
- border: "0px", margin: "0px", padding: "0px"
- }
- },
-
- browsers: {
- MSIE: function (browser) {
- MathJax.Hub.config.styles["#MathJax_Message"].position = "absolute";
- MathJax.Message.quirks = (document.compatMode === "BackCompat");
- },
- Chrome: function (browser) {
- MathJax.Hub.config.styles["#MathJax_Message"].bottom = "1.5em";
- MathJax.Hub.config.styles["#MathJax_Message"].left = "1em";
- }
- },
-
- Init: function (styles) {
- if (styles) {this.ready = true}
- if (!document.body || !this.ready) {return false}
- //
- // ASCIIMathML replaces the entire page with a copy of itself (@#!#%@!!)
- // so check that this.div is still part of the page, otherwise look up
- // the copy and use that.
- //
- if (this.div && this.div.parentNode == null) {
- this.div = document.getElementById("MathJax_Message");
- if (this.div) {this.text = this.div.firstChild}
- }
- if (!this.div) {
- var frame = document.body;
- if (MathJax.Hub.Browser.isMSIE) {
- frame = this.frame = this.addDiv(document.body); frame.removeAttribute("id");
- frame.style.position = "absolute";
- frame.style.border = frame.style.margin = frame.style.padding = "0px";
- frame.style.zIndex = "101"; frame.style.height = "0px";
- frame = this.addDiv(frame);
- frame.id = "MathJax_MSIE_Frame";
- window.attachEvent("onscroll",this.MoveFrame);
- window.attachEvent("onresize",this.MoveFrame);
- this.MoveFrame();
- }
- this.div = this.addDiv(frame); this.div.style.display = "none";
- this.text = this.div.appendChild(document.createTextNode(""));
- }
- return true;
- },
-
- addDiv: function (parent) {
- var div = document.createElement("div");
- div.id = "MathJax_Message";
- if (parent.firstChild) {parent.insertBefore(div,parent.firstChild)}
- else {parent.appendChild(div)}
- return div;
- },
-
- MoveFrame: function () {
- var body = (MathJax.Message.quirks ? document.body : document.documentElement);
- var frame = MathJax.Message.frame;
- frame.style.left = body.scrollLeft + 'px';
- frame.style.top = body.scrollTop + 'px';
- frame.style.width = body.clientWidth + 'px';
- frame = frame.firstChild;
- frame.style.height = body.clientHeight + 'px';
- },
-
- localize: function (message) {
- return MathJax.Localization._(message,message);
- },
-
- filterText: function (text,n,id) {
- if (MathJax.Hub.config.messageStyle === "simple") {
- if (id === "LoadFile") {
- if (!this.loading) {this.loading = this.localize("Loading") + " "}
- text = this.loading; this.loading += ".";
- } else if (id === "ProcessMath") {
- if (!this.processing) {this.processing = this.localize("Processing") + " "}
- text = this.processing; this.processing += ".";
- } else if (id === "TypesetMath") {
- if (!this.typesetting) {this.typesetting = this.localize("Typesetting") + " "}
- text = this.typesetting; this.typesetting += ".";
- }
- }
- return text;
- },
-
- Set: function (text,n,clearDelay) {
- if (n == null) {n = this.log.length; this.log[n] = {}}
- //
- // Translate message if it is [id,message,arguments]
- //
- var id = "";
- if (text instanceof Array) {
- id = text[0]; if (id instanceof Array) {id = id[1]}
- //
- // Localization._() will throw a restart error if a localization file
- // needs to be loaded, so trap that and redo the Set() call
- // after it is loaded.
- //
- try {
- text = MathJax.Localization._.apply(MathJax.Localization,text);
- } catch (err) {
- if (!err.restart) {throw err}
- if (!err.restart.called) {
- //
- // Mark it so we can tell if the Clear() comes before the message is displayed
- //
- if (this.log[n].restarted == null) {this.log[n].restarted = 0}
- this.log[n].restarted++; delete this.log[n].cleared;
- MathJax.Callback.After(["Set",this,text,n,clearDelay],err.restart);
- return n;
- }
- }
- }
- //
- // Clear the timout timer.
- //
- if (this.timer) {clearTimeout(this.timer); delete this.timer}
- //
- // Save the message and filtered message.
- //
- this.log[n].text = text; this.log[n].filteredText = text = this.filterText(text,n,id);
- //
- // Hook the message into the message list so we can tell
- // what message to put up when this one is removed.
- //
- if (typeof(this.log[n].next) === "undefined") {
- this.log[n].next = this.current;
- if (this.current != null) {this.log[this.current].prev = n}
- this.current = n;
- }
- //
- // Show the message if it is the currently active one.
- //
- if (this.current === n && MathJax.Hub.config.messageStyle !== "none") {
- if (this.Init()) {
- if (this.textNodeBug) {this.div.innerHTML = text} else {this.text.nodeValue = text}
- this.div.style.display = "";
- if (this.status) {window.status = ""; delete this.status}
- } else {
- window.status = text;
- this.status = true;
- }
- }
- //
- // Check if the message was resetarted to load a localization file
- // and if it has been cleared in the meanwhile.
- //
- if (this.log[n].restarted) {
- if (this.log[n].cleared) {clearDelay = 0}
- if (--this.log[n].restarted === 0) {delete this.log[n].cleared}
- }
- //
- // Check if we need to clear the message automatically.
- //
- if (clearDelay) {setTimeout(MathJax.Callback(["Clear",this,n]),clearDelay)}
- else if (clearDelay == 0) {this.Clear(n,0)}
- //
- // Return the message number.
- //
- return n;
- },
-
- Clear: function (n,delay) {
- //
- // Detatch the message from the active list.
- //
- if (this.log[n].prev != null) {this.log[this.log[n].prev].next = this.log[n].next}
- if (this.log[n].next != null) {this.log[this.log[n].next].prev = this.log[n].prev}
- //
- // If it is the current message, get the next one to show.
- //
- if (this.current === n) {
- this.current = this.log[n].next;
- if (this.text) {
- if (this.div.parentNode == null) {this.Init()} // see ASCIIMathML comments above
- if (this.current == null) {
- //
- // If there are no more messages, remove the message box.
- //
- if (this.timer) {clearTimeout(this.timer); delete this.timer}
- if (delay == null) {delay = 600}
- if (delay === 0) {this.Remove()}
- else {this.timer = setTimeout(MathJax.Callback(["Remove",this]),delay)}
- } else if (MathJax.Hub.config.messageStyle !== "none") {
- //
- // If there is an old message, put it in place
- //
- if (this.textNodeBug) {this.div.innerHTML = this.log[this.current].filteredText}
- else {this.text.nodeValue = this.log[this.current].filteredText}
- }
- if (this.status) {window.status = ""; delete this.status}
- } else if (this.status) {
- window.status = (this.current == null ? "" : this.log[this.current].text);
- }
- }
- //
- // Clean up the log data no longer needed
- //
- delete this.log[n].next; delete this.log[n].prev;
- delete this.log[n].filteredText;
- //
- // If this is a restarted localization message, mark that it has been cleared
- // while waiting for the file to load.
- //
- if (this.log[n].restarted) {this.log[n].cleared = true}
- },
-
- Remove: function () {
- // FIXME: do a fade out or something else interesting?
- this.text.nodeValue = "";
- this.div.style.display = "none";
- },
-
- File: function (file) {
- var root = MathJax.Ajax.config.root;
- if (file.substr(0,root.length) === root) {file = "[MathJax]"+file.substr(root.length)}
- return this.Set(["LoadFile","Loading %1",file],null,null);
- },
-
- Log: function () {
- var strings = [];
- for (var i = 1, m = this.log.length; i < m; i++) {strings[i] = this.log[i].text}
- return strings.join("\n");
- }
-
-};
-
-/**********************************************************/
-
-MathJax.Hub = {
- config: {
- root: "",
- config: [], // list of configuration files to load
- styleSheets: [], // list of CSS files to load
- styles: { // styles to generate in-line
- ".MathJax_Preview": {color: "#888"}
- },
- jax: [], // list of input and output jax to load
- extensions: [], // list of extensions to load
- preJax: null, // pattern to remove from before math script tag
- postJax: null, // pattern to remove from after math script tag
- displayAlign: 'center', // how to align displayed equations (left, center, right)
- displayIndent: '0', // indentation for displayed equations (when not centered)
- preRemoveClass: 'MathJax_Preview', // class of objects to remove preceeding math script
- showProcessingMessages: true, // display "Processing math: nn%" messages or not
- messageStyle: "normal", // set to "none" or "simple" (for "Loading..." and "Processing...")
- delayStartupUntil: "none", // set to "onload" to delay setup until the onload handler runs
- // set to "configured" to delay startup until MathJax.Hub.Configured() is called
- // set to a Callback to wait for before continuing with the startup
- skipStartupTypeset: false, // set to true to skip PreProcess and Process during startup
- elements: [], // array of elements to process when none is given explicitly
- positionToHash: true, // after initial typeset pass, position to #hash location?
-
- showMathMenu: true, // attach math context menu to typeset math?
- showMathMenuMSIE: true, // separtely determine if MSIE should have math menu
- // (since the code for that is a bit delicate)
-
- menuSettings: {
- zoom: "None", // when to do MathZoom
- CTRL: false, // require CTRL for MathZoom?
- ALT: false, // require Alt or Option?
- CMD: false, // require CMD?
- Shift: false, // require Shift?
- discoverable: false, // make math menu discoverable on hover?
- zscale: "200%", // the scaling factor for MathZoom
- renderer: "", // set when Jax are loaded
- font: "Auto", // what font HTML-CSS should use
- context: "MathJax", // or "Browser" for pass-through to browser menu
- locale: "en", // the language to use for messages
- mpContext: false, // true means pass menu events to MathPlayer in IE
- mpMouse: false, // true means pass mouse events to MathPlayer in IE
- texHints: true // include class names for TeXAtom elements
- },
-
- errorSettings: {
- // localized HTML snippet structure for message to use
- message: ["[",["MathProcessingError","Math Processing Error"],"]"],
- style: {color: "#CC0000", "font-style":"italic"} // style for message
- }
- },
-
- preProcessors: MathJax.Callback.Hooks(true), // list of callbacks for preprocessing (initialized by extensions)
- inputJax: {}, // mime-type mapped to input jax (by registration)
- outputJax: {order:{}}, // mime-type mapped to output jax list (by registration)
-
- processUpdateTime: 250, // time between screen updates when processing math (milliseconds)
- processUpdateDelay: 10, // pause between screen updates to allow other processing (milliseconds)
-
- signal: MathJax.Callback.Signal("Hub"), // Signal used for Hub events
-
- Config: function (def) {
- this.Insert(this.config,def);
- if (this.config.Augment) {this.Augment(this.config.Augment)}
- },
- CombineConfig: function (name,def) {
- var config = this.config, id, parent; name = name.split(/\./);
- for (var i = 0, m = name.length; i < m; i++) {
- id = name[i]; if (!config[id]) {config[id] = {}}
- parent = config; config = config[id];
- }
- parent[id] = config = this.Insert(def,config);
- return config;
- },
-
- Register: {
- PreProcessor: function () {MathJax.Hub.preProcessors.Add.apply(MathJax.Hub.preProcessors,arguments)},
- MessageHook: function () {return MathJax.Hub.signal.MessageHook.apply(MathJax.Hub.signal,arguments)},
- StartupHook: function () {return MathJax.Hub.Startup.signal.MessageHook.apply(MathJax.Hub.Startup.signal,arguments)},
- LoadHook: function () {return MathJax.Ajax.LoadHook.apply(MathJax.Ajax,arguments)}
- },
-
- getAllJax: function (element) {
- var jax = [], scripts = this.elementScripts(element);
- for (var i = 0, m = scripts.length; i < m; i++) {
- if (scripts[i].MathJax && scripts[i].MathJax.elementJax)
- {jax.push(scripts[i].MathJax.elementJax)}
- }
- return jax;
- },
-
- getJaxByType: function (type,element) {
- var jax = [], scripts = this.elementScripts(element);
- for (var i = 0, m = scripts.length; i < m; i++) {
- if (scripts[i].MathJax && scripts[i].MathJax.elementJax &&
- scripts[i].MathJax.elementJax.mimeType === type)
- {jax.push(scripts[i].MathJax.elementJax)}
- }
- return jax;
- },
-
- getJaxByInputType: function (type,element) {
- var jax = [], scripts = this.elementScripts(element);
- for (var i = 0, m = scripts.length; i < m; i++) {
- if (scripts[i].MathJax && scripts[i].MathJax.elementJax &&
- scripts[i].type && scripts[i].type.replace(/ *;(.|\s)*/,"") === type)
- {jax.push(scripts[i].MathJax.elementJax)}
- }
- return jax;
- },
-
- getJaxFor: function (element) {
- if (typeof(element) === 'string') {element = document.getElementById(element)}
- if (element && element.MathJax) {return element.MathJax.elementJax}
- if (element && element.isMathJax) {
- while (element && !element.jaxID) {element = element.parentNode}
- if (element) {return MathJax.OutputJax[element.jaxID].getJaxFromMath(element)}
- }
- return null;
- },
-
- isJax: function (element) {
- if (typeof(element) === 'string') {element = document.getElementById(element)}
- if (element && element.isMathJax) {return 1}
- if (element && element.tagName != null && element.tagName.toLowerCase() === 'script') {
- if (element.MathJax)
- {return (element.MathJax.state === MathJax.ElementJax.STATE.PROCESSED ? 1 : -1)}
- if (element.type && this.inputJax[element.type.replace(/ *;(.|\s)*/,"")]) {return -1}
- }
- return 0;
- },
-
- setRenderer: function (renderer,type) {
- if (!renderer) return;
- if (!MathJax.OutputJax[renderer]) {
- this.config.menuSettings.renderer = "";
- var file = "[MathJax]/jax/output/"+renderer+"/config.js";
- return MathJax.Ajax.Require(file,["setRenderer",this,renderer,type]);
- } else {
- this.config.menuSettings.renderer = renderer;
- if (type == null) {type = "jax/mml"}
- var jax = this.outputJax;
- if (jax[type] && jax[type].length) {
- if (renderer !== jax[type][0].id) {
- jax[type].unshift(MathJax.OutputJax[renderer]);
- return this.signal.Post(["Renderer Selected",renderer]);
- }
- }
- return null;
- }
- },
-
- Queue: function () {
- return this.queue.Push.apply(this.queue,arguments);
- },
-
- Typeset: function (element,callback) {
- if (!MathJax.isReady) return null;
- var ec = this.elementCallback(element,callback);
- var queue = MathJax.Callback.Queue();
- for (var i = 0, m = ec.elements.length; i < m; i++) {
- if (ec.elements[i]) {
- queue.Push(
- ["PreProcess",this,ec.elements[i]],
- ["Process",this,ec.elements[i]]
- );
- }
- }
- return queue.Push(ec.callback);
- },
-
- PreProcess: function (element,callback) {
- var ec = this.elementCallback(element,callback);
- var queue = MathJax.Callback.Queue();
- for (var i = 0, m = ec.elements.length; i < m; i++) {
- if (ec.elements[i]) {
- queue.Push(
- ["Post",this.signal,["Begin PreProcess",ec.elements[i]]],
- (arguments.callee.disabled? {} : ["Execute",this.preProcessors,ec.elements[i]]),
- ["Post",this.signal,["End PreProcess",ec.elements[i]]]
- );
- }
- }
- return queue.Push(ec.callback);
- },
-
- Process: function (element,callback) {return this.takeAction("Process",element,callback)},
- Update: function (element,callback) {return this.takeAction("Update",element,callback)},
- Reprocess: function (element,callback) {return this.takeAction("Reprocess",element,callback)},
- Rerender: function (element,callback) {return this.takeAction("Rerender",element,callback)},
-
- takeAction: function (action,element,callback) {
- var ec = this.elementCallback(element,callback);
- var queue = MathJax.Callback.Queue(["Clear",this.signal]);
- for (var i = 0, m = ec.elements.length; i < m; i++) {
- if (ec.elements[i]) {
- var state = {
- scripts: [], // filled in by prepareScripts
- start: new Date().getTime(), // timer for processing messages
- i: 0, j: 0, // current script, current jax
- jax: {}, // scripts grouped by output jax
- jaxIDs: [] // id's of jax used
- };
- queue.Push(
- ["Post",this.signal,["Begin "+action,ec.elements[i]]],
- ["Post",this.signal,["Begin Math",ec.elements[i],action]],
- ["prepareScripts",this,action,ec.elements[i],state],
- ["Post",this.signal,["Begin Math Input",ec.elements[i],action]],
- ["processInput",this,state],
- ["Post",this.signal,["End Math Input",ec.elements[i],action]],
- ["prepareOutput",this,state,"preProcess"],
- ["Post",this.signal,["Begin Math Output",ec.elements[i],action]],
- ["processOutput",this,state],
- ["Post",this.signal,["End Math Output",ec.elements[i],action]],
- ["prepareOutput",this,state,"postProcess"],
- ["Post",this.signal,["End Math",ec.elements[i],action]],
- ["Post",this.signal,["End "+action,ec.elements[i]]]
- );
- }
- }
- return queue.Push(ec.callback);
- },
-
- scriptAction: {
- Process: function (script) {},
- Update: function (script) {
- var jax = script.MathJax.elementJax;
- if (jax && jax.needsUpdate()) {jax.Remove(true); script.MathJax.state = jax.STATE.UPDATE}
- else {script.MathJax.state = jax.STATE.PROCESSED}
- },
- Reprocess: function (script) {
- var jax = script.MathJax.elementJax;
- if (jax) {jax.Remove(true); script.MathJax.state = jax.STATE.UPDATE}
- },
- Rerender: function (script) {
- var jax = script.MathJax.elementJax;
- if (jax) {jax.Remove(true); script.MathJax.state = jax.STATE.OUTPUT}
- }
- },
-
- prepareScripts: function (action,element,state) {
- if (arguments.callee.disabled) return;
- var scripts = this.elementScripts(element);
- var STATE = MathJax.ElementJax.STATE;
- for (var i = 0, m = scripts.length; i < m; i++) {
- var script = scripts[i];
- if (script.type && this.inputJax[script.type.replace(/ *;(.|\n)*/,"")]) {
- if (script.MathJax) {
- if (script.MathJax.elementJax && script.MathJax.elementJax.hover) {
- MathJax.Extension.MathEvents.Hover.ClearHover(script.MathJax.elementJax);
- }
- if (script.MathJax.state !== STATE.PENDING) {this.scriptAction[action](script)}
- }
- if (!script.MathJax) {script.MathJax = {state: STATE.PENDING}}
- if (script.MathJax.state !== STATE.PROCESSED) {state.scripts.push(script)}
- }
- }
- },
-
- checkScriptSiblings: function (script) {
- if (script.MathJax.checked) return;
- var config = this.config, pre = script.previousSibling;
- if (pre && pre.nodeName === "#text") {
- var preJax,postJax, post = script.nextSibling;
- if (post && post.nodeName !== "#text") {post = null}
- if (config.preJax) {
- if (typeof(config.preJax) === "string") {config.preJax = new RegExp(config.preJax+"$")}
- preJax = pre.nodeValue.match(config.preJax);
- }
- if (config.postJax && post) {
- if (typeof(config.postJax) === "string") {config.postJax = new RegExp("^"+config.postJax)}
- postJax = post.nodeValue.match(config.postJax);
- }
- if (preJax && (!config.postJax || postJax)) {
- pre.nodeValue = pre.nodeValue.replace
- (config.preJax,(preJax.length > 1? preJax[1] : ""));
- pre = null;
- }
- if (postJax && (!config.preJax || preJax)) {
- post.nodeValue = post.nodeValue.replace
- (config.postJax,(postJax.length > 1? postJax[1] : ""));
- }
- if (pre && !pre.nodeValue.match(/\S/)) {pre = pre.previousSibling}
- }
- if (config.preRemoveClass && pre && pre.className === config.preRemoveClass)
- {script.MathJax.preview = pre}
- script.MathJax.checked = 1;
- },
-
- processInput: function (state) {
- var jax, STATE = MathJax.ElementJax.STATE;
- var script, prev, m = state.scripts.length;
- try {
- //
- // Loop through the scripts
- //
- while (state.i < m) {
- script = state.scripts[state.i]; if (!script) {state.i++; continue}
- //
- // Remove previous error marker, if any
- //
- prev = script.previousSibling;
- if (prev && prev.className === "MathJax_Error") {prev.parentNode.removeChild(prev)}
- //
- // Check if already processed or needs processing
- //
- if (!script.MathJax || script.MathJax.state === STATE.PROCESSED) {state.i++; continue};
- if (!script.MathJax.elementJax || script.MathJax.state === STATE.UPDATE) {
- this.checkScriptSiblings(script); // remove preJax/postJax etc.
- var type = script.type.replace(/ *;(.|\s)*/,""); // the input jax type
- jax = this.inputJax[type].Process(script,state); // run the input jax
- if (typeof jax === 'function') { // if a callback was returned
- if (jax.called) continue; // go back and call Process() again
- this.RestartAfter(jax); // wait for the callback
- }
- jax.Attach(script,this.inputJax[type].id); // register the jax on the script
- this.saveScript(jax,state,script,STATE); // add script to state
- } else if (script.MathJax.state === STATE.OUTPUT) {
- this.saveScript(script.MathJax.elementJax,state,script,STATE); // add script to state
- }
- //
- // Go on to the next script, and check if we need to update the processing message
- //
- state.i++; var now = new Date().getTime();
- if (now - state.start > this.processUpdateTime && state.i < state.scripts.length)
- {state.start = now; this.RestartAfter(MathJax.Callback.Delay(1))}
- }
- } catch (err) {return this.processError(err,state,"Input")}
- //
- // Put up final message, reset the state and return
- //
- if (state.scripts.length && this.config.showProcessingMessages)
- {MathJax.Message.Set(["ProcessMath","Processing math: %1%%",100],0)}
- state.start = new Date().getTime(); state.i = state.j = 0;
- return null;
- },
- saveScript: function (jax,state,script,STATE) {
- //
- // Check that output jax exists
- //
- if (!this.outputJax[jax.mimeType]) {
- script.MathJax.state = STATE.UPDATE;
- throw Error("No output jax registered for "+jax.mimeType);
- }
- //
- // Record the output jax
- // and put this script in the queue for that jax
- //
- jax.outputJax = this.outputJax[jax.mimeType][0].id;
- if (!state.jax[jax.outputJax]) {
- if (state.jaxIDs.length === 0) {
- // use original array until we know there are more (rather than two copies)
- state.jax[jax.outputJax] = state.scripts;
- } else {
- if (state.jaxIDs.length === 1) // get the script so far for the existing jax
- {state.jax[state.jaxIDs[0]] = state.scripts.slice(0,state.i)}
- state.jax[jax.outputJax] = []; // start a new array for the new jax
- }
- state.jaxIDs.push(jax.outputJax); // save the ID of the jax
- }
- if (state.jaxIDs.length > 1) {state.jax[jax.outputJax].push(script)}
- //
- // Mark script as needing output
- //
- script.MathJax.state = STATE.OUTPUT;
- },
-
- //
- // Pre- and post-process scripts by jax
- // (to get scaling factors, hide/show output, and so on)
- // Since this can cause the jax to load, we need to trap restarts
- //
- prepareOutput: function (state,method) {
- while (state.j < state.jaxIDs.length) {
- var id = state.jaxIDs[state.j], JAX = MathJax.OutputJax[id];
- if (JAX[method]) {
- try {
- var result = JAX[method](state);
- if (typeof result === 'function') {
- if (result.called) continue; // go back and try again
- this.RestartAfter(result);
- }
- } catch (err) {
- if (!err.restart) {
- MathJax.Message.Set(["PrepError","Error preparing %1 output (%2)",id,method],null,600);
- MathJax.Hub.lastPrepError = err;
- state.j++;
- }
- return MathJax.Callback.After(["prepareOutput",this,state,method],err.restart);
- }
- }
- state.j++;
- }
- return null;
- },
-
- processOutput: function (state) {
- var result, STATE = MathJax.ElementJax.STATE, script, m = state.scripts.length;
- try {
- //
- // Loop through the scripts
- //
- while (state.i < m) {
- //
- // Check that there is an element jax
- //
- script = state.scripts[state.i];
- if (!script || !script.MathJax || script.MathJax.error) {state.i++; continue}
- var jax = script.MathJax.elementJax; if (!jax) {state.i++; continue}
- //
- // Call the output Jax's Process method (which will be its Translate()
- // method once loaded). Mark it as complete and remove the preview.
- //
- result = MathJax.OutputJax[jax.outputJax].Process(script,state);
- script.MathJax.state = STATE.PROCESSED; state.i++;
- if (script.MathJax.preview) {script.MathJax.preview.innerHTML = ""}
- //
- // Signal that new math is available
- //
- this.signal.Post(["New Math",jax.inputID]); // FIXME: wait for this? (i.e., restart if returns uncalled callback)
- //
- // Update the processing message, if needed
- //
- var now = new Date().getTime();
- if (now - state.start > this.processUpdateTime && state.i < state.scripts.length)
- {state.start = now; this.RestartAfter(MathJax.Callback.Delay(this.processUpdateDelay))}
- }
- } catch (err) {return this.processError(err,state,"Output")}
- //
- // Put up the typesetting-complete message
- //
- if (state.scripts.length && this.config.showProcessingMessages) {
- MathJax.Message.Set(["TypesetMath","Typesetting math: %1%%",100],0);
- MathJax.Message.Clear(0);
- }
- state.i = state.j = 0;
- return null;
- },
-
- processMessage: function (state,type) {
- var m = Math.floor(state.i/(state.scripts.length)*100);
- var message = (type === "Output" ? ["TypesetMath","Typesetting math: %1%%"] :
- ["ProcessMath","Processing math: %1%%"]);
- if (this.config.showProcessingMessages) {MathJax.Message.Set(message.concat(m),0)}
- },
-
- processError: function (err,state,type) {
- if (!err.restart) {
- if (!this.config.errorSettings.message) {throw err}
- this.formatError(state.scripts[state.i],err); state.i++;
- }
- this.processMessage(state,type);
- return MathJax.Callback.After(["process"+type,this,state],err.restart);
- },
-
- formatError: function (script,err) {
- //
- // Get the error message, URL, and line, and save it for
- // reporting in the Show Math As Error menu
- //
- var message = "Error: "+err.message+"\n";
- if (err.sourceURL) {message += "\nfile: "+err.sourceURL}
- if (err.line) {message += "\nline: "+err.line}
- script.MathJax.error = MathJax.OutputJax.Error.Jax(message,script);
-
- //
- // Create the [Math Processing Error] span
- //
- var errorSettings = this.config.errorSettings;
- var errorText = MathJax.Localization._(errorSettings.messageId,errorSettings.message);
- var error = MathJax.HTML.Element("span",
- {className:"MathJax_Error", jaxID:"Error", isMathJax:true},errorText);
- //
- // Attach the menu events
- //
- if (MathJax.Extension.MathEvents) {
- error.oncontextmenu = MathJax.Extension.MathEvents.Event.Menu;
- error.onmousedown = MathJax.Extension.MathEvents.Event.Mousedown;
- } else {
- MathJax.Ajax.Require("[MathJax]/extensions/MathEvents.js",function () {
- error.oncontextmenu = MathJax.Extension.MathEvents.Event.Menu;
- error.onmousedown = MathJax.Extension.MathEvents.Event.Mousedown;
- });
- }
- //
- // Insert the error into the page and remove any preview
- //
- script.parentNode.insertBefore(error,script);
- if (script.MathJax.preview) {script.MathJax.preview.innerHTML = ""}
- //
- // Save the error for debugging purposes
- // Report the error as a signal
- //
- this.lastError = err;
- this.signal.Post(["Math Processing Error",script,err]);
- },
-
- RestartAfter: function (callback) {
- throw this.Insert(Error("restart"),{restart: MathJax.Callback(callback)});
- },
-
- elementCallback: function (element,callback) {
- if (callback == null && (element instanceof Array || typeof element === 'function'))
- {try {MathJax.Callback(element); callback = element; element = null} catch(e) {}}
- if (element == null) {element = this.config.elements || []}
- if (!(element instanceof Array)) {element = [element]}
- element = [].concat(element); // make a copy so the original isn't changed
- for (var i = 0, m = element.length; i < m; i++)
- {if (typeof(element[i]) === 'string') {element[i] = document.getElementById(element[i])}}
- if (!document.body) {document.body = document.getElementsByTagName("body")[0]}
- if (element.length == 0) {element.push(document.body)}
- if (!callback) {callback = {}}
- return {elements: element, callback: callback};
- },
-
- elementScripts: function (element) {
- if (element instanceof Array) {
- var scripts = [];
- for (var i = 0, m = element.length; i < m; i++)
- {scripts.push.apply(scripts,this.elementScripts(element[i]))}
- return scripts;
- }
- if (typeof(element) === 'string') {element = document.getElementById(element)}
- if (!document.body) {document.body = document.getElementsByTagName("body")[0]}
- if (element == null) {element = document.body}
- if (element.tagName != null && element.tagName.toLowerCase() === "script") {return [element]}
- return element.getElementsByTagName("script");
- },
-
- Insert: function (dst,src) {
- for (var id in src) {if (src.hasOwnProperty(id)) {
- // allow for concatenation of arrays?
- if (typeof src[id] === 'object' && !(src[id] instanceof Array) &&
- (typeof dst[id] === 'object' || typeof dst[id] === 'function')) {
- this.Insert(dst[id],src[id]);
- } else {
- dst[id] = src[id];
- }
- }}
- return dst;
- },
-
- // Old browsers (e.g. Internet Explorer <= 8) do not support trim().
- SplitList: ("trim" in String.prototype ?
- function (list) {return list.trim().split(/\s+/)} :
- function (list) {return list.replace(/^\s+/,'').
- replace(/\s+$/,'').split(/\s+/)})
-};
-MathJax.Hub.Insert(MathJax.Hub.config.styles,MathJax.Message.styles);
-MathJax.Hub.Insert(MathJax.Hub.config.styles,{".MathJax_Error":MathJax.Hub.config.errorSettings.style});
-
-//
-// Storage area for extensions and preprocessors
-//
-MathJax.Extension = {};
-
-//
-// Hub Startup code
-//
-MathJax.Hub.Configured = MathJax.Callback({}); // called when configuration is complete
-MathJax.Hub.Startup = {
- script: "", // the startup script from the SCRIPT call that loads MathJax.js
- queue: MathJax.Callback.Queue(), // Queue used for startup actions
- signal: MathJax.Callback.Signal("Startup"), // Signal used for startup events
- params: {},
-
- //
- // Load the configuration files
- //
- Config: function () {
- this.queue.Push(["Post",this.signal,"Begin Config"]);
- //
- // If a locale is given as a parameter,
- // set the locale and the default menu value for the locale
- //
- if (this.params.locale) {
- MathJax.Localization.resetLocale(this.params.locale);
- MathJax.Hub.config.menuSettings.locale = this.params.locale;
- }
- //
- // Check for user cookie configuration
- //
- var user = MathJax.HTML.Cookie.Get("user");
- if (user.URL || user.Config) {
- if (confirm(
- MathJax.Localization._("CookieConfig",
- "MathJax has found a user-configuration cookie that includes code to "+
- "be run. Do you want to run it?\n\n"+
- "(You should press Cancel unless you set up the cookie yourself.)")
- )) {
- if (user.URL) {this.queue.Push(["Require",MathJax.Ajax,user.URL])}
- if (user.Config) {this.queue.Push(new Function(user.Config))}
- } else {MathJax.HTML.Cookie.Set("user",{})}
- }
- //
- // Run the config files, if any are given in the parameter list
- //
- if (this.params.config) {
- var files = this.params.config.split(/,/);
- for (var i = 0, m = files.length; i < m; i++) {
- if (!files[i].match(/\.js$/)) {files[i] += ".js"}
- this.queue.Push(["Require",MathJax.Ajax,this.URL("config",files[i])]);
- }
- }
- //
- // Perform author configuration from in-line MathJax = {...}
- //
- this.queue.Push(["Config",MathJax.Hub,MathJax.AuthorConfig]);
- //
- // Run the deprecated configuration script, if any (ignoring return value)
- // Wait for the startup delay signal
- // Run the mathjax-config blocks
- // Load the files in the configuration's config array
- //
- if (this.script.match(/\S/)) {this.queue.Push(this.script+";\n1;")}
- this.queue.Push(
- ["ConfigDelay",this],
- ["ConfigBlocks",this],
- [function (THIS) {return THIS.loadArray(MathJax.Hub.config.config,"config",null,true)},this],
- ["Post",this.signal,"End Config"]
- );
- },
- //
- // Return the delay callback
- //
- ConfigDelay: function () {
- var delay = this.params.delayStartupUntil || MathJax.Hub.config.delayStartupUntil;
- if (delay === "onload") {return this.onload}
- if (delay === "configured") {return MathJax.Hub.Configured}
- return delay;
- },
- //
- // Run the scripts of type=text/x-mathjax-config
- //
- ConfigBlocks: function () {
- var scripts = document.getElementsByTagName("script");
- var last = null, queue = MathJax.Callback.Queue();
- for (var i = 0, m = scripts.length; i < m; i++) {
- var type = String(scripts[i].type).replace(/ /g,"");
- if (type.match(/^text\/x-mathjax-config(;.*)?$/) && !type.match(/;executed=true/)) {
- scripts[i].type += ";executed=true";
- last = queue.Push(scripts[i].innerHTML+";\n1;");
- }
- }
- return last;
- },
-
- //
- // Read cookie and set up menu defaults
- // (set the locale according to the cookie)
- // (adjust the jax to accommodate renderer preferences)
- //
- Cookie: function () {
- return this.queue.Push(
- ["Post",this.signal,"Begin Cookie"],
- ["Get",MathJax.HTML.Cookie,"menu",MathJax.Hub.config.menuSettings],
- [function (config) {
- if (config.menuSettings.locale)
- {MathJax.Localization.resetLocale(config.menuSettings.locale)}
- var renderer = config.menuSettings.renderer, jax = config.jax;
- if (renderer) {
- var name = "output/"+renderer; jax.sort();
- for (var i = 0, m = jax.length; i < m; i++) {
- if (jax[i].substr(0,7) === "output/") break;
- }
- if (i == m-1) {jax.pop()} else {
- while (i < m) {if (jax[i] === name) {jax.splice(i,1); break}; i++}
- }
- jax.unshift(name);
- }
- },MathJax.Hub.config],
- ["Post",this.signal,"End Cookie"]
- );
- },
- //
- // Setup stylesheets and extra styles
- //
- Styles: function () {
- return this.queue.Push(
- ["Post",this.signal,"Begin Styles"],
- ["loadArray",this,MathJax.Hub.config.styleSheets,"config"],
- ["Styles",MathJax.Ajax,MathJax.Hub.config.styles],
- ["Post",this.signal,"End Styles"]
- );
- },
- //
- // Load the input and output jax
- //
- Jax: function () {
- var config = MathJax.Hub.config, jax = MathJax.Hub.outputJax;
- // Save the order of the output jax since they are loading asynchronously
- for (var i = 0, m = config.jax.length, k = 0; i < m; i++) {
- var name = config.jax[i].substr(7);
- if (config.jax[i].substr(0,7) === "output/" && jax.order[name] == null)
- {jax.order[name] = k; k++}
- }
- var queue = MathJax.Callback.Queue();
- return queue.Push(
- ["Post",this.signal,"Begin Jax"],
- ["loadArray",this,config.jax,"jax","config.js"],
- ["Post",this.signal,"End Jax"]
- );
- },
- //
- // Load the extensions
- //
- Extensions: function () {
- var queue = MathJax.Callback.Queue();
- return queue.Push(
- ["Post",this.signal,"Begin Extensions"],
- ["loadArray",this,MathJax.Hub.config.extensions,"extensions"],
- ["Post",this.signal,"End Extensions"]
- );
- },
-
- //
- // Initialize the Message system
- //
- Message: function () {
- MathJax.Message.Init(true);
- },
-
- //
- // Set the math menu renderer, if it isn't already
- // (this must come after the jax are loaded)
- //
- Menu: function () {
- var menu = MathJax.Hub.config.menuSettings, jax = MathJax.Hub.outputJax, registered;
- for (var id in jax) {if (jax.hasOwnProperty(id)) {
- if (jax[id].length) {registered = jax[id]; break}
- }}
- if (registered && registered.length) {
- if (menu.renderer && menu.renderer !== registered[0].id)
- {registered.unshift(MathJax.OutputJax[menu.renderer])}
- menu.renderer = registered[0].id;
- }
- },
-
- //
- // Set the location to the designated hash position
- //
- Hash: function () {
- if (MathJax.Hub.config.positionToHash && document.location.hash &&
- document.body && document.body.scrollIntoView) {
- var name = document.location.hash.substr(1);
- var target = document.getElementById(name);
- if (!target) {
- var a = document.getElementsByTagName("a");
- for (var i = 0, m = a.length; i < m; i++)
- {if (a[i].name === name) {target = a[i]; break}}
- }
- if (target) {
- while (!target.scrollIntoView) {target = target.parentNode}
- target = this.HashCheck(target);
- if (target && target.scrollIntoView)
- {setTimeout(function () {target.scrollIntoView(true)},1)}
- }
- }
- },
- HashCheck: function (target) {
- if (target.isMathJax) {
- var jax = MathJax.Hub.getJaxFor(target);
- if (jax && MathJax.OutputJax[jax.outputJax].hashCheck)
- {target = MathJax.OutputJax[jax.outputJax].hashCheck(target)}
- }
- return target;
- },
-
- //
- // Load the Menu and Zoom code, if it hasn't already been loaded.
- // This is called after the initial typeset, so should no longer be
- // competing with other page loads, but will make these available
- // if needed later on.
- //
- MenuZoom: function () {
- if (!MathJax.Extension.MathMenu) {
- setTimeout(
- function () {
- MathJax.Callback.Queue(
- ["Require",MathJax.Ajax,"[MathJax]/extensions/MathMenu.js",{}],
- ["loadDomain",MathJax.Localization,"MathMenu"]
- )
- },1000
- );
- } else {
- setTimeout(
- MathJax.Callback(["loadDomain",MathJax.Localization,"MathMenu"]),
- 1000
- );
- }
- if (!MathJax.Extension.MathZoom) {
- setTimeout(
- MathJax.Callback(["Require",MathJax.Ajax,"[MathJax]/extensions/MathZoom.js",{}]),
- 2000
- );
- }
- },
-
- //
- // Setup the onload callback
- //
- onLoad: function () {
- var onload = this.onload =
- MathJax.Callback(function () {MathJax.Hub.Startup.signal.Post("onLoad")});
- if (document.body && document.readyState)
- if (MathJax.Hub.Browser.isMSIE) {
- // IE can change from loading to interactive before
- // full page is ready, so go with complete (even though
- // that means we may have to wait longer).
- if (document.readyState === "complete") {return [onload]}
- } else if (document.readyState !== "loading") {return [onload]}
- if (window.addEventListener) {
- window.addEventListener("load",onload,false);
- if (!this.params.noDOMContentEvent)
- {window.addEventListener("DOMContentLoaded",onload,false)}
- }
- else if (window.attachEvent) {window.attachEvent("onload",onload)}
- else {window.onload = onload}
- return onload;
- },
-
- //
- // Perform the initial typesetting (or skip if configuration says to)
- //
- Typeset: function (element,callback) {
- if (MathJax.Hub.config.skipStartupTypeset) {return function () {}}
- return this.queue.Push(
- ["Post",this.signal,"Begin Typeset"],
- ["Typeset",MathJax.Hub,element,callback],
- ["Post",this.signal,"End Typeset"]
- );
- },
-
- //
- // Create a URL in the MathJax hierarchy
- //
- URL: function (dir,name) {
- if (!name.match(/^([a-z]+:\/\/|\[|\/)/)) {name = "[MathJax]/"+dir+"/"+name}
- return name;
- },
-
- //
- // Load an array of files, waiting for all of them
- // to be loaded before going on
- //
- loadArray: function (files,dir,name,synchronous) {
- if (files) {
- if (!(files instanceof Array)) {files = [files]}
- if (files.length) {
- var queue = MathJax.Callback.Queue(), callback = {}, file;
- for (var i = 0, m = files.length; i < m; i++) {
- file = this.URL(dir,files[i]);
- if (name) {file += "/" + name}
- if (synchronous) {queue.Push(["Require",MathJax.Ajax,file,callback])}
- else {queue.Push(MathJax.Ajax.Require(file,callback))}
- }
- return queue.Push({}); // wait for everything to finish
- }
- }
- return null;
- }
-
-};
-
-
-/**********************************************************/
-
-(function (BASENAME) {
- var BASE = window[BASENAME], ROOT = "["+BASENAME+"]";
- var HUB = BASE.Hub, AJAX = BASE.Ajax, CALLBACK = BASE.Callback;
-
- var JAX = MathJax.Object.Subclass({
- JAXFILE: "jax.js",
- require: null, // array of files to load before jax.js is complete
- config: {},
- //
- // Make a subclass and return an instance of it.
- // (FIXME: should we replace config with a copy of the constructor's
- // config? Otherwise all subclasses share the same config structure.)
- //
- Init: function (def,cdef) {
- if (arguments.length === 0) {return this}
- return (this.constructor.Subclass(def,cdef))();
- },
- //
- // Augment by merging with class definition (not replacing)
- //
- Augment: function (def,cdef) {
- var cObject = this.constructor, ndef = {};
- if (def != null) {
- for (var id in def) {if (def.hasOwnProperty(id)) {
- if (typeof def[id] === "function")
- {cObject.protoFunction(id,def[id])} else {ndef[id] = def[id]}
- }}
- // MSIE doesn't list toString even if it is not native so handle it separately
- if (def.toString !== cObject.prototype.toString && def.toString !== {}.toString)
- {cObject.protoFunction('toString',def.toString)}
- }
- HUB.Insert(cObject.prototype,ndef);
- cObject.Augment(null,cdef);
- return this;
- },
- Translate: function (script,state) {
- throw Error(this.directory+"/"+this.JAXFILE+" failed to define the Translate() method");
- },
- Register: function (mimetype) {},
- Config: function () {
- this.config = HUB.CombineConfig(this.id,this.config);
- if (this.config.Augment) {this.Augment(this.config.Augment)}
- },
- Startup: function () {},
- loadComplete: function (file) {
- if (file === "config.js") {
- return AJAX.loadComplete(this.directory+"/"+file);
- } else {
- var queue = CALLBACK.Queue();
- queue.Push(
- HUB.Register.StartupHook("End Config",{}), // wait until config complete
- ["Post",HUB.Startup.signal,this.id+" Jax Config"],
- ["Config",this],
- ["Post",HUB.Startup.signal,this.id+" Jax Require"],
- // Config may set the required and extensions array,
- // so use functions to delay making the reference until needed
- [function (THIS) {return MathJax.Hub.Startup.loadArray(THIS.require,this.directory)},this],
- [function (config,id) {return MathJax.Hub.Startup.loadArray(config.extensions,"extensions/"+id)},this.config||{},this.id],
- ["Post",HUB.Startup.signal,this.id+" Jax Startup"],
- ["Startup",this],
- ["Post",HUB.Startup.signal,this.id+" Jax Ready"]
- );
- if (this.copyTranslate) {
- queue.Push(
- [function (THIS) {
- THIS.preProcess = THIS.preTranslate;
- THIS.Process = THIS.Translate;
- THIS.postProcess = THIS.postTranslate;
- },this.constructor.prototype]
- );
- }
- return queue.Push(["loadComplete",AJAX,this.directory+"/"+file]);
- }
- }
- },{
- id: "Jax",
- version: "2.3",
- directory: ROOT+"/jax",
- extensionDir: ROOT+"/extensions"
- });
-
- /***********************************/
-
- BASE.InputJax = JAX.Subclass({
- elementJax: "mml", // the element jax to load for this input jax
- sourceMenuTitle: /*_(MathMenu)*/ ["Original","Original Form"],
- copyTranslate: true,
- Process: function (script,state) {
- var queue = CALLBACK.Queue(), file;
- // Load any needed element jax
- var jax = this.elementJax; if (!(jax instanceof Array)) {jax = [jax]}
- for (var i = 0, m = jax.length; i < m; i++) {
- file = BASE.ElementJax.directory+"/"+jax[i]+"/"+this.JAXFILE;
- if (!this.require) {this.require = []}
- else if (!(this.require instanceof Array)) {this.require = [this.require]};
- this.require.push(file); // so Startup will wait for it to be loaded
- queue.Push(AJAX.Require(file));
- }
- // Load the input jax
- file = this.directory+"/"+this.JAXFILE;
- var load = queue.Push(AJAX.Require(file));
- if (!load.called) {
- this.constructor.prototype.Process = function () {
- if (!load.called) {return load}
- throw Error(file+" failed to load properly");
- }
- }
- // Load the associated output jax
- jax = HUB.outputJax["jax/"+jax[0]];
- if (jax) {queue.Push(AJAX.Require(jax[0].directory+"/"+this.JAXFILE))}
- return queue.Push({});
- },
- needsUpdate: function (jax) {
- var script = jax.SourceElement();
- return (jax.originalText !== BASE.HTML.getScript(script));
- },
- Register: function (mimetype) {
- if (!HUB.inputJax) {HUB.inputJax = {}}
- HUB.inputJax[mimetype] = this;
- }
- },{
- id: "InputJax",
- version: "2.3",
- directory: JAX.directory+"/input",
- extensionDir: JAX.extensionDir
- });
-
- /***********************************/
-
- BASE.OutputJax = JAX.Subclass({
- copyTranslate: true,
- preProcess: function (state) {
- var load, file = this.directory+"/"+this.JAXFILE;
- this.constructor.prototype.preProcess = function (state) {
- if (!load.called) {return load}
- throw Error(file+" failed to load properly");
- }
- load = AJAX.Require(file);
- return load;
- },
- Register: function (mimetype) {
- var jax = HUB.outputJax;
- if (!jax[mimetype]) {jax[mimetype] = []}
- // If the output jax is earlier in the original configuration list, put it first here
- if (jax[mimetype].length && (this.id === HUB.config.menuSettings.renderer ||
- (jax.order[this.id]||0) < (jax.order[jax[mimetype][0].id]||0)))
- {jax[mimetype].unshift(this)} else {jax[mimetype].push(this)}
- // Make sure the element jax is loaded before Startup is called
- if (!this.require) {this.require = []}
- else if (!(this.require instanceof Array)) {this.require = [this.require]};
- this.require.push(BASE.ElementJax.directory+"/"+(mimetype.split(/\//)[1])+"/"+this.JAXFILE);
- },
- Remove: function (jax) {}
- },{
- id: "OutputJax",
- version: "2.3",
- directory: JAX.directory+"/output",
- extensionDir: JAX.extensionDir,
- fontDir: ROOT+(BASE.isPacked?"":"/..")+"/fonts",
- imageDir: ROOT+(BASE.isPacked?"":"/..")+"/images"
- });
-
- /***********************************/
-
- BASE.ElementJax = JAX.Subclass({
- // make a subclass, not an instance
- Init: function (def,cdef) {return this.constructor.Subclass(def,cdef)},
-
- inputJax: null,
- outputJax: null,
- inputID: null,
- originalText: "",
- mimeType: "",
- sourceMenuTitle: /*_(MathMenu)*/ ["MathMLcode","MathML Code"],
-
- Text: function (text,callback) {
- var script = this.SourceElement();
- BASE.HTML.setScript(script,text);
- script.MathJax.state = this.STATE.UPDATE;
- return HUB.Update(script,callback);
- },
- Reprocess: function (callback) {
- var script = this.SourceElement();
- script.MathJax.state = this.STATE.UPDATE;
- return HUB.Reprocess(script,callback);
- },
- Update: function (callback) {return this.Rerender(callback)},
- Rerender: function (callback) {
- var script = this.SourceElement();
- script.MathJax.state = this.STATE.OUTPUT;
- return HUB.Process(script,callback);
- },
- Remove: function (keep) {
- if (this.hover) {this.hover.clear(this)}
- BASE.OutputJax[this.outputJax].Remove(this);
- if (!keep) {
- HUB.signal.Post(["Remove Math",this.inputID]); // wait for this to finish?
- this.Detach();
- }
- },
- needsUpdate: function () {
- return BASE.InputJax[this.inputJax].needsUpdate(this);
- },
-
- SourceElement: function () {return document.getElementById(this.inputID)},
-
- Attach: function (script,inputJax) {
- var jax = script.MathJax.elementJax;
- if (script.MathJax.state === this.STATE.UPDATE) {
- jax.Clone(this);
- } else {
- jax = script.MathJax.elementJax = this;
- if (script.id) {this.inputID = script.id}
- else {script.id = this.inputID = BASE.ElementJax.GetID(); this.newID = 1}
- }
- jax.originalText = BASE.HTML.getScript(script);
- jax.inputJax = inputJax;
- if (jax.root) {jax.root.inputID = jax.inputID}
- return jax;
- },
- Detach: function () {
- var script = this.SourceElement(); if (!script) return;
- try {delete script.MathJax} catch(err) {script.MathJax = null}
- if (this.newID) {script.id = ""}
- },
- Clone: function (jax) {
- var id;
- for (id in this) {
- if (!this.hasOwnProperty(id)) continue;
- if (typeof(jax[id]) === 'undefined' && id !== 'newID') {delete this[id]}
- }
- for (id in jax) {
- if (!jax.hasOwnProperty(id)) continue;
- if (typeof(this[id]) === 'undefined' || (this[id] !== jax[id] && id !== 'inputID'))
- {this[id] = jax[id]}
- }
- }
- },{
- id: "ElementJax",
- version: "2.3",
- directory: JAX.directory+"/element",
- extensionDir: JAX.extensionDir,
- ID: 0, // jax counter (for IDs)
- STATE: {
- PENDING: 1, // script is identified as math but not yet processed
- PROCESSED: 2, // script has been processed
- UPDATE: 3, // elementJax should be updated
- OUTPUT: 4 // output should be updated (input is OK)
- },
-
- GetID: function () {this.ID++; return "MathJax-Element-"+this.ID},
- Subclass: function () {
- var obj = JAX.Subclass.apply(this,arguments);
- obj.loadComplete = this.prototype.loadComplete;
- return obj;
- }
- });
- BASE.ElementJax.prototype.STATE = BASE.ElementJax.STATE;
-
- //
- // Some "Fake" jax used to allow menu access for "Math Processing Error" messages
- //
- BASE.OutputJax.Error = {
- id: "Error", version: "2.3", config: {},
- ContextMenu: function () {return BASE.Extension.MathEvents.Event.ContextMenu.apply(BASE.Extension.MathEvents.Event,arguments)},
- Mousedown: function () {return BASE.Extension.MathEvents.Event.AltContextMenu.apply(BASE.Extension.MathEvents.Event,arguments)},
- getJaxFromMath: function (math) {return (math.nextSibling.MathJax||{}).error},
- Jax: function (text,script) {
- var jax = MathJax.Hub.inputJax[script.type.replace(/ *;(.|\s)*/,"")];
- return {
- inputJax: (jax||{id:"Error"}).id, // Use Error InputJax as fallback
- outputJax: "Error",
- sourceMenuTitle: /*_(MathMenu)*/ ["ErrorMessage","Error Message"],
- sourceMenuFormat: "Error",
- originalText: MathJax.HTML.getScript(script),
- errorText: text
- }
- }
- };
- BASE.InputJax.Error = {
- id: "Error", version: "2.3", config: {},
- sourceMenuTitle: /*_(MathMenu)*/ ["Original","Original Form"]
- };
-
-})("MathJax");
-
-/**********************************************************/
-
-(function (BASENAME) {
- var BASE = window[BASENAME];
- if (!BASE) {BASE = window[BASENAME] = {}}
-
- var HUB = BASE.Hub; var STARTUP = HUB.Startup; var CONFIG = HUB.config;
- var HEAD = document.getElementsByTagName("head")[0];
- if (!HEAD) {HEAD = document.childNodes[0]};
- var scripts = (document.documentElement || document).getElementsByTagName("script");
- var namePattern = new RegExp("(^|/)"+BASENAME+"\\.js(\\?.*)?$");
- for (var i = scripts.length-1; i >= 0; i--) {
- if ((scripts[i].src||"").match(namePattern)) {
- STARTUP.script = scripts[i].innerHTML;
- if (RegExp.$2) {
- var params = RegExp.$2.substr(1).split(/\&/);
- for (var j = 0, m = params.length; j < m; j++) {
- var KV = params[j].match(/(.*)=(.*)/);
- if (KV) {STARTUP.params[unescape(KV[1])] = unescape(KV[2])}
- }
- }
- CONFIG.root = scripts[i].src.replace(/(^|\/)[^\/]*(\?.*)?$/,'');
- break;
- }
- }
- BASE.Ajax.config = CONFIG;
-
- var BROWSERS = {
- isMac: (navigator.platform.substr(0,3) === "Mac"),
- isPC: (navigator.platform.substr(0,3) === "Win"),
- isMSIE: (window.ActiveXObject != null && window.clipboardData != null),
- isFirefox: (navigator.userAgent.match(/Gecko/) != null &&
- navigator.userAgent.match(/KHTML/) == null),
- isSafari: (navigator.userAgent.match(/ (Apple)?WebKit\//) != null &&
- (!window.chrome || window.chrome.loadTimes == null)),
- isChrome: (window.chrome != null && window.chrome.loadTimes != null),
- isOpera: (window.opera != null && window.opera.version != null),
- isKonqueror: (window.hasOwnProperty && window.hasOwnProperty("konqueror") && navigator.vendor == "KDE"),
- versionAtLeast: function (v) {
- var bv = (this.version).split('.'); v = (new String(v)).split('.');
- for (var i = 0, m = v.length; i < m; i++)
- {if (bv[i] != v[i]) {return parseInt(bv[i]||"0") >= parseInt(v[i])}}
- return true;
- },
- Select: function (choices) {
- var browser = choices[HUB.Browser];
- if (browser) {return browser(HUB.Browser)}
- return null;
- }
- };
-
- var AGENT = navigator.userAgent
- .replace(/^Mozilla\/(\d+\.)+\d+ /,"") // remove initial Mozilla, which is never right
- .replace(/[a-z][-a-z0-9._: ]+\/\d+[^ ]*-[^ ]*\.([a-z][a-z])?\d+ /i,"") // remove linux version
- .replace(/Gentoo |Ubuntu\/(\d+\.)*\d+ (\([^)]*\) )?/,""); // special case for these
-
- HUB.Browser = HUB.Insert(HUB.Insert(new String("Unknown"),{version: "0.0"}),BROWSERS);
- for (var browser in BROWSERS) {if (BROWSERS.hasOwnProperty(browser)) {
- if (BROWSERS[browser] && browser.substr(0,2) === "is") {
- browser = browser.slice(2);
- if (browser === "Mac" || browser === "PC") continue;
- HUB.Browser = HUB.Insert(new String(browser),BROWSERS);
- var VERSION = new RegExp(
- ".*(Version)/((?:\\d+\\.)+\\d+)|" + // for Safari and Opera10
- ".*("+browser+")"+(browser == "MSIE" ? " " : "/")+"((?:\\d+\\.)*\\d+)|"+ // for one of the main browser
- "(?:^|\\(| )([a-z][-a-z0-9._: ]+|(?:Apple)?WebKit)/((?:\\d+\\.)+\\d+)"); // for unrecognized browser
- var MATCH = VERSION.exec(AGENT) || ["","","","unknown","0.0"];
- HUB.Browser.name = (MATCH[1] == "Version" ? browser : (MATCH[3] || MATCH[5]));
- HUB.Browser.version = MATCH[2] || MATCH[4] || MATCH[6];
- break;
- }
- }};
-
- //
- // Initial browser-specific info (e.g., touch up version or name)
- //
- HUB.Browser.Select({
- Safari: function (browser) {
- var v = parseInt((String(browser.version).split("."))[0]);
- if (v > 85) {browser.webkit = browser.version}
- if (v >= 534) {browser.version = "5.1"}
- else if (v >= 533) {browser.version = "5.0"}
- else if (v >= 526) {browser.version = "4.0"}
- else if (v >= 525) {browser.version = "3.1"}
- else if (v > 500) {browser.version = "3.0"}
- else if (v > 400) {browser.version = "2.0"}
- else if (v > 85) {browser.version = "1.0"}
- browser.isMobile = (navigator.appVersion.match(/Mobile/i) != null);
- browser.noContextMenu = browser.isMobile;
- },
- Firefox: function (browser) {
- if ((browser.version === "0.0" || navigator.userAgent.match(/Firefox/) == null) &&
- navigator.product === "Gecko") {
- var rv = navigator.userAgent.match(/[\/ ]rv:(\d+\.\d.*?)[\) ]/);
- if (rv) {browser.version = rv[1]}
- else {
- var date = (navigator.buildID||navigator.productSub||"0").substr(0,8);
- if (date >= "20111220") {browser.version = "9.0"}
- else if (date >= "20111120") {browser.version = "8.0"}
- else if (date >= "20110927") {browser.version = "7.0"}
- else if (date >= "20110816") {browser.version = "6.0"}
- else if (date >= "20110621") {browser.version = "5.0"}
- else if (date >= "20110320") {browser.version = "4.0"}
- else if (date >= "20100121") {browser.version = "3.6"}
- else if (date >= "20090630") {browser.version = "3.5"}
- else if (date >= "20080617") {browser.version = "3.0"}
- else if (date >= "20061024") {browser.version = "2.0"}
- }
- }
- browser.isMobile = (navigator.appVersion.match(/Android/i) != null ||
- navigator.userAgent.match(/ Fennec\//) != null ||
- navigator.userAgent.match(/Mobile/) != null);
- },
- Opera: function (browser) {browser.version = opera.version()},
- MSIE: function (browser) {
- browser.isIE9 = !!(document.documentMode && (window.performance || window.msPerformance));
- MathJax.HTML.setScriptBug = !browser.isIE9 || document.documentMode < 9;
- var MathPlayer = false;
- try {new ActiveXObject("MathPlayer.Factory.1"); browser.hasMathPlayer = MathPlayer = true}
- catch (err) {}
- try {
- if (MathPlayer && !STARTUP.params.NoMathPlayer) {
- var mathplayer = document.createElement("object");
- mathplayer.id = "mathplayer"; mathplayer.classid = "clsid:32F66A20-7614-11D4-BD11-00104BD3F987";
- document.getElementsByTagName("head")[0].appendChild(mathplayer);
- document.namespaces.add("m","http://www.w3.org/1998/Math/MathML");
- browser.mpNamespace = true;
- if (document.readyState && (document.readyState === "loading" ||
- document.readyState === "interactive")) {
- document.write('');
- browser.mpImported = true;
- }
- } else {
- // Adding any namespace avoids a crash in IE9 in IE9-standards mode
- // (any reference to document.namespaces before document.readyState is
- // "complete" causes an "unspecified error" to be thrown)
- document.namespaces.add("mjx_IE_fix","http://www.w3.org/1999/xlink");
- }
- } catch (err) {}
- }
- });
- HUB.Browser.Select(MathJax.Message.browsers);
-
- if (BASE.AuthorConfig && typeof BASE.AuthorConfig.AuthorInit === "function") {BASE.AuthorConfig.AuthorInit()}
- HUB.queue = BASE.Callback.Queue();
- HUB.queue.Push(
- ["Post",STARTUP.signal,"Begin"],
- ["Config",STARTUP],
- ["Cookie",STARTUP],
- ["Styles",STARTUP],
- ["Message",STARTUP],
- function () {
- // Do Jax and Extensions in parallel, but wait for them all to complete
- var queue = BASE.Callback.Queue(
- STARTUP.Jax(),
- STARTUP.Extensions()
- );
- return queue.Push({});
- },
- ["Menu",STARTUP],
- STARTUP.onLoad(),
- function () {MathJax.isReady = true}, // indicates that MathJax is ready to process math
- ["Typeset",STARTUP],
- ["Hash",STARTUP],
- ["MenuZoom",STARTUP],
- ["Post",STARTUP.signal,"End"]
- );
-
-})("MathJax");
-
-}}
diff --git a/modules/MathJax/unpacked/extensions/FontWarnings.js b/modules/MathJax/unpacked/extensions/FontWarnings.js
deleted file mode 100644
index cb5aa1d..0000000
--- a/modules/MathJax/unpacked/extensions/FontWarnings.js
+++ /dev/null
@@ -1,313 +0,0 @@
-/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-
-/*************************************************************
- *
- * MathJax/extensions/FontWarnings.js
- *
- * Implements a font warning message window that appears when
- * the image fonts, no fonts, or web fonts are used, informing
- * the user where to download the fonts, or to update to a more
- * modern browser. The window will fade out automatically after
- * a time, and the user can dismiss it by a close box.
- *
- * To include font warning messages, add "FontWarnings.js" to the
- * extensions array in your MathJax configuration.
- *
- * You can customize the warning messages in a number of ways. Use the
- * FontWarnings section of the configuration to specify any of the items
- * shown in the CONFIG variable below. These include
- *
- * messageStyle the style to apply to the warning box that is
- * displayed when MathJax uses one of its fallback
- * methods.
- *
- * removeAfter the amount of time to show the warning message (in ms)
- * fadeoutTime how long the message should take to fade out
- * fadeoutSteps how many separate steps to use during the fade out
- * (set to 0 to use no fadeout and simply remove the window)
- *
- * Messages stores the descriptions of the messages to use for the
- * various warnings (webFonts, imageFonts, and noFonts).
- * These are arrays of strings to be inserted into the window,
- * or identifiers within brackets, which refer to the HTML
- * snippets in the HTML section described below. To disable a
- * specific message, set its value to null (see example below).
- *
- * HTML stores snippets of HTML descriptions for various
- * common parts of the error messages. These include
- * the closeBox, the message about web fonts being available
- * in modern browser, and messages about downloadable fonts.
- * The STIX and TeX font messages are used when only one
- * of these is in the availableFonts list. The data for these
- * are arrays of either strings to include or a description of
- * an HTML item enclosed in square brackets. That description
- * has (up to) three parts: the name of the tag to be included,
- * a list (enclosed in braces) of attributes and their values
- * to be set on the tag (optional), and an array of the contents
- * of the tag (optional). See the definitions below for examples.
- *
- * For example,
- *
- * MathJax.Hub.Config({
- * ...
- * extensions: ["FontWarnings.js"],
- * FontWarnings: {
- * removeAfter: 20*1000, // 20 seconds
- * messageStyle: {
- * border: "2px solid black",
- * padding: "2em"
- * },
- * Message: {
- * webFont: null // no webfont messages (only image and no fonts)
- * }
- * }
- * });
- *
- * would extend the time the message is displayed from 12 seconds to 20,
- * and changes the border to a solid black one, with 2em of padding
- * rather than the default of 1em.
- *
- * ---------------------------------------------------------------------
- *
- * Copyright (c) 2010-2013 The MathJax Consortium
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-(function (HUB,HTML) {
- var VERSION = "2.3";
-
- var STIXURL = "http://www.stixfonts.org/";
- var MATHJAXURL = "https://github.com/mathjax/MathJax/tree/master/fonts/HTML-CSS/TeX/otf";
-
- var CONFIG = HUB.CombineConfig("FontWarnings",{
- //
- // The CSS for the message window
- //
- messageStyle: {
- position:"fixed", bottom:"4em", left:"3em", width:"40em",
- border: "3px solid #880000", "background-color": "#E0E0E0", color: "black",
- padding: "1em", "font-size":"small", "white-space":"normal",
-
- "border-radius": ".75em", // Opera 10.5 and IE9
- "-webkit-border-radius": ".75em", // Safari and Chrome
- "-moz-border-radius": ".75em", // Firefox
- "-khtml-border-radius": ".75em", // Konqueror
-
- "box-shadow": "4px 4px 10px #AAAAAA", // Opera 10.5 and IE9
- "-webkit-box-shadow": "4px 4px 10px #AAAAAA", // Safari 3 and Chrome
- "-moz-box-shadow": "4px 4px 10px #AAAAAA", // Forefox 3.5
- "-khtml-box-shadow": "4px 4px 10px #AAAAAA", // Konqueror
- filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=3, OffY=3, Color='gray', Positive='true')" // IE
- },
-
- //
- // The messages for the various situations
- //
- Message: {
-
- webFont: [
- ["closeBox"],
- ["webFont",
- "MathJax is using web-based fonts to display the mathematics "+
- "on this page. These take time to download, so the page would "+
- "render faster if you installed math fonts directly in your "+
- "system's font folder."],
- ["fonts"]
- ],
-
- imageFonts: [
- ["closeBox"],
- ["imageFonts",
- "MathJax is using its image fonts rather than local or web-based fonts. "+
- "This will render slower than usual, and the mathematics may not print "+
- "at the full resolution of your printer."],
- ["fonts"],
- ["webFonts"]
- ],
-
- noFonts: [
- ["closeBox"],
- ["noFonts",
- "MathJax is unable to locate a font to use to display "+
- "its mathematics, and image fonts are not available, so it "+
- "is falling back on generic unicode characters in hopes that "+
- "your browser will be able to display them. Some characters "+
- "may not show up properly, or possibly not at all."],
- ["fonts"],
- ["webFonts"]
- ]
- },
-
- //
- // HTML objects that can be referred to in the message definitions
- //
- HTML: {
- //
- // The definition of the close box
- //
- closeBox: [[
- "div",{
- style: {
- position:"absolute", overflow:"hidden", top:".1em", right:".1em",
- border: "1px outset", width:"1em", height:"1em",
- "text-align": "center", cursor: "pointer",
- "background-color": "#EEEEEE", color:"#606060",
-
- "border-radius": ".5em", // Opera 10.5
- "-webkit-border-radius": ".5em", // Safari and Chrome
- "-moz-border-radius": ".5em", // Firefox
- "-khtml-border-radius": ".5em" // Konqueror
- },
- onclick: function () {
- if (DATA.div && DATA.fade === 0)
- {if (DATA.timer) {clearTimeout(DATA.timer)}; DATA.div.style.display = "none"}
- }
- },
- [["span",{style:{position:"relative", bottom:".2em"}},["x"]]]
- ]],
-
- webFonts: [
- ["p"],
- ["webFonts",
- "Most modern browsers allow for fonts to be downloaded over the web. "+
- "Updating to a more recent version of your browser (or changing "+
- "browsers) could improve the quality of the mathematics on this page."
- ]
- ],
-
- fonts: [
- ["p"],
- ["fonts",
- "MathJax can use either the [STIX fonts](%1) or the [MathJax TeX fonts](%2). " +
- "Download and install one of those fonts to improve your MathJax experience.",
- STIXURL,MATHJAXURL
- ]
- ],
-
- STIXfonts: [
- ["p"],
- ["STIXPage",
- "This page is designed to use the [STIX fonts](%1). " +
- "Download and install those fonts to improve your MathJax experience.",
- STIXURL
- ]
- ],
-
- TeXfonts: [
- ["p"],
- ["TeXPage",
- "This page is designed to use the [MathJax TeX fonts](%1). " +
- "Download and install those fonts to improve your MathJax experience.",
- MATHJAXURL
- ]
- ]
-
- },
-
- removeAfter: 12*1000, // time to show message (in ms)
- fadeoutSteps: 10, // fade-out steps
- fadeoutTime: 1.5*1000 // fadeout over this amount of time (in ms)
-
- });
- if (MathJax.Hub.Browser.isIE9 && document.documentMode >= 9)
- {delete CONFIG.messageStyle.filter}
-
- //
- // Data for the window
- //
- var DATA = {
- div: null, // the message window, when displayed
- fade: 0 // number of fade-out steps so far
- };
-
- //
- // Create the message window and start the fade-out timer
- //
- var CREATEMESSAGE = function (data) {
- if (DATA.div) return;
- var HTMLCSS = MathJax.OutputJax["HTML-CSS"], frame = document.body;
- if (HUB.Browser.isMSIE) {
- if (CONFIG.messageStyle.position === "fixed") {
- MathJax.Message.Init(); // make sure MathJax_MSIE_frame exists
- frame = document.getElementById("MathJax_MSIE_Frame");
- CONFIG.messageStyle.position = "absolute";
- }
- } else {delete CONFIG.messageStyle.filter}
- CONFIG.messageStyle.maxWidth = (document.body.clientWidth-75) + "px";
- var i = 0; while (i < data.length) {
- if (data[i] instanceof Array) {
- if (data[i].length === 1 && CONFIG.HTML[data[i][0]]) {
- data.splice.apply(data,[i,1].concat(CONFIG.HTML[data[i][0]]));
- } else if (typeof data[i][1] === "string") {
- var message = MathJax.Localization.lookupPhrase(["FontWarnings",data[i][0]],data[i][1]);
- message = MathJax.Localization.processMarkdown(message,data[i].slice(2),"FontWarnings");
- data.splice.apply(data,[i,1].concat(message));
- i += message.length;
- } else {i++}
- } else {i++}
- }
- DATA.div = HTMLCSS.addElement(frame,"div",
- {id:"MathJax_FontWarning",style:CONFIG.messageStyle},data);
- MathJax.Localization.setCSS(DATA.div);
- if (CONFIG.removeAfter) {
- HUB.Register.StartupHook("End",function ()
- {DATA.timer = setTimeout(FADEOUT,CONFIG.removeAfter)});
- }
- HTML.Cookie.Set("fontWarn",{warned:true});
- };
-
- //
- // Set the opacity based on the number of steps taken so far
- // and remove the window when it gets to 0
- //
- var FADEOUT = function () {
- DATA.fade++; if (DATA.timer) {delete DATA.timer}
- if (DATA.fade < CONFIG.fadeoutSteps) {
- var opacity = 1 - DATA.fade/CONFIG.fadeoutSteps;
- DATA.div.style.opacity = opacity;
- DATA.div.style.filter = "alpha(opacity="+Math.floor(100*opacity)+")";
- setTimeout(FADEOUT,CONFIG.fadeoutTime/CONFIG.fadeoutSteps);
- } else {
- DATA.div.style.display = "none";
- }
- };
-
- //
- // Check that we haven't already issued a warning
- //
- if (!HTML.Cookie.Get("fontWarn").warned) {
- //
- // Hook into the Startup signal and look for font warning messages.
- // When one comes, issue the correct message.
- //
- HUB.Startup.signal.Interest(function (message) {
- if (message.match(/HTML-CSS Jax - /) && !DATA.div) {
- var HTMLCSS = MathJax.OutputJax["HTML-CSS"], FONTS = HTMLCSS.config.availableFonts, MSG;
- var localFonts = (FONTS && FONTS.length);
- if (!localFonts) {CONFIG.HTML.fonts = [""]}
- else if (FONTS.length === 1) {CONFIG.HTML.fonts = CONFIG.HTML[FONTS[0]+"fonts"]}
- if (HTMLCSS.allowWebFonts) {CONFIG.HTML.webfonts = [""]}
- if (message.match(/- Web-Font/)) {if (localFonts) {MSG = "webFont"}}
- else if (message.match(/- using image fonts/)) {MSG = "imageFonts"}
- else if (message.match(/- no valid font/)) {MSG = "noFonts"}
- if (MSG && CONFIG.Message[MSG])
- {MathJax.Localization.loadDomain("FontWarnings",[CREATEMESSAGE,CONFIG.Message[MSG]])}
- }
- });
- }
-
-})(MathJax.Hub,MathJax.HTML);
-
-MathJax.Ajax.loadComplete("[MathJax]/extensions/FontWarnings.js");
diff --git a/modules/MathJax/unpacked/extensions/HTML-CSS/handle-floats.js b/modules/MathJax/unpacked/extensions/HTML-CSS/handle-floats.js
deleted file mode 100644
index 5a84191..0000000
--- a/modules/MathJax/unpacked/extensions/HTML-CSS/handle-floats.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-
-/*************************************************************
- *
- * MathJax/extensions/HTML-CSS/handle-floats.js
- *
- * This extension allows HTML-CSS output to deal with floating elements
- * better. In particular, when there are tags or equation numbers, these
- * would overlap floating elements, but with this extension, the width of
- * the line should properly correspond to the amount of space remaining.
- *
- * To load it, include
- *
- * "HTML-CSS": {
- * extensions: ["handle-floats.js"]
- * }
- *
- * in your configuration.
- *
- * ---------------------------------------------------------------------
- *
- * Copyright (c) 2012-2013 The MathJax Consortium
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-MathJax.Extension["HTML-CSS/handle-floats"] = {
- version: "2.3"
-};
-
-//
-// Make the display DIV be a table-cell
-// Use padding to get the separation, since table cells don't do margin
-// Make the width large (it will shrink to fit the remaining room)
-//
-MathJax.Hub.Config({
- "HTML-CSS": {
- styles: {
- ".MathJax_Display": {
- display: "table-cell",
- padding: "1em 0 ! important",
- width: (MathJax.Hub.Browser.isMSIE && (document.documentMode||0) < 8 ? "100%" : "1000em")
- }
- }
- }
-});
-
-//
-// Two consecutive equations would end up side-by-side, so force a separator
-// (Needed by IE8, IE9, and Firefox, at least).
-//
-MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
- var HTMLCSS = MathJax.OutputJax["HTML-CSS"],
- TRANSLATE = HTMLCSS.Translate;
- HTMLCSS.Augment({
- Translate: function (script,state) {
- TRANSLATE.call(this,script,state);
- if (script.MathJax.elementJax.HTMLCSS.display) {
- var next = script.nextSibling;
- if (!next || next.className !== "MathJax_MSIE_Separator") {
- var span = HTMLCSS.Element("span",{className:"MathJax_MSIE_Separator"});
- script.parentNode.insertBefore(span,next);
- }
- }
- }
- });
- MathJax.Hub.Startup.signal.Post("HTML-CSS handle-floats Ready");
-});
-
-MathJax.Ajax.loadComplete("[MathJax]/extensions/HTML-CSS/handle-floats.js");
diff --git a/modules/MathJax/unpacked/extensions/HelpDialog.js b/modules/MathJax/unpacked/extensions/HelpDialog.js
deleted file mode 100644
index 4d22fa6..0000000
--- a/modules/MathJax/unpacked/extensions/HelpDialog.js
+++ /dev/null
@@ -1,154 +0,0 @@
-/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-
-/*************************************************************
- *
- * MathJax/extensions/HelpDialog.js
- *
- * Implements the MathJax Help dialog box.
- *
- * ---------------------------------------------------------------------
- *
- * Copyright (c) 2013 The MathJax Consortium
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-(function (HUB,HTML,AJAX,OUTPUT,LOCALE) {
-
- var HELP = MathJax.Extension.Help = {
- version: "2.3"
- };
-
- var STIXURL = "http://www.stixfonts.org/";
- var MENU = MathJax.Menu;
-
- var CONFIG = HUB.CombineConfig("HelpDialog",{
- closeImg: AJAX.fileURL(OUTPUT.imageDir+"/CloseX-31.png"), // image for close "X" for mobiles
-
- styles: {
- "#MathJax_Help": {
- position:"fixed", left:"50%", width:"auto", "max-width": "90%", "text-align":"center",
- border:"3px outset", padding:"1em 2em", "background-color":"#DDDDDD", color:"black",
- cursor: "default", "font-family":"message-box", "font-size":"120%",
- "font-style":"normal", "text-indent":0, "text-transform":"none",
- "line-height":"normal", "letter-spacing":"normal", "word-spacing":"normal",
- "word-wrap":"normal", "white-space":"wrap", "float":"none", "z-index":201,
-
- "border-radius": "15px", // Opera 10.5 and IE9
- "-webkit-border-radius": "15px", // Safari and Chrome
- "-moz-border-radius": "15px", // Firefox
- "-khtml-border-radius": "15px", // Konqueror
-
- "box-shadow":"0px 10px 20px #808080", // Opera 10.5 and IE9
- "-webkit-box-shadow":"0px 10px 20px #808080", // Safari 3 and Chrome
- "-moz-box-shadow":"0px 10px 20px #808080", // Forefox 3.5
- "-khtml-box-shadow":"0px 10px 20px #808080", // Konqueror
- filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')" // IE
- },
-
- "#MathJax_HelpContent": {
- overflow:"auto", "text-align":"left", "font-size":"80%",
- padding:".4em .6em", border:"1px inset", margin:"1em 0px",
- "max-height":"20em", "max-width":"30em", "background-color":"#EEEEEE"
- }
- }
- });
-
- /*
- * Handle the Help Dialog box
- */
- HELP.Dialog = function () {
- LOCALE.loadDomain("HelpDialog",["Post",HELP]);
- };
-
- HELP.Post = function () {
- this.div = MENU.Background(this);
- var help = HTML.addElement(this.div,"div",{
- id: "MathJax_Help"
- },LOCALE._("HelpDialog",[
- ["b",{style:{fontSize:"120%"}},[["Help","MathJax Help"]]],
- ["div",{id: "MathJax_HelpContent"},[
- ["p",{},[["MathJax",
- "*MathJax* is a JavaScript library that allows page authors to include " +
- "mathematics within their web pages. As a reader, you don't need to do " +
- "anything to make that happen."]]
- ],
- ["p",{},[["Browsers",
- "*Browsers*: MathJax works with all modern browsers including IE6+, Firefox 3+, " +
- "Chrome 0.2+, Safari 2+, Opera 9.6+ and most mobile browsers."]]
- ],
- ["p",{},[["Menu",
- "*Math Menu*: MathJax adds a contextual menu to equations. Right-click or " +
- "CTRL-click on any mathematics to access the menu."]]
- ],
- ["div",{style:{"margin-left":"1em"}},[
- ["p",{},[["ShowMath",
- "*Show Math As* allows you to view the formula's source markup " +
- "for copy & paste (as MathML or in its origianl format)."]]
- ],
- ["p",{},[["Settings",
- "*Settings* gives you control over features of MathJax, such as the " +
- "size of the mathematics, and the mechanism used to display equations."]]
- ],
- ["p",{},[["Language",
- "*Language* lets you select the language used by MathJax for its menus " +
- "and warning messages."]]
- ],
- ]],
- ["p",{},[["Zoom",
- "*Math Zoom*: If you are having difficulty reading an equation, MathJax can " +
- "enlarge it to help you see it better."]]
- ],
- ["p",{},[["Accessibilty",
- "*Accessibility*: MathJax will automatically work with screen readers to make " +
- "mathematics accessible to the visually impaired."]]
- ],
- ["p",{},[["Fonts",
- "*Fonts*: MathJax will use certain math fonts if they are installed on your " +
- "computer; otherwise, it will use web-based fonts. Although not required, " +
- "locally installed fonts will speed up typesetting. We suggest installing " +
- "the [STIX fonts](%1).",STIXURL]]
- ]
- ]],
- ["a",{href:"http://www.mathjax.org/"},["www.mathjax.org"]],
- ["img", {
- src: CONFIG.closeImg,
- style: {width:"21px", height:"21px", position:"absolute", top:".2em", right:".2em"},
- onclick: HELP.Remove
- }]
- ]));
- LOCALE.setCSS(help);
- var doc = (document.documentElement||{});
- var H = window.innerHeight || doc.clientHeight || doc.scrollHeight || 0;
- if (MENU.prototype.msieAboutBug) {
- help.style.width = "20em"; help.style.position = "absolute";
- help.style.left = Math.floor((document.documentElement.scrollWidth - help.offsetWidth)/2)+"px";
- help.style.top = (Math.floor((H-help.offsetHeight)/3)+document.body.scrollTop)+"px";
- } else {
- help.style.marginLeft = Math.floor(-help.offsetWidth/2)+"px";
- help.style.top = Math.floor((H-help.offsetHeight)/3)+"px";
- }
- };
- HELP.Remove = function (event) {
- if (HELP.div) {document.body.removeChild(HELP.div); delete HELP.div}
- };
-
- MathJax.Callback.Queue(
- HUB.Register.StartupHook("End Config",{}), // wait until config is complete
- ["Styles",AJAX,CONFIG.styles],
- ["Post",HUB.Startup.signal,"HelpDialig Ready"],
- ["loadComplete",AJAX,"[MathJax]/extensions/HelpDialog.js"]
- );
-
-})(MathJax.Hub,MathJax.HTML,MathJax.Ajax,MathJax.OutputJax,MathJax.Localization);
diff --git a/modules/MathJax/unpacked/extensions/MatchWebFonts.js b/modules/MathJax/unpacked/extensions/MatchWebFonts.js
deleted file mode 100644
index a6ae643..0000000
--- a/modules/MathJax/unpacked/extensions/MatchWebFonts.js
+++ /dev/null
@@ -1,309 +0,0 @@
-/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-
-/*************************************************************
- *
- * MathJax/extensions/MatchWebFonts.js
- *
- * Adds code to the output jax so that if web fonts are used on the page,
- * MathJax will be able to detect their arrival and update the math to
- * accommodate the change in font. For the NativeMML output, this works
- * both for web fonts in main text, and for web fonts in the math as well.
- *
- * ---------------------------------------------------------------------
- *
- * Copyright (c) 2013 The MathJax Consortium
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-(function (HUB,AJAX) {
- var VERSION = "2.3";
-
- var CONFIG = MathJax.Hub.CombineConfig("MatchWebFonts",{
- matchFor: {
- "HTML-CSS": true,
- NativeMML: true,
- SVG: true
- },
- fontCheckDelay: 500, // initial delay for the first check for web fonts
- fontCheckTimeout: 15 * 1000, // how long to keep looking for fonts (15 seconds)
- });
-
- var MATCH = MathJax.Extension.MatchWebFonts = {
- version: VERSION,
- config: CONFIG
- };
-
- HUB.Register.StartupHook("HTML-CSS Jax Ready",function () {
- var HTMLCSS = MathJax.OutputJax["HTML-CSS"];
- var POSTTRANSLATE = HTMLCSS.postTranslate;
-
- HTMLCSS.Augment({
- postTranslate: function (state,partial) {
- if (!partial && CONFIG.matchFor["HTML-CSS"] && this.config.matchFontHeight) {
- //
- // Check for changes in the web fonts that might affect the font
- // size for math elements. This is a periodic check that goes on
- // until a timeout is reached.
- //
- AJAX.timer.start(AJAX,["checkFonts",this,state.jax[this.id]],
- CONFIG.fontCheckDelay,CONFIG.fontCheckTimeout);
- }
- return POSTTRANSLATE.apply(this,arguments); // do the original function
- },
-
- checkFonts: function (check,scripts) {
- if (check.time(function () {})) return;
- var size = [], i, m, retry = false;
- //
- // Add the elements used for testing ex and em sizes
- //
- for (i = 0, m = scripts.length; i < m; i++) {
- script = scripts[i];
- if (script.parentNode && script.MathJax.elementJax) {
- script.parentNode.insertBefore(this.EmExSpan.cloneNode(true),script);
- }
- }
- //
- // Check to see if anything has changed
- //
- for (i = 0, m = scripts.length; i < m; i++) {
- script = scripts[i]; if (!script.parentNode) continue; retry = true;
- var jax = script.MathJax.elementJax; if (!jax) continue;
- var span = document.getElementById(jax.inputID+"-Frame");
- //
- // Check if ex or mex has changed
- //
- var test = script.previousSibling;
- var ex = test.firstChild.offsetHeight/60;
- var em = test.lastChild.lastChild.offsetHeight/60;
- if (ex === 0 || ex === "NaN") {ex = this.defaultEx; em = this.defaultEm}
- if (ex !== jax.HTMLCSS.ex || em !== jax.HTMLCSS.em) {
- var scale = ex/this.TeX.x_height/em;
- scale = Math.floor(Math.max(this.config.minScaleAdjust/100,scale)*this.config.scale);
- if (scale/100 !== jax.scale) {size.push(script); scripts[i] = {}}
- }
- }
- //
- // Remove markers
- //
- for (i = 0, m = scripts.length; i < m; i++) {
- script = scripts[i];
- if (script.parentNode && script.MathJax.elementJax) {
- script.parentNode.removeChild(script.previousSibling);
- }
- }
- //
- // Rerender the changed items
- //
- if (size.length) {HUB.Queue(["Rerender",HUB,[size],{}])}
- //
- // Try again later
- //
- if (retry) {setTimeout(check,check.delay)}
- }
- });
- });
-
- HUB.Register.StartupHook("SVG Jax Ready",function () {
- var SVG = MathJax.OutputJax.SVG;
- var POSTTRANSLATE = SVG.postTranslate;
-
- SVG.Augment({
- postTranslate: function (state,partial) {
- if (!partial && CONFIG.matchFor.SVG) {
- //
- // Check for changes in the web fonts that might affect the font
- // size for math elements. This is a periodic check that goes on
- // until a timeout is reached.
- //
- AJAX.timer.start(AJAX,["checkFonts",this,state.jax[this.id]],
- CONFIG.fontCheckDelay,CONFIG.fontCheckTimeout);
- }
- return POSTTRANSLATE.apply(this,arguments); // do the original function
- },
-
- checkFonts: function (check,scripts) {
- if (check.time(function () {})) return;
- var size = [], i, m, retry = false;
- //
- // Add the elements used for testing ex and em sizes
- //
- for (i = 0, m = scripts.length; i < m; i++) {
- script = scripts[i];
- if (script.parentNode && script.MathJax.elementJax) {
- script.parentNode.insertBefore(this.ExSpan.cloneNode(true),script);
- }
- }
- //
- // Check to see if anything has changed
- //
- for (i = 0, m = scripts.length; i < m; i++) {
- script = scripts[i]; if (!script.parentNode) continue; retry = true;
- var jax = script.MathJax.elementJax; if (!jax) continue;
- var span = document.getElementById(jax.inputID+"-Frame");
- //
- // Check if ex or mex has changed
- //
- var test = script.previousSibling;
- var ex = test.firstChild.offsetHeight/60;
- if (ex === 0 || ex === "NaN") {ex = this.defaultEx; em = this.defaultEm}
- if (ex !== jax.SVG.ex) {size.push(script); scripts[i] = {}}
- }
- //
- // Remove markers
- //
- for (i = 0, m = scripts.length; i < m; i++) {
- script = scripts[i];
- if (script.parentNode && script.MathJax.elementJax) {
- script.parentNode.removeChild(script.previousSibling);
- }
- }
- //
- // Rerender the changed items
- //
- if (size.length) {HUB.Queue(["Rerender",HUB,[size],{}])}
- //
- // Try again later (if not all the scripts are null)
- //
-
- if (retry) setTimeout(check,check.delay);
- }
- });
- });
-
- HUB.Register.StartupHook("NativeMML Jax Ready",function () {
- var nMML = MathJax.OutputJax.NativeMML;
- var POSTTRANSLATE = nMML.postTranslate;
-
- nMML.Augment({
- postTranslate: function (state) {
- if (!HUB.Browser.isMSIE && CONFIG.matchFor.NativeMML) {
- //
- // Check for changes in the web fonts that might affect the sizes
- // of math elements. This is a periodic check that goes on until
- // a timeout is reached.
- //
- AJAX.timer.start(AJAX,["checkFonts",this,state.jax[this.id]],
- CONFIG.fontCheckDelay,CONFIG.fontCheckTimeout);
- }
- POSTTRANSLATE.apply(this,arguments); // do the original routine
- },
-
- //
- // Check to see if web fonts have been loaded that change the ex size
- // of the surrounding font, the ex size within the math, or the widths
- // of math elements. We do this by rechecking the ex and mex sizes
- // (to see if the font scaling needs adjusting) and by checking the
- // size of the inner mrow of math elements and mtd elements. The
- // sizes of these have been stored in the NativeMML object of the
- // element jax so that we can check for them here.
- //
- checkFonts: function (check,scripts) {
- if (check.time(function () {})) return;
- var adjust = [], mtd = [], size = [], i, m, script;
- //
- // Add the elements used for testing ex and em sizes
- //
- for (i = 0, m = scripts.length; i < m; i++) {
- script = scripts[i];
- if (script.parentNode && script.MathJax.elementJax) {
- script.parentNode.insertBefore(this.EmExSpan.cloneNode(true),script);
- }
- }
- //
- // Check to see if anything has changed
- //
- for (i = 0, m = scripts.length; i < m; i++) {
- script = scripts[i]; if (!script.parentNode) continue;
- var jax = script.MathJax.elementJax; if (!jax) continue;
- var span = document.getElementById(jax.inputID+"-Frame");
- var math = span.getElementsByTagName("math")[0]; if (!math) continue;
- jax = jax.NativeMML;
- //
- // Check if ex or mex has changed
- //
- var test = script.previousSibling;
- var ex = test.firstChild.offsetWidth/60;
- var mex = test.lastChild.offsetWidth/60;
- if (ex === 0 || ex === "NaN") {ex = this.defaultEx; mex = this.defaultMEx}
- var newEx = (ex !== jax.ex);
- if (newEx || mex != jax.mex) {
- var scale = (this.config.matchFontHeight && mex > 1 ? ex/mex : 1);
- scale = Math.floor(Math.max(this.config.minScaleAdjust/100,scale) * this.config.scale);
- if (scale/100 !== jax.scale) {size.push([span.style,scale])}
- jax.scale = scale/100; jax.fontScale = scale+"%"; jax.ex = ex; jax.mex = mex;
- }
-
- //
- // Check width of math elements
- //
- if ("scrollWidth" in jax && (newEx || jax.scrollWidth !== math.firstChild.scrollWidth)) {
- jax.scrollWidth = math.firstChild.scrollWidth;
- adjust.push([math.parentNode.style,jax.scrollWidth/jax.ex/jax.scale]);
- }
- //
- // Check widths of mtd elements
- //
- if (math.MathJaxMtds) {
- for (j = 0, n = math.MathJaxMtds.length; j < n; j++) {
- if (!math.MathJaxMtds[j].parentNode) continue;
- if (newEx || math.MathJaxMtds[j].firstChild.scrollWidth !== jax.mtds[j]) {
- jax.mtds[j] = math.MathJaxMtds[j].firstChild.scrollWidth;
- mtd.push([math.MathJaxMtds[j],jax.mtds[j]/jax.ex]);
- }
- }
- }
- }
- //
- // Remove markers
- //
- for (i = 0, m = scripts.length; i < m; i++) {
- script = scripts[i];
- if (script.parentNode && script.MathJax.elementJax) {
- script.parentNode.removeChild(script.previousSibling);
- }
- }
- //
- // Adjust scaling factor
- //
- for (i = 0, m = size.length; i < m; i++) {
- size[i][0].fontSize = size[i][1] + "%";
- }
- //
- // Adjust width of spans containing math elements that have changed
- //
- for (i = 0, m = adjust.length; i < m; i++) {
- adjust[i][0].width = adjust[i][1].toFixed(3)+"ex";
- }
- //
- // Adjust widths of mtd elements that have changed
- //
- for (i = 0, m = mtd.length; i < m; i++) {
- var style = mtd[i][0].getAttribute("style");
- style = style.replace(/(($|;)\s*min-width:).*?ex/,"$1 "+mtd[i][1].toFixed(3)+"ex");
- mtd[i][0].setAttribute("style",style);
- }
- //
- // Try again later
- //
- setTimeout(check,check.delay);
- }
- });
- });
-
- HUB.Startup.signal.Post("MathWebFont Extension Ready");
- AJAX.loadComplete("[MathJax]/extensions/MatchWebFonts.js");
-
-})(MathJax.Hub,MathJax.Ajax);
diff --git a/modules/MathJax/unpacked/extensions/MathEvents.js b/modules/MathJax/unpacked/extensions/MathEvents.js
deleted file mode 100644
index d107595..0000000
--- a/modules/MathJax/unpacked/extensions/MathEvents.js
+++ /dev/null
@@ -1,569 +0,0 @@
-/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-
-/*************************************************************
- *
- * MathJax/extensions/MathEvents.js
- *
- * Implements the event handlers needed by the output jax to perform
- * menu, hover, and other events.
- *
- * ---------------------------------------------------------------------
- *
- * Copyright (c) 2011-2013 The MathJax Consortium
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-(function (HUB,HTML,AJAX,CALLBACK,LOCALE,OUTPUT,INPUT) {
- var VERSION = "2.3";
-
- var EXTENSION = MathJax.Extension;
- var ME = EXTENSION.MathEvents = {version: VERSION};
-
- var SETTINGS = HUB.config.menuSettings;
-
- var CONFIG = {
- hover: 500, // time required to be considered a hover
- frame: {
- x: 3.5, y: 5, // frame padding and
- bwidth: 1, // frame border width (in pixels)
- bcolor: "#A6D", // frame border color
- hwidth: "15px", // haze width
- hcolor: "#83A" // haze color
- },
- button: {
- x: -4, y: -3, // menu button offsets
- wx: -2, // button offset for full-width equations
- src: AJAX.fileURL(OUTPUT.imageDir+"/MenuArrow-15.png") // button image
- },
- fadeinInc: .2, // increment for fade-in
- fadeoutInc: .05, // increment for fade-out
- fadeDelay: 50, // delay between fade-in or fade-out steps
- fadeoutStart: 400, // delay before fade-out after mouseout
- fadeoutDelay: 15*1000, // delay before automatic fade-out
-
- styles: {
- ".MathJax_Hover_Frame": {
- "border-radius": ".25em", // Opera 10.5 and IE9
- "-webkit-border-radius": ".25em", // Safari and Chrome
- "-moz-border-radius": ".25em", // Firefox
- "-khtml-border-radius": ".25em", // Konqueror
-
- "box-shadow": "0px 0px 15px #83A", // Opera 10.5 and IE9
- "-webkit-box-shadow": "0px 0px 15px #83A", // Safari and Chrome
- "-moz-box-shadow": "0px 0px 15px #83A", // Forefox
- "-khtml-box-shadow": "0px 0px 15px #83A", // Konqueror
-
- border: "1px solid #A6D ! important",
- display: "inline-block", position:"absolute"
- },
-
- ".MathJax_Hover_Arrow": {
- position:"absolute",
- width:"15px", height:"11px",
- cursor:"pointer"
- }
- }
- };
-
-
- //
- // Common event-handling code
- //
- var EVENT = ME.Event = {
-
- LEFTBUTTON: 0, // the event.button value for left button
- RIGHTBUTTON: 2, // the event.button value for right button
- MENUKEY: "altKey", // the event value for alternate context menu
-
- Mousedown: function (event) {return EVENT.Handler(event,"Mousedown",this)},
- Mouseup: function (event) {return EVENT.Handler(event,"Mouseup",this)},
- Mousemove: function (event) {return EVENT.Handler(event,"Mousemove",this)},
- Mouseover: function (event) {return EVENT.Handler(event,"Mouseover",this)},
- Mouseout: function (event) {return EVENT.Handler(event,"Mouseout",this)},
- Click: function (event) {return EVENT.Handler(event,"Click",this)},
- DblClick: function (event) {return EVENT.Handler(event,"DblClick",this)},
- Menu: function (event) {return EVENT.Handler(event,"ContextMenu",this)},
-
- //
- // Call the output jax's event handler or the zoom handler
- //
- Handler: function (event,type,math) {
- if (AJAX.loadingMathMenu) {return EVENT.False(event)}
- var jax = OUTPUT[math.jaxID];
- if (!event) {event = window.event}
- event.isContextMenu = (type === "ContextMenu");
- if (jax[type]) {return jax[type](event,math)}
- if (EXTENSION.MathZoom) {return EXTENSION.MathZoom.HandleEvent(event,type,math)}
- },
-
- //
- // Try to cancel the event in every way we can
- //
- False: function (event) {
- if (!event) {event = window.event}
- if (event) {
- if (event.preventDefault) {event.preventDefault()}
- if (event.stopPropagation) {event.stopPropagation()}
- event.cancelBubble = true;
- event.returnValue = false;
- }
- return false;
- },
-
- //
- // Load the contextual menu code, if needed, and post the menu
- //
- ContextMenu: function (event,math,force) {
- //
- // Check if we are showing menus
- //
- var JAX = OUTPUT[math.jaxID], jax = JAX.getJaxFromMath(math);
- var show = (JAX.config.showMathMenu != null ? JAX : HUB).config.showMathMenu;
- if (!show || (SETTINGS.context !== "MathJax" && !force)) return;
-
- //
- // Remove selections, remove hover fades
- //
- if (ME.msieEventBug) {event = window.event || event}
- EVENT.ClearSelection(); HOVER.ClearHoverTimer();
- if (jax.hover) {
- if (jax.hover.remove) {clearTimeout(jax.hover.remove); delete jax.hover.remove}
- jax.hover.nofade = true;
- }
-
- //
- // If the menu code is loaded,
- // Check if localization needs loading;
- // If not, post the menu, and return.
- // Otherwise wait for the localization to load
- // Otherwse load the menu code.
- // Try again after the file is loaded.
- //
- var MENU = MathJax.Menu; var load, fn;
- if (MENU) {
- if (MENU.loadingDomain) {return EVENT.False(event)}
- load = LOCALE.loadDomain("MathMenu");
- if (!load) {
- MENU.jax = jax;
- var source = MENU.menu.Find("Show Math As").menu;
- source.items[0].name = jax.sourceMenuTitle;
- source.items[0].format = (jax.sourceMenuFormat||"MathML");
- source.items[1].name = INPUT[jax.inputJax].sourceMenuTitle;
-
- //
- // Try and find each known annotation format and enable the menu
- // items accordingly.
- //
- var annotations = source.items[2]; annotations.disabled = true;
- var annotationItems = annotations.menu.items;
- annotationList = MathJax.Hub.Config.semanticsAnnotations;
- for (var i = 0, m = annotationItems.length; i < m; i++) {
- var name = annotationItems[i].name[1]
- if (jax.root && jax.root.getAnnotation(name) !== null) {
- annotations.disabled = false;
- annotationItems[i].hidden = false;
- } else {
- annotationItems[i].hidden = true;
- }
- }
-
- var MathPlayer = MENU.menu.Find("Math Settings","MathPlayer");
- MathPlayer.hidden = !(jax.outputJax === "NativeMML" && HUB.Browser.hasMathPlayer);
- return MENU.menu.Post(event);
- }
- MENU.loadingDomain = true;
- fn = function () {delete MENU.loadingDomain};
- } else {
- if (AJAX.loadingMathMenu) {return EVENT.False(event)}
- AJAX.loadingMathMenu = true;
- load = AJAX.Require("[MathJax]/extensions/MathMenu.js");
- fn = function () {
- delete AJAX.loadingMathMenu;
- if (!MathJax.Menu) {MathJax.Menu = {}}
- }
- }
- var ev = {
- pageX:event.pageX, pageY:event.pageY,
- clientX:event.clientX, clientY:event.clientY
- };
- CALLBACK.Queue(
- load, fn, // load the file and delete the marker when done
- ["ContextMenu",EVENT,ev,math,force] // call this function again
- );
- return EVENT.False(event);
- },
-
- //
- // Mousedown handler for alternate means of accessing menu
- //
- AltContextMenu: function (event,math) {
- var JAX = OUTPUT[math.jaxID];
- var show = (JAX.config.showMathMenu != null ? JAX : HUB).config.showMathMenu;
- if (show) {
- show = (JAX.config.showMathMenuMSIE != null ? JAX : HUB).config.showMathMenuMSIE;
- if (SETTINGS.context === "MathJax" && !SETTINGS.mpContext && show) {
- if (!ME.noContextMenuBug || event.button !== EVENT.RIGHTBUTTON) return;
- } else {
- if (!event[EVENT.MENUKEY] || event.button !== EVENT.LEFTBUTTON) return;
- }
- return JAX.ContextMenu(event,math,true);
- }
- },
-
- ClearSelection: function () {
- if (ME.safariContextMenuBug) {setTimeout("window.getSelection().empty()",0)}
- if (document.selection) {setTimeout("document.selection.empty()",0)}
- },
-
- getBBox: function (span) {
- span.appendChild(ME.topImg);
- var h = ME.topImg.offsetTop, d = span.offsetHeight-h, w = span.offsetWidth;
- span.removeChild(ME.topImg);
- return {w:w, h:h, d:d};
- }
-
- };
-
- //
- // Handle hover "discoverability"
- //
- var HOVER = ME.Hover = {
-
- //
- // Check if we are moving from a non-MathJax element to a MathJax one
- // and either start fading in again (if it is fading out) or start the
- // timer for the hover
- //
- Mouseover: function (event,math) {
- if (SETTINGS.discoverable || SETTINGS.zoom === "Hover") {
- var from = event.fromElement || event.relatedTarget,
- to = event.toElement || event.target;
- if (from && to && (from.isMathJax != to.isMathJax ||
- HUB.getJaxFor(from) !== HUB.getJaxFor(to))) {
- var jax = this.getJaxFromMath(math);
- if (jax.hover) {HOVER.ReHover(jax)} else {HOVER.HoverTimer(jax,math)}
- return EVENT.False(event);
- }
- }
- },
- //
- // Check if we are moving from a MathJax element to a non-MathJax one
- // and either start fading out, or clear the timer if we haven't
- // hovered yet
- //
- Mouseout: function (event,math) {
- if (SETTINGS.discoverable || SETTINGS.zoom === "Hover") {
- var from = event.fromElement || event.relatedTarget,
- to = event.toElement || event.target;
- if (from && to && (from.isMathJax != to.isMathJax ||
- HUB.getJaxFor(from) !== HUB.getJaxFor(to))) {
- var jax = this.getJaxFromMath(math);
- if (jax.hover) {HOVER.UnHover(jax)} else {HOVER.ClearHoverTimer()}
- return EVENT.False(event);
- }
- }
- },
- //
- // Restart hover timer if the mouse moves
- //
- Mousemove: function (event,math) {
- if (SETTINGS.discoverable || SETTINGS.zoom === "Hover") {
- var jax = this.getJaxFromMath(math); if (jax.hover) return;
- if (HOVER.lastX == event.clientX && HOVER.lastY == event.clientY) return;
- HOVER.lastX = event.clientX; HOVER.lastY = event.clientY;
- HOVER.HoverTimer(jax,math);
- return EVENT.False(event);
- }
- },
-
- //
- // Clear the old timer and start a new one
- //
- HoverTimer: function (jax,math) {
- this.ClearHoverTimer();
- this.hoverTimer = setTimeout(CALLBACK(["Hover",this,jax,math]),CONFIG.hover);
- },
- ClearHoverTimer: function () {
- if (this.hoverTimer) {clearTimeout(this.hoverTimer); delete this.hoverTimer}
- },
-
- //
- // Handle putting up the hover frame
- //
- Hover: function (jax,math) {
- //
- // Check if Zoom handles the hover event
- //
- if (EXTENSION.MathZoom && EXTENSION.MathZoom.Hover({},math)) return;
- //
- // Get the hover data
- //
- var JAX = OUTPUT[jax.outputJax],
- span = JAX.getHoverSpan(jax,math),
- bbox = JAX.getHoverBBox(jax,span,math),
- show = (JAX.config.showMathMenu != null ? JAX : HUB).config.showMathMenu;
- var dx = CONFIG.frame.x, dy = CONFIG.frame.y, dd = CONFIG.frame.bwidth; // frame size
- if (ME.msieBorderWidthBug) {dd = 0}
- jax.hover = {opacity:0, id:jax.inputID+"-Hover"};
- //
- // The frame and menu button
- //
- var frame = HTML.Element("span",{
- id:jax.hover.id, isMathJax: true,
- style:{display:"inline-block", width:0, height:0, position:"relative"}
- },[["span",{
- className:"MathJax_Hover_Frame", isMathJax: true,
- style:{
- display:"inline-block", position:"absolute",
- top:this.Px(-bbox.h-dy-dd-(bbox.y||0)), left:this.Px(-dx-dd+(bbox.x||0)),
- width:this.Px(bbox.w+2*dx), height:this.Px(bbox.h+bbox.d+2*dy),
- opacity:0, filter:"alpha(opacity=0)"
- }}
- ]]
- );
- var button = HTML.Element("span",{
- isMathJax: true, id:jax.hover.id+"Menu",
- style:{display:"inline-block", "z-index": 1, width:0, height:0, position:"relative"}
- },[["img",{
- className: "MathJax_Hover_Arrow", isMathJax: true, math: math,
- src: CONFIG.button.src, onclick: this.HoverMenu, jax:JAX.id,
- style: {
- left:this.Px(bbox.w+dx+dd+(bbox.x||0)+CONFIG.button.x),
- top:this.Px(-bbox.h-dy-dd-(bbox.y||0)-CONFIG.button.y),
- opacity:0, filter:"alpha(opacity=0)"
- }
- }]]
- );
- if (bbox.width) {
- frame.style.width = button.style.width = bbox.width;
- frame.style.marginRight = button.style.marginRight = "-"+bbox.width;
- frame.firstChild.style.width = bbox.width;
- button.firstChild.style.left = "";
- button.firstChild.style.right = this.Px(CONFIG.button.wx);
- }
- //
- // Add the frame and button
- //
- span.parentNode.insertBefore(frame,span);
- if (show) {span.parentNode.insertBefore(button,span)}
- if (span.style) {span.style.position = "relative"} // so math is on top of hover frame
- //
- // Start the hover fade-in
- //
- this.ReHover(jax);
- },
- //
- // Restart the hover fade in and fade-out timers
- //
- ReHover: function (jax) {
- if (jax.hover.remove) {clearTimeout(jax.hover.remove)}
- jax.hover.remove = setTimeout(CALLBACK(["UnHover",this,jax]),CONFIG.fadeoutDelay);
- this.HoverFadeTimer(jax,CONFIG.fadeinInc);
- },
- //
- // Start the fade-out
- //
- UnHover: function (jax) {
- if (!jax.hover.nofade) {this.HoverFadeTimer(jax,-CONFIG.fadeoutInc,CONFIG.fadeoutStart)}
- },
- //
- // Handle the fade-in and fade-out
- //
- HoverFade: function (jax) {
- delete jax.hover.timer;
- jax.hover.opacity = Math.max(0,Math.min(1,jax.hover.opacity + jax.hover.inc));
- jax.hover.opacity = Math.floor(1000*jax.hover.opacity)/1000;
- var frame = document.getElementById(jax.hover.id),
- button = document.getElementById(jax.hover.id+"Menu");
- frame.firstChild.style.opacity = jax.hover.opacity;
- frame.firstChild.style.filter = "alpha(opacity="+Math.floor(100*jax.hover.opacity)+")";
- if (button) {
- button.firstChild.style.opacity = jax.hover.opacity;
- button.firstChild.style.filter = frame.style.filter;
- }
- if (jax.hover.opacity === 1) {return}
- if (jax.hover.opacity > 0) {this.HoverFadeTimer(jax,jax.hover.inc); return}
- frame.parentNode.removeChild(frame);
- if (button) {button.parentNode.removeChild(button)}
- if (jax.hover.remove) {clearTimeout(jax.hover.remove)}
- delete jax.hover;
- },
- //
- // Set the fade to in or out (via inc) and start the timer, if needed
- //
- HoverFadeTimer: function (jax,inc,delay) {
- jax.hover.inc = inc;
- if (!jax.hover.timer) {
- jax.hover.timer = setTimeout(CALLBACK(["HoverFade",this,jax]),(delay||CONFIG.fadeDelay));
- }
- },
-
- //
- // Handle a click on the menu button
- //
- HoverMenu: function (event) {
- if (!event) {event = window.event}
- return OUTPUT[this.jax].ContextMenu(event,this.math,true);
- },
-
- //
- // Clear all hover timers
- //
- ClearHover: function (jax) {
- if (jax.hover.remove) {clearTimeout(jax.hover.remove)}
- if (jax.hover.timer) {clearTimeout(jax.hover.timer)}
- HOVER.ClearHoverTimer();
- delete jax.hover;
- },
-
- //
- // Make a measurement in pixels
- //
- Px: function (m) {
- if (Math.abs(m) < .006) {return "0px"}
- return m.toFixed(2).replace(/\.?0+$/,"") + "px";
- },
-
- //
- // Preload images so they show up with the menu
- //
- getImages: function () {
- var menu = new Image();
- menu.src = CONFIG.button.src;
- }
-
- };
-
- //
- // Handle touch events.
- //
- // Use double-tap-and-hold as a replacement for context menu event.
- // Use double-tap as a replacement for double click.
- //
- var TOUCH = ME.Touch = {
-
- last: 0, // time of last tap event
- delay: 500, // delay time for double-click
-
- //
- // Check if this is a double-tap, and if so, start the timer
- // for the double-tap and hold (to trigger the contextual menu)
- //
- start: function (event) {
- var now = new Date().getTime();
- var dblTap = (now - TOUCH.last < TOUCH.delay && TOUCH.up);
- TOUCH.last = now; TOUCH.up = false;
- if (dblTap) {
- TOUCH.timeout = setTimeout(TOUCH.menu,TOUCH.delay,event,this);
- event.preventDefault();
- }
- },
-
- //
- // Check if there is a timeout pending, i.e., we have a
- // double-tap and were waiting to see if it is held long
- // enough for the menu. Since we got the end before the
- // timeout, it is a double-click, not a double-tap-and-hold.
- // Prevent the default action and issue a double click.
- //
- end: function (event) {
- var now = new Date().getTime();
- TOUCH.up = (now - TOUCH.last < TOUCH.delay);
- if (TOUCH.timeout) {
- clearTimeout(TOUCH.timeout);
- delete TOUCH.timeout; TOUCH.last = 0; TOUCH.up = false;
- event.preventDefault();
- return EVENT.Handler((event.touches[0]||event.touch),"DblClick",this);
- }
- },
-
- //
- // If the timeout passes without an end event, we issue
- // the contextual menu event.
- //
- menu: function (event,math) {
- delete TOUCH.timeout; TOUCH.last = 0; TOUCH.up = false;
- return EVENT.Handler((event.touches[0]||event.touch),"ContextMenu",math);
- }
-
- };
-
- //
- // Mobile screens are small, so use larger version of arrow
- //
- if (HUB.Browser.isMobile) {
- var arrow = CONFIG.styles[".MathJax_Hover_Arrow"];
- arrow.width = "25px"; arrow.height = "18px";
- CONFIG.button.x = -6;
- }
-
- //
- // Set up browser-specific values
- //
- HUB.Browser.Select({
- MSIE: function (browser) {
- var mode = (document.documentMode || 0);
- var isIE8 = browser.versionAtLeast("8.0");
- ME.msieBorderWidthBug = (document.compatMode === "BackCompat"); // borders are inside offsetWidth/Height
- ME.msieEventBug = browser.isIE9; // must get event from window even though event is passed
- ME.msieAlignBug = (!isIE8 || mode < 8); // inline-block spans don't rest on baseline
- if (mode < 9) {EVENT.LEFTBUTTON = 1} // IE < 9 has wrong event.button values
- },
- Safari: function (browser) {
- ME.safariContextMenuBug = true; // selection can be started by contextmenu event
- },
- Opera: function (browser) {
- ME.operaPositionBug = true; // position is wrong unless border is used
- },
- Konqueror: function (browser) {
- ME.noContextMenuBug = true; // doesn't produce contextmenu event
- }
- });
-
- //
- // Used in measuring zoom and hover positions
- //
- ME.topImg = (ME.msieAlignBug ?
- HTML.Element("img",{style:{width:0,height:0,position:"relative"},src:"about:blank"}) :
- HTML.Element("span",{style:{width:0,height:0,display:"inline-block"}})
- );
- if (ME.operaPositionBug) {ME.topImg.style.border="1px solid"}
-
- //
- // Get configuration from user
- //
- ME.config = CONFIG = HUB.CombineConfig("MathEvents",CONFIG);
- var SETFRAME = function () {
- var haze = CONFIG.styles[".MathJax_Hover_Frame"];
- haze.border = CONFIG.frame.bwidth+"px solid "+CONFIG.frame.bcolor+" ! important";
- haze["box-shadow"] = haze["-webkit-box-shadow"] =
- haze["-moz-box-shadow"] = haze["-khtml-box-shadow"] =
- "0px 0px "+CONFIG.frame.hwidth+" "+CONFIG.frame.hcolor;
- };
-
- //
- // Queue the events needed for startup
- //
- CALLBACK.Queue(
- HUB.Register.StartupHook("End Config",{}), // wait until config is complete
- [SETFRAME],
- ["getImages",HOVER],
- ["Styles",AJAX,CONFIG.styles],
- ["Post",HUB.Startup.signal,"MathEvents Ready"],
- ["loadComplete",AJAX,"[MathJax]/extensions/MathEvents.js"]
- );
-
-})(MathJax.Hub,MathJax.HTML,MathJax.Ajax,MathJax.Callback,
- MathJax.Localization,MathJax.OutputJax,MathJax.InputJax);
diff --git a/modules/MathJax/unpacked/extensions/MathML/content-mathml.js b/modules/MathJax/unpacked/extensions/MathML/content-mathml.js
deleted file mode 100644
index 622e97d..0000000
--- a/modules/MathJax/unpacked/extensions/MathML/content-mathml.js
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-
-/*************************************************************
- *
- * MathJax/extensions/MathML/content-mathml.js
- *
- * This file implements an XSLT transform to convert Content-MathML to
- * Presentation MathML for processing by MathJax. The transform is
- * performed in a pre-filter for the MathML input jax, so that the
- * Show Math As menu will still show the Original MathML as Content MathML,
- * but the Presentation MathML can be obtained from the main MathML menu.
- *
- * To load it, include
- *
- * MathML: {
- * extensions: ["content-mathml.js"]
- * }
- *
- * in your configuration.
- *
- * A portion of this file is taken from ctop.xsl which is
- * Copyright (c) David Carlisle 2001, 2002,
- * and is used by permission of David Carlisle, who has agreed to allow us
- * to release it under the Apache2 license (see below). That portion is
- * indicated via comments.
- *
- * The remainder falls under the copyright that follows.
- * ---------------------------------------------------------------------
- *
- * Copyright (c) 2013 The MathJax Consortium
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-MathJax.Extension["MathML/content-mathml"] = {
- version: "2.3"
-};
-
-MathJax.Hub.Register.StartupHook("MathML Jax Ready",function () {
-
- var MATHML = MathJax.InputJax.MathML,
- PARSE = MATHML.Parse.prototype;
-
- MATHML.prefilterHooks.Add(function (data) {
- if (!MATHML.ctopXSLT) return;
-
- // Parse the