The command "latex(expression)" attempts to generate LaTeX commands that will recreate the expression in LaTeX. For example; latex(%) will try to generate LaTeX commands to recreate the last output from Maple.
Let's say I had just entered the Maple command to display an integral; for example:
Int(Int(Int(rho^2*sin(phi),rho=sec(phi)..5*sec(phi)),phi=Pi/6..Pi/3),theta=0..2*Pi);
If I would like to put that same integral in a LaTeX document; I could enter the
following command:
latex(%);
Which, in Maple 9, returned:
\int _{0}^{2\,\pi }\!\int _{1/6\,\pi }^{1/3\,\pi }\!\int _{\sec
\left( \phi \right) }^{5\,\sec \left( \phi \right) }\!{\rho}^{2}\sin
\left( \phi \right) {d\rho}\,{d\phi}\,{d\theta}
Now, depending on your prowess with LaTeX; this may be all you need.
You can then copy that text into a LaTeX document and be on your way.
Here is a sample LaTeX document:
\documentclass{article}
\title{Show me the Maple} % Declares the document's title.
\begin{document}
\[
\int _{0}^{2\,\pi }\!\int _{1/6\,\pi }^{1/3\,\pi }\!\int _{\sec
\left( \phi \right) }^{5\,\sec \left( \phi \right) }\!{\rho}^{2}\sin
\left( \phi \right) {d\rho}\,{d\phi}\,{d\theta}
\]
\end{document}
Some of the time; it isn't quite as straight-forward; with the LaTeX code
that is generated having some dependencies. Those dependencies turn out
to be files in the Maple9\ETC directory (the directory where Maple
was installed, or Maple10\ETC, or Maple11\ETC directory).
I found that if I copied the files from the Maple9\ETC directory
to the directory where my LaTeX file is; that things would work. This was
a set of maybe 10 files or so.
The following is a full LaTeX file; with additional "wrapping" commands
to make the file a valid LaTeX file. Some items are critical like
"\usepackage{maple2e}". I cant speak on a command-by-command basis as
to which of them may be optional. When using this template; you will
need the files "maple2e.sty" and such from the Maple9\ETC directory
(or the ETC directory where Maple was installed).
\documentclass{article}
\usepackage{maple2e}
\def\emptyline{\vspace{12pt}}
\DefineParaStyle{maplegroup}
\DefineParaStyle{Author}
\DefineParaStyle{subtitle}
\DefineParaStyle{Bullet Item}
\DefineParaStyle{Dash Item}
\DefineParaStyle{Diagnostic}
\DefineParaStyle{Error}
\DefineParaStyle{Heading 1}
\DefineParaStyle{Heading 2}
\DefineParaStyle{Heading 3}
\DefineParaStyle{Heading 4}
\DefineParaStyle{Normal}
\DefineParaStyle{Text Output}
\DefineParaStyle{Title}
\DefineParaStyle{Warning}
\DefineCharStyle{2D Math}
\DefineCharStyle{Help Heading}
\DefineCharStyle{Maple Input}
\DefineCharStyle{FixedWidth}
\DefineCharStyle{endFixedWidth}
\begin{document}
\pagestyle{empty}
\begin{maplelatex}
\[
{\frac {\int _{0}^{2\,\pi }\!\int _{0}^{7/2\,\sqrt {2}}\!\int _{r}^{
\sqrt {49-{r}^{2}}}\!zr{dz}\,{dr}\,{d\theta}}{\int _{0}^{2\,\pi }\!
\int _{0}^{7/2\,\sqrt {2}}\!\int _{r}^{\sqrt {49-{r}^{2}}}\!r{dz}\,{dr
}\,{d\theta}}}
\]
\end{maplelatex}
\end{document}
-Jay