Lexer->addEntryPattern('\$(?=.*\$)',$mode,'plugin_latex_dollar'); } function postConnect() { $this->Lexer->addExitPattern('\$','plugin_latex_dollar'); } /** * Handle the match */ function handle($match, $state, $pos, Doku_Handler $handler){ if($state != DOKU_LEXER_UNMATCHED) return array($match,$state,NULL); return array("$".$match."$",$state,'class'=>"latex_inline", 'title'=>"Math", NULL); } }