# insert MAPLE algorithm to LaTeX

I am writing my dissertation through LaTeX, and I want to insert the code from MAPLE, it is about 2 pages and I am not sure how to include the algorithm, do you have any idea how am I going to do it?

-
add comment

## 1 Answer

Maple (I assume you are talking about http://www.maplesoft.com/) has a built in style for including Maple code to the LaTeX environment.

What you do is simply locate you installation directory:

``````~/apps/maple15/
``````

is my installation directory. If you are on a Windows machine it will be something like:

``````C:\Program Files\MapleSoft\Maple15
``````

Within a folder named `etc` is located. In that style files and definitions used for Maple is located, you should see the following files:

``````maple2e.sty
mapleenv.sty
maplestd2e.sty
mapletab.sty
mapleenv.def
mapleplots.sty
maplestyle.sty
mapleutil.sty
``````

if you use the built in Maple to LaTeX exporter you simply need to add these style files and definitions to your path.

I.e. copy them to your TeX file and compile.

I have attached a small output of an as-is output:

It has the last section folded in.

-
thank's but I have a problem with the graphs,I can't see them into latex, and last how am I going to connect my dissertation file with the file that has the maple code –  Vangelis Aug 21 '12 at 13:56
@Vangelis the graphs are in exported in eps format. So change them to whatever format you use. Then simply strip the Maple TeX file from the header and include it in your dissertation. Just remember to add the preamble from the Maple output to your dissertation as well. If in doubt please provide a full minimal example in your question. –  zeroth Aug 21 '12 at 15:08
@zeroth I have been trying to change the MapleFont size without success. Do you know how to achieve that? –  pluton Aug 26 '12 at 15:51
@pluton look in the style files... for direct manipulation. Else you enclose the environments in a block which reduces the size of the font. Search around for having several default font sizes. –  zeroth Aug 26 '12 at 16:38
alright. Strangely, they define the \MapleSize and \MapleFont commands that are never used in the .sty files. –  pluton Aug 26 '12 at 16:52
show 8 more comments