Matching all the valid latex delimiters is great, but should be optional. It limits how the filter can be used. I'm currently trying to use it with Wikimedia API and GeSHI, and by default it's impossible to get them all the play nice - in particular, Drutex tends to grab random chunks of code and mark them up.

I used the patch at http://drupal.org/node/214365 to disable most of the matches, leaving just , , but that still doesn't work well with Wikimedia. If Drutex is first, then the resulting image markup is escaped, and if Wiki is first, then it escapes the tags.

By changing it to match [tex], it all works fine[1].

Ideally, this would be a GUI option configurable per-filter. If I manage to get anything working, I"ll post it here, in the meantime any tips on where to start appreciated.

[1] change line 90 in drutex_render.inc to:
'pattern' => '@\[tex( [^>]*)?\](.+?)\[/tex\]@se',

Comments

mo-seph’s picture

the sentence "leaving just , , " above should have a "tex" and "equation" HTML tag in it.