WxMaxima

1 The wxMaxima user manual

WxMaxima ist ein graphisches Benutzerinterface (GUI) für das Computer-Algebrasystem Maxima. wxMaxima erlaubt die Nutzung aller Funktionen dieses Programms und bietet Assistenten für dessen wichtigste Funktionen an. Dieses Handbuch beschreibt die Features, die wxMaxima zu einer der beliebtesten graphischen Benutzerumgebung für Maxima gemacht haben.


2 Introduction to wxMaxima

2.1 Maxima and 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.

2.1.1 Maxima

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.

Maxima Screenshot, Kommandozeile

Extensive documentation for Maxima is available in the internet. Part of this documentation is also available in wxMaxima’s help menu. Pressing the Help key (on most systems the F1 key) causes wxMaxima’s context-sensitive help feature to automatically jump to Maxima’s manual page for the command at the cursor.

2.1.2 WxMaxima

wxMaxima ist ein graphisches Benutzer-Interface, das die komplette Funktionalität und Flexibilität von Maxima zu nutzen erlaubt. Zudem bietet es viele Funktionalitäten an, die die Verwendung von Maxima einfacher gestalten. Beispielsweise kann es den Inhalt eines Arbeitsblattes, einer Zelle des Arbeitsblatts oder einen Teil einer Formel nach LaTeX, MathML oder in eine RTF-Formel für eine Textverarbeitung konvertieren. Dokumentation für wxMaxima kann im Internet gefunden werden, oder über das Hilfemenü.

wxMaxima Fenster

wxMaxima lässt alle Berechnungen im Hintergrund durch das Kommandozeilen-Werkzeug Maxima durchführen.

2.2 Workbook basics

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.

2.2.1 The workbook approach

Eine der Sachen, die neue Benutzer oft verwirrt, ist, dass das Arbeitsblatt von wxMaxima in Zellen aufgeteilt ist, die nur auf Befehl vom Benutzer an Maxima gesendet werden. Wenn eine Zelle ausgewertet wird, werden alle Maxima-Befehle (nur) dieser Zelle als Batch-Befehle ausgewertet. Man kann auch mehrere Zellen auswählen und gleichzeitig auswählen. Oder das gesamte Arbeitsblatt auf einmal auswerten WxMaxima’s Ansatz für die Auswertung von Befehlen mag seltsam erscheinen. Es vereinfacht aber die Arbeit mit großen Dokumenten (wo man nicht jede Änderung eine komplette Neu-Evaluierung des ganzen Dokuments auslösen will. Ausserdem ist dieser Ansatz für die Fehlersuche praktisch.

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.

Eingabe/Ausgabe Zelle

Wird eine Code-Zelle ausgewertet, weist ihr Maxima eine Marke zu (standardmäßig ist diese in roter Schrift gehalten und beginnt mit einem %i), über das sie später wieder referenziert werden kann. Für die Ausgabe wird eine Marke generiert, die standardmäßig mit %o beginnt und nicht angezeigt wird, außer der Benutzer hat der Formel einen sprechenden Namen gegeben, der stattdessen angezeigt werden kann. Der %o-Label den Maxima automatisch erzeugt, ist trotzdem verwendbar.

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).

Ein Beispiel verschiedener wxMaxima Zelltypen

2.2.2 Cells

Das Arbeitsblatt ist in Zellen aufgeteilt. WxMaxima kennt die folgenden Zelltypen:

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.

Ein Kommentar (wie in der Programmiersprache C) kann als Teil einer Mathematik-Eingabezelle eingegeben werden: /* Dieser Kommentar wird von Maxima ignoriert */.

/*” markiert den Beginn des Kommentars, “*/” das Ende.

2.2.3 Horizontal and vertical cursors

Wenn in einer Textverarbeitung versucht wird, einen Satz auszuwählen, wird diese versuchen, Beginn und Ende der Auswahl so zu verschieben, dass ganze Wörter ausgewählt sind. wxMaxima wird aus diesem Grund, wenn mehr als eine Zelle ausgewählt wird, die Auswahl auf ganze Zellen ausdehnen.

Was ungewöhnlich erscheinen kann ist, dass wxMaxima alternativ einen vertikalen oder einen horizontalen Cursor darstellen kann. wxMaxima wechselt zwischen ihnen nach Bedarf:

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)).

(Blinkender) Horizontaler Cursor nachdem wxMaxima gestartet wurde

Möglicherweise wollen Sie einen anderen Zelltyp erzeugen (im “Zellen” Menü), vielleicht eine Titelzelle oder Textzelle, die beschreibt, was das Arbeitsblatt machen wird, wenn Sie beginnen, ein Arbeitsblatt zu erstellen.

Wenn Sie zwischen den Zellen navigieren, sehen Sie den (blinkenden) horizontalen Cursor. An dieser Stelle können Sie eine Zelle einfügen - entweder eine mathematische Eingabezelle, indem einfach der Maxima-code eingegeben wird), oder eine andere Zelle (unter Verwendung des Zellen-Menüs).

(Blinkender) Horizontaler Cursor zwischen den Zellen

2.2.4 Sending cells to Maxima

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.

2.2.5 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 a 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 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).

2.2.5.1 Greek characters

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.

Für die Mehrzahl der Länder ist aus diesem Grund eine Codepage mit 256 Zeichen definiert worden, die allerdings in den meisten Ländern beispielsweise keine griechischen Buchstaben beinhaltet, die in der Mathematik oft verwendet werden. Um diese Begrenzung zu umgehen, wurde Unicode entwickelt: Eine Zeichencodierung, die englischen Text wie gewohnt aussehen lässt, aber viel mehr als 256 Zeichen ermöglicht.

Wenn Maxima mit einem Lisp-Compiler generiert wurde, der Unicode unterstützt oder sich nicht darum kümmert, auf welche Weise Zeichen codiert werden, unterstützt es Unicode. Da meist eine dieser Bedingungen gegeben ist, bietet WxMaxima eine Methode an, griechische Zeichen mit der Tastatur einzugeben:

Zeichen Griechischer Buchstabe Zeichen Griechischer Buchstabe Zeichen Griechischer Buchstabe
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.

2.2.5.1.1 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:

Zeicheneingabe Mathematisches Symbol
hbar Planck 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.

ESC61ESC therefore results in an a.

Viele der Unicode-Symbole (mit der Ausnahme der logischen Verknüpfungen) haben keine direkte Entsprechung in Maxima und werden daher als normale Zeichen interpretiert. Falls Maxima eine Lisp-Version verwendet, die Unicode nicht unterstützt, kann das eine Fehlermeldung verursachen.

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).

2.2.6 Unicode replacement

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.

Unicode has several “common” fractions encoded as one Unicode code point: ¼, ½, ¾, ⅐, ⅑, ⅒, ⅓, ⅔, ⅕, ⅖, ⅗, ⅘, ⅙, ⅚, ⅛, ⅜, ⅝, ⅞

wxMaxima will replace them with their Maxima representations, e.g (1/4) before the input is sent do Maxima. There are also , which will be replaced by 1/ and (used in baseball), which will be replaced by (0/3).

It is recommended to use Maxima code (not these Unicode code points) in input cells (Rationale: (a) it might be possible, that the used font for math input does not contain them; (b) if you save the document as wxm-file, it is usually readable by (command line) Maxima, but these changes will of course not work in command line Maxima); but they may occur, if you cut&paste a formula from another document.

2.2.7 Side Panes

Die meisten Maxima-Befehle, ein Inhaltsverzeichnis, Debug-Meldungen oder die Liste der zuletzt verwendeten Befehle werden in Seitenleisten angeboten, die über das “Ansicht”-Menü aktiviert und an beliebige Stellen in oder außerhalb des wxMaxima-Fensters verschoben werden können. Ebenso kann eine Seitenleiste mit griechischen Buchstaben geöffnet werden, die eine alternative Methode anbietet, griechische Buchstaben einzugeben.

Beispiele verschiedener Seitenbereiche

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.

Increase or decrease headings in the TOC side pane

2.2.8 MathML output

Einige Textverarbeitungen verstehen entweder MathML oder (wie LibreOffice) haben einen Formeleditor, der die Option “importiere MathML aus der Zwischenablage” unterstützt. Andere unterstützen Mathematik im RTF-Format. wxMaxima bietet daher einige entsprechende Optionen im Rechtsklick-Menü an.

2.2.9 Markdown support

WxMaxima unterstützt einige Markdown-Kommandos, die nicht mit Konstrukten kollidieren, die in mathematischen Formeln vorkommen. Eines dieser Elemente sind Aufzählungen:

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

WxMaxima will recognize text starting with > chars as block quotes:

Ordinary text
> quote quote quote quote
> quote quote quote quote
> quote quote quote quote
Ordinary 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.

2.2.10 Hotkeys

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:

2.2.11 Raw TeX in the TeX export

Wenn eine Textzelle mit “TeX:” beginnt, wird der Rest ihres Inhalts bei der Konvertierung des Dokuments nach TeX unverändert ausgegeben.

2.3 File Formats

Das Arbeitsblatt kann auf verschiedene Weisen gespeichert werden:

2.3.1 .mac

.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.

Laden einer Datei mit batch()

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. (Kommandozeilen)-Maxima wird den unbekannten Befehl ignorieren und ihn als Ausgabe erneut ausgeben.

.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.

2.3.2 .wxm

.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. Well - mostly. Questions (like asksign(x)) are problematic, as the answer is written in the .wxm file (so that it can be suggested after loading), but that can Maxima not evaluate. You can prevent Maxima from asking questions by using assume() to declare some properties, Maxima wants to know.

With this plain-text format, it sometimes is unavoidable that worksheets that use new features are not downwards-compatible with older versions of wxMaxima.

2.3.2.1 File format of wxm files

This is just a plain text file (you can open it with a text editor), containing the cell contents as some special Maxima comments.

It starts with the following comment:

/* [wxMaxima batch file version 1] [ DO NOT EDIT BY HAND! ]*/
/* [ Created with wxMaxima version 24.02.2_DevelopmentSnapshot ] */

And then the cells follow, encoded as Maxima comments, e.g. a section cell:

/* [wxMaxima: section start ]
Title of the section
   [wxMaxima: section end   ] */

or (in a Math cell the input is of course not commented out (the output is not saved in a wxm file)):

/* [wxMaxima: input   start ] */
f(x):=x^2+1$
f(2);
/* [wxMaxima: input   end   ] */

Images are Base64 encoded with the image type as first line):

/* [wxMaxima: image   start ]
jpg
[very chaotic looking character sequence]
   [wxMaxima: image   end   ] */

A page break is just one line containing:

/* [wxMaxima: page break    ] */

And folded cells marked by:

/* [wxMaxima: fold    start ] */
...
/* [wxMaxima: fold    end   ] */

2.3.3 .wxmx

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.

2.3.3.1 File format of wxmx files

A wxmx-file seems to be a binary format, but one can handle it with tools, which are included in your OS. It is a zip file, one can decompress it with unzip (maybe rename it before, so that is recognized by the unzip program of your OS). We do not use the compression function, just the possibility to merge several files into one file - images are already compressed and the rest is simple text (probably much smaller, than huge images, which are included).

It does contain the following files:

So, if something goes wrong, you can unzip a wxMaxima document (maybe rename it before to a zip-file), maybe make changes in the content.xml file with a text editor, or replace an broken image, zip the files again, probably rename the zip to a wxmx-file - and you get another modified wxmx-file.

2.4 Configuration options

Einige Variablen, über die Maxima konfiguriert wird, können auf zwei Arten eingestellt werden:

wxMaxima Konfiguration 1

2.4.1 Default animation framerate

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.

2.4.2 Default plot size for new maxima sessions

Beim nächsten Start werden im Arbeitsblatt eingebettete Diagramme mit dieser Größe erstellt, wenn der Wert von wxplot_size nicht geändert wird.

Diese Variable kann notfalls auch nur für das aktuelle Diagramm gesetzt werden:

wxdraw2d(
   explicit(
       x^2,
       x,-5,5
   )
), wxplot_size=[480,480]$

2.4.3 Match parenthesis in text controls

Diese Option schaltet zwei Funktionen ein:

2.4.4 Don’t save the worksheet automatically

Wenn diese Option gewählt ist, wird das Arbeitsblatt nur überschrieben, wenn der Benutzer es speichert. Ein aktuelles Backup wird in diesem Fall im temp-Verzeichnis abgelegt.

Ist diese Option nicht angewählt, arbeitet wxMaxima wie eine moderne Handy-App:

2.4.5 Where is the configuration saved?

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.


3 Extensions to Maxima

wxMaxima’s Hauptaufgabe ist es, die Ein- und Ausgaben von Maxima graphisch darzustellen. An einigen Stellen fügt es jedoch Funktionalitäten zu Maxima hinzu. WxMaxima’s Fähigkeiten, Reports zu generieren, indem Arbeitsblätter nach HTML und LaTeX exportiert werden können, wurde erwähnt. Dieser Abschnitt betrachtet einige Arten, wie wxMaxima die Einbindung von Graphiken in ein Arbeitsblatt verbessert

3.1 Subscripted variables

wxsubscripts gibt an, wie (und ob) wxMaxima Variablennamen automatisch tiefstellen wird:

Falls es false gesetzt wird, wird die Funktion deaktiviert, wxMaxima wird nicht Teile von Variablennamen nach einem Unterstrich tiefstellen.

Falls es auf 'all gesetzt wird, wird alles nach einem Unterstrich tiefgestellt.

Wenn es auf true gesetzt ist, werden Variablennamen im Format x_y mit einem tiefgestellten y dargestellt, wenn

Wie Variablen mit wxsubscripts automatisch tiefgestellt werden

Wenn nicht, kann jede Variable als mit tiefgestelltem y ausgestattet deklariert werden mittels wxdeclare_subscript(variablenname); oder wxdeclare_subscript([variablenname1,variablenname2,...]); Rückgängig gemacht werden kann dies mittels wxdeclare_subscript(variablenname,false);

You can use the menu “View->Autosubscript” to set these values.

3.2 User feedback in the status bar

Kommandos, die lange arbeiten, können Fortschrittsinformationen in die Statuszeile ausgeben. Diese Informationen überschreiben deren Inhalt. wxstatusbar() kann sogar in Bibliotheken verwendet werden, bei denen nicht bekannt ist, ob sie mit wxMaxima oder in einem Maxima ohne Frontend verwendet werden: Wenn wxMaxima diese Funktion nicht definiert hat, wird sie von Maxima einfach als undefinierte Funktion betrachtet und nicht weiter bearbeitet.

for i:1 thru 10 do (
    /* Tell the user how far we got */
    wxstatusbar(concat("Pass ",i)),
    /* (sleep n) is a Lisp function, which can be used */
    /* with the character "?" before. It delays the */
    /* program execution (here: for 3 seconds) */
    ?sleep(3)
)$

3.3 Exporting the worksheet from within Maxima

The command wxworksheettohtml() exports the current worksheet to an HTML file from within a running Maxima session, which is convenient for scripted or batch export. Like wxstatusbar() it is safe to use in code that might also run in plain (console) Maxima: if wxMaxima isn’t present the command is simply left unevaluated.

wxworksheettohtml("report.html")$
wxworksheettohtml("report.html", flavor="svg", wxmx=true)$

A relative file name is interpreted relative to Maxima’s working directory. The optional keyword options are:

option values meaning
flavor mathml (default), mathjax, svg, bitmap how the equations are rendered in the exported page
wxmx false (default), true embed a downloadable .wxmx copy of the session

The flavor values match the equation formats offered by the graphical File → Export dialog: mathml produces a self-contained page that needs no internet connection, mathjax adds a MathJaX fall-back for browsers that still lack MathML, and svg/bitmap render every equation to an image.

The companion command wxworksheettotex() exports to a LaTeX (.tex) file the same way:

wxworksheettotex("report.tex")$
wxworksheettotex("report.tex", documentclass="report", documentclassoptions="12pt,a4paper")$
option meaning
documentclass overrides the LaTeX \documentclass (e.g. "article", "report")
documentclassoptions overrides its options (e.g. "12pt,a4paper")

Support for wxworksheettopdf() is planned.

3.4 Plotting

Diagramme haben per definitionem mit einer graphischen Benutzerumgebung zu tun, weswegen an dieser Stelle Erweiterungen von Maxima zu erwarten sind.

3.4.1 Embedding a plot into the worksheet

Maxima weist normalerweise Gnuplot an, Diagramme in eigenen Fenstern darzustellen. Wenn dem entsprechenden draw oder plot-Kommando ein “wx” vorangestellt wird, wird das Bild stattdessen in das Arbeitsblatt eingebaut.

Die folgenden Plot-Funktionen haben wx-Äquivalente:

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).

If you got problems with one of these functions, please check, if the problem exists in the the Maxima function too (e.g. you got an error with wxplot2d(), check the same plot in the Maxima command plot2d() (which opens the plot in a separate Window)). If the problem does not disappear, it is most likely a Maxima issue and should be reported in the Maxima bugtracker. Or maybe a Gnuplot issue.

3.4.2 Making embedded plots bigger or smaller

Wie bereits beschrieben kann die Größe von Diagrammen mittels der Variable wxplot_size definiert werden. Die plot-Funktionen von wxMaxima beachten den Inhalt dieser Variablen, die die Größe von Plots in Pixeln angibt. Ihr Inhalt kann jederzeit ausgelesen oder geändert werden:

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.

3.4.3 Better quality plots

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.

3.4.4 Opening embedded plots in interactive Gnuplot windows

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.

3.4.5 Opening Gnuplot’s command console in plot windows

On MS Windows, there are two Gnuplot programs, gnuplot.exe and wgnuplot.exe. You can configure, which command should be used using the configuration menu. wgnuplot.exe offers the possibility to open a console window, where gnuplot commands can be entered into, gnuplot.exe does not offer this possibility. Unfortunately, wgnuplot.exe causes Gnuplot to “steal” the keyboard focus for a short time every time a plot is prepared.

3.4.6 Embedding animations into the spreadsheet

Es ist meist schwer, aus 3D-Diagrammen quantitative Aussagen zu entnehmen. Eine Alternative ist es, den 3. Parameter auf das Mausrad zu legen. Das Kommando with_slider_draw ist eine Version von wxdraw2d, die mehrere Plots erstellt und es erlaubt, mittels eines Schiebers zwischen diesen hin- und herzuschalten. WxMaxima kann die Animation auch als animierte .gif-Datei exportieren.

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
    )
)$

Wer plot draw vorzieht, dem steht ein zweiter Satz an Funktionen zur Verfügung:

Die Standard-Bildwiederholrate für Animationen kann im Konfigurations-Dialog von wxMaxima eingestellt werden. Um die Geschwindigkeit einer einzelnen Animation zu ändern, kann die Variable wxanimate_framerate geändert werden:

wxanimate(a, 10,
    sin(a*x), [x,-5,5]), wxanimate_framerate=6$

Die Animations-Funktionen haben eine Eigentümlichkeit, die daher rührt, dass sie makelist verwenden: Der Parameter, der sich von Bild zu Bild ändert, wird nur eingesetzt, wenn die Variable direkt sichtbar ist. Das folgende Beispiel scheitert daher:

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
    )
)$

3.4.7 Opening multiple plots in contemporaneous windows

Strenggenommen kein Feature von wxMaxima. Aber Maxima erlaubt auf vielen Systemen das folgende Beispiel von Mario Rodriguez auszuführen:

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 in einem Fenster sind auch möglich (dies ist auch möglich in Kommandozeilen-Maxima mit dem Standard-draw()-Befehl:

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))
);

3.4.8 The “Plot using draw” side pane

Die “Plotte mittels Draw”-Seitenleiste enthält einen Codegenerator, der es erlaubt, einen Teil der Flexibilität des draw-Pakets von Maxima zu nutzen.

3.4.8.1 2D

Generates the skeleton of a draw() command that draws a 2D scene. This scene later has to be filled with commands that generate the scene’s contents, for example by using the buttons in the rows below the “2D” button.

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.

3.4.8.2 3D

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.

3.4.8.3 Ausdruck

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.

3.4.8.4 Implicit plot

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.

3.4.8.5 Parametric plot

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.

3.4.8.6 Points

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.

3.4.8.7 Diagram title

Bestimmt den Titel des Diagramms.

3.4.8.8 Axis

Die Einstellungen für die Achsen.

3.4.8.9 Contour

(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.

3.4.8.10 Plot name

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.

3.4.8.11 Line colour

Setzt die Linienfarbe für die nun folgenden Plots des aktuellen draw-Befehls.

3.4.8.12 Fill colour

Setzt die Füllfarbe für die nun folgenden Objekte des aktuellen draw-Kommandos.

3.4.8.13 Grid

Ein Assistent, der die Gitterlinien einzustellen hilft.

3.4.8.14 Accuracy

Erlaubt das Wählen zwischen Geschwindigkeit und Genauigkeit bei der Erstellung der folgenden Kurven.

3.4.9 Modify font and font size for plots

Especially when you use a high resolution display, the default font size might be very small. For the draw-based commands, you can set the font / font size using options like font=..., font_size=..., e.g.:

wxdraw2d(
     font="Helvetica",
     font_size=30,
     explicit(sin(x),x,1,10));

For the plot-commands (e.g. wxplot2d, wxplot3d) font sizes and fonts can be set using the gnuplot_preamble command, e.g.:

wxplot2d(sin(x),[x,1,10],
         [gnuplot_preamble, "set tics font \"Arial, 30\"; set xlabel font \",20\"; set ylabel font \",20\";"]);

This sets the font for the numbers to Arial with size 30, the size for the xlabel and ylabel font to 20 (with the default font).

Read the Maxima and Gnuplot documentation for further information. Note: Gnuplot seems to have issues with larger font sizes, see wxMaxima issue 1966.

3.5 Embedding graphics

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("man.png");

3.6 Startup files

Der Konfigurationsdialog von wxMaxima bietet an, zwei Dateien mit Maxima-Befehlen zu bearbeiten:

For example, if Gnuplot is installed in /opt (maybe on MacOS), you can add gnuplot_command:"/opt/local/bin/gnuplot"$ (or /opt/gnuplot/bin/gnuplot or any other path) to these files.

These files are in the Maxima user directory (usually %USERPROFILE%/maxima in Windows, $HOME/.maxima otherwise). The location can be found out with the command: maxima_userdir;

3.7 Special variables wx…

3.8 Pretty-printing 2D output

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.

Ein drittes Tabellen-Beispiel

Da Matrizen effektiv Listen von Listen sind, können auch sie in Tabellen verwandelt werden.

Ein anderes table_form Beispiel

The function wx_matrix() is a wrapper for Maxima’s matrix() command that allows for more flexible formatting of matrices in wxMaxima:

wx_matrix( <matrix>, [options] )

Example:

wx_matrix(matrix(["Name", "Value"], ["X", 10], ["Y", 20]),
          lines=true, rownames=true, colnames=true, parenstyle=square);

3.9 Bug reporting

WxMaxima bietet einige Funktionen für das Melden von Fehlern an:

3.10 Marking output being drawn in red

Maxima’s box() command causes wxMaxima to print its argument with a red foreground, if the second argument to the command is the text highlight.

3.11 Output rendering.

Mittels set_display() kann man angeben, wie wxMaxima die Ausgabe anzeigt.

set_display('xml) is the default value. Here Maxima speaks to wxMaxima using an (machine readable) XML-dialect (can be seen in the “Raw XML sidebar”) and outputs the resulting formulas nicely rendered, e.g. pretty Matrices, Square root signs, fractions, etc.

set_display('ascii) causes wxMaxima to output formulas as in command line Maxima - as ASCII-Art.

set_display('none) bewirkt ‘einzeilige’ ASCII Ausgaben - dasselbe was (Kommandozeilen-)Maxima mit display2d:false; macht.

4 Help menu

WxMaxima’s help menu provides access to the Maxima and wxMaxima manual, tips, some example worksheets and in command line Maxima included demos (the demo() command).

Please notice, that the demos write:

At the ’_’ prompt, type ’;’ and <enter> to proceed with the demonstration.

That is valid for command-line Maxima, however in wxMaxima by default it is necessary to continue the demonstration with: CTRL+ENTER

(That can be configured in the Configure->Worksheet->“Hotkeys for sending commands to Maxima” menu.)


5 Troubleshooting

5.1 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. 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.

Auf Unix/Linux-Rechnern kann ein weiterer Grund sein, dass das “loopback”-Netzwerkgerät (erlaubt Netzwerkverbindungen zwischen 2 Prorammen am selben Rechner) nicht korrekt eingestellt ist.

5.2 How to save data from a broken .wxmx file

Die meisten modernen XML-basierten Formate sind von ihrem Inhalt her einfache .zip-Dateien. wxMaxima schaltet bei ihnen die Kompression nicht ein, weswegen ihr Inhalt in einem normalen Texteditor lesbar ist.

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.

And even if there isn’t such a file: The .wxmx file is a container format and the XML portion is stored uncompressed. It it is possible to rename the .wxmx file to a .txt file and to use a text editor to recover the XML portion of the file’s contents (it starts with <?xml version="1.0" encoding="UTF-8"?> and ends with </wxMaximaDocument>. Before and after that text you will see some unreadable binary contents in the text editor).

Wird eine Textdatei mit diesem Text (z.B. indem er mit Copy+Paste in eine neue Datei eingefügt wird) als .xml-Datei gespeichert, weiß wxMaxima, wie man den Text-Teil des Dokuments rekonstruiert.

5.3 I want some debug info to be displayed on the screen before my command has finished

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) is a Lisp function, which can be used */
   /* with the character "?" before. It delays the */
   /* program execution (here: for 3 seconds) */
   ?sleep(3)
)$

Alternativ kann man sich das wxstatusbar()-Kommando oben ansehen.

5.4 Plotting only shows a closed empty envelope with an error message

wxMaxima konnte die Datei, die Maxima Gnuplot instruiert hat, zu generieren, nicht lesen.

Mögliche Gründe für diesen Fehler sind:

5.5 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. 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.

5.6 I lost cell content and undo doesn’t remember

Es gibt zwei Rückgängigmach- Funktionen, die beide die wichtige Information enthalten können:

playback();

5.7 WxMaxima starts up with the message “Maxima process terminated.”

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.

5.8 Maxima is forever calculating and not responding to input

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.

5.9 My SBCL-based Maxima runs out of memory

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.

SBCL Speicherkonfiguration

5.10 Input sometimes is sluggish/ignoring keys on Ubuntu

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.

5.11 WxMaxima halts when Maxima processes Greek characters or Umlauts

Wenn Maxima mittels SBCL compiliert wurde, können die folgenden Befehle zur .sbclrc hinzugefügt werden:

(setf sb-impl::*default-external-format* :utf-8)

Wo diese Datei abgelegt werden muss, ist systemabhängig. Aber ein mit SBCL compiliertes Maxima kann durch den folgenden Befehl angewiesen werden, den Ort zu nennen:

:lisp (sb-impl::userinit-pathname)

5.12 Note concerning Wayland (recent Linux/BSD distributions)

There seem to be issues with the Wayland Display Server and wxWidgets. WxMaxima may be affected, e.g. that sidebars are not moveable.

You can either disable Wayland and use X11 instead (globally) or just tell, that wxMaxima should use the X Window System by setting: GDK_BACKEND=x11

z.B. Wxmaxima wie folgt starten:

GDK_BACKEND=x11 wxmaxima

5.13 The menu bar disappears on KDE Plasma

On some KDE Plasma installations the global menu bar disappears when clicked. As this is a bug in the global menu proxy, the only way to avoid it is to tell that wxMaxima should use its own menu bar instead of the global one. This is done by setting: UBUNTU_MENUPROXY=0

Starting with version 26.05.0, wxMaxima attempts to set this variable automatically if it detects an affected system (KDE, Unity, or Ubuntu with older wxWidgets versions).

If the automatic fix fails, you can manually start wxMaxima with:

UBUNTU_MENUPROXY=0 wxmaxima

5.14 Why is the integrated manual browser not offered on my Windows PC?

Either wxWidgets wasn’t compiled with support for Microsoft’s webview2 or Microsoft’s webview2 isn’t installed.

5.15 Why is the external manual browser not working on my Linux box?

The HTML browser might be a snap, flatpack or appimage version. All of these typically cannot access files that are installed on your local system. Another reason might be that maxima or wxMaxima is installed as a snap, flatpack or something else that doesn’t give the host system access to its contents. A third reason might be that the maxima HTML manual isn’t installed and the online one cannot be accessed.

5.16 Can I make wxMaxima output both image files and embedded plots at once?

Das Arbeitsblatt enthält png-Dateien. WxMaxima erlaubt dem User anzugeben, wo sie generiert werden sollen:

wxdraw2d(
    file_name="test",  /* extension .png automatically added */
    explicit(sin(x),x,1,10)
);

Wenn ein unterschiedliches Format benutzt wird, ist es einfacher, Bilder zu generieren und dann in das Arbeitsblatt zu importieren:

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)
);

5.17 Can I set the aspect ratio of an embedded plot?

Verwenden Sie die Variable wxplot_size:

wxdraw2d(
    explicit(sin(x),x,1,10)
),wxplot_size=[1000,1000];

5.18 After upgrading to MacOS 13.1 plot and/or draw commands output error messages like

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.

5.19 Logging

Log messages might be helpful to debug problems. WxMaxima can log many events. Most log entries will be helpful for developers, especially in case of problems or bugs. If you run a “Release”-Build, the log windows is not shown by default, if you run a development version, it is shown by default as a second window. You can enable and disable this window using the “View->Toggle log window” menu entry.

Messages are not ‘lost’, if the log window is not shown, if you select to show the log window later, you will see past log messages (if you did not clear the messages).

Such messages may be helpful, when you create bug reports (or trying to find a bug by yourself).

Log messages can (additionally) be printed to STDERR, when using the command line option “–logtostderr”. On Windows a separate text console will be opened, as a Windows GUI application does not have the standard IO connected.


6 FAQ

6.1 Is there a way to make more text fit on a LaTeX page?

Ja. Verwenden Sie das LaTeX Paket “geometry” um die Größe der Ränder anzugeben.

You can add the following line to the LaTeX preamble (for example by using the respective field in the config dialogue (“Export”->“Additional lines for the TeX preamble”), to set borders of 1cm):

\usepackage[left=1cm,right=1cm,top=1cm,bottom=1cm]{geometry}

6.2 Is there a dark mode?

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.

6.3 WxMaxima sometimes hangs for several seconds once in the first minute

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.

6.4 Especially when testing new locale settings, a message box “locale ’xx_YY’ can not be set” occurs

Locale Warnung

(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 Übersetzungen des wxWidgets Frameworks.

Diese Übersetzungen sind möglicherweise im System nicht vorhanden. Auf Ubuntu/Debian Linux-Systemen können sie mit dpkg-reconfigure locales erzeugt werden.

6.5 How can I use symbols for real numbers, natural numbers (ℝ, ℕ), etc.?

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.

6.6 How can a Maxima script determine, if it is running under wxMaxima or command line Maxima?

Wenn wxMaxima verwendet wird, hat die Maxima-Variable maxima_frontend den Wert wxmaxima. Die Maxima-Variablemaxima_frontend_version` enthält dann die wxMaxima-Version.

Wenn kein Frontend verwendet wird (Kommandozeilen-Maxima wird verwendet), dann haben diese Variablen den Wert false).

6.7 Help! I can not save my document!

If saving as wxmx file does not work, try saving the document as wxm file (and vice versa). And you can also try to remove all output (Menu Cell->Remove all output) and save that file, maybe some unexpected output causes issues during the save process.


7 Command-line arguments

Üblicherweise werden Programme mit einer graphischen Oberfläche einfach mit einem Mausklick auf ein Desktop-Icon oder einen Desktop-Menüeintrag gestartet. WxMaxima - falls es von der Kommandozeile aus gestartet wird - bietet doch einige Kommandozeilen-Optionen.

Manche Betriebssysteme verwenden bei Kommandozeilenparametern einen Schrägstrich statt eines Minuszeichens.


8 About the program, contributing to wxMaxima

WxMaxima wird hauptsächlich in der Programmiersprache C++ entwickelt, verwendet das wxWidgets framework, als Build-System verwenden wir CMake, ein kleiner Teil ist in Lisp geschrieben. Sie können zu wxMaxima beitragen, werden Sie Teil des wxMaxima-Projekts auf https://github.com/wxMaxima-developers/wxmaxima, wenn Sie Kenntnisse dieser Programmiersprachen haben und zum Open-Source-Projekt wxMaxima etwas beitragen können.

Aber nicht nur Programmierer sind notwendig! Sie können auch zu wxMaxima beitragen, indem Sie die Dokumentation verbessern, Fehler finden und melden (und vielleicht auch Fehlerlösungen) oder wxMaxima oder die Anleitung übersetzen helfen (Siehe die Readme-Datei im locale subdirectory, wie das übersetzen funktioniert.

Oder Fragen von anderen Benutzern im Diskussionsforum beantworten.

Der Quellcode von wxMaxima ist mit Doxygen hier dokumentiert.

Das Programm ist nahezu unabhängig, ausser einiger Systembibliotheken (und der wxWidgets-Bibliothek) sind keine externen Abhängigkeiten (z.B. externe Graphiken oder der Lisp-Teil (die wxMathML.lisp-Datei) notwendig, diese Dateien sind alle in wxMaxima eingebaut.

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.