Menu

#3168 TeX output for diff

None
wont-fix
nobody
5
2016-06-01
2016-05-27
P Magunia
No

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

Discussion

  • Leo Butler

    Leo Butler - 2016-05-27

    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.

     
  • P Magunia

    P Magunia - 2016-05-27

    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.

     
  • Kris Katterjohn

    Kris Katterjohn - 2016-06-01
    • status: open --> wont-fix
     
  • Kris Katterjohn

    Kris Katterjohn - 2016-06-01

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

     

Log in to post a comment.