up previous next
latex    --    LaTeX formatting


Syntax
latex(X: OBJECT): STRING

Description
This function returns a string containing the argument formatted in LaTeX. It can also be called with the name LaTeX.

For typesetting ideals this function assumes use of a LaTeX macro like this:
  \newcommand{\ideal}[1]{\langle #1 \rangle}


Example
/**/  use R ::= QQ[x,y,z];
/**/  F := x^10 +2*y^12*z^3;
/**/  latex(F);
2 y^{12} z^3  +x^{10}

/**/  M := mat([[1,2],[3,4]]);
/**/  latex(M);
\left( \begin{array}{cc}
  1 & 2 \\
  3 & 4 \end{array}\right)

/**/  R ::= QQ[x,y,z];
/**/  latex(ideal(x^2, y+z));
\ideal{x^2 ,
  y +z}

/**/  P := NewFractionField(R);
/**/  use P;
/**/  F := (x+y)/(1-z)^3;
/**/  latex(F);
\frac{ -x -y} {z^3  -3 z^2  +3 z -1}

See Also