[Scummvm-cvs-logs] SF.net SVN: scummvm:[55949] wiki/trunk/extensions/MathJax
criezy at users.sourceforge.net
criezy at users.sourceforge.net
Thu Apr 14 20:51:15 CEST 2011
Revision: 55949
http://scummvm.svn.sourceforge.net/scummvm/?rev=55949&view=rev
Author: criezy
Date: 2011-04-14 18:51:15 +0000 (Thu, 14 Apr 2011)
Log Message:
-----------
WIKI: Modify MathJax extension to remove '$' and '$$' hooks.
There are several other hooks for equations (e.g. '<math>', '\(', '\[' or ':<math>') so
there is still plenty of choice and '$' being used on some of our pages the
original MathJax extension breaks these pages.
Modified Paths:
--------------
wiki/trunk/extensions/MathJax/MathJax.php
wiki/trunk/extensions/MathJax/mwMathJaxConfig.js
Modified: wiki/trunk/extensions/MathJax/MathJax.php
===================================================================
--- wiki/trunk/extensions/MathJax/MathJax.php 2011-04-14 18:47:21 UTC (rev 55948)
+++ wiki/trunk/extensions/MathJax/MathJax.php 2011-04-14 18:51:15 UTC (rev 55949)
@@ -66,10 +66,9 @@
'author' => array('Dirk Nuyens'),
'url' => 'http://www.mediawiki.org/wiki/Extension:MathJax',
'description' => 'Enables MathJax (http://www.mathjax.org/) for typesetting TeX '
- .'and LaTeX formulae in MediaWiki inside <tt><nowiki>$</nowiki>'
- .'</tt>, <tt>\(</tt> and <tt><math></tt> (for inline) and '
- .'<tt><nowiki>$$</nowiki></tt>, <tt>\[</tt> and <tt>:<math>'
- .'</tt> (for display) math environments.'
+ .'and LaTeX formulae in MediaWiki inside <tt>\(</tt> and '
+ .'<tt><math></tt> (for inline) and <tt>\[</tt> and '
+ .'<tt>:<math></tt> (for display) math environments.'
.' This gives nice and scalable mathematics. The extension also '
.'enables the usage of <tt>\label{}</tt> and <tt><nowiki>\eqref{}'
.'</nowiki></tt> tags with automatic formula numbering. If needed'
@@ -167,9 +166,9 @@
if(empty($wgMathJaxDisplayButton))
$wgMathJaxDisplayButton = "$wgStylePath/common/images/button_math.png";
$inline_math = 'addButton("' . $wgMathJaxInlineButton . '"'
- . ',"Inline mathematical formula (LaTeX)","$","$","Insert formula here","mw-editbutton-math");' . "\n";
+ . ',"Inline mathematical formula (LaTeX)","\\(","\\)","Insert formula here","mw-editbutton-math");' . "\n";
$display_math = 'addButton("'. $wgMathJaxDisplayButton . '"'
- . ',"Display-style mathematical formula (LaTeX)","$$","$$",'
+ . ',"Display-style mathematical formula (LaTeX)","\\[","\\]",'
. '"Insert formula here, optionally \\\\tag{manual-number}","mw-editbutton-math2");' . "\n";
$toolbar = substr_replace($toolbar, $inline_math . $display_math, $b, $l);
return true;
@@ -351,7 +350,7 @@
// Parser::Parse just before the ParserBeforeTidy hook
$text = preg_replace_callback('/(\\\\begin{(.*?)})(.*?)(\\\\end{\\2})/s', 'MathJax_register_and_strip_math', $text);
// watch out for \$ in TeX using negative look behind:
- $text = preg_replace_callback('/((\${1,2}))(.*?)((?<!\\\\)\\2)/s', 'MathJax_register_and_strip_math', $text);
+ // $text = preg_replace_callback('/((\${1,2}))(.*?)((?<!\\\\)\\2)/s', 'MathJax_register_and_strip_math', $text);
$text = preg_replace_callback('/((\\\\\\[))(.*?)(\\\\\\])/s', 'MathJax_register_and_strip_math', $text);
$text = preg_replace_callback('/((\\\\\\())(.*?)(\\\\\\))/s', 'MathJax_register_and_strip_math', $text);
Modified: wiki/trunk/extensions/MathJax/mwMathJaxConfig.js
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list