texput and .



Hello,

I'm very sorry the last email. The example work from  previous email, but this 
new one do not work. 

I want to write matrix manipulation to latex when I use transpose.
Simple example work, e.g. 
  transpose(A) . transpose(B)
but more nested don't work
  transpose( D . transpose(A) . transpose(B) )

Please see the code below:

(%i1) load("mactex-utilities")$
STYLE-WARNING: redefining TEX-MQUOTIENT in DEFUN
STYLE-WARNING: redefining TEX-MATRIX in DEFUN

(%i2) set_tex_environment_default(
"\\begin{gather}
  ",      "
\\end{gather}")$

(%i3) matchfix("transpose(", ")")$
(%i4) texput ("transpose(", [" (", ")^T "], matchfix)$
(%i5) texput(".", "", infix)$

(%i6) R1: transpose(A).transpose(B);
(%o6)                  transpose(A) . transpose(B)
(%i7) tex(R1);
\begin{gather}
   (A)^T  (B)^T
\end{gather}
(%o7)                                                                             
false

(%i8) R2: transpose(D . transpose(A) . transpose(B));
(%o8)          transpose(D . transpose(A) . transpose(B))
(%i9) tex(R2);
\begin{gather}

Wrong number of arguments to "."
 -- an error. To debug this try: debugmode(true);


I want to obtain as result in latex this for R2:
\begin{gather}
   (D  (A)^T  (B)^T)^T 
\end{gather}

Would you like help me achieve it. 

Thank you in advance.

Zbigniew