2.5.10 Configuration file
When you save changes to your configuration, they are stored in a
configuration file, which will be .xcasrc in
your home directory in Unix and xcas.rc in
Windows. This file will have four functions –
widget_size,
cas_setup,
xcas_mode and
xyztrange –
which determine the configuration and which are evaluated when
Xcas starts.
The widget_size command sets properties of the opening
Xcas window.
-
widget_size takes between 1 and 12 arguments. The arguments
(in order) are:
-
Font size.
- The first argument is a positive integer
specifying the font size. Optionally, this can be a bracketed list
whose first number indicates the font and the second the font size.
- Horizontal and vertical offset.
- The second and third
arguments are horizontal and vertical distances in pixels from the
upper left hand corner of the screen. They specify where the upper
left corner of the Xcas window is when it opens.
- Window size.
- The fourth and fifth arguments specify the width and height in
pixels of the Xcas window when it opens.
- Keyboard
- (see Section 2.2, item
2.2). The sixth argument is either 0 or 1; a 1 indicates
that the on-screen keyboard will be open when Xcas starts,
a 0 indicates that the keyboard will be hidden.
- Open browser.
- The seventh argument is either 0 or 1;
a 1 indicates that the browser will be automatically opened to
display help for the selected command in the menu or index, a 0
indicates that the browser will not be automatically opened.
- Message window
- (see Section 2.2, item 2.2).
The eighth argument is either 0 or 1;
a 1 indicates that Xcas will open with the message window,
a 0 indicates that Xcas will open without the message
window.
- <empty>.
- The ninth argument is currently not used.
- Browser name.
- The tenth argument is a string with the
name of the browser to use to read the help pages. A value of
"builtin" means that Xcas will use a small browser
built into Xcas.
- Starting level
- (see Section 2.1). The eleventh
argument indicates what level Xcas will start at; a 0
means command line, a 1 means program editor, a
2 means spreadsheet, and a 3 means a 2D geometry screen.
- Postscript previewer.
- The twelfth argument is a
string with the name of a program for postscript previews; for
example, "gv".
The cas_setup command determines how computations will be
performed.
-
cas_setup takes nine arguments. The arguments (in
order) are:
-
Approximate mode
- (see Section 2.5.4). A 1
means Xcas works in approximate mode, a 0 means exact mode.
- Complex variables
- (see Section 2.5.5). A 1
means Xcas works with complex variables, a 0 means real
variables.
- Complex mode
- (see Section 2.5.5).
A 1 means Xcas works with in complex mode, a 0 means real
mode.
- Radian
- (see Section 2.5.3). A 1 means work in
radians, a 0 means work in degrees.
- Display format
- (see Section 2.5.7, item
2.5.7). A 0 means use the standard format to display
numbers, a 1 means use scientific format, a 2 means use engineering
format, and a 3 means use floating hexadecimal format (which is
standardized with a non-zero first digit).
- Epsilon
- (see Section 2.5.7, item
2.5.7). This is the value of epsilon used
by Xcas.
- Digits.
- This is the number of digits to use to
display a float.
- Tasks.
- This will be used in the future for
parallelism.
- Increasing power.
- This is 0 to display polynomials
in increasing power, and 1 to display polynomials in decreasing powers.
The xcas_mode command sets the computer language used by
Xcas (see Section 2.5.2).
The xyztrange command sets or returns the values of the
graphics configuration.