rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

TeX output for diff #978

Open rtoy opened 3 months ago

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-03 15:53:34 Created by pmagunia on 2016-05-27 00:45:25 Original: https://sourceforge.net/p/maxima/bugs/3168


Hello,

I wanted to report what seemed like a bug in Maxima.

With the option simp:false the following command returns some unusual TeX markup:

tex('diff(x^2));

The command is supposed to return the unevaluated TeX version of the derivative of x^2. Ideally it should be:

\frac{d}{dx}\,x^{2}

The actual TeX output is:

$${{d^{{\it mplus}\left(\right)}}\over{{\it mtimes}\left(\right)}}\,x ^2$$

which doesn't render too nicely in MathJax or LaTex Math Mode.

I'm using

Maxima 5.32.1 using Lisp SBCL 1.1.14.debian

Thank you!

Parag Magunia

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-03 15:53:35 Created by l_butler on 2016-05-27 17:04:19 Original: https://sourceforge.net/p/maxima/bugs/3168/#74f7


A couple points: you don't need to set simp to false; and you want

diff(x^2,x);

not

diff(x^2);

Here is what I get when I leave simp unchanged and specify the independent variable from an uncustomized session:

$ maxima --init=/dev/null

Maxima 5.38.0 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.12
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) display2d:false$
(%i2) 'diff(x^2,x);
(%o2) 'diff(x^2,x,1)
(%i3) tex(%);
$${{d}\over{d\,x}}\,x^2$$

Which, aside from the tex-ism, is what you want.

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-03 15:53:38 Created by pmagunia on 2016-05-27 17:25:52 Original: https://sourceforge.net/p/maxima/bugs/3168/#34bd


Thank you for clarifying that. I tested on the command line and confirm the results. By adding the wrt variable I got the TeX expression I was after.

I would close this ticket but I don't think I have sufficient privileges.

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-03 15:53:42 Created by kjak on 2016-06-01 00:22:45 Original: https://sourceforge.net/p/maxima/bugs/3168/#d8b4


rtoy commented 3 months ago

Imported from SourceForge on 2024-07-03 15:53:45 Created by kjak on 2016-06-01 00:22:45 Original: https://sourceforge.net/p/maxima/bugs/3168/#0cda


OK, I'm closing this as wont-fix since the problem was resolved and wasn't a bug in Maxima.