how do make multidimentional polynomials readable?



I remember that in Mathematica and in MuPad, when I was working with
multidimentional polynomials there was a "collect()" function that would
allow me to specify which variables I was interested in and it would collect
all of the coefficients of those variables into sums.

For instance: here's an example taken from a MuPad notebook.  I had a (in
this case) linear eqn and I wanted to see the it organized around the
variables (a[0]...a[4]).

> t[2];

d[1][2] (a[1] d[0][1] + a[2] d[1][1] + a[3] d[2][1] + a[4] d[3][1]) -
d[1][1] (a[1] d[2][1] + a[2] d[1][2] + a[3] d[0][3] + a[4] d[1][3])

> collect(expand(t[2]),[a[i]$i=1..4]);

a[1] (d[0][1] d[1][2] - d[1][1] d[2][1]) + a[3] (- d[0][3] d[1][1] + d[1][2]
d[2][1]) + a[4] (- d[1][1] d[1][3] + d[1][2] d[3][1])

Is there some way to do this in Maxima?

Joshua Scholar