On Wed, 11 Jun 2003, Alexander Schatten wrote:

> Peter Flynn wrote:
> >TeX systems are for formatting: you use them to typeset something
> >which was created/edited/stored/manipulated in (for example) XML.
> >Because of the way history happened, TeX preceded XML, so we have
> >a lot of legacy TeX. Sure it would be nice to have a tex2xml which
> >would do the job (actually there are a few attempts) but if you stop
> >for a moment to think of the ghastly mess which most authors make
> >of TeX, you'll realise why there is no such animal right now. Yes,
> >you could write a conversion from well-formed LaTeX to XML (I actually
> >did one a long time ago, for SGML) but the instant an author starts
> >to write her own macros or mess manually with the formatting, the model
> >breaks and translation becomes virtually impossible. To effect it fully
> >you'd need to rewrite TeX the program to output XML instead of DVI or
> >PDF, and you'd *still* be in trouble because most of what TeX formats
> >carries nothing with it which can be used to indicate markup, unless
> >you want to go back to the days of <b>, <i>, and <u>.
> >
> >
> I really cannot see the point. the only thing I would need is a
> generator that 1:1 tries to move LaTeX into XML, if this is a user
> written command or not.
>
> \begin{Citation}{1234}{456}
> blabla
> \end{Citation}
>
> should become to something like
>
> <comm arg1="Citation" arg2="1234" arg3="456">
> blabla
> </comm>
>
> and \index{Test} to <index>Test</index>
>
> you can then write your own stylesheets to process this to whatever
> needed. So really no need to rewrite the tex program. far away from this!
>
> and such a generator would be fully sufficient to process available tex
> documents for some reasons.

In my working group we use the Chaperon components to convert Tex
into xml, because Tex is much easier to write than XML.

And if you need to convert Tex the following article might be a solution:
http://www-106.ibm.com/developerworks/java/library/j-jspmath/

Stephan.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to