Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

File Layout

For general technical information on the Mathematica kernel or front end, please refer to The Mathematica Book.

Initialization files and resources

Initialization files are stored in two directories: the systemwide base directory and the user-specific preferences directory. Within each of these directories are several possible subdirectories with titles such as FrontEnd, Kernel, and Licensing.

Mathematica will first load settings from files in the base directory and then load settings from files in the preferences directory. This allows systemwide configuration information to be stored in the base directory (see below).

PlatformBase directory
Windows 98, MeC:\Windows\All Users\Application Data\Mathematica
Windows NTC:\WINNT\Profiles\All Users\Application Data\Mathematica
Windows 2000, XPC:\Documents and Settings\All Users\Application Data\Mathematica
Mac OS X/Library/Mathematica
Unix and Linux/usr/share/Mathematica

To set the location of the base directory, you can set the environment variable MATHEMATICA_BASE. In all cases, Mathematica refers to the location of the base directory as $BaseDirectory.

PlatformPreferences directory
Windows 98, MeC:\Windows\Application Data\Mathematica
Windows NTC:\WINNT\Profiles\username\Application Data\Mathematica
Windows 2000, XPC:\Documents and Settings\username\Application Data\Mathematica
Mac OS X~/Library/Mathematica
Unix and Linux ~/.Mathematica

To define where preferences should be stored, you can set the environment variable MATHEMATICA_USERBASE. In all cases, Mathematica refers to the location for preferences as $UserBaseDirectory.

In the following documentation, replace the variables $BaseDirectory and $UserBaseDirectory with the appropriate directories for your system.

Front end

The file FrontEnd/init.m stores preferences for the front end. The Option Inspector lists two paths that are searched to find this file: ConfigurationPath and PreferencesPath. Any init.m file found on either path is read. If a setting is listed in more than one file, the most recent setting from the last init.m file read is used.

In addition, any directory in the $BaseDirectory/Autoload or $UserBaseDirectory/Autoload directories may contain a file called FrontEnd/init.m. If such a file exists, it is loaded automatically.

Caches store the locations and names of all system and text resources used by the front end. If the caches are missing, they are rebuilt automatically when the front end is started.

PlatformLocation of caches
Windows 98, Me, NTC:\Windows\Local Settings\Application Data\Mathematica\FrontEnd\5.1 Caches
Windows 2000, XPC:\Documents and Settings\username\Local Settings\Application Data\Mathematica\FrontEnd\5.1 Caches
Mac OS X~/Library/Mathematica/FrontEnd/5.1 Caches
Unix and Linux~/.Mathematica/FrontEnd/5.1_Caches

Kernel

The file Kernel/init.m stores preferences for the kernel. Two files are read on startup: $BaseDirectory/Kernel/init.m and $UserBaseDirectory/Kernel/init.m.

Any subdirectory in $BaseDirectory/Autoload or $UserBaseDirectory/Autoload may contain a file called Kernel/init.m. If such a file exists, it is loaded automatically when the kernel is started.

Systemwide defaults

You can set up systemwide defaults for both the front end and kernel by creating init.m files in subdirectories of $BaseDirectory. This is ideal for setting up Mathematica for use in computer labs and classrooms.

To set up a configuration file for the front end:

  1. On one machine, set up any changes to the front end that you need in Mathematica. An example of a front end change is changing the default open palettes.
  2. Quit Mathematica.
  3. Go to the $UserBaseDirectory/FrontEnd directory, and copy the file init.m to $BaseDirectory/FrontEnd.

These preferences will now be used with the front end unless overridden by the local init.m file stored in $UserBaseDirectory/FrontEnd.

To set up a configuration file for the kernel:

Launch Mathematica, and create a new file. Add any Mathematica commands that should be evaluated at startup. Enter all the commands in the same cell, separating commands with semicolons. Make this cell an initialization cell by selecting the cell bracket and then choosing Cell RightTriangle Cell Properties RightTriangle Initialization Cell. Using File RightTriangle Save As Special RightTriangle Package Format, save the file as $BaseDirectory/Kernel/init.m.

Fonts

Several fonts with names such as "Mathematica1", "Mathematica1Bold", "Mathematica2", and "Mathematica2Bold" are installed when you install Mathematica. You do not need to know which font a particular character is from in order to use it; this is handled automatically by Mathematica.

On Mac OS X, after you run the front end for the first time, the fonts will be available to any program on your system.

Some printers allow you to download fonts for faster printing. You may be able to do this from the Properties dialog box for your printer.

Documentation

The notebooks used by the Help Browser are stored in Mathematica's Documentation directory in a language subdirectory, such as English or Japanese. The notebooks are split into categories that are presented as buttons in the browser.

Other documentation files can be stored in any of the following directories:

  • $BaseDirectory/Applications
  • $BaseDirectory/Autoload
  • $UserBaseDirectory/Applications
  • $UserBaseDirectory/Autoload
  • Documentation files must be stored in a Documentation/language directory. When the front end is started, each subdirectory is searched for a file called BrowserCategories.m, which defines the categories and notebooks.

    Application package locations

    Standard packages

    Standard application packages are installed in $InstallationDirectory/AddOns/StandardPackages. The standard packages are subdivided by topic, so that within the StandardPackages directory are directories with names such as Algebra, Calculus, and NumericalMath.

    Application packages

    Products from the Mathematica Applications Library should be installed in $BaseDirectory/Applications or $UserBaseDirectory/Applications.

    Applications installed in $BaseDirectory will be available to all users, while applications installed in $UserBaseDirectory will only be available to the specified user. See Add-ons & Links RightTriangle Working with Add-ons in the Help Browser for more information.

    The Autoload subdirectory

    Application packages installed in $BaseDirectory/Autoload and $UserBaseDirectory/Autoload will be loaded automatically when you start Mathematica. To autoload a standard application package, copy the entire directory, such as AddOns/StandardPackages/Algebra, to the $BaseDirectory/Autoload or $UserBaseDirectory/Autoload directory.

    Any init.m file located in any directory within Autoload is loaded automatically by the front end.

    For more information about installing application packages, see Add-ons & Links RightTriangle Working with Add-ons in the Help Browser.

    MathLink

    On Windows, the transport mechanisms available when using MathLink are TCP, TCP/IP, SharedMemory, and Filemap. The Filemap mechanism is used for linking programs that are running on the same machine.

    On Macintosh, the transport mechanisms available when using MathLink are TCP, TCP/IP, and pipes.


    Any questions about topics on this page? Click here to get an individual response.Buy NowFree TrialMore Information



     © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
    Sign up for our newsletter: