Here is a simple collection of Python scripts that allows Maple code to be embedded directly within a LaTeX document. The scripts will process the LaTeX document, calling Maple as required, making the Maple output directly accessible in the LaTeX document. The source, including extensive examples, can be found at This  library also supports inclusion of active Mathematica, Matlab, Python and Cadabra code within LaTeX documents.

Here is a simple example (based on maple/example-01 in the GitHub site)




   ans := diff(x*sin(x),x):                          # mpl (ans.501,ans)
   ans := eval(diff(x*sin(x),x),x=Pi/4):             # mpl (ans.502,ans)
   ans := int(2*sin(x)^2, x=a..b):                   # mpl (ans.503,ans)
   ans := int(2*exp(-x^2),x=0..infinity):            # mpl (ans.504,ans)
   ans := ''int(2*exp(-x^2),x=0..infinity)'':        # mpl (lhs.504,ans)
   ans := int(int(x^2 + y^2,  y=0..x),x=0..1):       # mpl (ans.505,ans)
   ans := ''int(int(x^2 + y^2,  y=0..x),x=0..1)'':   # mpl (lhs.505,ans)



and here is the corresponding output



Please Wait...