Skip to content
Parlazo edited this page Apr 16, 2021 · 1 revision

Much of wxMaxima is self-explaining, but some details require attention. This site contains a number of workbooks that address various aspects of wxMaxima https://wxmaxima-developers.github.io/wxmaxima/help.html Working through some of these (particularly the “10 minute (wx)Maxima tutorial”) will increase one’s familiarity with both the content of Maxima and the use of wxMaxima to interact with Maxima. This manual concentrates on describing aspects of wxMaxima that are not likely to be self-evident and that might not be covered in the online material.

Workbook

One of the very few things that are not standard in wxMaxima is that it organizes the data for Maxima into cells that are evaluated (which means: sent to Maxima) only when the user requests this. When a cell is evaluated, all commands in that cell, and only that cell, are evaluated as a batch. (The preceding statement is not quite accurate: One can select a set of adjacent cells and evaluate them together. Also, one can instruct Maxima to evaluate all cells in a workbook in one pass.) wxMaxima’s approach to submitting commands for execution might feel unfamiliar at the first sight. It does, however, drastically ease work with big documents (where the user does not want every change to automatically trigger a full re-evaluation of the whole document). Also, this approach is very handy for debugging.

If text is typed into wxMaxima it automatically creates a new worksheet cell. The type of this cell can be selected in the toolbar. If a code cell is created the cell can be sent to Maxima, which causes the result of the calculation to be displayed below the code. A pair of such commands is shown below.

Mathematical input/output cell

On evaluation of an input cell’s contents the input cell Maxima assigns a label to the input (by default shown in red and recognizable by the %i) by which it can be referenced later in the wxMaxima session. The output that Maxima generates also gets a label that begins with %o and by default is hidden, except if the user assigns the output a name. In this case by default the user-defined label is displayed. The %o-style label Maxima auto-generates will also be accessible, though.

Besides the input cells wxMaxima allows for text cells for documentation, image cells, title cells, chapter cells and section cells. Every cell has its own undo buffer so debugging by changing the values of several cells and then gradually reverting the unneeded changes is rather easy. Furthermore the worksheet itself has a global undo buffer that can undo cell edits, adds and deletes.

The figure below shows different cell types (title cells, section cells, subsection cells, text cells, input/output cells and image cells).

Example of different wxMaxima cells

Cells

The worksheet is organized in cells. Each cell can contain other cells or the following types of content.

  • A title, section or a subsection.
  • A text block that can for example be used for documentation.
  • One or more lines of Maxima input.
  • Output of, or a question from, Maxima.
  • One or more images.

The default behavior of wxMaxima when text is entered is to automatically create a math cell. Cells of other types can be created using the Cell menu, using the hot keys shown in the menu or using the drop-down list in the toolbar. Once the non-math cell is created, whatever is typed into the file is interpreted as text.

Additional comment text can be entered into a math cell if bracketed as follows:

/* This comment will not be sent to Maxima for evaluation. */
/*
    This comment will not be sent
    to Maxima for evaluation.
*/

Horizontal and vertical cursors

If the user tries to select a complete sentence a word processor will try to extend the selection to automatically begin and end with a word boundary. Likewise wxMaxima if more than one cell is selected will extend the selection to whole cells.

What isn’t standard is that wxMaxima provides drag-and-drop flexibility by defining two types of cursors. wxMaxima will switch between them automatically when needed:

  • The cursor is drawn horizontally if it is moved in the space between two cells or by clicking there.
  • A vertical cursor that works inside a cell. This cursor is activated by moving the cursor inside a cell using the mouse pointer or the cursor keys and works much like the cursor in a text editor.

Sending cells to Maxima

The command in a code cell are executed once CTRL+ENTER, SHIFT+ENTER or the ENTER key on the keypad is pressed. The wxMaxima default is to enter commands when either CTRL+ENTER or SHIFT+ENTER is entered, but wxMaxima can be configured to execute commands in response to ENTER.

Command autocompletion

wxMaxima contains an autocompletion feature that is triggered via the menu (Cell/Complete Word) or alternatively by pressing the key combination CTRL+SPACE. The autocompletion is context-sensitive. For example if activated within an unit specification for ezUnits it will offer a list of applicable units.

ezUnits

Besides completing a file name, a unit name or the current command’s or variable’s name the autocompletion is able to show a template for most of the commands indicating the type (and meaning) of the parameters this program expects. To activate this feature press SHIFT+CTRL+SPACE or select the respective menu item (Cell/Show Template).

Clone this wiki locally