public static function &getInstance()
 {
     if (self::$_instance) {
         return self::$_instance;
     }
     self::$_instance = new nxt_Math_2_Formula();
     return self::$_instance;
 }
Esempio n. 2
0
function _nxt_math_img_inline_render($match)
{
    $formulaImg = nxt_Math_2_Formula::getInstance();
    if (defined('MATH_IMG_INLINE_HEIGHT')) {
        $formulaImg->setHeight(MATH_IMG_INLINE_HEIGHT);
    }
    $formulaImg->setFormula($match[1]);
    return '<img src="' . $formulaImg->getUrl() . '" />';
}