用javascript或php渲染乳胶文件

Here is the big picture of what I want to do. I need a wiki for my University where we can modify tex file. The structure is the same as a normal wiki (history, comments, etc.) except the code of the documents would be only latex.

So I would like to know if there is a way (javascript, php) to compile a latex document online every time a modification is made ?

Note : I searched on google and stackoverflow and I did not find what I want yet. I do not need mathjax because I need more than just math equation. I read this solution too (PHP - LaTeX rendering) but I would prefer to do it only in php or javascript

thx.

Check out LaTeX2HTML for running a process server-side, and LaTeX4Web for doing it client side with Javascript.

Also, this question might be relevant too.

For a PHP specific project, check out http://drupal.org/project/drutex even if you aren't using Drupal. It has latex2html and html2latex functions.