Difference between revisions of "Sandbox"
From SolarSailWiki
m |
m |
||
Line 1: | Line 1: | ||
<php> | <php> | ||
− | echo '<script src="../Wikka/3rdparty/plugins/jsmath/jsMath.js" type="text/javascript"></script>'; | + | //echo '<script src="../Wikka/3rdparty/plugins/jsmath/jsMath.js" type="text/javascript"></script>'; |
− | echo '<div class="math"> \sum_{i=1}^{\nu} i = {n(n+1)\over 2} </div>'; | + | //echo '<div class="math"> \sum_{i=1}^{\nu} i = {n(n+1)\over 2} </div>'; |
− | echo '<script type="text/javascript">jsMath.Process()</script>'; | + | //echo '<script type="text/javascript">jsMath.Process()</script>'; |
+ | include('ASCIIMathPHP.cfg.php'); | ||
+ | include('ASCIIMathPHP.class.php'); | ||
+ | $expr='x^2'; | ||
+ | $ascii_math =& new ASCIIMathPHP($symbol_arr); // The $symbol array is defined in ASCIIMathPHP.class.php | ||
+ | $ascii_math->setExpr($expr); // The ASCIIMath expression you want generate MathML for | ||
+ | $ascii_math->genMathML(); | ||
+ | print($ascii_math->getMathML()); | ||
</php> | </php> |
Revision as of 09:23, 20 April 2006
<php> //echo '<script src="../Wikka/3rdparty/plugins/jsmath/jsMath.js" type="text/javascript"></script>';
//echo ' \sum_{i=1}^{\nu} i = {n(n+1)\over 2}
';
//echo '<script type="text/javascript">jsMath.Process()</script>'; include('ASCIIMathPHP.cfg.php'); include('ASCIIMathPHP.class.php'); $expr='x^2'; $ascii_math =& new ASCIIMathPHP($symbol_arr); // The $symbol array is defined in ASCIIMathPHP.class.php $ascii_math->setExpr($expr); // The ASCIIMath expression you want generate MathML for $ascii_math->genMathML(); print($ascii_math->getMathML()); </php>