Plugin idea: modifications to LatexRender
Thursday, July 19th, 2007I’ve started working on a modification of the LatexRender WP plugin. My motivation is to increase the ease of certain tasks that I’ve found myself doing often, and add a little more functionality to the current plugin. Here’re a list of the changes I’m planning. Suggestions are welcome.
- Support logically separate classes of LaTeX content: inline, display, and arbitrary TeX/LaTeX. In particular, center displayed content automatically– this should eliminate the need to manually insert div tags to get centered content and the
\DisplayStylecommand to set the correct display style. The user should be able to use whatever and however many tag names per class he or she feels appropriate. - Provide a control panel for the user to set plugin options. For the pure math classes, this means font size, color, and face, what packages to include, and auxiliary definitions (e.g. vector notation or common symbols you use repeatedly). For the arbitrary tex content, you should be able to specify complete pre- and postamble sections. Also, there should be an HTML entity replacement table (I keep needing to add new ones directly to
latex.php). - Let the user change the error conditions such as the size of inputted formulas and the resulting image size, and vary them among the classes (e.g. you may want to allow larger images when formed from arbitrary tex than from inline math)
- Provide a mechanism for per post header modifications and a way to reuse these modifications between posts. This would be useful if, for example, you were writing a series of posts on algebraic geometry so needed special notation, but didn’t feel it would be used often enough to warrant adding to the site-wide header.
- Autoconfiguration– the plugin should check that all the necessary tools (latex, ghostscript, imagemagick, etc.) are available and the file permissions are as needed, and offer helpful instructions if needed to resolve these issues.
