Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Tex Calculator

Tex

Function: tex (<expr>)

f(x):=sin(x);
P1(x):=taylor(f(x), x, 0, 1);
P3(x):=taylor(f(x), x, 0, 3);
P5(x):=taylor(f(x), x, 0, 5);
P7(x):=taylor(f(x), x, 0, 7);
tex(P1(x));
tex(P3(x));
tex(P5(x));
tex(P7(x));
plot2d ([P1(x), P3(x), P5(x), P7(x), f(x)], [x, -%pi, %pi],[color, blue, green, red, black, cyan], [box,false],[legend, "f", "P1", "P3", "P5", "P7"],[axes, true], [xlabel, "x"],[ylabel, "sin(x)"]);

Function: tex (<expr>, <destination>)

Function: tex (<expr>, false)

Function: tex (<label>)

Function: tex (<label>, <destination>)

Function: tex (<label>, false) 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.

<destination> may be an output stream or file name. When <destination> is a file name, tex appends its output to the file. The functions openw and opena create output streams.

tex (<expr>, false) and tex (<label>, false) return their TeX output as a string.

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 texput.

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)

tex (<expr>, false) returns its TeX output as a string.

          (%i1) S : tex (x * y * z, false);
          (%o1) $$x\,y\,z$$
          (%i2) S;
          (%o2) $$x\,y\,z$$

There are also some inexact matches for tex. Try ?? tex to see them.

(%o1)                                true
(%i2) 

Tex Example

Related Examples

tex

tex(a=[2,3,6]);

Calculate

tex

tex( A = ([1,0,1],[1,...

Calculate

tex

f1:[1,2,3,4];

f2:[2,5,7,-2];

f3:[-1,5,6,7];

Calculate

tex

g(alpha) := (1/9)*(8*...

tex(g(alpha));

d: alpha^3;

Calculate

tex

f(alpha):=(1/9)*(8*al...

tex((1/9)*(8*alpha + ...

Calculate

tex

tex(x/(2*g));

Calculate

tex

tex((1/2*x^3-1/6*x^2*...

eq2:(1/2*x^3-1/6*x^2*...

tex(eq2);

Calculate

tex

tex(-(18+20*x+19*x^2+...

Calculate

tex

tex((x+y)/(x-y));

Calculate