pierodancona / gmail.com wrote:

> 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).

Yes, unless the effort required to recreate the TeX algorithms is unduly
onerous, and unless no sane person would be willing to undertake the task
of converting the code.

> 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.

In principle, yes, all you say is true -- one could recreate all TeX
processing in plain Ruby code. But it would probably be very slow, and it
would be a case of reinventing the wheel.

> Just dreaming,

Fair enough. Have you considered reducing your idea to practice, by
recreating the TeX engine in Ruby? It's one think to speculate about such a
thing, it's quite another to write and test the code.

-- 
Paul Lutus
http://www.arachnoid.com