Maxima tex output of equation with equal(a,b) function as =

179 Views Asked by At

When I have an equation in Maxima, say "x=5" in the form

equal(x,5) 

and I use the tex function on it, I get the output

$${\it equal}\left(x , 5\right)$$

but I would like to get

$$x=5$$

Is this possible?

3

There are 3 best solutions below

0
On
texequal(e):= block([a, b], [a, b]: args(e), concat(tex1(a), "=", tex1(b)))$
texput(equal, texequal)$

expr: equal(x, 5)$
tex(expr)$
0
On
(%i15) equal('x,5);
(%o15)                            equal(x, 5)
...
(%i18) tex(part(%o15,1)=part(%o15,2));
$$x=5$$
(%o18)                               false
(%i19)
0
On
texput (equal, "=", infix);
tex (equal (x, 5));
  => $$x=5$$