I thought I'd bring up this idea again since it might be easy to implement with the new codebase.
If you put text such as [$\int_{x=0}^\infty x^2 dx$] in Wiki, upon saving the article, TeX will be called and translate the formula into an image, and store the image on the server and its name in a database indexed with the formula text. When the Wiki page is presented, the image is inlined (and an alt attribute containg the formula text added). When the page is later edited and saved again, the system first checks whether an up-to-date image of the formula already exists; if not, TeX is called to regenerate it.
This would make mathematicians, computer scientists, physicists and chemists happy. TeX includes a package for typesetting chemical structure formulas and another one for quite general labeled diagrams and trees. There's also a TeX package which allows to typeset musical notes and another one for chess positions.
The concept could be expanded to other programs which can produce graphics on-the-fly based on a textual description. This includes gnuplot (graphs of functions) and maybe packages such as GD, imagemagick or even GIMP.
Axel
On Thu, Jun 20, 2002 at 06:44:18AM +0200, Axel Boldt wrote:
I thought I'd bring up this idea again since it might be easy to implement with the new codebase.
If you put text such as [$\int_{x=0}^\infty x^2 dx$] in Wiki, upon saving the article, TeX will be called and translate the formula into an image, and store the image on the server and its name in a database indexed with the formula text. When the Wiki page is presented, the image is inlined (and an alt attribute containg the formula text added). When the page is later edited and saved again, the system first checks whether an up-to-date image of the formula already exists; if not, TeX is called to regenerate it.
This would make mathematicians, computer scientists, physicists and chemists happy. TeX includes a package for typesetting chemical structure formulas and another one for quite general labeled diagrams and trees. There's also a TeX package which allows to typeset musical notes and another one for chess positions.
The concept could be expanded to other programs which can produce graphics on-the-fly based on a textual description. This includes gnuplot (graphs of functions) and maybe packages such as GD, imagemagick or even GIMP.
Idea is good, but there should be some option to chose what size do you want.
Doesn't this leave us open to potential malice? I don't know very much about TeX, but it is my understanding that by blindly executing TeX when someone edits a page, we are assuming that they haven't included any malicious code in their TeX source.
Am I way off base here?
Jason
Axel Boldt wrote:
I thought I'd bring up this idea again since it might be easy to implement with the new codebase.
If you put text such as [$\int_{x=0}^\infty x^2 dx$] in Wiki, upon saving the article, TeX will be called and translate the formula into an image, and store the image on the server and its name in a database indexed with the formula text. When the Wiki page is presented, the image is inlined (and an alt attribute containg the formula text added). When the page is later edited and saved again, the system first checks whether an up-to-date image of the formula already exists; if not, TeX is called to regenerate it.
This would make mathematicians, computer scientists, physicists and chemists happy. TeX includes a package for typesetting chemical structure formulas and another one for quite general labeled diagrams and trees. There's also a TeX package which allows to typeset musical notes and another one for chess positions.
The concept could be expanded to other programs which can produce graphics on-the-fly based on a textual description. This includes gnuplot (graphs of functions) and maybe packages such as GD, imagemagick or even GIMP.
Axel _______________________________________________ Wikitech-l mailing list Wikitech-l@ross.bomis.com http://ross.bomis.com/mailman/listinfo/wikitech-l
On Thu, 20 Jun 2002, Axel Boldt wrote:
I thought I'd bring up this idea again since it might be easy to implement with the new codebase.
If you put text such as [$\int_{x=0}^\infty x^2 dx$] in Wiki, upon saving the article, TeX will be called and translate the formula into
Excellent proposal. Write the implementation. Then wrap it in code that monitors how often it gets called and how long each call takes, and allows the entire thing to be switched off if it would become a performance bottleneck.
wikitech-l@lists.wikimedia.org