readium/readium — pull request #54 by dpvc (2012-03-28 13:36:41+00:00)
Title: Add MathJax to iframe for fixed pagination

This change includes code that injects MathJax into an iframe, and uses it in the fixed pagination view. You may want to add it in other views as well (I didn't look closely to see what other ones would appear in iframes).

It also includes a second configuration that is used within the iframes. That is because for some reason that I can't quite figure out, the xlink references that MathJax uses to create the character glyphs from path templates don't seem to be working within the iframe, so I have included a patch to MathJax that outputs the paths directly rather than references to template paths. I have checked the DOM in the iframe, and the templates are there and properly marked, and the references all look correct to me, but the link isn't being made. Since this process uses href links, it might be that something you are doing to adjust links within the book is interfering with it, but I can't see what that might be. This works, but is less efficient. I'll keep looking to see if I can figure out what is going wrong, but I have not been able to reproduce it in a static page, so there is something delicate happening.

Anyway, I think this will fix things up for you for now.