postfix transpose operator



-----Lynn Quam wrote: -----

>Is there any (easy) way to get transpose to be a
>postfix operator so that the printed form of matrix/vector equations
>can print an a more mathematically natural manner?

Here is a start:

(%i1) load("mactex-utilities")$
(%i2) postfix("^^T")$
(%i3) texput("^^T","^^T",postfix)$
(%i4) a^^T;
(%o4)                                        a ^^T
(%i5) tex(%);
$$a^^T$$
(%o5)                                        FALSE
(%i6) "^^T"(m) := if matrixp(m) then transpose(m) else funmake("^^T",[m])$
(%i7) m^^T;
(%o7)                                        m ^^T

(%i8) matrix([5,6])^^T;
         [ 5 ]
(%o8)                                  [   ]
         [ 6 ]
(%i9)

>I have looked at the code in mactex.lisp for declaring factorial
>to be postfix.

>   (defprop mfactorial tex-postfix tex)
>   (defprop mfactorial ("!") texsym)
>   (defprop mfactorial 160. tex-lbp)
>
>Might something like this do the trick?

Yes, you could do something this; for some
simple modifications to mactex, you can use the
user-level function texput.

Welcome to Maxima.

Barton