On Sun, Dec 01, 2002 at 05:06:06PM -0800, Axel Boldt wrote:
I wonder if it would be beneficial to skip the external parsing step and leave all parsing to TeX. The advantage would be that all TeX functionality is immediately available without any additional work, including macro packages such as those for
- commutative diagrams and graphs (xypic)
- chemical structure formulas (chemtex)
- music scores (musictex)
- chess diagrams
There is no safety issue, since TeX can be made to run safely so that no shell processes can be called and only the standard files can be generated.
The only disadvantage I see is that we would lose the optional HTML rendering of formulas. While I like that feature, I think we can live without it: most advanced formulas cannot be rendered in HTML anyway, and those that can should probably be written in HTML in the first place to be nice to anonymous users with non-graphical browsers.
<table> <tr align=center><td><td>∞ <tr align=center><td><td>∫<td>x<sup>2</sup> dx <tr align=center><td><td>0 <tr align=center><td>3<td colspan=2><hr><td><td> - π <tr align=center><td><td colspan=2>2π </table>
Ok. That was silly. But you can see a diference between "possible to do in HTML" and "sane to do in HTML" now.
Now back to topic. texvc's markup is not really TeX or some subset of it. It is pseudo-TeX that is much nicer to write. It fixes all the usual problems (%, &foo; not having \foo counterpart, some {}-ing issues), and provides us with full information that we can use for many purposes, rendering HTML being one. But it could also be extended to render ascii-arts MathML or really awesome HTML code like one in previous example. And from other side too, to accept other kinds of math markup (OpenOffice math markup has been suggested).
I'm not completely sure about safety. Probably we should both validate and run TeX in safe mode.
texvc is extremely easy to extend. It shouldn't take too much time just to add a few dozens of new tags, and a night or two should be enough for completely new kind of markup, be it chemistry (which certainly should be added), chess, music or whatever.