DefaultDirectory , PrettyPrinter , Help , HistorySize .

Startup configuration

Yacas allows you to configure a few things at startup. The file ~/.yacasrc is written in the Yacas language and will be executed when Yacas is run. The following functions can be useful in the ~/.yacasrc file.

DefaultDirectory add directory to path for Yacas scripts
PrettyPrinter set routine to use as pretty-printer
Help get documentation for some command
HistorySize set size of history file


DefaultDirectory -- add directory to path for Yacas scripts

Internal function
Calling format:
DefaultDirectory(path)

Parameters:
path -- a string containing a full path where yacas script files reside

Description:
When loading files, yacas is also allowed to look in the folder "path". path will be prepended to the file name before trying to load the file. This means that "path" should end with a forward slash (under Unix-like operating systems).

Yacas first tries to load a file from the current directory, and otherwise it tries to load from directories defined with this function, in the order they are defined. Note there will be at least one directory specified at start-up time, defined during compilation. This is the directory Yacas searches for the initialization scripts and standard scripts.

Examples:
In> DefaultDirectory("/home/user/myscripts/");
Out> True;

See also:
Load , Use , DefLoad , FindFile .


PrettyPrinter -- set routine to use as pretty-printer

Standard library
Calling format:
PrettyPrinter(printer)

Parameters:
printer -- a string containing the name of a function that can "pretty-print" an expression

Description:
This function sets up the function printer to print out the results on the command line. This can be reset to the internal printer with PrettyPrinter().

Currently implemented prettyprinters are: PrettyForm, TeXForm, Print and DefaultPrint.

Examples:
In> Taylor(x,0,5)Sin(x)
Out> x-x^3/6+x^5/120;
In> PrettyPrinter("PrettyForm");

True

In> Taylor(x,0,5)Sin(x)

     3    5
    x    x
x - -- + ---
    6    120

In> PrettyPrinter();
Out> True;
In> Taylor(x,0,5)Sin(x)
Out> x-x^3/6+x^5/120;

See also:
PrettyForm , Write .*CMD MaxEvalDepth -- set depth of recursion stack
Internal function
Calling format:
MaxEvalDepth(n)
Parameters:
n -- integer
Description:
Sets the maximum depth of recursive function call. An error message is printed when too many recursive calls are executed, and this function can be used to increase or decrease the limit as necessary.


Help -- get documentation for some command

Standard library
Calling format:
Help()
Help(function)

Parameters:
function -- a string containing the name of a function to show help for

Description:
When help is requested by the user, by typing ?function or ??, the functions Help() (for ??) and Help(function) (for ?function) are called. By default, lynx is used as a browser (another recommended text-only browser is links). The help resides in the subdirectory documentation/ under the directory the math scripts were installed in. So the help files can be found using FindFile.

The function Help is auxiliary and should not be used to actually get online help.

Examples:
To use netscape for browsing help, enter the following commands:

Help(_f) <-- SystemCall("netscape " :
  FindFile("documentation/ref.html"):"#":f);
Help() := SystemCall("netscape " :
  FindFile("documentation/books.html"));

See also:
SystemCall , FindFile .


HistorySize -- set size of history file

Internal function
Calling format:
HistorySize(n)

Parameters:
n -- number of lines to store in history file

Description:
When exiting, yacas saves the command line history to a file ~/.yacas_history. By default it will only save the last 50 lines, to save space on the hard disk. This can be overridden with this function. Passing -1 tells the system to save all lines.

Examples:
In> HistorySize(200)
Out> True;
In> quit