imaxima problems



Hello,

I'm trying to get imaxima working on EMACS CVS under Linux. I'm sure
the problem as such is not with imaxima, but the TeX compilation. I
don't have much experience with (La)TeX, so I would be glad if
somebody is willing to help me out.

After starting the imaxima mode, any command I try gives me an
error. For example:

-------------->8---------------------
(C1) integrate(sin(x),x);

LaTex error in:  -\cos x
-------------->8---------------------

Pressing RET on the "LaTex error in" line gives me:

-------------->8---------------------
This is TeX, Version 3.14159 (Web2C 7.4.5) (format=tex 2003.9.16)  28 DEC 2003 19:22
**&mylatex /tmp/imaxima14408EpB/1.tex
(/tmp/imaxima14408EpB/1.tex
Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, n
ohyphenation, loaded.
! Undefined control sequence.
l.1 \documentclass
                  [11pt,leqno]{article}
? 
! Emergency stop.
l.1 \documentclass
                  [11pt,leqno]{article}
End of file on the terminal!

No pages of output.
-------------->8---------------------

And, the generated source code is:

-------------->8---------------------
\documentclass[11pt,leqno]{article}

% mylatex
\setlength{\textwidth}{187mm}
\begin{document}
\pagecolor[rgb]{0.200000,0.200000,0.200000}\pagestyle{empty}
\begin{normalsize}
\color[rgb]{1.000000,0.000000,0.000000}\tt\begin{dmath}[number={D1}]
\color[rgb]{0.000000,0.000000,0.000000} -\cos x\end{dmath}\end{normalsize}\end{document}
-------------->8---------------------

I'm sure my AucTex installation is working fine, because I did one of
my papers with it. But, I've never used the keywords 'leqno' or
'dmath' before.


Thanking you in advance,
Ganesh

-- 
Ganesh Swami