how to format foreign object?



On 2/18/12, John Lapeyre <lapeyre.math122a at gmail.com> wrote:

> I would like to tell Maxima how to format a particular lisp
> struct. I notice that for lisp list expressions there are
> some hooks that I don't understand. eg in nset.lisp.

For 2-d display, Maxima gets the formatting function name as
(GET (CAAR EXPR) 'DIMENSION) and then calls that.
For 1-d display, the property is GRIND

The display code is pretty obtuse. When I need a display function
I always just copy an existing one and then modify that.

That only works for ordinary Maxima expressions which have
the form ((FOO) ...). If you have some other kind of expression,
I guess it won't work; you'd have to hack src/displa.lisp or src/grind.lisp.

best

Robert Dodier