wxMaxima-developers / wxmaxima

A gui for the computer algebra system Maxima built with wxWidgets
https://wxMaxima-developers.github.io/wxmaxima/
Other
459 stars 96 forks source link

set_display(ascii) seemingly incompatible with matrices #1926

Open ggrondin opened 1 week ago

ggrondin commented 1 week ago

In wxmaxima v24.05.0, with maxima v5.47.0, the commands :

/*(%i1)*/ set_display('xml);
/*(%i2)*/ matrix([0]);
/*(%i3)*/ set_display('ascii);
/*(%i4)*/ display2d_unicode:false;
/*(%i5)*/ matrix([0]);

yield :

(%o1)   xml
(%o2)   `(0) with big parentheses`
        (%o3)                               ascii
        (%o4)                               false
Maxima encountered a Lisp error:
 The value
   #\(
 is not of type
   SEQUENCE
 when binding SEQUENCE
Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.

Using display2d_unicode:true; has no effect. Any other matrix command yields the same result.

My version info :

Maxima-version: "5.47.0" Maxima build date: "2024-05-30 17:34:43" Host type: "x8664-apple-darwin22.6.0" Lisp implementation type: "SBCL" Lisp implementation version: "2.4.5" User dir: "/Users/g.grondin/.maxima" Temp dir: "/var/folders/q/_ftbc_qn7rv3kx35q4h3lhyc0000gq/T" Object dir: "/Users/g.grondin/.maxima/binary/5_47_0/sbcl/2_4_5" Frontend: "wxMaxima" Frontend version: "24.05.0_MAC"

daute commented 1 week ago

Unicode support (e.g. nice display2d_unicode) was improved in Maxima recently, not in the latest release (5.47.0, which was released approx. 1 year ago). So you have to use the current development version.

An example (using a up to date Maxima (command line version)):

(%i1) display2d_unicode:false;
(%o1)                                false
(%i2) sum(a,a,b,c);
                                     c
                                    ____
                                    \
(%o2)                                >    a
                                    /
                                    ----
                                    a = b
(%i3) 'integrate(x,x);
                                    /
                                    |
(%o3)                               | x dx
                                    |
                                    /
(%i4) display2d_unicode:true;
(%o4)                                true
(%i5) sum(a,a,b,c);
                                     c
                                    ____
                                    ╲
(%o5)                                ⟩    a
                                    ╱
                                    ‾‾‾‾
                                    a = b
(%i6) 'integrate(x,x);
                                    ⌠
                                    ⎮
(%o6)                               ⎮ x dx
                                    ⎮
                                    ⌡

Best regards, Wolfgang