"Nikolaos I. Ioakimidis" <ioakimidis@otenet.gr> writes:
> (C1) pde : 'diff(u,x,2)+'diff(u,y,2) = 0$
> (C2) tex(pde)$
> $${{d^2}\over{d\,y^2}}\,u+{{d^2}\over{d\,x^2}}\,u=0$$
> (C3) derivabbrev : true$
> (C4) pde$
> (C5) tex(pde)$
> $${{d^2}\over{d\,y^2}}\,u+{{d^2}\over{d\,x^2}}\,u=0$$
>
> > From this short session it is clear that the Maxima TeX ouput
> ignores the derivabbrev : true$ command [...]
I think it's not implemented. Here is a quick (and barely tested)
hack. Please try it out. After loading the snippet below, I get
(C2) derivabbrev:true;
(D2) TRUE
(C3) 'diff(u,x,2)+'diff(u,y,2) = 0;
(D3) u + u = 0
y y x x
(C4) tex(%);
$$u_{y\,y}+u_{x\,x}=0$$
(D4) FALSE
(C5)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cut ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(defun tex-derivative (x l r)
(tex (if $derivabbrev
(tex-dabbrev x)
(tex-d x '$|d|)) l r lop rop ))
(defun tex-dabbrev (x)
;; Format the macsyma derivative form so it looks like
;; f
;; x y
(let*
((arg (cadr x)) ;; the function being differentiated
(difflist (cddr x)) ;; list of derivs e.g. (x 1 y 2)
(ords (odds difflist 0)) ;; e.g. (1 2)
(vars (odds difflist 1))) ;; e.g. (x y)
`((,arg array)
((mtimes) ,@(mapcan #'(lambda (var ord)
(make-list ord :initial-element var))
vars ords)))))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cut ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Wolfgang