        /** Printing Derivatives **/
/*K: pretty-printing; differentiation; formatted output; pretty printing;
     Pr; Fmt */ 
/*A: K McIsaac  */
/*S: University of Western Australia */
/*D: November 1987 */
/*B: will only work if "d" has no value, gives incorrect result for
	D[g[x],x]*/
/*QV: D */

/* Totally rewritten to handle multiple derivatives and products and
quotients containing derivatives */
 
_Dop[Pr][] : Fmt[,]
_Dop[Pr][{$y,$n,$z}]:: Fmt[,d^$n/Fmt[,d,$z^$n]," "]
_Dop[Pr][$f,{$y,$n,$z}]:: Fmt[,d^$n,$f]/Fmt[,d,$z^$n]

_D[Pr][[$f,$x,$$x]]:: \ 
    Fmt[, Ap[Fmt[,$1],Map[Dop[$1],Rev[{$$x}]]], Dop[Rel[$f[0]],$x]]
 
/* Print derivative operator at end of quotient line. This improves 
	readability*/
_Div[Pr][[D[$$b],$c]] :: Fmt[2,1/$c,D[$$b]]
_Div[Pr][[$$a D[$$b],$c]] :: Fmt[2,$$a/$c,D[$$b]]

/*E: 
#I[1]::  <XDiffPR2
 
#I[2]::  D[f[x],x]
 
         d f
#O[2]:*  ---
         d x
 
#I[3]::  a D[b[c],{c,2}]+ e D[f[g],{g,3,h}]
 
            2        3
           d  b     d  f
#O[3]:*  a ---- + e ----
              2        3
           d c      d h
 
*/
 
