Initialization Files - Maple Help

Home : Support : Online Help : Configure Maple : Initialization Files

Create Maple Initialization File

 By creating an initialization file, you can set up Maple to automatically execute a series of commands on startup and after every restart. This is useful for setting Maple global variables such as Digits and Order.
 The initialization file is an ASCII text file that contains the commands in Maple syntax.
 It is recommended that you use a colon to end the commands so that the output is not printed in the worksheet on startup.
 In multiple user environments, one initialization file can be defined for all users, and users can also have their own initialization file. The specific name and location of this file varies depending on the operating system.
 Alternatively, you can enter Maple commands into the StartupCode region of a file or set a default User Profile. You can also designate regions in a worksheet for automatic execution.  For more information on automatic execution, see Setting the Autoexecute Feature.

Windows

 Under Windows, the initialization file is called maple.ini.
 If \lib\maple.ini exists, it is loaded first (where  is your Maple installation directory). With a network installation of Maple, the commands in this initialization file will be executed by all users on the network.
 To execute a user's personal set of commands, only the first initialization file in one of the following paths will be loaded.
 1) The current working directory (for example, "C:\Program_Files\Maple\maple.ini"). See currentdir.
 2) The \Users directory (for example, "C:\Program_Files\Maple\Users\maple.ini")
 3) The user's personal profile directory (multiuser only) (for example, "C:\Users\userid\maple.ini")
 Maple reads and executes the network initialization file before the personal initialization file.

Changing the Location of the Initialization File

 By default, the location of the maple.ini file is C:\Users\\AppData\Roaming\Maple\. If you want to change the file location do the following:
 1 Go to the \bin. directory, where is your Maple installation directory and is your Windows platform. For example, X86_64_WINDOWS.
 2 Open the file maplelauncher.l4j.ini.
 3 Uncomment the second line # -Dmaple.user.home="C:Temp" and change C:\Temp to the directory you want to store the .ini file in.

Mac

 Under Mac, the personal initialization file is called .mapleinit, and the global initialization file is called init. The commands in the global initialization file will be executed by all users on the network. To use such a file, create a file called init and save it in the lib directory of your Maple installation, that is, $MAPLE/lib/init, where$MAPLE is the directory of your Maple installation. (You can query the directory of your Maple installation using kernelopts(mapledir).)
 To execute a user's personal set of commands, the initialization file should be placed in the user's home directory under Mac, for example, $HOME/.mapleinit.  Maple reads and executes the network initialization file before the personal initialization file. Linux  Under Linux, the personal initialization file is called .mapleinit, and the global initialization file is called init. The commands in the global initialization file will be executed by all users on the network by placing the file in the Maple lib directory, for example,$MAPLE/lib/init.
 To execute a user's personal set of commands, the initialization file should be placed in the user's home directory under Linux, for example, \$HOME/.mapleinit.
 Maple reads and executes the network initialization file before the personal initialization file.