<?xml version="1.0" encoding="utf-8" ?> <!-- for emacs: -*- coding: utf-8 -*- --> <!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>initialization file</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_input.html">next</a> | <a href="_autoload_lp__Symbol_cm__String_rp.html">previous</a> | <a href="_input.html">forward</a> | <a href="_autoload_lp__Symbol_cm__String_rp.html">backward</a> | <a href="_system_spfacilities.html">up</a> | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div> </td> </tr> </table> <div><a href="index.html" title="">Macaulay2Doc</a> > <a href="___The_sp__Macaulay2_splanguage.html" title="">The Macaulay2 language</a> > <a href="_system_spfacilities.html" title="">system facilities</a> > <a href="_initialization_spfile.html" title="">initialization file</a></div> <hr/> <div><h1>initialization file</h1> <div>The file <tt>init.m2</tt> is loaded automatically when the program is started, if it exists.<p>On most systems the file is sought in the directory <tt>$HOME/.Macaulay2/</tt>, where <tt>$HOME</tt> is replaced by the path to the user's home directory.</p> <p>Under Mac OS X, the file is sought instead in the directory <tt>$HOME/Library/Application Support/Macaulay2/</tt>.</p> <p>If the user wants a file called, say, <tt>start.m2</tt> in the current directory to be loaded automatically when the program is started, then the following line of code can be placed in the file <tt>init.m2</tt>.</p> <pre>if fileExists "start.m2" then load(currentDirectory()|"start.m2")</pre> <p>Warning: former versions of the program would also load a file named <tt>init.m2</tt> found in the current directory.</p> </div> </div> </body> </html>