Maxima: Modification to function tex().



Dear All,

I wanted to ask if somebody could possibly modify the tex() function such 
that:

(1) The tex output automatically includes matching parentheses commands, and 
\\ so that very long expressions with parentheses, etc will appear correctly 
over multiple lines, for example,

\begin{eqnarray*}
\left(\left( .................... \right.\right.     \\
.............................................................   \\
\left.\left.                               \right)\right) 
\end{eqnarray*}

(2) The approximate width of each line above is specified by a number or list 
x, for example, tex(expression,x).

Thanks very much.

C. Frangos.