testsuite_files SciMax Toolbox texput

SciMax Toolbox >> tex

tex

Maxima Function

Calling Sequence

tex (expr)
tex(label)
tex(expr,filename)
tex(label,filename)

Description

Prints a representation of an expression suitable for the TeX document preparation system. The result is a fragment of a document, which can be copied into a larger document but not processed by itself.

tex (expr) prints a TeX representation of expr on the console.

tex (label) prints a TeX representation of the expression named by label and assigns it an equation label (to be displayed to the left of the expression). The TeX equation label is the same as the Maxima label.

tex (expr, filename) appends a TeX representation of expr to the file filename.

tex (label, filename) appends a TeX representation of the expression named by label, with an equation label, to the file filename.

tex evaluates its first argument after testing it to see if it is a label. Quote-quote '' forces evaluation of the argument, thereby defeating the test and preventing the label.

See also .

Examples:

(%i1) integrate (1/(1+x^3), x);
                                    2 x - 1
                  2            atan(-------)
             log(x  - x + 1)        sqrt(3)    log(x + 1)
(%o1)      - --------------- + ------------- + ----------
                    6             sqrt(3)          3
(%i2) tex (%o1);
$$-{{\log \left(x^2-x+1\right)}\over{6}}+{{\arctan \left({{2\,x-1
 }\over{\sqrt{3}}}\right)}\over{\sqrt{3}}}+{{\log \left(x+1\right)
 }\over{3}}\leqno{\tt (\%o1)}$$
(%o2)                          (\%o1)
(%i3) tex (integrate (sin(x), x));
$$-\cos x$$
(%o3)                           false
(%i4) tex (%o1, "foo.tex");
(%o4)                          (\%o1)
testsuite_files SciMax Toolbox texput