Rendering Maths With LaTeX
Short, concise description of the idea
Implement rendering of mathematical equations/symbols in entries and comments written in LaTeX using the mimeTex CGI script.
Full description of the idea
Though a similar suggestion has been brought up before (http://community.livejournal.com/suggestions/657683.html), a significant amount of time has past since then. I will also address the criticisms made on that suggestion through offering a specific avenue for implementation.
Currently, the only way to accomplish Maths in LJ is through images, with XML-based methods or with MathML. All of these methods are cumbersome to the point of impracticability. Though in the Maths LJ communities LaTeX is presented in its raw form, it is hard to read prior to rendering. Allowing users to, at the very least, "send" there equations to a CGI script for processing will provide an easy way to write/edit method for communicating Math/Science between users.
To address the issues that foxfirefey brought up in the linked suggestion:
- There is a good number of maths people on LJ.
- Math people is not limited to (aspiring/amateur) Mathematicians. *Every* Science uses math and would benefit from this.
- It won't be CPU intensive if the images are cached.
- Regularly clearing the cache (nightly?) would prevent ever climbing storage requirements
- MathML is cumbersome and _not_ the standard language of Math/Science
- Given the above, this need not be a paid feature.
- LJ users that participate in Maths/Science discussion will be able to properly communicate.
- Readability of LJ communities that use math would increase dramatically.
- Makes LJ more Maths/Science friendly as LaTeX is the standard typesetting language.
- Adds a feature not present on LJ but present on at least one competing service (e.g. WordPress).
An ordered list of problems/issues involved
- Alteration of one (or more) scripts used for signup.
- Possible server load/storage issues.
An organized list, or a few short paragraphs detailing suggestions for implementation
- Enable caching (compile time option) for mimeTex to lessen server load.
- Create a cron job to clear the cache directory/directories nightly (or another suitable time-frame) to make sure never/rarely viewed equations are removed. This will reduce storage requirements (greatly).
- Alter the signup script to create a cgi-bin directory under the users subdomain as well. Then mimeTex.cgi could be sym-linked (or hard linked) to saving storage costs.
- The cache directory could either be under the users account or in a central location. The former provides better collision prevention in filenames but is slightly more complicated when deleting the cache. The latter is easy for clearing the cache but may produce some collisions with file names.
- LJ /could/ introduce another tag for use for LaTeX. A common one is <tex>Equation</tex>. It would be a trivial matter to introduce another regex to convert this tag to an image tag with the src="/cgi-bin/mimetex.cgi?TheEquation". After all, LJ already has regex's with the <lj*> tags. So, the infrastructure should already in place to extend.