Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
Mathematica Technical FAQs Services & Resources / Mathematica / Packages
-----
 /
Writing
*Mathematica
*Network Mathematica
*webMathematica
*gridMathematica
*Personal Grid Edition
*Wolfram Workbench
*Wolfram Education Group
*Application Packages
*Mathematica for Students
*Mathematica CalcCenter
*Publicon
*A New Kind of Science Explorer
*Mathematical Explorer
*Mathematica Teacher's Edition
*Calculus WIZ
*Mathematica Player
*Ask about this page
*Print this page
*Email this page
*Give us feedback
*
Sign up for our newsletter:

How do I write a package?

There are three main ways to create packages.

1.

ASCII/Text editor

 

Packages are ASCII/Text files that contain InputForm Mathematica commands. Comments can be included inside (* and *).

2.

Mathematica menu command File > Save As Special > Package Format

 

This saves a notebook as a package. All input cells that are initialization cells will be included in the package. All other cells will be saved as comments. You can set the Initialization Cell property for a cell with the following menu command.

 

Cell > Cell Properties > Initialization Cell

 

You can also use the Option Inspector, which can be accessed via Format > Option Inspector. Please see the following FAQ for more information about the Option Inspector.

 

http://support.wolfram.com/mathematica/interface/options/inspector.html

 

You can set the option in the Option Inspector by selecting the following menu command.

 

Cell Options > Evaluation Options > Initialization Cell > True

3.

AutoSave package

 

When saving a notebook with initialization cells, Mathematica may ask if you want to create an AutoSave package, depending on the settings of the following two options.

 

Notebook Options > Evaluation Options > InitializationCellWarning

 

Notebook Options > Evaluation Options > InitializationCellEvaluation

 

If an AutoSave package is created, all initialization cells are saved in the package. All other cells are omitted. A special header is also added at the beginning of the package.

Download this FAQ as a Mathematica 5.2 Notebook






 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy | [ja] [kr]