So. This page describes what I currently implemented and what I'd like to be able to do in general.

currently implemented

The latex formatter has a magic method that tells the latex parser that the formatter is latex, so that it will simply pass the typed latex formula through that magic method that makes it go into the output as-is.

wish

A generic framework to do this.

Each plugin would register what mime-types it can emit (the latex parser would register image/png and text/latex or similar) and the formatter has a list of which mime-types it can accept (currently only text/latex).

Now these should be ordered by preference, with the most specific ones first:

Now this should be matched and if there is a common match, then the parser should be asked to produce the mimetype and the formatter should be given it. If there is no match, standard formatter calls must be used instead, in this case the formula would simply disappear because images are not handled by the formatter yet.

other problems

MoinMoin: JohannesBerg/ParserFormatterCommunication (last edited 2008-02-27 18:30:41 by 195)