Extension talk:JsMath

From mediawiki.org
Latest comment: 9 years ago by Physikerwelt in topic Mark as obsolete

Btw... can you make another extension for those without Tex?

See Extension:MathJax. --Dirk Nuyens 22:22, 15 November 2010 (UTC)Reply
  • Most of cases show perfect math redering with jsMath (many thanks). But, when a page is transcluded to another page by the tag {{:a page}}, math formulas in the translcuded page are rendered not with jsMath but with texvc png. How can I correct it? --203.254.163.30 07:47, 3 February 2008 (UTC) (Seongchong)Reply
You're right. The way I see it, the problem has to do with how the mediawiki parser strips the <math> tag (i.e., the point where the parser renders <math>...</math> and replaces the formula with a marker that points to the rendered formula). The parser normally strips tags (like <math> and <nowiki>) by the following sequence of lines:
wfRunHooks( 'ParserBeforeStrip', array( &$this, &$text, &$this->mStripState ) );
$text = $this->strip( $text, $this->mStripState );
wfRunHooks( 'ParserAfterStrip', array( &$this, &$text, &$this->mStripState ) );
and then it is easy for the JsMath extension to grab any <math> tags by using the hook ParserBeforeStrip and convert any math formulas before the math renderer is called (inside the strip command). Now, the problem is that at some points in the parser (e.g., template expansion) the stripping is done with the line
$text = $this->strip( $text, $this->mStripState );
(without the hooks involved) and therefore these <math> tags will not get caught by this extension. I can't really see why the parser would call the strip command without also calling the hooks. Hmm, I will think some more on this and see if there is a (simple) way to work around this problem. — Tommy Ekola 13:53, 3 February 2008 (UTC)Reply
Transclusion works with Extension:MathJax. That extension uses two hooks to do the rendering: ParserBeforeStrip and InternalParseBeforeLinks. In this way both transclusion and templates have their math rendered (but math protected by nowiki will be rendered as well in those cases). --Dirk Nuyens 22:22, 15 November 2010 (UTC)Reply

Installation problems in MW 1.13[edit]

I tried to install this extension, but if I add $wgUseTeX = true; in the LocalSettings.php it always tries to render the formula with the includes/math.php not with jsMath. Do I have to make any changes in includes/math.php? The test in jsMath/test/index.html shows the right results and the folder definitions of the extension and of jsMath in LocalSettings.php are correct and JsMath is also defined as default ($wgJsMathDefault = 1;).

Thanks a lot! --Filburt 09:06, 25 November 2008 (UTC)Reply


After trying all the known steps to get Math to work without success, Tried JsMath, and found only one wrinkle . . On Version mediawiki-1.15.1 , Wouldn't work until I set the math option in Preferences for ADMIN to JsMath only . . Guest account (not logged in) apparently uses the admin settings, Recommend this highly for those having problems with getting the math going on a windows system .

Works beautifully ejblayer 19:45, 24 August 2009


Looks great, but have found one problem. Using mediawiki 1.15.1. It's typical to indent math using something like:

:<math> x^2
y
</math>

Multiline formulas with a colon in front of them render only the first line. Seems like the dl tag gets added before and after the first line only.

Problems after upgrading to Mediawiki 1.16[edit]

I got the message

Fatal error: Call to undefined method ParserOptions::getUseTeX() in /home/www/vtadwiki_1_16/extensions/JsMath/JsMath.php on line 159

any idea?

same error I'v described below #Error in jsMath.php Inc ru (talk) 08:49, 16 January 2014 (UTC)Reply

Error in jsMath.php[edit]

Just received error:

Fatal error: Call to a member function addMessages() on a non-object in C:\xampp\htdocs\wiki\extensions\jsMath\jsMath.php on line 88

line 88 code: $wgMessageCache->addMessages( $langMessages, $lang );

I'm only have found that: "Mediawiki 1.18 no longer uses $wgMessageCache"[1] and just coment this line. After that I see same error as discribed above — #Problems after upgrading to Mediawiki 1.16

Some ways to find solution: stackoverflow -- Enabling math formulae display in Mediawiki on a shared host

Inc ru (talk) 08:42, 16 January 2014 (UTC)Reply

Mark as obsolete[edit]

Maybe this Extension can be marked as {{ObsoleteExtension}} --Physikerwelt (talk) 19:47, 17 October 2014 (UTC)Reply