--- Matthew Astley <[EMAIL PROTECTED]> wrote:

> On Mon, Feb 06, 2006 at 08:22:38PM -0800, C Y wrote:
> 
> Sorry about the delay.

No problem.  Been a bit quiet in here lately - I guess everybody  has
Real Work to do.  Oh well, at least it's not just me ;-).
 
> > --- Matthew Astley <[EMAIL PROTECTED]> wrote:
>
> 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.

That'll take some experimenting to appreciate, I think.

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

In theory it might, I guess.  There is a bit of research that relates
to the problem, and I think it will be possible to define some
algorithms, but the real problem is those algorithms need to know
almost everything about the expression and subexpressions to work. 
That's why having the typesetting engine in lisp is attractive - you
can dig as deep as you want with very little effort.

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

So you basically typeset a document defined from a subset of the
document?

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

No problem.  There are a lot of wrinkles there to dig through.

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

It would certainly be nice to have the option. 

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

Right.  Not necessarily true for LaTeX, but at the TeX level I think
that is true.

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

True enough.

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

Once the basics are defined, I agree.  Of course, if you want to handle
external formats there has to be some change, but that's usually at the
upper level (e.g. LaTeX packages) rather than the lower.

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

Unfortunately, unicode in Lisp is a bit spotty too, at least last time
I checked.  I think SBCL has it, at least to some degree - not sure
about the others.  I think unicode support would be a good goal to
target though - for modern documents (particularly once the STIX fonts
go live) it will be a major asset.

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

If that's true, I think TeX has been severely underutilized by the free
software community.  

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

Not for a little bit, at least on my part anyway - I've got way too
many irons in the fire and need to focus on a couple and get them done.
 Probably that's going to be units support in Axiom, for now - I do
hope to get back to this question later though.

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

Reply via email to