I’m putting the finishing touches on the core part of the LaTeX-Render perl port. The only things I have left to definitely change are: currently the output directories and temporary filenames and settings for dimensions are hard coded, so you’d have to edit the variables at the top of the module file to change that– I’m going to add an interface that lets the user override those settings each time they call the module. Also, the error-handling is non-existent, mostly because I have no idea what the return status codes are for the programs used (convert, identify, latex); I’m going to look those up and add better error-handling. And I’m going to add a way for the user to check for errors, independent of determining whether a filename was passed back, or an error message (which is what the current error-reporting amounts to)– maybe a function that returns the status of the last job.
In addition, I’ve been working on integrating LaTeX-Render into the MathMT text formatting engine I had started to develop earlier. My major impediment is finding a reasonable way to determine when formulas are nested– that is, when one formula contains a text box that contains another formula. Problem is, I don’t think there is a way to determine that without writing a TeX parser, to track modes. So I think MathMT will end up not supporting nested formulas. Of course, the big problem with detected nested formulas is TeX’s starting and ending delimiters for formulas are the same ($ and $$), so I could just change notation, for example to and tags, and eliminate the problem. That is probably what I will end up doing, along with supporting the TeX notation, with the provisio that nested formulas are not supported.
That last problem points out to me one of the perils of using Perl– you can get so wrapped up in the text-processing capabilities of the language, that instead of doing things the *right* way, you do them the easy way.
Possibly relevant posts:
- LaTeXRender (5/1/2004)
- Book Naming Conventions (3/27/2003)
- Test of MTPerlScript plug-in (9/3/2002)