On Mon, Feb 06, 2006 at 08:22:38PM -0800, C Y wrote: Sorry about the delay.
> --- Matthew Astley <[EMAIL PROTECTED]> wrote: > > On Thu, Feb 02, 2006 at 04:56:06PM -0800, C Y wrote: > > TeX is as good a typesetting engine as anyone might want [...] > > Why start from scratch? > > 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. Sure. It isn't necessary to stop using TeX to do this, but I guess that isn't obvious to most TeX users because the normal mode of use is "please typeset this document (I hope it's syntactically valid and all fits on the page)". Whether TeX is internal or external shouldn't make any difference, it can be just a funcall away. [snip] > > > 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. I did mean text, and I can see that breaking equations is going to be messy. If the equations are generated from code, does make it easier to allow placement of breaking points? > > The TeX Instant Preview demonstration is relevant, > > > > http://www.pytex.org/doc/index.html#tug2001 > > http://cvs.sourceforge.net/viewcvs.py/pytex/pytex/ > > [...] 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. There is some elisp code (has my dabs on it in places) to allow you to break a document into pieces and only preview the bit you're on. Currently that requires the user to insert special marks, but that is just an easy implementation. Maybe it's because LaTeX tends to require the user to know what is setup and what is document? I forget the details, sorry. > > [...] 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. I think this is what I wanted to show - what is possible, and why it might be a good idea. There's another aspect of TeX which I forgot to mention: it's stable. You can write a document for TeX and expect it to typeset to exactly the same thing in ten years' time. I don't know whether the last bug was fixed long enough ago for it to hold, but the converse is to take a ten year old document and expect that it will typeset correctly - to the pixel. Provided you have the relevant style files and other bolt-on packages. This works in much the same way that word processors don't. I don't need to name specific offenders because it applies to all the ones I've used: loading up a document saved by an old release is likely to cause trouble. When using the typesetting package as an intermediate between application data and PDF output this probably doesn't apply. It is unlikely that any typesetting API is going to change so fast your application can't track it. > One of the PyTeX papers makes a good point - TeX+Unicode could pose > a problem. [...] Yikes, typesetting astrological symbols. I'm out of my depth here. > > [...] Things You Should Never Do, Part I [rewrite software > > product] > > I guess it depends on what the potential of dameon mode TeX actually > is. As I understand it, all parts of the typesetting process can be accessed independently. It should be possible (with TeX daemon and the trace-mode trick) to put data in and have it come back annotated with any and all relevant typesetting info, by calling a function. So I didn't feel the need to jump up and reimplement Jonathan's work in Perl, when he started in Python. I don't at this point feel any urge to start in Lisp either. What I can do is make the option known (I think this is now done) and perhaps be a contact between Lisp and PyTeX if there is interest. Matthew #8-) _______________________________________________ Gardeners mailing list [email protected] http://www.lispniks.com/mailman/listinfo/gardeners
