register_hook( 'TPL_DOCUMENT_CLOSING', 'BEFORE', $this, 'handle_closing', array() ); } /** * * * * @param Doku_Event $event * @param $param */ public function handle_closing(Doku_Event &$event, $param) { // config=TeX-MML-AM_CHTML // where: // Tex = TeX and LaTeX // MML = MathML - http://www.w3.org/TR/MathML3 // AM = AsciiMath - http://asciimath.org/ // CHTML = output using HTML with CSS // Check metadata to see if there is a math syntax // https://www.dokuwiki.org/devel:metadata#metadata_index global $ID; $isMathExpression = p_get_metadata($ID, syntax_plugin_webcomponent_math::MATH_EXPRESSION); if ($isMathExpression) { $math_div_id = webcomponent::PLUGIN_NAME . '_' . syntax_plugin_webcomponent_math::getComponentName(); ptln('
'); ptln(DOKU_TAB . ''); ptln(DOKU_TAB . ''); ptln('
'); } } }