--- Matthew Astley <[EMAIL PROTECTED]> wrote: > As far as I can make out, TeX is as good a typesetting engine as > anyone might want - mature and featureful. Why start from scratch? > Why implement another typesetting engine in Lisp? I can't find "why" > on the web site, in the mail archives or the repository.
Having the typesetting abilities inside the lisp environment allows for a lot more simplicity and flexibility than talking to an external TeX, would be my guess. > (this is not a top post) > On Thu, Feb 02, 2006 at 04:56:06PM -0800, C Y wrote: > > > [...] I finally got a copy of TeX - The Program in dead tree form, > > and [...] I think it would be an awesome project to implement all > > the abilities of TeX in cl-typesetting. Lout also deserves > > consideration. > > So... you're explicitly considering porting chunks (swathes?) of > TeX. If not porting then maybe implementing something similar, but > then will it be better? Algorithmically, no. TeX is a hard act to follow, although I gather Lout does have some good ideas (particularly for "high level" stuff). It will, however, be much simpler to interact with the typesetting engine in a "lispy" way. Libraries and/or GUIs could access whatever level of information they needed from the engine with very little pain - dealing with a foreign environment means that all such requests are more "expensive" in terms of time and effort. cl-typesetting demonstrates many of these possibiities already, based on the example documents I have seen. > > This is actually what I would consider an important first step > > to a high quality mathematical document interface to Axiom (my > > real goal) > > ...you're after maths content which is TeX's forte, Right, up to a point. To the best of my knowledge TeX's mathematical typesetting abilities are still unsurpassed and maybe even unequaled in terms of quality output produced. However, TeX does not attempt to do any automatic line breaking of long mathematical expressions. This is by design - Knuth specificly addresses that point in the TeXbook, although he does give some useful examples on how to manually linebreak equations. For a CAS gui, unfortunately, the "by hand" method of line breaking long expressions is insufficient, unless one abandons the idea of being able to print expressions cleanly on finite paper. A variety of tools exist - the command line output of both Maxima and Axiom is arranged to fit in a terminal (although that's a simpler problem in some ways since the fonts are fixed), Axiom and TeXmacs use a tool written to automatically handle TeX linebreaking (although I don't know how robust that tool actually is - I need to study it more) and there is the breqn TeX package. Anyway, all the indications I've seen suggest that to do a really good job, the linebreaking routines will need a LOT of knowledge about things like sizes of subexpressions, positioning relative to page edges, etc - and a lisp typesetting engine offers a LOT of power for close integration. TeXmacs is certainly one argument for the quality of interactive document that can be obtained with proper techniques. > > since things like linebreaking need lots of information about the > > typesetting details > > linebreaking within an environment is (I'm told) the most basic > functionality you might need access to. Do you mean linebreaking of text lines, or equations? The latter is a Hard Problem, at least according to what I've seen so far. > > and a cl-typesetting program would be the perfect foundation - > given > > proper handling it might very well be possible to have TeXmacs-like > > typesetting rendering in a WYSIWYG environment. > > The TeX Instant Preview demonstration is relevant, > > http://www.pytex.org/doc/index.html#tug2001 > http://cvs.sourceforge.net/viewcvs.py/pytex/pytex/ Interesting paper! Thanks for the link. Definitely relevant. I actually wasn't aware of the whole pytex project, so that's good to see! Daemon mode TeX is not something I had thought of. My first concern is that, for extremely long documents, each keypress might trigger a re-formatting that lasts several seconds. I'll take a look and see if I can find how they address this concern. > I mention Instant Preview because it's a fairly important > prerequisite for WYSIWYG (or other related document views). The > paper discusses this. I'll give that paper a read through. > > Of course it would take a fair bit of work to duplicate all of the > > LaTeX and LaTeX package functionality that has been created over > > the last couple decades, but I suspect given the flexibility of > > lisp it would be quite possible. > > Possible, of course. But if you can just *use* those parts of TeX > that you actually want - this large body of implemented and tested > code - wouldn't that be a really neat shortcut? Indeed - however powerful a Lisp TeX might be, it is hard to argue with the assertion that Knuth's original TeX is one of the most bug-free desktop level programs ever written. One of the PyTeX papers makes a good point - TeX+Unicode could pose a problem. I think the STIX folks have TeX in mind, and the STIX fonts are almost certainly going to be the logical standard to focus on if they can provide the quality required for TeX rendering, but it's an issue that is worth bearing in mind. Of course, the lisp world itself is also coming to terms with unicode... > There's also Joel Spolsky's view to consider, > http://www.joelonsoftware.com/articles/fog0000000069.html > Things You Should Never Do, Part I [rewrite software product] > > Maybe it's not relevant for personal projects, but if your real goal > is something else then you may be looking for an efficient route. I guess it depends on what the potential of dameon mode TeX actually is. Cheers, CY __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Gardeners mailing list [email protected] http://www.lispniks.com/mailman/listinfo/gardeners
