1

How to remove all $ signs from the output of, e.g., tex(x^2-5*x+6); ?

This question is more related to Maxima so I post it here.

Second Person Shooter
  • 14,188
  • 21
  • 90
  • 165
  • Removing the other extraneous material from the output: http://stackoverflow.com/q/20318328/1142217 –  Jun 16 '14 at 23:03

2 Answers2

3

Just use tex1 instead of tex. This way the output won't be enclosed inside $$ delimiters. You can find more details on these matters in the Maxima reference.

jmbr
  • 3,298
  • 23
  • 23
0

Writing set_tex_environment_default( "", "" ); in your script would do the same.

From maxima manual

(%i1) get_tex_environment_default ();
(%o1)                       [$$, $$]
(%i2) tex (f(x) + g(x));
$$g\left(x\right)+f\left(x\right)$$
(%o2)                         false
(%i3) set_tex_environment_default ("\\begin{equation}
", "
\\end{equation}");
(%o3) [\begin{equation}
, 
\end{equation}]
(%i4) tex (f(x) + g(x));
\begin{equation}
g\left(x\right)+f\left(x\right)
\end{equation}
(%o4)                         false
Dilawar
  • 5,438
  • 9
  • 45
  • 58