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):= 5*sin(4*x);
p(x):= 5*sin(4*x);
t(x):=(f(x), x, 0, 5);
fortran(t(x));
tex(t(x));
plot2d ([f(x),t(x), g(x), p(x)], [x, 0, 6.28]);

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

r1: [a,b];

r2: [c, d];

r1: r1*(a^x);

Calculate

tex

/* maxima code */r1:[...

r2:[c, d];

r1:r1*(a^x);

Calculate

tex

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

b:[6,1,8];

Calculate

tex

tex(f(x) := x^2+x^3-2);

Calculate

tex

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

Calculate

tex

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

tex(h(alpha));

Calculate

tex

tex(f(x) := x^2+x^3-2);

tex(g(x) := 2*x+x^3-2);

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(Integrate(f(x^3/(...

Calculate