> I think this same topic came up a year or two ago. I don't
> remember what anyone might have said about it at the time.
> Probably you could search the message archives.
> See: http://maxima.sourceforge.net/maximalist.html
>
> best
>
> Robert Dodier
I find, in ML archive, a similar post for superscript function.
Here there's your code attached to it
/* make x`y act like a superscripted variable
* copyright 2010 by Robert Dodier
* I release this work under terms of the GNU General Public License.
*/
infix ("`");
:lisp (setf (get '$\` 'dimension) (get 'mexpt 'dimension))
texput ("`", "^", 'infix);
:lisp (setf (get '$\` 'mset_extension_operator) 'superscript-assign)
:lisp (defun superscript-assign (expr value) (let* ((x (second expr))
(y (third expr)) (z (or (get x 'superscript-values) (setf (get x
'superscript-values) (make-hash-table))))) (setf (gethash y z)
value)))
:lisp (defun $\` (x y) (or (and (get x 'superscript-values) (gethash y
(get x 'superscript-values))) `(($\`) ,x ,y)))
Here the thread http://www.math.utexas.edu/pipermail/maxima/2010/021139.html
I don't know lisp language, but I think shouldn't be too hard to modify it.
MR