\input texinfo
@setfilename  wxmaxima.info
@finalout

@c -*-texinfo-*-

@c 
@c (C) 2014-2015 Gunter Königsmann <wxMaxima@physikbuch.de>
@c Based on a file from the maxima sources that was created from
@c Jim Van Zandt <jrv@vanzandt.mv.com>

@c to update the menus do: 
@c (texinfo-multiple-files-update "wxMaxima.texi" t t)
@c
@c texinfo-multiple-files-update will delete the detailed node listing!


@c %**start of header
@settitle wxMaxima Manual

@c @synindex ky fn
@c @synindex vr fn
@c @synindex cp fn

@c %**end of header
@ifinfo
This is a Texinfo wxMaxima manual based on the maxima
manual which is Copyright 1994,2001 William F. Schelter.

The original version if the wxMaxima manual was written in
2014 by Gunter Königsmann.

@format
INFO-DIR-SECTION Math
START-INFO-DIR-ENTRY
* wxMaxima: (wxMaxima).     A gui for a computer algebra system.
END-INFO-DIR-ENTRY
@end format

@macro var {expr}
<\expr\>
@end macro
@end ifinfo

@iftex
@titlepage
@sp 10
@comment The title is printed in a large font.
@center @titlefont{wxMaxima Manual}
@page
@vskip 0pt plus 1filll
Maxima is a computer algebra system that is actively developed and is
sucessfully used in a variety of applications like maths, computer
science and biochemistry.

wxMaxima is a graphical user interface that allows to use all of
maxima's functions providing convenient wizards for accessing the most
commonly used of them.
@end titlepage
@end iftex

@ifnottex
@node top
@top The wxMaxima user's manual
wxMaxima is a graphical user interface that allows to use all of
maxima's functions providing convenient wizards for accessing the most
commonly used of them. This manual attempts to describe the unique
features that make this program one of the most popular GUIs for
maxima.
@end ifnottex
@ifnotinfo

@image{wxMaximaLogo,4cm}

@end ifnotinfo
@ifnottex
@menu
* Introduction::    wxMaxima basics
* Extensions::      The commands wxMaxima adds to maxima
* Troubleshooting:: What to do if wxMaxima doesn't work as expected
* FAQ::             Frequently asked questions
* CommandLine::     The command-line arguments wxMaxima supports
@end menu
@end ifnottex
@node Introduction
@chapter Introduction to wxMaxima
@section Maxima and wxMaxima
In the open-source domain big systems are normally split into smaller
projects that are easier to handle for small groups of developers.
For example a CD burner program will consist of a command-line tool
that actually burns the CD and a graphical user interface that allows
the user to use it without having to learn about all the command-line
switches and in fact without using the commandline at all. One
advantage of this approach is that the developing work that
was invested into the command-line program can be shared by many
programs without having to re-invent the wheel: The same cd-burner
command-line program can be used as a ``send-to-cd''-plug-in for a
file manager application, for the ``burn to CD'' function of a music
player and as the CD writer for a DVD backup tool. Another advantage
is that splitting one big task into smaller parts allows to provide
several user interfaces for the same program: A computer algebra
system could be be the logic behind a arbitrary precision calculator
application, it can do automatic transforms of formulas in the
background of a bigger system (e.G.
@uref{http://www.sagemath.org,  Sage}) or actually used as a full-fledged
computer algebra system (which is the case with wxMaxima).
@subsection Maxima
@cindex CAS
@cindex Computer algebra System
Maxima is a full-featured computer algebra system (CAS). In other
words it is a program specialized in solving mathematical problems by
rearranging formulas and finding a formula solving the problem as
opposed to just outputting the numeric value of the result.  

@ifnotinfo

@image{maxima_screenshot,6cm}

@end ifnotinfo
There is extensive documentation for maxima available in the internet
part of which can be found in wxMaxima's help menu. To make access to
the documentation easier if the @key{Help} key is pressed (on most systems
that would be the @key{F1} key) wxmaxima's context-sensitive help feature
will automatically jump to maxima's manual page for the command at the
cursor.
@subsection wxMaxima
wxMaxima is a graphical user interface that provides the full
functionality and flexibility of maxima providing the user with a
graphical display and many features that make working with maxima
easier. For example wxMaxima allows to export any cell's contents (or,
if that is needed, any part of a formula, as well) as text, as LaTeX
or as MathML specification at a simple right-click.

@ifnotinfo

@image{wxMaximaWindow,12cm}

@end ifnotinfo
The calculations itself are done by the maxima command-line
tool in the background.
@section  Worksheet basics
Most of wxMaxima should be self-explaining. Therefore this manual will
concentrate on describing facts that won't need more time to read about
than to be actually explored.
@subsection The worksheet approach
One of the very few things that aren't standar ist that wxMaxima
organizes the data for maxima in cells that are only evaluated (which
means: sent to maxima) when the user requests this. This approach might
feel unfamiliar at the first sight. But it drastically eases work with
big documents (where the user certainly doesn't want every small change
to automatically to trigger a full re-evaluation of the whole
document) and is very handy for debugging. 

The cells wxMaxima automatically creates on typing some text are maxima
input cells that will eventually be sent to maxima.
@ifnotinfo

@image{InputCell,12cm}

@end ifnotinfo

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 @code{%i}) by which it can be referenced lateron. The output
maxima generates will be shown in a different style and preceded by maxima
by a label beginning with @code{%o}.

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

@ifnotinfo

@image{NoiseFilter,12cm}

@end ifnotinfo
@subsection Cells
The worksheet is organized in cells that work like very much like the
styles word processors offer. Each cell can contain one of the following
types of content:
@itemize @bullet
@item one or more lines of maxima input
@item an image
@item a title, section or a subsection
@item Output of or a question from maxima 
@item normal a text block that can for example used for explaining the meaning
      of the math cell's contents.
@end itemize
By default behavior of wxMaxima if text is input is to automatically
create a math cell. Cells of other types can be created
using the Cell menu or using the hotkeys shown there. 
@subsection Horizontal and vertical cursors
While it sometimes is both desirable to allow selecting multiple cells or
only part of a cell for export or Drag-and-Drop beginning such an action
in the middle of one cell and ending it in the middle of another will
most certainly lead to unexpected results.

wxMaxima works around this by defining two types of cursors wxMaxima
will switch between automatically when needed:
@itemize @bullet
@item A vertical cursor that is able to select any number of whole
      cells. This cursor is activated by moving the cursor between
      two cells or by clicking on a space between two cells.
@item And 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.
@end itemize 
As long as the cursor is inside a cell search operations will limit
ther scope to the current cell.
@subsection Command autocompletion
wxMaxima contains an autocompletion feature that is triggered via the menu
(Cell/Complete Word) or alternatively by pressing the key combination
@key{Ctrl}+@key{k}. The autocompletion is context-sensitive and if activated
within an unit specification for ezUnits it will offer a list of applicable
units.

@ifnotinfo

@image{ezUnits,12cm}

@end ifnotinfo
Besides completing 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
@key{Shift}+@key{Ctrl}+@key{k} or select the respective menu item
(Cell/Show Template).

@subsection Greek characters
Computers traditionally store characters in 8-bit values: This allows
for a maximum of 256 different characters and all letters, numbers,
and control symbols (end of transmission, end of string, lines and
edges for drawing rectangles for menus etc.) of nearly any given
language fit there.

For most countries the codepage of 256 characters that has been chosen
doesn't include greek letters, though. To overcome this limitation
unicode has been invented: A method of including characters that
aren't normally used in the english language in a text that
(as long as only the basic form of latin characters is used)
looks like plain 8-bit ASCII.

Maxima allows for unicode characters if it runs on a lisp that
supports them and if the wxWidgets library wxMaxima is built on
supports unicode characters, too, wxMaxima can be built with unicode
support. In this case it provides a method of entering greek
characters:
@itemize @bullet
@item An alpha is entered by pressing the <ESC> key and then typing in
      the character a followed by a press on the <ESC> key.
@item A beta is entered by pressing the <ESC> key and then typing in
      the character b followed by a press on the <ESC> key.
@item A gamma is entered by pressing the <ESC> key and then typing in
      the character c followed by a press on the <ESC> key.
@item ...and so on.
@end itemize 
If the system does not provide unicode support wxMaxima will still
provide a method of showing greek characters: Variable names like
``alpha'' are always displayed as the corresponding greek symbols.

The lowercase greek letters actually can be entered both by enter
a lating letter or the whole latin name of the greek letter
followed and preceded by a press of the escape key:
@example
a alpha    i iota      r rho
b beta     k kappa     s sigma
g gamma    l lambda    t tau
d delta    m mu        u upsilon
e epsilon  n nu        f phi
z zeta     x xi        c chi
h eta      om omicron  y psi
q theta    p pi        o omega
@end example

The same is tue for the uppercase greek letters:
@example
A Alpha    I Iota      R Rho
B Beta     K Kappa     S Sigma
G Gamma    L Lambda    T Tau
D Delta    M Mu        U Upsilon
E Epsilon  N Nu        P Phi
Z Zeta     X Xi        C Chi
H Eta      Om Omicron  Y Psi
T Theta    P Pi        O Omega
@end example

This mechanism also allows to enter some miscellaneous mathematical
symbols:
@example
2             squared
3             to the power of three
/2            1/2
sq            root
ii            imaginary
ee            element
hb            h barred
in            in
impl,implies  implies
inf           infinity
empty         empty
TB            Big triangle right
tb            small triangle right
and           and
or            or
xor           xor
nand          nand
nor           nor
equiv         equivalent
not           not
union         union
inter         intersection
subseteq      subset or equal
subset        subset
notsubseteq   not subset or equal
notsubset     not subset
@end example

It is to note that a maxima running on a lisp without unicode support
might not be able to deal with files that contain special unicode
characters.
@subsection Side Panes

@ifnotinfo

@image{SidePanes,12cm}

@end ifnotinfo
Shortcuts to the most important maxima commands and a history of the last
issued commands can be accessed using the side panes. They can be enabled
using the ``Panes'' entry in the ``Maxima'' menu.
@subsection Markdown support
Markdown in many cases collides with the notations that are frequently used
for mathematics. wxMaxima will recognize bullet lists, though, for the HTML
and TeX export when the items are marked with stars.
@example
Ordinary text
 * One item, indentation level 1
 * Another item at indentation level 1
   * An item at a second indentation level
   * A second item at the second indentation level
 * A third item at the first indentation level
Ordinary text
@end example

wxMaxima will also recognize @code{=>} and replace it by a 
@example
cogito => sum.
@end example
Other symbols the markdown parser will recognize are @code{<=} and
@code{>=} for comparisons, a double-pointed double arrow (@code{<=>}),
single- headed arrows (@code{<->}, @code{->} and @code{<-}) and
@code{+/-} as the respective sign.
@subsection Hotkeys
Most hotkeys can be found in the text of the respective menus.
Since they are actually taken from the menu text and thus can be customized
by the translations of wxMaxima to match the needs of users of the local
keyboard there is no usee of documenting them here.
There are a few hotkeys or hotkey aliases, though, that aren't documented there:
@itemize @bullet
@item @code{Ctrl+Shift+Delete} deletes a complete cell. 
@item @code{Ctrl+Tab} or @code{Ctrl+Shift} triggers the auto-completion mechanism.
@item @code{Ctrl++} or @code{Ctrl+-} Zoom in or out.
@end itemize

@section  File Formats
@subsection .mac
@file{.mac} files are ordinary text files that can be read using
maxima's read command:
@example
%i1 read("test.mac");
@end example
They can be used for writing own libraries but since they don't
contain enough structural information they cannot be read back
directly into wxMaxima.
@subsection .wxm
@file{.wxm} files contain the input for maxima, as well as any
text cells, title cells and chapter or section cells the user typed
in. Pictures and maxima's output aren't saved along with the
@file{.wxm} file, though.
@subsection .wxmx
This xml-based file format saves all text and images the work sheet
contains. It is the preferred file format now and comes in two
flavors:
@itemize @bullet
@item Files saved in the version-control friendly @file{.wxmx} format
contain all images in a standard compressed format (@file{.png}) and
a uncompressed copy of the xml tree that contains the structure of the
document and the text typed in by the user. Since the images are
compressed individually and the text is saved as text a version
control system like bazaar, subversion, git or mercurial will only
have to save the elements of the file that actually have changed since
the last version.
@item Files saved in disk space-optimized @file{.wxmx} format are
compressed as a whole. If no version control system is used this will
save disk space:
@itemize @bullet
@item The portion of the file that is pure xml data tends to get
fundamentally smaller when being compressed
@item and after the compression recurring data like image headers
will use up only a fraction of the space they originally did.
@end itemize
This comes at the cost, though, that the change of even a single line
of text in the uncompressed version tends to completely change the
structure of the compressed version of a file. A version control 
system that deals with such a file will - however optimized
it might be on handling differences between binary files -
will therefore have to track (and to store) a much higher number of
differences  between two file versions than necessary;
Since most version control systems compress the data they store on the 
server the server space occupied by the initial version of both
@file{.wxmx} flavors should be nearly identical in size.
@end itemize
@section Configuration options
@subsection Default animation framerate
The animation framerate that is used for new animations if
the value of @var{wxanimate_framerate} isn't changed from the maxima
side.
@subsection Default plot size for new maxima sessions
After the next start plots embedded into the worksheet will be created
with this size if the value of  @var{wxplot_size} isn't changed by
maxima. 
@subsection Match parenthesis in text controls
This option enables two things:
@itemize @bullet
@item If an opening parenthesis, bracket or double quote is entered
wxMaxima will insert a closing one after it.
@item If text is selected if any of these keys is pressed the selected
text will be put between the matched signs.
@end itemize
@subsection Autosave interval
If this value is set to a value bigger than zero maxima will work in a
more mobile-device-like fashion: 
@itemize @bullet
@item Files are saved automatically on exit
@item And the file will automatically be saved every n minutes.
@end itemize
For the automatic saving functionality to work wxMaxima needs to know
a name to save the file with, though. This means this feature will
only work if the file has already been saved to or opened from the
disk.
@node Extensions
@chapter Extensions to maxima
wxMaxima aims to be but a graphical user interface for maxima. In some
cases it adds functionality to Maxima, though. These cases are
described here.
@section Plotting
Plotting (having fundamentally to do with graphics) is a place where a
graphical user interface will have to provide some extensions to the
original program.
@subsection Embedding a plot into the work sheet
Maxima normally instructs the external program gnuplot to open a
separate window for every diagram it creates. Since many times it is
convenient to embed graphs into the work sheet instead wxMaxima
provides its own set of plot functions that don't differ from the
corresponding maxima functions save in their name: They are all
prepended by a ``wx''. For example  @command{wxplot} corresponds to
@command{plot}, @command{wxdraw} corresponds to @command{draw} and
@command{wxhistogram} corresponds to @command{histogram}.
@subsection Making embedded plots bigger or smaller
The configure dialog provides a way to change the default size plots
are created with which sets the starting value of @var{wxplot_size}.
The plotting routines of wxMaxima respect this variable that specifies
the size of a plot in pixels. It can always be queried or used to set
the size of the following plots:
@example
%i1 wxplot_size:[1200,800];
%o1 [1200,800];

%i2 wxdraw2d(
        explicit(
            sin(x),
            x,1,10
        )
    )$
@end example
If the size of only one plot is to be changed maxima provides a
canonical way to change an attribute only for the current cell.
@example
%i1 wxplot_size:[1200,800];
%o1 [1200,800];

%i1 wxdraw2d(
        explicit(
            sin(x),
            x,1,10
        )
    ),wxplot_size=[1600,800]$
@end example

@subsection Better quality plots
Gnuplot doesn't seem to provide a portable way of determining is it
supports the high-quality bitmap output the cairo library provides.
On systems where gnuplot is compiled to use this library the
pngcairo option from the configuration menu (that can be overridden
by the variable @var{wxplot_pngcairo}) enables support for
antialiasing and additional line styles.
@subsection Embedding animations into the spreadsheet
The @code{with_slider_draw} command is a version of @code{wxdraw2d}
that does prepare multiple plots and allows to switch between them
by moving the slider on top of the screen. If ImageMagick is installed
wxMaxima even allows to export this animation as an animated gif.

The first two arguments for @code{with_slider_draw} are the name of
the variable that is stepped between the plots and a list of the
values of these variable. The arguments that follow are the ordinary
arguments for @code{wxdraw2d}:
@example
with_slider_draw(
    f,[1,2,3,4,5,6,7,10],
    title=concat("f=",f,"Hz"),
    explicit(
        sin(2*%pi*f*x),
        x,0,1
    ),grid=true
);
@end example
The same functionality for 3d plots is accessible as @code{with_slider_draw3d}.

There is a second set of functions making use of the slider
@itemize @bullet
@item @code{wxanimate_draw} and
@item @code{wxanimate_draw3d}:
@end itemize
@example
wxanimate_draw(
    a, 3,
    explicit(sin(a*x), x, -4, 4),
    title=printf(false, "a=~a", a));
@end example

Normally the animations are played back or exported with the frame
rate chosen in the configuration of wxMaxima. To set the speed an
individual animation is played back the variable @var{wxanimate_framerate}
can be used:
@example
wxanimate(a, 10,
    sin(a*x), [x,-5,5]), wxanimate_framerate=6$
@end example

The animation functions have a pitfall that one has to be aware of when
using them: The slider variable's value are substituted into the
expression that is to be plotted - which will fail, if the variable
isn't directly visible in the expression. Therefore the following
example will fail:
@example
f:sin(a*x);
with_slider_draw(
    a,makelist(i/2,i,1,10),
    title=concat("a=",float(a)),
    grid=true,
    explicit(f,x,0,10)
)$
@end example
If maxima is forced to first evaluate the expression and then asked
to substitute the slider's value plotting works fine instead:
@example
f:sin(a*x);
with_slider_draw(
    a,makelist(i/2,i,1,10),
    title=concat("a=",float(a)),
    grid=true,
    explicit(''f,x,0,10)
)$
@end example

@subsection Opening multiple plot windows contemporarily
While not being a provided by wxmaxima this feature of maxima (on
setups that support it) sometimes comes in handily. The following
example comes from a post from Mario Rodriguez to the maxima mailing
list: 
@example
load(draw);

/* Parabola in window #1 */
draw2d(terminal=[wxt,1],explicit(x^2,x,-1,1));

/* Parabola in window #2 */
draw2d(terminal=[wxt,2],explicit(x^2,x,-1,1));

/* Paraboloid in window #3 */
draw3d(terminal=[wxt,3],explicit(x^2+y^2,x,-1,1,y,-1,1));
@end example
@section Embedding graphics
if the @file{.wxmx} file format is being used embedding files in a
wxMaxima project can be done as easily as per drag-and-drop. But
sometimes (for example if an image's contents might change lateron)
it is better to tell the file to load the image on evaluation:
@example
show_image("Mann.png");
@end example
@section wxmaximarc
@cindex Startup File
If the maxima user directory there is a text file named @file{wxmaxima-init.mac}
the contents of the file is passed to maxima automatically every time
a new worksheet has been started.

To find out which directory maxima uses as the user directory just
type in the following line:
@example
maxima_userdir;
@end example
The answer from Maxima will specify the name of the directory that the
startup file can be placed in. 
@example
%o1 /home/username/.maxima
@end example
@section Special variables
@itemize @bullet
@item @var{wxfilename} This variable contains the name of the file
%currently opened in wxMaxima.
@item @var{wxplot_pngcairo} tells if wxMaxima tries to use gnuplot's
pngcairo terminal that provides more line styles and a better overall
graphics quality. This variable can be used for reading or overriding
the respective setting in the configuration dialog.
@item @var{wxplot_size} defines the size of embedded plots.
@item @var{wxchangedir} On most operating systems wxmaxima
      automatically sets maxima's working directory to the directory
      of the current file. This will allow file I/O (e.G. by
      @code{read_matrix}) to work without specifying the whole path to the 
      file that has to be read or written. On windows this is
      deactivated, though: The Lisp Standard doesn't contain a concept of
      the current working directory. Therefore there is no standard
      way of setting it and changing to a directory that isn't on
      the drive maxima has been installed to might cause maxima to
      try to read is own package files from this drive, too, instead
      of from the drive maxima has been installed to. Setting
      @var{wxchangedir} to @code{true} tells wxMmaxima that it has to
      risk that and to set maxima's working directory.
@item @var{wxanimate_framerate} The number of frames per second the
      following animations have to be played back with. -1 tells
      wxMaxima to use the default frame rate from the config dialog.
@end itemize
@section Pretty-printing 2D output
The function @code{(table_form)} displays a 2D list in a form that is
more readable than the output maxima's default output routine.
@example
table_form(
    [
        [1,2],
        [3,4]
    ]
)$
@end example
@section Bug reporting
wxMaxima provides a few functions that gather bug reporting
information about the current system:
@itemize @bullet
@item @code{wxbuild_info()} gathers information about the currently
running version of wxMaxima
@item @code{wxbug_report()} tells how and where to file bugs
@end itemize
@node Troubleshooting
@chapter Troubleshooting
@section Cannot connect to Maxima
Since maxima (the program that does the actual mathematics) and
wxMaxima (providing the easy-to-use user interface) are separate
programs that communicate by the means of a local network connection
the most probably case is that this connection is somehow not
working. For example a firewall could be set up in a way that it
doesn't only prevent against unauthorized connections from the
internet (and perhaps to intercept some connections to the internet,
too) but also to block inter-process-communication inside the same
computer. Note that since maxima is being run by a lisp processor
the process communication is blocked from does not necessarily
have to be named ``maxima''. Common names of the program that opens
the network connection would be sbcl, gcl, ccl or similar instead.

On Un*x computers another possible reason
would be that the loopback network that provides network connections
between two programs in the same computer isn't properly configured.
@section How to save data from a broken .wxmx file
Internally most modern xml-based formats are ordinary zip-files with
one speciality: the first file in the archive is stored uncompressed
and provides information about what type of program can open this
file.

If the zip signature at the end of the file is still intact
after renaming a broken @file{.wxmx} file to @file{.zip} most operating
systems will provide a way to extract any portion of information that
is stored inside it. The can be done when there is the need of
recovering the original image files from a text processor document.
If the zip signature isn't intact that does not need to be the end
of the world: If wxMaxima during saving detected that something went
wrong there will be a @file{wxmx~} file whose contents might help and
even if there isn't such a file: If the configuration option is set
that @file{.wxmx} files have to be optimized for version control
it is possible to rename the @file{.wxmx} file to a @file{.txt} file
and to use a text editor to recover the file's contents.
@section wxMaxima waits forever for data from maxima
This might be caused by the fact that a closing brace, bracket,
parenthesis or hyphenation mark is missing: In this case maxima waits
until it gets the rest of its input. If that isn't the case the
operating system normally provides a way to see if maxima is actually
really working forever trying to solve the current problem.
@section wxMaxima on Windows crashes on displaying seemingly simple equations
The jsMath fonts allow for excellent 2D-display of equations. But there
are of broken versions of this package that crash wxMaxima.
A working version can be downloaded from @uref{http://www.math.union.edu/~dpvc/jsmath/download/jsMath-fonts.html math.union.edu}. If this doesn't help jsMath can be deactivated
in the Styles tab of wxMaxima's configuration dialogue.
@section Outputting animations doesn't work
wxMaxima relies on a third-party tool
(@uref{http://www.imagemagick.org/, ImageMagick}) to convert
animations to the animated gif format. This will obviously only work
if this package is installed and known to the system (on windows the path
to ImageMagick's @file{convert.exe} has to be part of the @var{PATH} system
variable to make the system find it).

Another possible reason of not getting an animated gif is that this
image would exceed the format's (or ImageMagick's) capabilities:
@itemize @bullet
@item @file{.gif} files only allow for a maximum of 256 frames
@item @file{.gif} files can not exceed 65535x65535 pixels
@item ImageMagick has to have access to enough memory to hold all frames in
      their uncompressed form.
@end itemize
@section Plotting only shows an closed empty envelope with an error message
This means that wxMaxima was unable to read the file maxima was supposed
to instruct gnuplot to create.

Possible reasons that might cause this are:
@itemize @bullet
@item The plotting command is part of a third-party package like
      @code{implicit_plot} but this package wasn't loaded by maxima's
      @code{load()} command before trying to plot.
@item maxima tried to do something the currently installed version of
      gnuplot isn't able to understand. In this case the file
      @file{maxout.gnuplot} in the directory maxima's variable
      @var{maxima_userdir} points to contains the instructions from
      maxima to gnuplot. Most of the time this file's contents therefore is
      helpful when debugging the problem.
@item Gnuplot was instructed to use the pngcairo library that provides
      antialiassing and additional line styles. But it wasn't compiled to
      support this possibility. Solution: Uncheck the "Use the cairo
      terminal for plot" checkbox in the configuration dialog and
      don't set @var{wxplot_pngcairo} to true from maxima.
@item Gnuplot didn't output a valid @file{.png} file.
@end itemize
@section Plotting an animation results in ``error: undefined variable''
The value of the slider variable by default is only substituted into the
expression that is to be plotted if it is visible there. Putting an
@code{ev()} around this expression should resolve this problem.
@section I lost a cell contents and undo doesn't remember
There are separate undo functions for cell operations and for changes
inside of cells so chances are low that this ever happens. If it does
there are several methods to recover data:
@itemize @bullet
@item wxMaxima actually has two undo features: The global undo buffer
that is active if no cell is selected and a per-cell undo buffer that is
active if the cursor is inside a cell. It is worth trying to use both undo
options in order to see if an old value can still be accessed.
@item If you still have a way to find out what label maxima has assigned
to the cell just type in the cell's label and it's contents will
reappear.
@item If you don't: Don't panic. In the ``maxima'' menu there
is a way to show a history pane that shows all maxima commands that
have been issued recently.
@item If nothing else helps maxima contains a replay feature:
@example
%i1 playback();
@end example
@end itemize
@section wxMaxima starts up with the message ``Maxima process Terminated.''
One possible reason is that maxima cannot be found in the location that is
set in the ``maxima'' tab of wxMaxima's configuration dialog and therefore
won't run at all. Setting the path to a working maxima binary should
fix this problem.
@section Maxima is forever calculating and not responding to input
It is theoretically possible that wxMaxima doesn't realize that maxima has
finished calculating and therefore never gets informed it can send new data
to maxima. If this is the case ``Trigger evaluation'' might resynchronize
the two programs.
@section File I/O from maxima doesn't work on Windows
On windows File I/O isn't relative to the directory of the current
file by default. If you store the maxima file on the drive wxMaxima is
installed to setting @var{wxchangedir} to @code{true} will fix
that for @code{load}, @code{read_list}, @code{batch},
@code{read_matrix}, @code{save} and all similar commands.

Setting this variable to @code{true} might have a drawback, though:
Maxima knows which directory it is installed in and will search for
any additional package that is requested by a @code{load} command in
this directory, too. But it might not know which drive it is installed
on. If @var{wxchangedir} is @code{true} and the current file is saved
on a different drive than the one maxima is installed on maxima
therefore might fail to load the additional packages it was bundled
with.
@section Input sometimes is sluggish/ignoring keys on Ubuntu
Installing the package @code{ibus-gtk} should resolve this issue. See
(@uref{https://bugs.launchpad.net/ubuntu/+source/wxwidgets3.0/+bug/1421558}) for details.
@section wxMaxima halts when maxima processes greek characters or Umlaute
If your maxima is based on sbcl the following lines have to be added to your
@file{.sblrc}:
@example
(setf sb-impl::default-external-format :utf-8)
@end example
The location this file has to be put in order to be found by sbcl is system-
and installation-specific. But any sbcl-based maxima that already has evaluated
a cell in the current session will happily tell where it can be found after
getting the following command:
@example
:lisp (sb-impl::userinit-pathname)
@end example

@node FAQ
@chapter FAQ
@section Is there a way to make more text fit on a pdfLaTeX page?
There is: Just add the following lines to the LaTeX preamble (for
example by using the respective field in the config dialog):
@example
\usepackage[a4paper,landscape,left=1cm,right=1cm,top=1cm,bottom=1cm]@{geometry@}
@end example
@node CommandLine
@chapter Command-line arguments
Most operating systems provide less complicated ways of
starting programs than the command line so this possibility
is only rarely used. wxMaxima still provides some
command line switches, though.
@itemize @bullet
@item -v or --version: Output the version information
@item -h or --help: Output a short help text
@item -o or --open: Open the filename given as argument to this
      command-line switch
@item -b or --batch: If the command-line opens a file all cells in this file are
      evaluated and the file is saved afterwards. This is for example useful if
      the sesson described in the file makes maxima generate output files.
      Batch-processing will be stopped if wxMaxima detects that maxima has output
      an error and will pause if maxima has a question: Mathematics is somewhat
      interactive by nature so a completely interaction-free batch processing
      cannot always be guaranteed.
@item (Only on windows): -f or --ini: Use the init file that was
      given as argument to this command-line switch
@end itemize
Instead of a minus some operating systems might use a dash in
front of the command-line switches.
@shortcontents
@contents
@bye
