From: Robert D. <rob...@gm...> - 2023-06-13 17:46:43
|
On Sun, Jun 11, 2023 at 12:20 PM Barton Willis via Maxima-discuss <max...@li...> wrote: > (kill(n),printf(false,"~m",(n!)!)) > Result: > "<math><mrow lisp="wxxml-paren"><p lisp="wxxml-paren"><mi lisp="*var-tag*">n</mi><mo>!</mo></p></mrow><mo>!</mo></math>" > This differed from the expected result: > "(n!)! > (trace(atom),with_stdout(S,atom(1)),get_output_stream_string(S)) > Result: > "<math> <mn>1</mn><st> Enter </st><mi lisp="*var-tag*">atom</mi><st> </st><mrow list="true"><t lisp="mlist" listdelim="true">[</t><mrow><mn>1</mn></mrow><t lisp="mlist" listdelim="true">]</t></mrow><st></st><st></st></math><math> <mn>1</mn><st> Exit </st><mi lisp="*var-tag*">atom</mi><st> </st><t lisp="true">true</t><st></st><st></st></math>" > This differed from the expected result: > "1 Enter atom [1] > 1 Exit atom true > " Looks like both of these are due to wxMaxima intercepting the display mechanism and interjecting its own markup. I guess wxMaxima needs to figure out whether the output is destined for its notebook display or not. I don't know how to handle that in general -- it might be hard to tell, down in the depths of the display code, when all you have in hand is an output stream. Another possibility is to say that's the correct output, given that the display mechanism has been modified. However, I'm leaning towards saying that output is incorrect, and the redefined display needs to suppress the extra markup when the output is not going to the notebook display. FWIW Robert |