About this site

This site is the home of imaxima and imath, Emacs extension programs for Maxima Computer Algebra System.

You can find the latest release package, how to install, examples of both imaxima and imath here.

Tutorial of imaxima

This is a tutorial that explains how to use Imaxima. Assumption is that all the software necessary for Imaxima are installed correctly. Then, you can use Imaxima equally on all the platforms such as Windows, Mac OS X, Linux, and so on.

Start up and normal use

First, you need to start emacs. Then, M-x imaxima [ret] starts the Imaxima.

This command creates a buffer named "*imaxima*", in which maxima is running, displaying the standard splash text and a prompt waiting for input. You can type any ordinary Maxima commands. For instance, the integration of a unknown function returns the noun form of integration.


Changing appearance of the output

You can change the size of the fonts to be used by LaTeX by changing the value of the variable imaxima-fnt-size. Type of the value is string. Values such as "normalsize", "large", and "Large", can be assigned and the results are:


You can type:

(setq imaxima-fnt-size "Large") [ctrl-j]

in the *scratch* buffer to set the value "Large" to the variable. The effect takes place just after evaluating the above expression. If you want the effect to remain forever, the expression (setq imaxima-fnt-size "Large") can be put into .emacs which is used to customize GNU Emacs. See the next picture for how to do them.

There are several other options that are used to change the appearance of the output. See imaxima manual for more details.


Control of the style of output

Maxima has a special variable display2d to control the style of the output. This variable can be set three possible values: true, false, and imaxima. When the value imaxima is set, the imaxima rendering of the output is enabled. When true or false is set, imaxima rendering is disabled. Then if the value is true, the ascii character based 2d formula output is used. If the value is false, function style linear output is used.


Please note that this change should be done within Maxima, not as an Emacs command.


Editing the input

In *imaxima* buffer, you can do most of the same operations that you can do in *shell* buffer. Here are some examples of such operations that are convenient (for me at least).

M-p (or Esc-p): Previous input is displayed after the last prompt. Repeated M-p will go back to the history of input and shows them after the last prompt.

C-a: This moves the cursor to just after the prompt.

C-e: This moves the cursor to the end of line.


Combined use with Maxima mode

Maxima.el provided in the Maxima source distribution enables you more commands than imaxima.el. So, imaxima is designed to work with maxima.el.

As for the preparation, you should put

(setq imaxima-use-maxima-mode-flag t)

in .emacs file and restart your emacs.


In this setting, *maxima* buffer is created instead of *imaxima* buffer. In the buffer, you can do all the things imaxima provides to you. In addition, you can use more commands that are provided by maxima.el. One of such commands which are convenient is:

M-tab: This expands the partially input maxima symbol as much as possible for command symbol completion.


Publishing the session buffer contents into different formats

The contents of *imaxima* buffer (or *maxima* buffer when value of imaxima-use-maxima-mode-flag is t) can be translated into various formats.

imaxima-latex can be used to translate *imaxima* buffer into LaTeX format. *imaxima-latex* buffer is created and the LaTeX document are inserted to the *imaxima-latex* buffer. You can save this buffer with more appropriate name and process the file with the latex command to obtain a dvi file.

imaxima-print-buffer can be used to print the *imaxima* buffer. With the appropriate set up of the variable imaxima-print-tex-command, imaxima-print-buffer can be used to generate PDF file from the *imaxima* buffer contents.

(setq imaxima-print-tex-command "latex %s; dvipdf %s.dvi imax.pdf; open imax.pdf")

will generate a PDF file and open it. The 'open' command is available only on Mac OS X, so you might just remove that part from the above example and place printing command on your system instead.

imaxima-to-html generates HTML from the *imaxima* buffer. All the image files generated as rendered formulas are reused in the HTML. Following is an example output in HTML.

Tutorial of imaxima - Session example