texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] latex-needs patch


From: Joris van der Hoeven
Subject: Re: [Texmacs-dev] latex-needs patch
Date: Mon, 12 May 2003 17:30:12 +0200 (CEST)

On 12 May 2003, Nix N. Nix wrote:
> On Mon, 2003-05-12 at 08:17, Joris van der Hoeven wrote:
>                                       %
> >     (drd-group latex-wasy-symbol
> >       agemO APLbox APLcomment ...)
> >
> >     (drd-rules
> >       ((latex-symbol% 'x) (latex-wasy-symbol% 'x))
> >       ((latex-needs% 'x "wasysym") (latex-wasy-symbol% 'x)))
>
> But what about latex-ams-symbol% and latex-stmary-symbol% ?

Yes, these should be treated similarly.

> And how would we reference these rules ? (drd-ref ...) ?

Yes, "drd-ref" and "drd-in?".
I might add some more retrieval functions if needed.
The basic logical resolution function is "query".

> I guess I don't know enough about DRDs.

It works similarly to PROLOG, except that the number of
primitives have been reduced (no cut), but that the resolution
itself is accelerated by the intesive use of hashmaps.

> > Notice that we might have to add a function which finds the *list* of
> > packages needed by a symbol (or command) instead of *the* package.
> > This should not be hard to do with the DRD stuff. Alternatively,
> > the right-hand side of latex-needs% may be a list, as you do.
>
> Exactly. I was thinking about whether to turn the RHS into a list, or
> whether to only turn it into a list when it's necessary, and then do
>
> (let ((drdval (drd-ref %latex-needs something)))
>      (if (list? drdval) ...
>          ...))
>
> Unfortunately, this may cause many of these (if (list? drdval) ... )
> lines to crop up all over the file, so I decided it would be more
> consistent, and more reflective of the workings of TeXmacs to have a RHS
> that is a list.

You may also add a routine "drd-ref-list" which yields the list
of solutions instead of the unique one (if it exists).
Please take a look at the definition of drd-ref and you will understand.

> > Do you have a christmas tree TeXmacs file (or several ones)?
> > This would be very useful indeed...
>
> I suppose I could make one ... heck, this could be a project in itself.

Yes; in fact we need a good test suite of documents for testing TeXmacs.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]