8 Feb 2005 msevior   » (Master)

AbiWord - Plugins.

I've been hacking on some really cool plugins for AbiWord. These are now maturing enough to become useful though they're still very alpha.

The first is a plugin framework to allow arbitrary content to be rendered in AbiWord. I have a document describing this that I'm working on. I haven't finished the document because I keep tweaking the interface.

The first application of the framework is a plugin to use Luca Padovani's GtkMathView to render maths inside AbiWord. Luca and I worked out how to draw MathML into AbiWord at last years GUADEC. However by placing the code inside the new plugin framework we can move the code to CVS HEAD while allowing those platforms unfortunate enough to to not have GtkMathView to build and develop. The works really well and fully utilizes the AbiWord and GtkMathView abstract graphics and font classes to draw and  print directly into an AbiWord document. Furthermore, the framework can make png snapshots of  itself so that the AbiWord document with the maths can be viewed without the plugin. This is great for backward compatibility or for platforms that don't support GtkMathView.

Despite the name, the build of GtkMathView that we use does not need GTK and is in principle totally portable. In practice this hasn't happened yet. We need Windows and OSX developers to port it.

While GtkMathView is an awesome piece of code, it is not complete. It needs quite a bit more work to be production ready and it's editor needs to be fully implemented.. At the moment all we can do is insert MathML into a document. We can't create it on the fly.

While this is the first application of the framework it is by no means the last. I think we can use the code to enable arbitary rendering of content within AbiWord. So we can embed gnumeric documents, postscript, pdfs and maybe even the netscape plugins. We'll see.

The other cool plugin is for grammar checking. Last year I created a new type of plugin based on notifications. These work by having AbiWord broadcast notifications to plugins that "listen". I used this send the text in each paragraph to the excellent link-grammar grammar checker. Dom wrote a great auto-enabled build system for the code and now we have automatic English grammar checking in AbiWord. It seems to work really well!

Dom has already posted one screenshot, here is another showing some nice maths too :-)

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!