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 preferences directory and the Configuration directory within the main Mathematica directory. Within each directory are several possible subdirectories with titles such as FrontEnd, Kernel, and Licensing.
Mathematica will first use files that are in the preferences directory and then use files that are in the general Configuration directory. This allows sitewide configuration information to be stored in the Configuration directory (see below).
You can set the environment variable MATHEMATICA_PREFERENCES to define where preferences should be stored. In all cases, Mathematica refers to the location for preferences as $UserBaseDirectory. In the following documentation, replace this variable with the appropriate directory for your system.
The file FrontEnd/init.m stores preferences for the front end. The Option Inspector lists two paths that are searched for this file: ConfigurationPath and PreferencesPath. Any init.m file 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 in the directory $UserBaseDirectory/FrontEnd/Caches (on Unix, $UserBaseDirectory/FrontEnd/5.0_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.
On Windows 2000 and XP, the caches are in C:\Documents and Settings\username\Local Settings\Application Data\Mathematica\FrontEnd\5.0 Caches.
The file Kernel/init.m stores preferences for the kernel. Two files are read on startup: Configuration/Kernel/init.m and the first init.m file located on $Path.
Any subdirectory in $BaseDirectory/Autoload or $UserAddOnDirectory/Autoload may contain a file called Kernel/init.m. If such a file exists, it is loaded automatically when the kernel is started.
The Configuration subdirectory of the main Mathematica directory allows you to set up systemwide defaults for both the front end and kernel. 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. Examples of front end changes are palettes listed in File Palettes or changes to new untitled notebooks.
2. Quit Mathematica.
3. Go to the $UserBaseDirectory/FrontEnd directory, and copy the file init.m to Configuration/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:
Edit the file Configuration/Kernel/init.m and add any Mathematica commands that should be evaluated at startup. You may edit this file with Mathematica, but you must save it using File Save As Special Package Format. When editing init.m in Mathematica, each command to be evaluated must be within the existing initialization cell.
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.
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:
They 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 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.
Products from the Applications Library should be installed in $BaseDirectory/Applications or $UserBaseDirectory/Applications.
Applications installed into $BaseDirectory will be available to all users, while applications installed into $UserBaseDirectory will only be available to the specified user. See Add-ons & Links 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 Working With Add-ons in the Help Browser.
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.