WxMaxima is a graphical user interface (GUI) for the Maxima computer algebra system (CAS). WxMaxima allows one to use all of Maxima’s functions. In addition, it provides convenient wizards for accessing the most commonly used features. This manual describes some of the features that make wxMaxima one of the most popular GUIs for Maxima.
Vor dem eigentlichen Inhalt ist es vielleicht angebracht, die Navigation zu erklären: Die nun folgende Liste enthält Hyperlinks auf die einzelnen Kapitel der Dokumentation. Ein Klick auf Inhaltsverzeichnis führt zu einem detaillierten Inhaltsverzeichnis. Dieser Link kommt öfter vor, um die Navigation zu erleichtern.
WxMaxima basics
Die Kommandos, mittels deren wxMaxima Maxima erweitert
What to do if wxMaxima does not work as expected?
Häufig gestellte Fragen
The command-line arguments wxMaxima supports.
How can you contribute to the development of wxMaxima?
Im Open-Source-Bereich ist es üblich, große Systeme in kleine Projekte aufzuteilen, die jeweils klein genug sind, dass eine endliche Menge an Entwicklern ausreicht, um sie weiterzuentwickeln. Beispielsweise ist ein CD-Brennprogramm aus einem Kommandozeilentool zusammengesetzt, das die CDs brennt und eine graphische Benutzerumgebung, die dieses Tool bedient. Ein Vorteil dieses Ansatzes ist es, daß dasselbe Kommandozeilenprogramm von vielen Stellen aus genutzt werden: Das Brennprogramm, ein “Sende an die CD”-Knopf und beispielsweise ein Backup-Tool. Ein weiterer Vorteil ist es, dass auf diese Weise für eine Funktionalität mehrere Benutzerinterfaces angeboten werden können.
Ein Computer-Algebrasystem (CAS) wie Maxima ist hervorragend für diesen Ansatz geeignet: Es kann die Logik hinter einem Taschenrechner liefern, der mit beliebig langen Zahlen hantieren kann, Formeln für ein größeres System, z.B. Sage umstellen. Alternativ kann es direkt verwendet werden. Dies kann von der Kommandozeile aus geschehen, oder von wxMaxima aus, das eine komfortablere Bedienung unterstützt.
Maxima ist ein komplettes Computer-Algebrasystem (CAS): Ein Programm, das die Formel, nicht nur die Zahl sucht, die ein mathematisches Problem löst. Auch wenn es darauf spezialisiert ist, mit Buchstaben zu rechnen, bietet es auch eine Menge an Funktionen, die Probleme lösen, für die nur numerische Lösungen existieren.
Umfangreiche Dokumentation für Maxima ist im Internet verfügbar. Teile davon sind auch im Hilfe-Menü von wxMaxima verfügbar. Ein Druck auf die Hilfe-Taste (auf den meisten Systemen ist dies die F1-Taste) springt automatisch zur Stelle im Maxima-Handbuch, wo das Kommando unter dem Cursor erklärt wird.
WxMaxima is a graphical user interface that provides the full functionality and flexibility of Maxima. WxMaxima offers users a graphical display and many features that make working with Maxima easier. For example wxMaxima allows one 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. Indeed, an entire workbook can be exported, either as a HTML file or as a LaTeX file. Documentation for wxMaxima, including workbooks to illustrate aspects of its use, is online at the wxMaxima help site, as well as via the help menu.
wxMaxima lässt alle Berechnungen im Hintergrund durch das Kommandozeilen-Werkzeug Maxima durchführen.
wxMaxima ist größtenteils selbsterklärend. Diese Internetseite bietet einige Beispiele an, wovon das “10-Minuten-Tutorial” besonders zu empfehlen ist. Dieses Handbuch beschreibt einige zusätzliche Aspekte von wxMaxima.
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.
Wenn Text in wxMaxima eingegeben wird, erzeugt er automatisch eine neue Zelle des Arbeitsblattes. Wenn dies eine Code-Zelle ist, kann ihr Inhalt an Maxima gesendet werden und das Resultat dieser Aktion wird unter der Zelle angezeigt, wie unten abgebildet.
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.
Außer Code-Zellen kennt wxMaxima auch Textzellen und solche mit Bildern oder Überschriften. Jede Zelle hat ihren eigenen Speicher für das Rückgängigmachen von Aktionen, was sich oft als hilfreich erwiesen hat. Zudem besitzt, wie in fast allen Applikationen, das Arbeitsblatt einen eigenen Speicher für die Rückgängigmachen-Funktion.
Die nun folgende Abbildung zeigt verschiedene Zelltypen (Titelzellen, Untertitelzellen, Textzellen, Eingabe/Ausgabezellen und eine Bildzelle).
The worksheet is organized in cells. WxMaxima knows the following cell types:
Wenn Text eingegeben ist, erzeugt wxMaxima normalerweise gleich eine Code-Zelle. Andere Zelltypen können über das “Zellen”-Menü, die dort dokumentierten Tastenkombinationen oder über die Werkzeugleiste erzeugt werden. Wenn eine nicht-mathematische Zelle (Überschrift, Text, etc.) erzeugt wurde, wird alles was eingetippt wird, als Text interpretiert.
A (C-style) comment
text can be part of a math cell as follows:
/* This comment will be ignored by Maxima */
“/*
” markiert den Beginn des Kommentars,,
“*/
” das Ende.
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, if more than one cell is selected, wxMaxima 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:
When you start wxMaxima, you will only see the blinking horizontal
cursor. If you start typing, a math cell will be automatically created
and the cursor will change to a regular vertical one (you will see a
right arrow as “prompt”, after the Math cell is evaluated
(CTRL+ENTER), you will see the labels,
e.g. (%i1)
, (%o1)
).
You might want to create a different cell type (using the “Cell” menu), maybe a title cell or text cell, which describes, what will be done, when you start creating your worksheet.
If you navigate between the different cells, you will also see the (blinking) horizontal cursor, where you can insert a cell into your worksheet (either a math cell, by just start typing your formula - or a different cell type using the menu).
The command in a code cell is executed once by pressing CTRL+ENTER, SHIFT+ENTER or the ENTER key on the keypad. 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.
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 a unit specification for ezUnits it will offer a list of applicable units.
Besides completing a file name, a unit name, or the current command or variable 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).
Computer speichern Zeichen meist als 8-Bit-Werte, was maximal 256 unterschiedliche Typen von Zeichen erlaubt. Die meisten Sprachen nutzen inklusive Steuerzeichen, Ziffern und ein paar Zeichen, aus denen Graphiken zusammengesetzt werden können, weniger als dies.
For most countries, the codepage of 256 characters that has been chosen does not include things like Greek letters, though, that are frequently used in mathematics. To overcome this type of limitation Unicode has been invented: An encoding that makes English text work like normal, but to use much more than 256 characters.
Maxima allows Unicode if it was compiled using a Lisp compiler that either supports Unicode or that doesn’t care about the font encoding. As at least one of this pair of conditions is likely to be true. WxMaxima provides a method of entering Greek characters using the keyboard:
key | Greek letter | key | Greek letter | key | Greek letter |
---|---|---|---|---|---|
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 |
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 |
You can also use the “Greek letters”-sidebar to enter the Greek letters.
Attention: Lookalike characters
Several Latin letters look like the Greek letters, e.g. the Latin letter “A” and the Greek letter “Alpha”. Although they look identical, they are two different Unicode characters, represented by different Unicode code points (numbers).
This might be problematic, if you assign a value to the Variable A and later use the Greek letter Alpha to do something with this variable, especially on printouts. For the greek letter my (which is also used as prefix for micro) there are also two different unicode code points.
The “Greek letters”-sidebar therefore has the option, that lookalike characters are not available (which can be changed using a right-click menu).
Derselbe Mechanismus erlaubt es auch, einige andere mathematische Symbole einzugeben:
keys to enter | mathematical symbol |
---|---|
hbar | Planck’s constant: a h with a horizontal bar above it |
Hbar | a H with a horizontal bar above it |
2 | squared |
3 | to the power of three |
/2 | 1/2 |
partial | partial sign (the d of dx/dt) |
integral | integral sign |
sq | square root |
ii | imaginary |
ee | element |
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 to |
not | not |
union | union |
inter | intersection |
subseteq | subset or equal |
subset | subset |
notsubseteq | not subset or equal |
notsubset | not subset |
approx | approximately |
propto | proportional to |
neq != /= or # | not equal to |
+/- or pm | a plus/minus sign |
<= or leq | equal or less than |
>= or geq | equal or greater than |
<< or ll | much less than |
>> or gg | much greater than |
qed | end of proof |
nabla | a nabla operator |
sum | sum sign |
prod | product sign |
exists | there exists sign |
nexists | there is no sign |
parallel | a parallel sign |
perp | a perpendicular sign |
leadsto | a leads to sign |
-> | a right arrow |
–> | a long right arrow |
You can also use the “Symbols”-sidebar to enter these Mathematical symbols.
If a special symbol isn’t in the list, it is possible to input arbitrary Unicode characters by pressing ESC [number of the character (hexadecimal)] ESC. Additionally the “symbols” sidebar has a right-click menu that allow to display a list of all available unicode symbols one can add to this toolbar or to the worksheet.
ESC 61 ESC erzeugt daher ein
a
.
Please note that most of these symbols (notable exceptions are the logic symbols) do not have a special meaning in Maxima and therefore will be interpreted as ordinary characters. If Maxima is compiled using a Lisp that doesn’t support Unicode characters they might cause an error message.
It may be the case that e.g. Greek characters or mathematical symbols are not included in the selected font, then they can not be displayed. To solve that problem, select other fonts (using: Edit -> Configure -> Style).
wxMaxima will replace several Unicode characters with their
respective Maxima expressions, e.g. “²” with “^2”, “³” with “^3”, the
square root sign with the function sqrt()
, the
(mathematical) Sigma sign (which is not the same unicode character as
the corresponding greek letter) with sum()
, etc.
Shortcuts to the most important Maxima commands, things like a table of contents, windows with debug messages or a history of the last issued commands can be accessed using the side panes. They can be enabled using the “View” menu. They all can be moved to other locations inside or outside the wxMaxima window. Other useful panes is the one that allows to input Greek letters using the mouse.
In the “table of contents” side pane, one can increase or decrease a heading by just clicking on the heading with the right mouse button and select the next higher or lower heading type.
Several word processors and similar programs either recognize MathML input and automatically insert it as an editable 2D equation - or (like LibreOffice) have an equation editor that offers an “import MathML from clipboard” feature. Others support RTF maths. WxMaxima, therefore, offers several entries in the right-click menu.
WxMaxima offers a set of standard Markdown conventions that don’t collide with mathematical notation. One of these elements is bullet lists.
Normaler Text
* Ein eingerückter Aufzählungspunkt
* Ein zweiter Aufzählungspunkt
* Eine Aufzählung in der Aufzählung
* Ein zweiter Aufzählungspunkt der Aufzählung in der Aufzählung
* Ein Punkt in der äußeren Aufzählung
Normaler text
WxMaxima will recognize text starting with >
chars as block quotes:
Normaler Text
> Zitat Zitat Zitat
> Zitat Zitat Zitat
> Zitat Zitat Zitat
> Zitat Zitat Zitat
Normaler Text
WxMaxima’s TeX and HTML output will also recognize
=>
and replace it by the corresponding Unicode sign:
cogito => sum.
Other symbols the HTML and TeX export will recognize are
<=
and >=
for comparisons, a
double-pointed double arrow (<=>
), single-headed
arrows (<->
, ->
and
<-
) and +/-
as the respective sign. For TeX
output also <<
and >>
are
recognized.
Die meisten Tastenkürzel entstammen den Menüs, was bedeutet, dass sie mit diesen übersetzt werden können, falls die Tastatur der aktuellen Sprache dies erforderlich macht. Nicht dort dokumentiert ist:
Wenn eine Textzelle mit “TeX:” beginnt, wird der Rest ihres Inhalts bei der Konvertierung des Dokuments nach TeX unverändert ausgegeben.
Das Arbeitsblatt kann auf verschiedene Weisen gespeichert werden:
.mac-Dateien sind Textdateien mit Maxima-Befehlen. Sie
können über Maxima’s batch()
oder
load()
-Befehl oder in wxMaxima über “Datei/Batch File
laden” gelesen werden.
One example is shown below. Quadratic.mac
defines a
function and afterward generates a plot with wxdraw2d()
.
Afterward the contents of the file Quadratic.mac
are
printed and newly defined function f()
is evaluated.
Achtung: Obwohl die Datei Quadratic.mac
eine übliche
Maxima-extension hat (.mac
), kann sie nur durch wxMaxima
verarbeitet werden, der Befehl wxdraw2d()
ist eine
wxMaxima-Erweiterung für Maxima.
.mac
-Dateien eignen sich dafür, eine Bibliothek von
Maxima-Befehlen aufzubauen. Ausreichend Information über die Struktur
eines wxMaxima-Arbeitsblatts, dass sie es erlauben, dieses
wieder zu rekonstruieren, enthalten sie aber nicht.
.wxm files contain the worksheet except for Maxima’s output.
On Maxima versions >5.38 they can be read using Maxima’s
load()
function just as .mac files can be. With this
plain-text format, it sometimes is unavoidable that worksheets that use
new features are not downwards-compatible with older versions of
wxMaxima.
Dieses XML basiertes Dateiformat enthält das gesamte Arbeitsblatt, inklusive Eigenschaften wie den Zoom-Faktor oder die Watchlist. Es ist das empfohlene Dateiformat für wxMaxima-Arbeitsblätter.
Einige Variablen, über die Maxima konfiguriert wird, können auf zwei Arten eingestellt werden:
Die Bildwiederholgeschwindigkeit für Animationen wird in der Variable
wxanimate_framerate
gespeichert. wxMaxima setzt sie auf den
Wert aus dem Konfigurationsdialog, wenn ein neues Maxima
gestartet wird.
After the next start, plots embedded into the worksheet will be
created with this size if the value of wxplot_size
isn’t
changed by maxima.
Diese Variable kann notfalls auch nur für das aktuelle Diagramm gesetzt werden:
wxdraw2d(
explicit(
x^2,
x,-5,5
)wxplot_size=[480,480]$ ),
Diese Option schaltet zwei Funktionen ein:
If this option is set, the file where the worksheet is will be overwritten only the request of the user. In case of a crash/power loss/… a recent backup copy is still made available in the temp directory, though.
Ist diese Option nicht angewählt, arbeitet wxMaxima wie eine moderne Handy-Applikation:
If you are using Unix/Linux, the configuration information will be
saved in a file .wxMaxima
in your home directory (if you
are using wxWidgets < 3.1.1), or .config/wxMaxima.conf
((XDG-Standard) if wxWidgets >= 3.1.1 is used). You can retrieve the
wxWidgets version from the command wxbuild_info();
or by
using the menu option Help->About. wxWidgets is the cross-platform
GUI library, which is the base for wxMaxima (therefore the
wx
in the name). (Since the filename starts with a dot,
.wxMaxima
or .config
will be hidden).
Unter Windows wird die Konfiguration in der Registry unter
HKEY_CURRENT_USER\Software\wxMaxima
gespeichert.
WxMaxima is primarily a graphical user interface for Maxima. As such, its main purpose is to pass along commands to Maxima and to report the results of executing those commands. In some cases, however, wxMaxima adds functionality to Maxima. WxMaxima’s ability to generate reports by exporting a workbook’s contents to HTML and LaTeX files has been mentioned. This section considers some ways that wxMaxima enhances the inclusion of graphics in a session.
wxsubscripts
specifies, if (and how) wxMaxima
will autosubscript variable names:
If it is false
, the functionality is off, wxMaxima will
not autosubscript part of variable names after an underscore.
If it is set to 'all
, everything after an underscore
will be subscripted.
If it is set to true
variable names of the format
x_y
are displayed using a subscript if
x
or y
is a single letter ory
is an integer (can include more than one
character).If the variable name doesn’t match these requirements, it can still
be declared as “to be subscripted” using the command
wxdeclare_subscript(variable_name);
or
wxdeclare_subscript([variable_name1,variable_name2,...]);
Declaring a variable as subscripted can be reverted using the following
command: wxdeclare_subscript(variable_name,false);
You can use the menu “View->Autosubscript” to set these values.
Long-running commands can provide user feedback in the status bar.
This user feedback is replaced by any new feedback that is placed there
(allowing to use it as a progress indicator) and is deleted as soon as
the current command sent to Maxima is finished. It is safe to
use wxstatusbar()
even in libraries that might be used with
plain Maxima (as opposed to wxMaxima): If
wxMaxima isn’t present the wxstatusbar()
command
will just be left unevaluated.
for i:1 thru 10 do (
/* Gib dem User Bescheid, wie weit wir schon sind */
wxstatusbar(concat("Pass ",i)),
/* (sleep n) ist eine Lisp-Funktion, die mit einem */
/* "?" Zeichen vorher verwendet werden kann. */
/* Sie verzögert die Programmausführung für n Sekunden */
/* (in diesem Beispiel: für 3 Sekunden). */
sleep(3)
? )$
Diagramme haben per definitionem mit einer graphischen Benutzerumgebung zu tun, weswegen an dieser Stelle Erweiterungen von Maxima zu erwarten sind.
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 worksheet 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 prefixed by a “wx”.
The following plotting functions have wx-counterparts:
wxMaxima’s plot function | Maxima’s plot function |
---|---|
wxplot2d() |
plot2d |
wxplot3d() |
plot3d |
wxdraw2d() |
draw2d |
wxdraw3d() |
draw2d |
wxdraw() |
draw |
wximplicit_plot() |
implicit_plot |
wxhistogram() |
histogram |
wxscatterplot() |
scatterplot |
wxbarsplot() |
barsplot |
wxpiechart() |
piechart |
wxboxplot() |
boxplot |
If a wxm
-file is read by (console) Maxima, these
functions are ignored (and printed as output, as other unknown functions
in Maxima).
As noted above, the configure dialog provides a way to change the
default size plots created which sets the starting value of
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:
wxplot_size:[1200,800]$
wxdraw2d(
explicit(
sin(x),
x,1,10
) )$
Wenn die Größe nur des aktuellen Diagramms geändert werden soll,
erlaubt Maxima dies für die aktuelle Zelle zu machen. In diesem
Beispiel wird wxplot_size = [wert1, wert2]
an den
wxdraw2d( )
Befehl angehängt, es ist nicht Teil des
wxdraw2d
Befehls.
wxdraw2d(
explicit(
sin(x),
x,1,10
)wxplot_size=[1600,800]$ ),
Setting the size of embedded plot with wxplot_size
works
for embedded plots using e.g. wxplot
, wxdraw
,
wxcontour_plot
and wximplicit_plot
commands
and for embedded animations with with_slider_draw
and
wxanimate
commands.
Gnuplot doesn’t seem to provide a portable way of
determining whether it supports the high-quality bitmap output that 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 wxplot_pngcairo
) enables
support for antialiasing and additional line styles. If
wxplot_pngCairo
is set without gnuplot supporting
this the result will be error messages instead of graphics.
Wenn ein Diagramm mittels einem wxdraw
-ähnlichen Befehl
erstellt wurde (wxplot2d
und wxplot3d
werden
hier nicht unterstützt) und die Gnuplot-Datei nicht allzu lang ist,
bietet wxMaxima einen Rechts-Klick-Menüpunkt an, der das
Diagramm in einem interaktiven Gnuplot-Fenster öffnet.
plot
FensternWenn unter Windows die Variable gnuplot_command
auf
“wgnuplot” geändert wird, erlaubt gnuplot, eine Kommandokonsole zu
öffnen, stiehlt aber jedes Mal, wenn ein Diagramm gezeichnet wird, den
Tastaturfokus für kurze Zeit (die Zeichen, die währenddessen eingegeben
werden, verschwinden).
3D diagrams tend to make it hard to read quantitative data. A viable
alternative might be to assign the 3rd parameter to the mouse wheel. The
with_slider_draw
command is a version of
wxdraw2d
that does prepare multiple plots and allows to
switch between them by moving the slider on top of the screen.
WxMaxima allows to export this animation as an animated
gif.
Die ersten beiden Argumente von with_slider_draw
sind
der Name der Variable des zu variierenden Parameters und die Liste der
Werte, die dieser annehmen soll. Darauf folgen die ganz normalen
Argumente, die wxdraw2d
akzeptiert:
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
), );
Für 3D-Diagramme ist dieselbe Funktionalität als
with_slider_draw3d
verfügbar, die auch rotierende
3D-Diagramme erstellen kann:
wxanimate_autoplay:true;
wxanimate_framerate:20;
with_slider_draw3d(
makelist(i,i,1,360,3),
α,title=sconcat("α=",α),
surface_hide=true,
contour=both,
view=[60,α],
explicit(
sin(x)*sin(y),
x,-π,π,
y,-π,π
) )$
Wenn es nur um die generelle Form der Kurve geht, reicht es oft, das Bild ein wenig zu bewegen, so, dass es von der Intuition erfasst werden kann:
wxanimate_autoplay:true;
wxanimate_framerate:20;
with_slider_draw3d(
t,makelist(i,i,0,2*π,.05*π),
title=sconcat("α=",α),
surface_hide=true,
contour=both,
view=[60,30+5*sin(t)],
explicit(
sin(x)*y^2,
x,-2*π,2*π,
y,-2*π,2*π
) )$
For those more familiar with plot
than with
draw
, there is a second set of functions:
with_slider
undwxanimate
.Normally the animations are played back or exported with the frame
rate chosen in the configuration of wxMaxima. To set the speed
at an individual animation is played back the variable
wxanimate_framerate
can be used:
wxanimate(a, 10,
sin(a*x), [x,-5,5]), wxanimate_framerate=6$
The animation functions use Maxima’s makelist
command and therefore share the pitfall that the slider variable’s value
is substituted into the expression only if the variable is directly
visible in the expression. Therefore the following example will
fail:
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)
)$
Wenn Maxima explizit gebeten wird, den Wert einzusetzen, funktioniert der Befehl stattdessen:
f:sin(a*x);
with_slider_draw(
b,makelist(i/2,i,1,10),
title=concat("a=",float(b)),
grid=true,
explicit(
subst(a=b,f),
x,0,10
) )$
While not being 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:
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));
Mehrere Diagramme im gleichen Fenster plotten ist auch möglich:
wxdraw(
gr2d(
key="sin (x)",grid=[2,2],
explicit(sin(x),x,0,2*%pi)),
gr2d(
key="cos (x)",grid=[2,2],
explicit(cos(x),x,0,2*%pi))
);
The “Plot using draw” sidebar hides a simple code generator that allows generating scenes that make use of some of the flexibility of the draw package maxima comes with.
Generiert einen draw()
-Befehl, der mittels der anderen
Knöpfe der Seitenleiste mit einer 2D-Szene gefüllt werden kann.
One helpful feature of the 2D button is that it allows to set up the scene as an animation in which a variable (by default it is t) has a different value in each frame: Often a moving 2D plot allows easier interpretation than the same data in a non-moving 3D one.
Generates the skeleton of a draw()
command that draws a
3D scene. If neither a 2D nor a 3D scene is set up, all of the other
buttons set up a 2D scene that contains the command the button
generates.
Fügt den aktuellen draw()
-Befehl den Plot einer Kurve
wie sin(x)
, x*sin(x)
oder
x^2+2*x-4
hinzu. Besteht noch kein
draw()
-Befehl, wird automatisch eine 2D-Szene erzeugt. Jede
Szene kann beliebig viele Plots beinhalten.
Markiert alle Punkte, an denen eine Bedingung wie
y=sin(x)
, y*sin(x)=3
oder
x^2+y^2=4
erfüllt ist und zeichnet diese Kurve in das
aktuelle Diagramm ein. Gibt es kein aktuelles Diagramm, wird ein
2D-Diagramm erzeugt.
Bewegt eine Variable von einem Start- zu einem Endwert und verwendet
getrennte Ausdrücke wie t*sin(t)
und t*cos(t)
,
um die x-, die y- (und in 3D-Diagrammen auch die z-) Koordinaten zu
generieren.
Zeichnet eine Reihe von Punkten, die optional miteinander verbunden werden. Die Koordinaten der Punkte können aus einer Liste von Listen, einem 2-dimensionalen Array oder einer Liste oder einem Array pro Achse entnommen werden.
Bestimmt den Titel des Diagramms.
Die Einstellungen für die Achsen.
(Only for 3D plots): Adds contour lines similar to the ones one can
find in a map of a mountain to the plot commands that follow in the
current draw()
command and/or to the ground plane of the
diagram. Alternatively, this wizard allows skipping drawing the curves
entirely only showing the contour plot.
Fügt einen Eintrag zur Legende hinzu, der für die nächsten Objekte gilt. Ein leerer Name bedeutet, dass die nun folgenden Objekte keinen eigenen Eintrag erhalten.
Setzt die Linienfarbe für die nun folgenden Plots des aktuellen draw-Befehls.
Setzt die Füllfarbe für die nun folgenden Objekte des aktuellen
draw
-Kommandos.
Ein Assistent, der die Gitterlinien einzustellen hilft.
Erlaubt das Wählen zwischen Geschwindigkeit und Genauigkeit bei der Erstellung der folgenden Kurven.
Das .wxmx
-Dateiformat erlaubt es, Bilder per
Drag-And-Drop einzubetten. Manchmal (z.B. wenn die Bildinhalte sich
später während einer Sitzung ändern könnten) ist es besser, die
Bilddatei während der Auswertung zu laden:
show_image("Mensch.png");
Der Konfigurationsdialog von wxMaxima bietet an, zwei Dateien mit Maxima-Befehlen zu bearbeiten:
maxima-init.mac
wxmaxima-init.mac
Diese Dateien liegen im Benutzerverzeichnis von Maxima, normalerweise
im Ordner .maxima
im Home-Verzeichnis. Der genaue Ort kann
über das Kommando maxima_userdir;
ermittelt werden.
wxsubscripts
informiert Maxima, welche
Variablen mit Unterstrich (z.B. R_150
) in Variablen mit
Subscript konvertieren soll. Details werden unter
wxdeclare_subscript
beschrieben.wxfilename
: Diese Variable sagt, welchen Dateinamen das
Arbeitsblatt laut wxMaxima besitzt.wxdirname
: Diese Variable enthält den Namen des
Verzeichnisses, in welchem die aktuelle Datei geöffnet wurde.wxplot_pngcairo
sagt Maxima, ob es versuchen soll,
gnuplot zu instruieren, pngcairo zu nutzen, um hochqualitative Bilder zu
nutzen.wxplot_size
legt die Größe eingebetteter Diagramme
fest.wxchangedir
: Normalerweise setzt wxMaxima
Maxima’s Arbeitsverzeichnis auf dasjenige, in dem sich das
Arbeitsblatt befindet. Dies ist praktisch, wenn Maxima auf Dateien
zugreifen soll (z.B. via read_matrix
). Unter Windows geht
dieses Feature manchmal schief und kann daher auf false
gesetzt werden.wxanimate_framerate
: Die Geschwindigkeit, mit der
Animationen abgespielt werden sollen.wxanimate_autoplay
: Sollen Animationen automatisch
abgespielt werden?wxmaximaversion
: Returns the version number of
wxMaxima.wxwidgetsversion
: Returns the wxWidgets version
wxMaxima is using.Die Funktion table_form()
konvertiert 2D-Listen in eine
lesbarere Tabellenform als Maxima selbst. Die Eingabe ist eine
Liste von einer oder mehreren Listen. Wie der “print” Befehl wird die
Ausgabe auch gemacht, wenn der Befehl durch ein Dollarzeichen
abgeschlossen wurde. Das abschließende done
kann durch
Verwendung eines $
anstelle eines ;
unterdrückt werden.
table_form(
[1,2],
[3,4]
[
] )$
Das folgende Beispiel zeigt das Zusammensetzen der Listen für solch eine Tabelle.
Da Matrizen effektiv Listen von Listen sind, können auch sie in Tabellen verwandelt werden.
WxMaxima provides a few functions that gather bug reporting information about the current system:
wxbuild_info()
sammelt Informationen über die derzeit
ausgeführte Version von wxMaximawxbug_report()
sagt, wo und wie Fehler gemeldet werden
könnenMaxima’s box()
command causes wxMaxima
to print its argument with a red foreground, if the second argument to
the command is the text highlight
.
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. Therefore the most probable cause is that this connection is somehow not working. For example, a firewall could be set up in a way that it doesn’t just prevent unauthorized connections from the internet (and perhaps intercept some connections to the internet, too), but also blocks inter-process-communication inside the same computer. Note that since Maxima is being run by a Lisp processor the process communication that is blocked does not necessarily have to be named “maxima”. Common names of the program that opens the network connection would be sbcl, gcl, ccl, lisp.exe, or similar names.
On Unix 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.
Internally most modern XML-based formats are ordinary zip files.
WxMaxima doesn’t turn on compression, so the contents of
.wxmx
files can be viewed in any text editor.
If the zip signature at the end of the file is still intact after
renaming a broken .wxmx
file to .zip
most
operating systems will provide a way to extract any portion of the
information that is stored inside it. This can be done when there is a
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 .wxmx~
file whose
contents might help.
Und auch wenn diese Datei nicht existiert: Eine
.wxmx
-Datei ist ein Containerformat, und der XML-Anteil
wird unkomprimiert gespeichert. Es ist möglich, die
.wxmx
-Datei in eine .txt
Datei umzubenennen und
mit einem Texteditor den XML-Anteil der Datei (beginnt mit
<?xml version="1.0" encoding="UTF-8"?>
und endet mit
</wxMaximaDocument>
zu sichern. Vor und nach diesem
Text wird unlesbarer (binärer) Inhalt im Texteditor sichtbar sein).
If a text file containing only these contents (e.g. copy and paste
this text into a new file) is saved as a file ending in
.xml
, wxMaxima will know how to recover the text
from the document.
Normalerweise gibt wxMaxima erst etwas aus, wenn die
komplette Ausgabe steht. Das disp
-Kommando wird hingegen
sofort ausgeführt:
for i:1 thru 10 do (
disp(i),
/* (sleep n) ist eine Lisp-Funktion, die mit einem */
/* "?" Zeichen vorher verwendet werden kann. */
/* Sie verzögert die Programmausführung für n Sekunden */
/* (in diesem Beispiel: für 3 Sekunden). */
sleep(3)
? )$
wxMaxima konnte die Datei, die Maxima gnuplot instruiert hat, zu generieren, nicht lesen.
Mögliche Gründe für diesen Fehler sind:
implicit_plot
wurde verwendet, ohne vorher via
load()
geladen zu werden.maxima_userdir
zeigt in einer Datei mit der Endung
.gnuplot
. Der Inhalt dieser Datei ist oft hilfreich, um den
Fehler zu suchen.wxplot_pngCairo
to true from Maxima..png
-Datei ausgegeben.The value of the slider variable by default is only substituted into
the expression that is to be plotted if it is visible there. Using a
subst
command that substitutes the slider variable into the
equation to plot resolves this problem. At the end of section Embedding animations
into the spreadsheet, you can see an example.
Es gibt zwei Rückgängigmach- Funktionen, die beide die wichtige Information enthalten können:
%o20
) zugewiesen
wurde, kann diese Marke eingegeben werden und der betreffende Text
erscheint.playback();
Ein möglicher Grund ist, dass Maxima nicht dort gefunden worden kann, wo dies in wxMaxima’s Konfigurationsdialog angegeben ist. Korrektur des dort angegebenen Pfades zum Programm löst dieses Problem.
Theoretisch kann es passieren, daß wxMaxima nicht erkennt, dass Maxima mit der Berechnung fertig ist und daher nie neue Befehle an Maxima sendet. In diesem Fall kann der Befehl ‘Trigger Evaluation’ die Synchronisation wieder herstellen.
The Lisp compiler SBCL by default comes with a memory limit that
allows it to run even on low-end computers. When compiling a big
software package like Lapack or dealing with extremely big lists of
equations this limit might be too low. In order to extend the limits,
SBCL can be provided with the command line parameter
--dynamic-space-size
that tells SBCL how many megabytes it
should reserve. A 32bit Windows-SBCL can reserve up to 999 Megabytes. A
64-bit SBCL version running on Windows can be instructed to use more
than the about 1280 Megabytes compiling Lapack needs.
Kommandozeilenparameter für Maxima (und daher für SBCL) können in wxMaxima’s Konfigurationsdialog eingegeben werden.
Das Installieren von ibus-gtk
behebt dieses Problem
meist. Auf (https://bugs.launchpad.net/ubuntu/+source/wxwidgets3.0/+bug/1421558)
findet man genauere Angaben dazu.
Wenn Maxima mittels SBCL compiliert wurde, können die
folgenden Befehle zur .sbclrc
hinzugefügt werden:
setf sb-impl::*default-external-format* :utf-8) (
The folder where this file has to be placed 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:
:lisp (sb-impl::userinit-pathname)
Das Arbeitsblatt enthält png-Dateien. WxMaxima erlaubt dem User anzugeben, wo sie generiert werden sollen:
wxdraw2d(
file_name="test",
explicit(sin(x),x,1,10)
);
If a different format is to be used, it is easier to generate the images and then import them into the worksheet again:
load("draw");
pngdraw(name,[contents]):=
(draw(
append(
[terminal=pngcairo,
dimensions=wxplot_size,
file_name=name
],contents
)
),show_image(printf(false,"~a.png",name))
);pngdraw2d(name,[contents]):=
pngdraw(name,gr2d(contents));
pngdraw2d("Test",
explicit(sin(x),x,1,10)
);
Nicht direkt bei Maxima. Aber es gibt Gnuplot-Kommandos dafür:
wxdraw2d(
proportional_axis=xy,
explicit(sin(x),x,1,10)
wxplot_size=[1000,1000]; ),
1 HIToolbox 0x00007ff80cd91726 _ZN15MenuBarInstance22EnsureAutoShowObserverEv + 102
2 HIToolbox 0x00007ff80cd912b8 _ZN15MenuBarInstance14EnableAutoShowEv + 52
3 HIToolbox 0x00007ff80cd35908 SetMenuBarObscured + 408
...
This might be an issue with the operating system. Disable the hiding of the menu bar (SystemSettings => Desktop & Dock => Menu Bar) might solve the issue. See wxMaxima issue #1746 for more information.
Yes. Use the LaTeX package “geometry” to specify the size of the borders.
Ja, gibt es. Geben Sie einfach die folgenden Zeilen im LaTeX-Vorspann (z.B. indem sie das entsprechende Feld im Konfigurationsdialog (“Exportieren”->“Zusätzliche Zeilen für die LaTeX preamble”) angeben.
\usepackage[left=1cm,right=1cm,top=1cm,bottom=1cm]{geometry}
If wxWidgets is new enough, wxMaxima will automatically be
in dark mode if the rest of the operating system is. The worksheet
itself is by default equipped with a bright background. But it can be
configured otherwise. Alternatively, there is a
View/Invert worksheet brightness
menu entry that allows to
quickly convert the worksheet from dark to bright and vice versa.
WxMaxima delegates some big tasks like parsing Maxima’s >1000-page-manual to background tasks, which normally goes totally unnoticed. At the moment the result of such a task is needed, though, it is possible that wxMaxima needs to wait a couple of seconds before it can continue its work.
(Dieses Problem kann bei anderen Anwendungen auch auftreten). Die Übersetzungen scheinen okay zu sein, nachdem auf ‘OK’ geklickt wurde. WxMaxima verwendet nicht nur die eigenen Übersetzungen sondern auch einige Übersetzungen des wxWidgets Frameworks.
These locales maybe not present in the system. On Ubuntu/Debian
systems they can be generated using:
dpkg-reconfigure locales
You can find these symbols in the Unicode sidebar (search for ‘double-struck capital’). But the selected font must also support these symbols. If they do not display properly, select another font.
Usually you can start programs with a graphical user interface just by clicking on a desktop icon or desktop menu entry. WxMaxima - if started from the command line - still provides some command-line switches, though.
-v
oder --version
: Gibt die Versionsnummer
aus-h
oder --help
: Gibt einen kurzen
Hilfetext aus-o
oder --open=<str>
: Öffnet den
Dateinamen, der als Argument dieser Kommandozeilenoption angegeben
wurde.-e
oder --eval
: Evaluiere die Datei nach
dem Öffnen.-b
or --batch
: If the command-line opens a
file all cells in this file are evaluated and the file is saved
afterward. This is for example useful if the session 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.--logtostderr
: Log all “debug messages” sidebar
messages to stderr, too.--pipe
: Pipe messages from Maxima to stdout.--exit-on-error
: Close the program on any maxima
error.-f
or --ini=<str>
: Use the init file
that was given as an argument to this command-line switch-u
, --use-version=<str>
: Use maxima
version <str>
.-l
, --lisp=<str>
: Use a Maxima
compiled with Lisp compiler <str>
.-X
, --extra-args=<str>
: Allows to
specify extra Maxima arguments-m
or --maxima=<str>
: allows
specifying the location of the maxima binary--enableipc
: Lets Maxima control wxMaxima via
interprocess communications. Use this option with care.--wxmathml-lisp=<str>
: Location of wxMathML.lisp
(if not the built-in should be used, mainly for developers).Instead of a minus, some operating systems might use a dash in front of the command-line switches.
wxMaxima is mainly developed using the programming language C++ using the wxWidgets framework, as build system we use CMake, a small part is written in Lisp. You can contribute to wxMaxima, join the wxMaxima project at https://github.com/wxMaxima-developers/wxmaxima, if you have knowledge of these programming languages and want to help and contribute to the open source project wxMaxima.
But not only programmers are necessary! You can also contribute to wxMaxima, if you help to improve the documentation, find and report bugs (and maybe bugfixes), suggest new features, help to translate wxMaxima or the manual to your language (read the Readme in the locale subdirectory how wxMaxima and the manual can be translated).
Or answer questions of other users in the discussion forum.
The source code of wxMaxima is documented using Doxygen here.
The program is nearly self-contained, so except for system libraries
(and the wxWidgets library), no external dependencies (like graphic
files or the Lisp part (the wxmathML.lisp
-file) is needed,
these files are included in the executable.
If you are a developer, you might want to try out a modified
wxmathML.lisp
-file without recompiling everything, one can
use the command line option --wxmathml-lisp=<str>
to
use another Lisp file, not the included one.