How to remove TeX displayed equation markups from the output of Maxima tex?

StackOverflow https://stackoverflow.com/questions/6315289

  •  26-10-2019
  •  | 
  •  

Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top