WxMaxima

El manual del usuario de wxMaxima

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.

Logotipo wxMaxima

Antes que aparezca en el contexto unos pocos puntos permaneciendo la navegación están en orden. Inmediatamente debajo hay una tabla pequeña de los contenidos. Pulsando cualquiera de los ítemes listados mueve el cursor al techo de la sección indicada del manual. Pulsando en Índice mueve el cursor a un índice del contenido. Esta tabla extendida pude ser utilizada para explorar más directamente en partes específicas del manual. El enlace Contenidos aparece en los lugares a través del texto para propósitos de exploración.

WxMaxima basics

Las instrucciones wxMaxima agregan a Maxima

Qué hacer si wxMaxima no funciona como esperaba

Preguntas frecuentes

Los argumentos de la línea de instrucción admite wxMaxima


1 Introducción de wxMaxima

1.1 Maxima y wxMaxima

En el dominio de código abierto, los sistemas grandes están divididos normalmente en proyectos más pequeños que son más fáciles para manipular en grupos pequeños de desarrolladores. Por ejemplo un programa para el quemado del DVD consistirá de una herramienta de línea de instrucciones que actualmente quema el CD un interfaz gráfico de usuario que permite a los usuarios implementarlo sin tener que aprenderse todas las opciones de línea de instrucciones como complemento “enviar-a-CD”para una aplicación de gestión de ficheros, para la función «quemar a CD» de un reproductor de música y como el grabador de CD para una herramienta de respaldo DVD. Otra ventaja es que dividiendo una tarea grande en partes más pequeñas permite a los desarrolladores proporcionar varios interfaces de usuarios para el mismo programa.

Un sistema de computación algebraico (CAS) como Maxima encaja dentro de este marco referencial. Un CAS puede proporcionar la lógica detrás de la aplicación de precisión de cálculo arbitrario o puede hacer transformaciones automáticas de fórmulas en el segundo plano de un sistema más grande (p.e., [Sage] (https://www.sagemath.org/)). Alternativamente, puede ser utilizado directamente como un sistema independiente. Maxima pude ser accedido vía una línea de instrucción. A menudo, sin embargo, un interfaz como wxMaxima proporciona una manera más eficiente para acceder al software, especialmente para los recién llegados.

1.1.1 Maxima

Maxima es un sistema algebraico computador completo (CAS) de características. Un CAS es un programa que puede resolver problemas matemáticos reconociendo fórmulas y encontrando una fórmula que resuelva el problema como difícil a ajustar la salida del valor numérico del resultado. En otras palabras, Maxima pude servir como una calculadora que proporciona representaciones numéricas de variables, y además puede proporcionar soluciones analíticas. Más aún, ofrece un rango de métodos numéricos para ecuaciones o sistemas de ecuaciones que no pueden ser analíticamente resueltos.

Pantallazo de Maxima, línea intrucción

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.

1.1.2 WxMaxima

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.

Ventana de wxMaxima

Los cálculos que son introducidos en wxMaxima son realizados por la herramienta de línea de instrucciones de Maxima en el segundo plano.

1.2 Cuaderno básico

Mucho de wxMaxima son auto-explicativos, pero algunos detalles requieren atención. Este sitio contiene un número de cuadernos que dirige varios aspectos de wxMaxima. Trabajar junto algunos de estos (particularmente el tutorial de «10 minutos (wx)Maxima») incrementará la familiaridad de uno con los ambos del contenido de Maxima y el uso de wxMAxima para interactuar con maxima. Este manual se concentra en describir aspectos de wxMaxima que no son como los evidentes y que tal vez no está cubierto dentro del material por línea.

1.2.1 La aproximación del cuaderno

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.

Si el texto está tecleado en wxMaxima automáticamente crea una celda de hoja de trabajo nueva. El tipo de esta celda puede ser seleccionado en la barra de herramientas. Si se crea una celda de código, la celda puede ser enviada a Maxima, la cual causa que el resultado del cálculo es desplegado debajo del código. Una pareja de dichas instrucciones se muestra debajo.

Celda de entrada/salida

En la evaluación de los contenidos de celda de entrada la celda Maxima de entrada asigna una etiqueta a la entrada (por defecto muestra en rojo y reconocible por el «%i») por el cual puede ser referenciado posteriormente dentro de la sesión _wxMaxima:. La salida que genera Maxima genera además obtener una etiqueta que comience con «%o» y por defecto está oculta, excepto si el usuario asigna la salida un nombre. En este caso por defecto el etiquetado definido por el usuario está desplegado. EL estilo «%o» de etiquetado Maxima auto-genera además será accesible, sin embargo.

Al lado de las celdas de entradas wxMaxima permite celdas de texto para documentación, celdas de imagen, celdas de título, celdas de capítulo y celdas de sección. Cada celda tiene su propio búfer para deshacer por lo que se depura a través de modificar los valores de varias celdas y después gradualmente es más fácil revertir las modificaciones no necesarias. Además el mismo cuaderno tiene un búfer global para deshacer que puede deshacer celdas editadas, agregar y borrar.

La figura inferior muestra tipos de celda diferentes (celdas título, sección, subsección, texto, E/S e imagen).

Ejemplo de celdas wxMaxima

1.2.2 Celdas

The worksheet is organized in cells. WxMaxima knows the following cell types:

El comportamiento predeterminado de wxMaxima cuando el texto es teclado para creación automática de una celda matemática. Las celdas de otros tipos puede ser creadas utilizando el menú Celda, utilizando las teclas resaltadas mostradas dentro del menú o utilizando el listado de arrastrar-bajar dentro de la barra de herramientas. Una vez que la celda no matemática es creada, lo que se teclee dentro del fichero es interpretado como texto.

A (C-style) comment text can be part of a math cell as follows: /* This comment will be ignored by Maxima */

/*” marks the start of the comment, “*/” the end.

1.2.3 Cursores horizontales y verticales

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

(blinking) horizontal cursor after wxMaxima start

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

(blinking) horizontal cursor between cells

1.2.4 Envía celdas a “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.

1.2.5 Auto-completado de instrucción

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

1.2.5.1 Caracteres griegos

Equipos tradicionalmente almacenados en valores 8-bit. Esto permite para un máximo de 256 caracteres diferentes. Todas las letras, números t y símbolos de control (final de transmisión, final de cadena, líneas y bordes para dibujar rectángulos para menús :etc_.) de cerca cualquier idioma puede caber dentro de ese límite.

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:

tecla | Letra griega | tecla | letra griega | tecla | letra griega |

|:—–:|:————:|:—–:|:————:|:—- :|:————:| | 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 |

El mismo mecanismo también permite introducir algunos símbolos matemáticos adicionales:

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

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.

ESC 61 ESC por lo tanto resulta en un 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).

1.2.6 Paneles Laterales

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.

Ejemplo de diferentes paneles laterales

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

1.2.7 Salida MathML

Several word processors and similar programs either recognize MathML input and automatically insert it as an editable 2D equation - or (like LibreOffice 5.1) 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.

1.2.8 Admite Markdown

WxMaxima offers a set of standard Markdown conventions that don’t collide with mathematical notation. One of these elements is bullet lists.

Texto ordinario
 * Un ítem, nivel 1 de sangría
 * Otro ítem en nivel 1 de sangría
    * Un ítem en un nivel de sangría 2
    * Un segundo ítem en el nivel 2 de sangría
 * Un tercer ítem en el nivel 1 de la sangría
Texto ordinario

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

Texto ordinario
> comilla comilla comilla comilla
> comilla comilla comilla comilla
> comilla comilla comilla comilla
Texto ordinario

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.

1.2.9 Teclas resaltadas

Muchas teclas resaltadas pueden ser encontradas dentro del texto de los respectivos menús. Desde que son tomados actualmente desde el texto del menú y por lo tanto puede ser adaptados por las traducciones de wxMaxima para coincidir con las necesidades de los usuarios del teclado local, no lo documentamos aquí. Unas pocas teclas especiales o aliases, sin embargo , no están documentadas dentro de los menús:

1.2.10 TeX crudo dentro de la exportación TeX

Si una celda de texto comienza con TeX: la exportación de TeX contiene el texto literal que continua el marcador TeX:. Utilizando esta característica permite al apunte del marcado TeX sin el cuaderno wxMaxima.

1.3 Formatos de Ficheros

El material desarrollado en una sesión wxMaxima puede ser almacenado para un posterior uso en cualquiera de estas tras maneras:

1.3.1 .mac

los ficheros .mac son ficheros de texto ordinario que contiene instrucciones de Maxima. Pueden ser leídos utilizando la instrucción de lectura de Maxima o un apunte del menú de Archivo de Archivo/Fichero batch de wxMaxima.

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.

Cargando un fichero .mac con batch()

Atención: aunque el fichero Quadratic.mac tiene una extensión usual de Maxima (.mac), solamente puede ser leído por wxMaxima, ya que la instrucción wxdraw2d() es una extensión de wxMaxima para Maxima.

Puede utilizar los ficheros .mac para escribir su propia biblioteca de macros. Pero desde que no contengan suficiente información estructural no puede releer como una sesión wxMaxima.

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

1.3.3 .wxmx

Este fichero cuyo formato está basado en XML guarda el cuaderno completo incluyendo cosas como el factor de zoom y el listado de vigía. Es el formato de fichero preferido.

1.4 Opciones de configuración

Para algunas configuraciones comunes de variables wxMaxima ofrecen dos maneras de configurarlas:

Configuración de wxMaxima 1

1.4.1 Tasa predet. del marco de animación

La tasa del marco de animación que se utiliza para animaciones nuevas se conserva dentro de la variable wxanimate_framerate. El valor inicial de esta variable contiene dentro una hoja de trabajo nueva que puede ser modificada utilizando el diálogo de configuración.

1.4.2 Tamaño de trama predet. para sesiones maxima nuevas

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.

Con la intención de establecer el tamaño de trama de un grafo único solamente utilice la notación siguiente puede ser utilizado que conjuntos de un valor de variable para una instrucción únicamente:

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

1.4.3 Coincide paréntesis en controles de texto

Esta opción habilita dos cosas:

1.4.4 No guardar el cuaderno automáticamente

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.

Si esta opción no está puesta wxMaxima se comporta como un app telefónico moderno:

1.4.5 ¿Donde está guardada la configuración?

Si está utilizando Unix/Linux, la información de la configuración será guardada dentro de un fichero .wxMaxima dentro de su directorio personal (si está utilizando wxWidgets < 3.1.1), o .config/wxMaxima.conf((XDG-Estandarizado) si wxWidgets >= 3.1.1 es utilizada). Puede obtener la versión de wxWidgets desde la instrucción wxbuild_info(); o para utilizar la opción del menú Ayuda > Acerca de. wxWidgets es la biblioteca IGU de plataforma cruzada el cual es la base para wxMaxima (por lo tanto el wx dentro del nombre). (Cuando el nombre del fichero comience con un punto, .wxmaxima o .config. serán ocultados).

Si está utilizando Windows, la configuración será almacenada dentro del registro. Encontrará los apuntes para wxMaxima en la posición siguiente dentro del registro: HKEY_CURRENT_USER\Software\wxMaxima


2 Extensiones para Maxima

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.

2.1 Variables subescritas

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

How variables are autosubscripted using wxsubscripts

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.

2.2 Retroalimentación del usuario en la barra de estado

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 (
    /* Dice al usuario como obtuvo */
    wxstatusbar(concat("Pass ",i)),   disp(i),
   /* (sleep n) es una función de Lisp, la cual puede utilizarse */
   /* con el carácter "?" antes.  Retrasa la ejecución del */
   /* programa (aquí: por 3 segundos) */
   ?sleep(3)
)$

2.3 Tramado

Tramar (teniendo fundamentalmente hacerlo con gráficas) es un lugar donde un interfaz gráfico del usuario tendrá para proporcionar algunas extensiones para el programa original.

2.3.1 Embedding a plot into the worksheet

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”. For example wxplot2d corresponds to plot2d, wxplot3d corresponds to plot3d, wxdraw corresponds to draw and wxhistogram corresponds to histogram.

2.3.2 Creando tramas empotradas mayores o menores

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

Si el tamaño de solamente una trama va a ser modificada, Maxima proporciona una manera canónica para modificar un atributo solamente para la celda actual. En este uso la especificación wxplot_size = [valor1, valor2] es agregada a la instrucción wxdraw2d( ), y no es parte de la instrucción wxdraw2d.

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.

2.3.3 Tramados de mayor calidad

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.

2.3.4 Abriendo tramados empotrados en ventanas gnuplot interactivas

Si una trama fue generada utilizando las instrucciones de tipo wxdraw (wxplot2d y wxplot3d no son admitidas por esta característica) y el tamaño del fichero del proyecto gnuplot no es una forma wxMaxima buena para ofrecer un menú de pulsación secundaria que permite abrir el tramado dentro de una ventana interactiva de gnuplot.

2.3.5 Abriendo consola para instrucciones de gnuplot en las ventanas plot

En MS Windows, si dentro de la variable de Maxima gnuplot_command “gnuplot” es reemplazado por “wgnuplot”, gnuplot ofrece la posibilidad de abrir una ventana de la consola, donde las instrucciones de gnuplot pueden ser introducidas. Desafortunadamente, habilitando esta característica causa que gnuplot “roba” el foco del teclado por un breve tiempo mientras se prepara un tramado.

2.3.6 Empotrando animaciones dentro de la hoja de cálculo

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.

Los primeros dos argumentos para with_slider_draw son el nombre de la variable que está pasada entre las tramas y un listado de los valores de estas variables. Los argumentos que siguen son los argumentos ordinarios para wxdraw2d:

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

La misma funcionalidad para tramas de 3D es accesible como ‘with_slider:draw3d’, el cual permite rotación en tramas de 3D:

wxanimate_autoplay:true;
wxanimate_framerate:20;
with_slider_draw3d(
    α,makelist(i,i,1,360,3),
    title=sconcat("α=",α),
    surface_hide=verdad,
    contour=ambos,
    view=[60,α],
    explicit(
        sin(x)*sin(y),
        x,-π,π,
        y,-π,π
    )
)$

Si el formato general de la trama es que pasa quizá sufra mover el tramado tan solo un pequeño bit con el fin de crear su naturaleza 3D disponible a la intuición:

wxanimate_autoplay:true;
wxanimate_framerate:20;
with_slider_draw3d(
    t,makelist(i,i,0,2*π,.05*π),
    titulo=sconcat("α=",α),
    superficie_oculta=true,
    contorno=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:

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

Si Maxima se solicita explícitamente para sustituir el valor del tramado deslizante funciona bien en su lugar:

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

2.3.7 Abriendo múltiples tramas en ventanas contemporáneas

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

Es posible tramar múltiples tramas dentro de la misma ventana, también:

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

2.3.8 El panel lateral «Tramado utilizando dibujo»

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.

2.3.8.1 2D

Genera el esqueleto de una instrucción draw() que dibuja una escena 2D. Esta escena posteriormente tiene que ser filtrada con instrucciones que generan el contenido de la escena, por ejemplo utilizando los botones dentro de las filas debajo del botón “2D”.

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.

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

2.3.8.3 Expresión

Adjunta una trama común de una expresión como sin(x), x*sin(x) o x^2+2*x-4 para la instrucción draw() el cursor actualmente está dentro. Si no hay ninguna instrucción de dibujo en una escena 2D con la trama es generada. Cada escena puede ser rellenada con cualquier número de tramas.

2.3.8.4 Tramado implícito

Intenta encontrar todos los puntos como una expresión y=sin(x), y*sin(x)=3 o x^2+y^2=4 es verdadero y trama de la curva resultante dentro de la instrucción draw() el cursor actualmente está dentro. Si no hay instrucción de dibujo en escena de 2D con el trama es generado.

2.3.8.5 Trama paramétrica

Para un paso de una variable desde un límite inferior a un límite superior y utiliza dos expresiones como t*sin(t) y t*cos(t) para generar coordenadas x, y (y en tramas 3D también z) de una curva que es puesta dentro de la instrucción de actual del dibujo.

2.3.8.6 Puntos

Dibuja muchos puntos que pueden ser unidos opcionalmente. Las coordenadas de los puntos son tomados desde un listado de listas, una unimatriz 2D o un listado o unimatriz por cada eje.

2.3.8.7 Título del diagrama

Dibuja un título sobre el final superior del diagrama,

2.3.8.8 Eje

Establece los ejes.

2.3.8.9 Contorno

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

2.3.8.10 Nombre de trama

Agrega una leyenda de apunte mostrando el nombre del siguiente tramado de la leyenda del diagrama. Un nombre vacío deshabilita generando apuntes de leyenda para las tramas siguientes.

2.3.8.11 Color de línea

Establece el color de línea para las tramas seguidas que contiene la instrucción de dibujo actual.

2.3.8.12 Color de relleno

Establece un color de relleno para tramas seguidas que contiene la instrucción de dibujo actual.

2.3.8.13 Rejilla

Aparece un asistente que permite establecer las líneas de rejilla.

2.3.8.14 Precisión

Permite seleccionar un punto adecuado dentro de la velocidad versus exactitud compensada que es parte de cualquier programa de trama.

2.4 Gráficos empotrados

Si el formato de fichero .wxmx está siendo utilizado empotrando dicheros dentro de un proyecto wxMaxima puede ser hecho como fácilmente como por arrastrar-y-soltar. Sin embargo algunas veces (por ejemplo si el contenido de la imagen es modificado posteriormente sobre una sesión) es mejor decirle al fichero que cargue la imagen al evaluar:

show_image("man.png");

2.5 Ficheros de inicio

El diálogo de configuración de wxMaxima ofrece editar dos ficheros con instrucciones que son ejecutadas al inicializar:

Estos ficheros están dentro del directorio del usuario de Maxima (usualmente maxima en Windows, .maxima en otros sitios) dentro del directorio inicial del usuario / perfil. La ubicación puede ser encontrada fuera con la instrucción: maxima_userdir;

2.6 Variables especiales wx…

2.7 Salida de 2D con impresión bonita

La función table_form() despliega un listado 2D dentro de un formato que es más legible que la salida desde la rutina de salida predeterminada de Maxima, esta instrucción despliega la salida incluso cuando finaliza con un signo de dólar. Finalizando la instrucción con un resultado punto y como dentro de la misma tabla a lo largo con un enunciado “done”.

table_form(
    [
        [1,2],
        [3,4]
    ]
)$

Como se muestra en el ejemplo siguiente, los listados que son ensamblados por la instrucción ‘table_form’ pueden ser creados antes que la instrucción sea ejecutada.

Un tercer ejemplo de tabla

Además, porque una matriz es un listado de listados, las matrices pueden convertirse a tablas de una aparición similar.

Otro ejemplo de tabla_formulario

2.8 Comunicar gazapo

WxMaxima provides a few functions that gather bug reporting information about the current system:

2.9 Marcando que la salida será dibujada en rojo

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 Solución de problemas

3.1 No se puede conectar a 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.

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.

3.2 Cómo guardar datos desde un fichero estropeado .wxmx

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.

E incluso si no hay un fichero: el fichero .wxmx es un formato de contenedor y la porción es almacenada sin comprimir. Es posible renombrar el fichero .wxmx a un fichero .tct y utilizar un editor de texto para recuperar la porción XML del contenido del fichero (se inicia con <?xml version="1.0" encoding="UTF-8"?> y termina con </wxMaximaDocument>. Antes y después de ese texto verá algún contenido binario no legible dentro del editor del texto).

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.

3.3 Desea algo de información de depuración para ser desplegada sobre la pantalla antes que mi instrucción haya finalizado

Normalmente wxMaxima espera a la fórmula 2D completa para ser transferida antes que comenzar a configurar el conjunto del tipo. Esto guarda tiempo para crear muchos intentos para tipos de teclas para solo ecuación parcialmente completada. Hay una instrucción disp, por lo que, eso proporcionará salida de depuración inmediatamente y sin esperar a que la instrucción de Maxima finalice:

for i:1 thru 10 do (
   disp(i),
   /* (sleep n) es una función de Lisp, la cual puede utilizarse */
   /* con el carácter "?" antes.  Retrasa la ejecución del */
   /* programa (aquí: por 3 segundos) */
   ?sleep(3)
)$

3.4 El tramado solamente muestra una cobertura de sobre vacío cerrado con un mensaje de error

Esto significa que wxMaxima no pudo leer el fichero Maxima que fue admitido a la instrucción gnuplot para crear.

Las posibles razones de este error son:

3.5 Tramando un resultado de animación en «error: variable no definida»

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.

3.6 I lost cell content and undo doesn’t remember

Hay funciones de deshacer separadas para operaciones de celdas y para modificaciones dentro de celdas tales que modifiquen son bajos que este a veces ocurran. Si no hay varios métodos para cubrir datos:

playback();

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

Una razón posible es que Maxima no puede ser encontrada dentro de la localización que está establecida dentro de la etiqueta “Maxima” del diálogo de configuración de wxMaxima y por lo tanto no ejecutará nada. Estableciendo la ruta a un Maxima binario para el trabajo debería solucionar este problema.

3.8 ‘Maxima’ está calculando para siempre y no responde a la entrada

Es posible teóricamente que wxMaxima no realiza que Maxima ha finalizado el cálculo y por lo tanto nunca está informado que puede enviar datos nuevos a Maxima. Si esto es el caso “Disparar evaluación” tal vez resincronice los dos programas.

3.9 Mi Maxima basada en SBCL se ejecuta sin memoria

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.

Una manera de proporcionar a Maxima (y por lo tanto SBCL) con parámetros de línea de instrucción es el campo «Parámetros adicionales para Maxima» del diálogo de configuración de wxMaxima.

sbcl memory

3.10 La entrada algunas veces el tecleo es vago/perezoso en Ubuntu

La instalación del paquete «ibus-gtk» debería resolver este problema. Vea https://bugs.launchpad.net/ubuntu/+source/wxwidgets3.0/+bug/1421558) para los detalles.

3.11 WxMaxima halts when Maxima processes Greek characters or Umlauts

Si su Maxima está basado en SBCL las siguientes líneas tienen que ser agregadas a su .sbclrc:

(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-nombreruta)

3.12 Tramado

3.12.1 ¿Se puede crear la salida de wxMaxima por ambos fichero de imagen y tramas empotradas a la vez?

The worksheet embeds .png files. WxMaxima allows the user to specify where they should be generated:

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

3.12.2 ¿Puede establecer el radio de aspecto de una trama?

Not directly using Maxima. But there are Gnuplot commands for it:

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

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


4 P+F

4.1 ¿Hay una manera de crear más texto que quepa en una página LaTeX?

Yes. Use the LaTeX package “geometry” to specify the size of the borders.

Puede agregar la línea siguiente al preámbulo LaTeX (por ejemplo utilizando el campo respectivo dentro del diálogo de configuración («Exportar» → «Líneas adicionales para el preámbulo TeX»), para fijar bordes de 1cm):

\usepackage[izq=1cm,der=1cm,cim=1cm,fon=1cm]{geometría}

4.2 ¿Hay un modo oscuro?

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.

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

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

Locale warning

(The same problem can occur with other applications too). The translations seem okay after you click on ‘OK’. WxMaxima does not only use its own translations but the translations of the wxWidgets framework too.

These locales maybe not present in the system. On Ubuntu/Debian systems they can be generated using: dpkg-reconfigure locales

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


5 Argumentos de línea de instrucción

Most operating systems provide less complicated ways of starting programs than the command-line so this possibility is only rarely used. WxMaxima still provides some command-line switches, though.

Instead of a minus, some operating systems might use a dash in front of the command-line switches.


6 About the program, contributing to wxMaxima

wxMaxima is mainly developed using the program 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.

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.