Items tagged with package


Was just pondering this idea and posted this in the post topic for discussion. 

Each Maple finished version of Maple may still have certain bugs that will not be updated for that version, so I am suggesting (I think anyone could implement it) that if there is a workaround, one could wrap it up in something I would call a patch package updateable by us users we could update here on mapleprimes.  It would be good for people who haven't upgraded or can't upgrade due to costs etc...

For example, there was recent issue with pdsolve that was fixed quite quickly in the seperate updateable Physics package.  Things could be done similarily that might work with other workarounds using this patch package idea. 

If anyone thinks this is good or even viable idea then lets implement it.  I envisioned it with just this one rule to follow - the name of the patch package would reflect the version we are patching (ie. with(patch12) or with(patch2016) for Maple 12 and Maple 2016 respectively etc...)  We could make these patch packages available in this post or start another.

As I said, I'm just throwing the idea out there.  Thoughts?

As a momentary diversion, I threw together a package that downloads map images into Maple using the Google Static Maps API.

If you have Maple 2017, you can install the package using the MapleCloud Package Manager or by executing PackageTools:-Install("5769608062566400").

This worksheet has several examples, but I thought I'd share a few below .

Here's the Maplesoft office


Let's view a roadmap of Waterloo, Ontario.


The package features over 80 styles for roadmaps. These are examples of two styles (the second is inspired by the art of Piet Mondrian and the De Stijl movement)


You can also find the longitude and latitude of a location (courtesy of Google's Geocoding API). Maple returns a nested list if it finds multiple locations.


The geocoding feature can also be used to add points to Maple 2017's built-in world maps.


Let me know what you think!

I would like to create a Maple Workbook of my Lattice Package so I can put it on MapleCloud. I had an email exchange with Daniel Skoog from Maplesoft about this, and he even sent me an example that looked easy enough to adapt to my purposes. Alas, it does not work. Here is the code I wrote to assemble the already extant files:

                "Maple Initialization loaded..."
# Build Lattice workbook following example from Daniel Skoog, MapleSoft:
 "/Applications/Math_Calc/Maple 2015/Packages/Lattice/Lattice

    Version 1.1.0 release files"
# We have all files already from the App Center submission, so just assemble the workbook
"MLA file"="Lattice.mla",\
"Build procedure"="",\
"Manual"="The Lattice Package Users",\
"Release Notes"="V1.1 Release Notes.rtf");
Error, (in march) unable to attach worksheet file The Lattice Package Users

When I look at the created workbook (Lattice.maple), the only members included are, the Build procedure and the source file Lattice.mpl. In particular, Lattice.mla is not there, which is the most important one.

What am I doing wrong? What does "march" (which sounds like machine architecture) have to do with it??

I also don't quite know how to "install" it. I assume I just put the whole workbook into a directory accessible through libname ?

Mac Dude

PS: I could have sorted this privately with Daniel, but this may be of interest to others as well so I hope he'll answer through this forum.

The Lattice package to investigate particle accelerator magnet lattices (original post) has been updated to V1.1. This is a significant update, addressing a number of inaccuracies and bugs of V1.0 as well as introducing new elements: Octupole, Fringe effect in dipoles, a MatchedSection allowing to insert a piece of beamline when the details are irrelevant, and a few experimental elements like WireQuad. New functions include the 6th synchrotron-radiation integral I6x, momentum compaction alphap and TaylorMap, which allows to compute the Taylor expansion of  the non-linear map to any degree.

The code and documentation are available in the Application Center.

U. Wienands, aka Mac Dude


Is there any command or package in Maple that computes blow ups? I didn't find blow up in the help.

I need to install FGb package into Maple, the instruction is here:

But after I tried so many times, I am still unable to install the package(the instruction is a little bit unclear).  Basically, I downloaded the file FGb-1.61.macosx.tar.gz  in my home directory and unzip it. I created .mapleinit and put these commands inside:

libname:= “Macintosh HD/Users/jinhuilitar xvfz/tmp/FGb-1.61.macosx.tar.gz”/FGblib, libname:

mv <12627>/*.so <Macintosh HD/Users/jinhuili/tar xvfz/tmp/FGb-1.61.macosx.tar.gz>

 mv <12627>/FGblib <Macintosh HD/Users/jinhuili/tar xvfz/tmp/FGb-1.61.macosx.tar.gz>


I put .mapleinit in the home directory as well. But after I did all of these followed the instructions, I opened Maple and type with(FGb), it says FGb does not exist. I am so desperate, I have tried two days to solve this simple problem, please help.

I have made a small package in a workbook and want to upload it as a package to MapleCloud. According to the help pages, I should select Save To Cloud from the File menu and select the package option for Application Type in the dialog that appears. However, no matter what I do the only option availlable is Maple. What is going on?

I can't understand how to install this package "SADE" in Maple 17. Secondly, I am new to Maple. So Please guide me the process to install this package and how to use it. Thanks!

In the test package below I want the the Value of Clr to be "B" when the package is loaded. How do I achieve that?


mylibdir := cat(kernelopts(homedir), kernelopts(dirsep), "maple", kernelopts(dirsep), "toolbox", kernelopts(dirsep), "personal", kernelopts(dirsep), "lib")




libname := mylibdir, libname

"C:\Users\Ronan.Ronan-PC\maple\toolbox\personal\lib", "C:\Program Files\Maple 2016\lib", "C:\Users\Ronan.Ronan-PC\maple\toolbox\personal\lib"





"RTest:=module()  option package;  export  Sums;    global Clr;  Clr:=B;  Sums:=proc(p1,p2,c:=Clr)  if c=B or c=b  then    p1+p2  elif c=G or c=g then  p1-p2  elif c=R or c=r  then      if p2 =0 then "Not Valid"       else ( p1)/(p2)        end if  else "Error"  end if  end proc;    end module; "










"At This point I want the value of Clr to be automaticially   B"

Sums(2, 3)



RTest:-Sums(2, 3, b)




RTest:-Sums(2, 3, r)



RTest:-Sums(2, 3, g)



Clr := g



RTest:-Sums(2, 3)



RTest:-Sums(2, 3, b)



RTest:-Sums(2, 3)



RTest:-Sums(2, 0, r)

"Not Valid"





A number of MaplePrimers have asked how one might use the section and subsections of a Maple worksheet to structure the source code of an extended Maple package.  The usual answer is that it cannot be done; a module-based Maple package must be assigned in a single input region in a worksheet.  A recommended alternative is to write the source in text files and use either command line tools or the Maple read command from a worksheet to assign the package.  Because the read command handles Maple preprocessor macros, specifically the $include macro, the source can be conveniently split into smaller files.

I prefer this file-based method for development because text files are generally more robust than Maple worksheets, can be edited with the user's preferred editor, can be put under version control, and can be searched and modified by standard Unix-based tools.  However, not everyone is familiar with this method of development.  With that in mind, I wrote a small Maple package, CodeBuilder, that permits splitting the source of a Maple package (or any Maple code) into separate code edit regions in a standard Maple worksheet, using $include macros to include the source of other regions.  To build the package, the code edit regions are written to external files, using the names of the regions as the local file name relative to a temporary directory.

The package includes a method to run mint on the source code.  The result can be either printed in the worksheet or displayed in a pop-up maplet that allows selecting the infolevel and the region to check.

CodeBuilder includes help pages and a simple example (referenced from the top-level help page) demonstrating the usage.  To install the package, unzip the attached zip file and follow the directions in the README file.

Errata Just noticed that a last minute change broke some of the code.  Do not bother with the 1-0-1 version; I'll upload a new version shortly.  The latest version (1-0-3) is now available.


To have to better overview of a package, I would like to be able to group/ ungroup all the lines inside a subpackage as it is possible to do for example in a worksheet.

Is there a possibility to group lines (as a section) inside a package ?

Thank you for your feedback


I have a package with multiple subpackages that I want to correct.

For troubleshooting my package, i would be interested by 2 points :
1) I would like use subsection for each subpackage. It would enable to have a better view of the structure of my package. However, I heard that sections, and subsections can lead to syntax errors. Is there a possibility to gather lines in a subpackages as with a section or subsection ?

2) To troubleshoot my package, I would like to comment a important part of code lines. Is there a technique to comment/ uncomment an important group of lines in the same time. I would enable me to valid my code little by little.

Thanks a lot for your help and tips so as to troubleshoot a big package with many subpackages.



I try to retrieve some procedures from a package that I have in a 2D output.

But, when I copy/paste in a 1D maple input or a simple text file, the main part of the procedure is replaced by "...".

Example :

proc(a, b)  ...  end;

Do you have a idea to suppress this feature ? and so that I can retrieve the desired procedures?

Thanks a lot for your help


I am writing a package to define a few Records and collect some quantities and formulae to do some arithmetic with.

At some point I started running into a severe problem: Each time I want to use one of the exports form the module, the Maple kernel dies with a "Stack limit exceeded" message. The issue is: This seems to happen only on Maple 2016. I had some issues in Maple 2015 but that got sorted by rewriting some stuff. I never had any issue like that with Maple 15. I went as far as commenting out most of my .mapleinit code to make sure that did not cause issues. The code works as intended in Maple 15 and in Maple 2015.

I am posting this here and am asking others to see if they can reproduce this. Needless to say I will SCR this. But I actually need to get this to work.

The error can be triggered by simply entering


after loading the package. Needless to say, it should just echo the name "Booster", to get more one would need to enter eval(Booster) (due to the last-name evaluation rules).



I am experimenting with creating help files for  my own package.

I have saved  a package overview file and one package command  file into a help data base as a test usingTools, Help Database, Save as Help Page.

These 2 help pages work in principle as i can find them when I search for them and the command  help page opens from the overview page. I now need to edit them. So I edit the original worksheets and use Tools, Help Database, Save as Help Page to update the data base.

Now Maple will not let me overwrite the original page.The Help file savy you can overwrite. So I have to delete the original page first then resave it back in. This involves reentering all the data again. Topic Alisies and Table of contents.

To say the least this is extremely tedious  vastly innefficient and very error prone. I will have upto say 40 help pages to edit and they will require some expirementing with.

Is there a better way to do this?


Hve added this line the the bottom of the worksheet

makehelp('`Rational Trigonometry`', "Rational Trigonometry Overview", " C:\Users\Ronan.Ronan-PC\maple\toolbox\UserHelp\lib\")

get     Error, (in readline) file or directory does not exist


1 2 3 4 5 6 7 Last Page 1 of 33