[dokuwiki] Re: DokuWiki and LatexRender

Hi!

> Maybe you could give me some hints whether I'm on the right way and
> not mis-using the new parser-concept (actually I would be happy if
> this'extension' would lose its kind of "dirty-hack"-state ;)

That would be the best :-) I really need to get those plugin system done. Until 
then let's see...

> 1) Added a method to Doku_Handler, parser/handler.php:
> 2) Added a class to parser/parser.php:
> 4) Added a method to Doku_Renderer, parser/renderer.php:
> 3) Added a method to Doku_Renderer_xhtml, parser/xhtml.php:

So far very good.

> Actually this seems to work quite good already, although there's one
> problem left: <latex>-tags placed inline are not recognized yet (which
> is probably due to some missing stuff in Doku_Handler::latex() ?).

The one missing thing is to tell other parser modes if they may contain your 
mode. This is usually done by adding it in the different classes of the parser 
to $this->allowedModes. In your case it may be enough to add 'latex' to 
Doku_Parser_Protected() in parser.php.

As you now have some experience in adding a new syntax to the new Parser system 
I'd like to ask you if you have any ideas how this could be transferred into a 
simple plugin system.

In my imagination it should be enough for you to put some classes into a 
plugins/latex directory and everything should work.

But currently there are to many places that need to be adjusted to make it work 
:-/ So any ideas are welcome.

Andi

Other related posts: