Last modified: 2014-02-12 23:32:46 UTC
With Mediawiki on sourceforge.net I try to use MathJax 2.2. After installation on the VPS, the MathJax test is working (http://freeplane-up.sourceforge.net/wiki/MathJax/test/index.html). But the MathJax does not recognize by mediawiki. After setting up LocalSettings.php as example (https://www.mediawiki.org/wiki/Extension:Math) I have an error when mediawiki try to render TEX code. on Apache : PHP Notice: Use of undefined constant MW_MATH_MATHJAX - assumed ' MW_MATH_MATHJAX' in /home/project-web/freeplane-up/htdocs/wiki/LocalSettings.php on line 309, referer: http://freeplane- up.sourceforge.net/wiki/index.php/LaTeX_in_Freeplane tail of LocalSettings : $wgUseMathJax = true; // enabeling MathJax as rendering option $wgDefaultUserOptions['math'] = MW_MATH_MATHJAX; // setting MathJax as default rendering option (optional) $wgMathJaxUrl = 'http://freeplane-up.sourceforge.net/wiki/MathJax/MathJax.js?config=TeX-AMS_HTML'; // specifying the path to local MathJax in case MathJax's CDN should not be used (optional) ?> When I do a "grep -i MW_MATH_MATHJAX ..." on wiki and MathJax package this constant is not define other than LocalSettings.php !
Based on http://freeplane-up.sourceforge.net/wiki/index.php/Special:Version and your paste above, you don't have the math extension included. You need to add the following before the maths settings you already have: require_once("$IP/extensions/Math/Math.php");
I add the Math module, but this one does not exist >$ ls extensions/ Babel Freeplane.php Nuke ReplaceText Vector CleanChanges Gadgets ParserFunctions SpamBlacklist VisualMathCaptcha ConfirmEdit GeSHiHighlight.php Piwik Translate WikiEditor FCKeditor INSTALL.MediaWikiLanguageExtensionBundle README TwitterFBLike cldr Freeplane LocalisationUpdate Renameuser UniversalLanguageSelector geshi When I try to reload webpage: Warning: require_once(/home/project-web/freeplane-up/htdocs/wiki/extensions/Math/Math.php) [function.require-once]: failed to open stream: No such file or directory in /home/project-web/freeplane-up/htdocs/wiki/LocalSettings.php on line 307 Fatal error: require_once() [function.require]: Failed opening required '/home/project-web/freeplane-up/htdocs/wiki/extensions/Math/Math.php' (include_path='/home/project-web/freeplane-up/htdocs/wiki:/home/project-web/freeplane-up/htdocs/wiki/includes:/home/project-web/freeplane-up/htdocs/wiki/languages:.:/usr/share/pear:/usr/share/php') in /home/project-web/freeplane-up/htdocs/wiki/LocalSettings.php on line 307 At http://www.mediawiki.org/wiki/Extension:Math I read "It was a part of the core MediaWiki software until MediaWiki 1.18", what's wrong?
It was part of MediaWiki core, but it no longer is. In later versions, you need to install the extension, as noted at https://www.mediawiki.org/wiki/Extension:Math (see Download and Installation sections). This is not a bug in the software. If you need help installing the Math extension, try emailing mediawiki-l (https://lists.wikimedia.org/mailman/listinfo/mediawiki-l).
Finally texvc can not be compiled in Sourceforge to activate normally Math extension. See "http://www.mediawiki.org/wiki/Manual_talk:Installing_MediaWiki_on_SourceForge.net#Enabling_math_under_Sourceforge.net". So I close this ticket. Regards for your help.
You shouldn't need to compile texvc if you're only using MathJax. That is a very old post from before MathJax was even available. I wouldn't be surprised if the SourceForge shell options have changed too. There is also a Debian/Ubuntu package for texvc, mediawiki-math.