# How to load a custom mathematica package from a .m file?

I would like to load the package groebner50.m which is available through the website of David A. Cox. It's supposed to contain some useful tools for commutative algebra, but I haven't been able to get it working.

I tried to follow the instructions from the webpage to save the file as groebner50.m, but I was only allowed to save it with a .wl file extension. I tried running "groebner50.wl" on the Mathematica workspace, but that didn't appear to do anything either.

What I really need is a step-by-step guide for saving the package from the URL above and making the commands within it usable. Can anyone provide some guidance on how to access the functions and code in this package?

These are the steps I did:

1) Go to the link you posted, RIGHT-CLICK on the link of the file groebner50.m and do SAVE-AS and save it to some folder. Say c:\tmp\groebner50.m

2) Open Mathematica, open new notebook, then save the notebook to the same folder i.e. to c:\tmp\

3) Now type

  SetDirectory[NotebookDirectory[]];
<< groebner50.m


4) That is all. Now type any command in the package such as ?AltBuchberger

This package does not seem to be well documented/written. A package should always lists its commands when doing

 ?groebner50*


But the above does not. I had to open it in text editor to find the commands it had. Just use notepad.exe or any text editor to look at the file (it is plain text file) and you'll see list of commands in it there).

• Sorry that this is frustrating, but I still can't get it to work; this is the image I have from my desktop: tinypic.com/r/rhlppz/8 – daOnlyBG Nov 3 '14 at 7:20
• @daOnlyBG The image you show above !Mathematica graphics indicates you hit "=" before. Do not use the "=" to type the commands. This will send the commands to the Wolfram alpha server on the Wolfram Cloud. Just type SetDirectory[NotebookDirectory[]];` as is without hitting "=" before it. Make sure again you have saved the notebook to the same folder as the package. Do not use the Wolfram Cloud functionality. – Nasser Nov 3 '14 at 7:30
• May I converse with you in chat? – daOnlyBG Nov 3 '14 at 7:45
• Seriously @daOnlyBG, I hope you have not been working with Mathematica through the = command all the time, have you? – Sjoerd C. de Vries Nov 3 '14 at 12:16
• @SjoerdC.deVries, yes, I have. Again, I am a beginner with this software. Nasser was kind enough to point me in the right direction- thanks again, Nasser! – daOnlyBG Nov 4 '14 at 1:10