Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate LaTeX from Maxima input

Tags:

latex

maxima

I want to use Maxima to evaluate documents. It's easy to convert Maxima output into TeX:

(%i1) tex(5*x^2+sin(x)+c)$
$$\sin x+5\,x^2+c$$

However, it doesn't work for previously input lines:

(%i2) 5*x^2+sin(x)+c;
                                           2
(%o2)                          sin(x) + 5 x  + c
(%i3) tex(%i2);

\begin{verbatim}
(%i2)sin(x)+5*x^2+c;
\end{verbatim}

(%o3)                                (%i2)

After much research (including here which is close but no cigar) I've come up empty. Any insights?

like image 610
Ryan Kennedy Avatar asked Mar 11 '13 16:03

Ryan Kennedy


1 Answers

Try this.

tex (''%i2);

or

apply (tex, [%i2]);
like image 144
Robert Dodier Avatar answered Oct 31 '22 19:10

Robert Dodier