Well, perltex basically extends TeX: you work
inside TeX, then at some point you go out, do
someting in perl, then go back in TeX. In some
sense this is already present in the original
implementation of TeX (via write18 stuff etc).

What I mean is: would it be possible to completely
dispense with TeX? I mean, to produce a dvi file from
inside ruby, using a syntax as close as possible
to TeX's. Or to produce a pdf output via commands
close to pdftex's. Of course I can easily write some
ruby code which outputs a .tex file and then asks TeX
to compile it, but that would be pointless.

Why I am asking: TeX's algorithms (paragraph
formatting, hyphenation, math formatting etc) are
close to optimal, and having them at hand would
be much more useful that leaving them buried inside
the TeX program (or pdftex). One simple application
could be to insert beautifully formatted formulas
into any document; or, one might play with the
basics of TeX and produce a superTeX with more
bells and whistles. In any case, every ruby programmer
could play wiih TeX and expand or simply use its
algorithms.

Just dreaming,
Piero


Vincent Fourmond wrote:
> > Hi,
> > how diffcult could it possibly be to fully integrate TeX
> > (and, for that matter, pdftex) as a subset of ruby?
>
>   What do you mean by that ? Do you want to produce Pdf files formatted
> by Tex from within ruby ? Or do you want to be able to make a LaTeX
> document using Ruby to write macros, like PerlTex ?
>
> http://www.tug.org/tex-archive/help/Catalogue/entries/perltex.html
>
>   In either case, I don't believe it's less than a few month
> more-than-fulltime work.
>
> > Essentially, TeX is just some trivial arithmetic.
>
>   Maybe it is trivial, but I don't believe it to be small, and I have a
> strong feeling that the author was not writing code for nothing...
>
> 	Vince
>
> -- 
> Vincent Fourmond, PhD student
> http://vincent.fourmond.neuf.fr/