From: lynette on
how to create a mathematica package

From: Patrick Scheibe on

File -> New -> Package (.m) -> Go

Cheers
Patrick

PS: http://catb.org/esr/faqs/smart-questions.html

On Sat, 2010-07-10 at 04:01 -0400, lynette wrote:
> how to create a mathematica package
>


From: Vincent on
On Jul 10, 10:01 am, lynette <xiao...(a)gmail.com> wrote:
> how to create a mathematica package

If you have a cell with the Initialization Cell property (which you
set by going to the menu Cell> Cell Properties> Initialization cell)
then the first time you save the notebook it will ask if you want to
autogenerate a package. If you click yes, Mathematica will
automatically generate a .m package file (with the same name as the
notebook) containing all code which is set as initialization cells. If
you click no the first time, you can also go to Format>Option
inspector>notebook options>File options and set AutoGeneratedPackage
to true.

From: Nasser M. Abbasi on
On Jul 10, 1:01 am, lynette <xiao...(a)gmail.com> wrote:
> how to create a mathematica package

I wrote a small note on this.

http://12000.org/my_notes/how_to_write_package_in_mathematica/index.htm

If you find any errors, pls let me know and I'll correct it.

--Nasser

From: Bill Rowe on
On 7/19/10 at 2:10 AM, nma(a)12000.org (Nasser M. Abbasi) wrote:

>On Jul 10, 1:01 am, lynette <xiao...(a)gmail.com> wrote:
>>how to create a mathematica package

>I wrote a small note on this.

>http://12000.org/my_notes/how_to_write_package_in_mathematica/index.
>htm

>If you find any errors, pls let me know and I'll correct it.

There is a small typo in step 3.

Cell->Cell Propertoes s/b Cell->Cell Properties

Also, instead of making the cell an initialization cell, you
could do

Format->Style->Code

after selecting the cell (or perhaps better use the keyboard
short cut for this cell style). Then going to File->Save As and
selecting Mathematica package will create the desired package.
If you then later choose to save the original notebook, you will
get the same Auto Save dialog.