# How to include Maple code in LaTeX?

At here Fanciest way to include Mathematica code in LaTeX we can include Mathematica in LaTeX. I want to include the code

restart:
with(geom3d):
eqS:=Equation(sphere(S,(x-1)^2 + (y-1)^2 +(z-1)^2 -121=0,[x,y,z],'centername'=T)):
L:=[]:
for x from -5 to 10  do
for y from -5 to 10  do
for z from -5 to 10  do  if  x<>xcoord(T) and y<>ycoord(T) and z <> zcoord(T) and   type(x,integer) and type(y,integer)and type(z,integer) and eqS then
L:=[op(L), [x,y,z]] fi;
od: od: od:
nops(L);


I tried

\begin{lstlisting}[language=Maple,caption={}]
restart:
with(geom3d):
eqS:=Equation(sphere(S,(x-1)^2 + (y-1)^2 +(z-1)^2 -121=0,[x,y,z],'centername'=T)):
L:=[]:
for x from -5 to 10  do
for y from -5 to 10  do
for z from -5 to 10  do  if  x<>xcoord(T) and y<>ycoord(T) and z <> zcoord(T) and   type(x,integer) and type(y,integer)and type(z,integer) and eqS then
L:=[op(L), [x,y,z]] fi;
od: od: od:
nops(L);
L;
\end{lstlisting}


How to include Maple code in LaTeX?

-
Can you include the information about the differences of Maple compared to Mathematica? It seems that same answers apply directly to any code up to style issues. –  percusse Apr 17 '13 at 11:07
Unfortunately, Maple is not one of the predefined languages in listings. You have to create your own style for that. –  hpesoj626 Apr 17 '13 at 11:49
I was wondering if its possible to Matlab type publish/export maple code into latex although not good. –  texenthusiast Apr 17 '13 at 17:24
This material may be helpful, or at least get you started: puszcza.gnu.org.ua/support/?153 –  Jan Hlavacek May 22 '13 at 12:44