maxima with imaxima and xemacs, latex error.




On Thu, 25 Feb 2010, Alejandro Morales wrote:

< Hi:
< With the following instructions in maxima using imaxima on xemacs I get a
< latex error:
< 
< e1:x_1*K_1+%i*x_1*G_1-k*k_2/m_1-omega**2*x_1=F/m_1;
< e2:x_2*K_2+%i*x_2*G_2-k*k_1/m_2-omega**2*x_2=0;
< [globalsolve:false,programmode:false];
< linsolve([e1,e2],[x_1,x_2]);
< polarform(%t4);
< 
< With the last instruction imaxima gives the  message "Latex error in" and a
< huge latex file. Is there a way to fix this problem?
< Thanks: A. Morales.
 
Try using underdeclared arrays instead of subscripted variable names.
Although the latex code generated by your code does compile for me, the
subscripts can cause problems.

e1:x[1]*K[1]+%i*x[1]*G[1]-k*k[2]/m[1]-omega**2*x[1]=F/m[1];
e2:x[2]*K[2]+%i*x[2]*G[2]-k*k[1]/m[2]-omega**2*x[2]=0;
[globalsolve:false,programmode:false];
linsolve([e1,e2],[x[1],x[2]]);

The latex code will 'do the right thing' with the array subscripts.

Leo

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.