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

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

  •  26-10-2019
  •  | 
  •  

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.

有帮助吗?

解决方案

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.

其他提示

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
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top