I was trying to redefine the output for sqrt()
in Maxima, using texput, but am getting an error that I can't make sense of.
This is the function I wrote for creating the desired string:
sqrt_tex:lambda([e], printf(false,"\\csqrt{~a}", tex1(e)))
When applied to an expression, it seems to behave as expected:
sqrt_tex(2);
> \csqrt{2}
but after passing texput('sqrt, sqrt_tex, prefix);
when I try:
tex1(sqrt(2))
> Maxima encountered a Lisp error:
((LAMBDA SIMP) ((MLIST) $E) (($PRINTF) NIL "\\csqrt{~a}" $E)) is not a string designator.
Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
I'm sure I'm missing something simple, but can't figure it out. Any help would be greatly appreciated!