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):=exp(x)/cos(x);
P4(x):=taylor(f(x), x, 0, 4);
P7(x):=taylor(f(x), x, 0, 7);
P9(x):=taylor(f(x), x, 0, 9);
P14(x):=taylor(f(x), x, 0, 17);
fortran(P4(x));
fortran(P7(x));
fortran(P9(x));
fortran(P14(x));
tex(P4(x));
tex(P7(x));
tex(P9(x));
tex(P14(x));
plot2d ([P4(x),P7(x),P9(x),P14(x),f(x)], [x, -4, 4], [y, -4, 4],[color, green, blue, black, magenta, red],[legend, "T4", "T7", "T9", "T14", "exp(x)/cos(x)"],[axes,true], [xlabel,"X"] , [ylabel,"Y"]);

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(f(x,y) := x^2+y^3...

tex(g(x,y) := 2*y+x^3...

tex(f(-1,-1)/g(-1,-1));

Calculate

tex

tex (x = ((y-1)^(1/(1...

Calculate

tex

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

b:[6,1,8];

Calculate

tex

tex(f(x,y) := x^2+y^3...

tex(g(x,y) := 2*y+x^3...

f(-1,-1)/g(-1,-1);

Calculate

tex

tex(f(x,y) := x^2+y^3...

tex(g(x,y) := 2*y+x^3...

f(1,1)/g(-1,10);

Calculate

tex

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

Calculate

tex

tex(int(x/(y+4)+4,x));

Calculate

tex

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

tex(g(alpha));

d: alpha^3;

Calculate

tex

tex([[1,2,3],[4,5,6]]);

Calculate

tex

tex(f(x,y) := x^2+y^3...

tex(g(x,y) := 2*y+x^3...

f(1,1)/g(-1,10);

Calculate