Top
Back: texobj
Forward: texproc
FastBack:
FastForward:
Up: latex_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.9.2.9 texpoly

Procedure from library latex.lib (see latex_lib).

Usage:
texpoly(fname,p); fname string, p poly

Return:
if fname="": string, the polynomial p in LaTeX-typesetting;
otherwise: append this string to the file <fname>, and return nothing.

Note:
preceding ">>" are deleted in fname, and suffix ".tex" (if not given) is added to fname.

Example:
 
LIB "latex.lib";
ring r0=0,(x,y,z),dp;
poly f = -1x^2 + 2;
texpoly("",f);
==> $-x^{2}+2$
ring rr= real,(x,y,z),dp;
texpoly("",2x2y23z);
==> $2.000x^{2}y^{23}z$
ring r7= 7,(x,y,z),dp;
poly f = 2x2y23z;
texpoly("",f);
==> $2x^{2}y^{23}z$
ring rab =(0,a,b),(x,y,z),dp;
poly f = (-2a2 +b3 -2)/a * x2y4z5 + (a2+1)*x + a+1;
f;
==> (-2a2+b3-2)/(a)*x2y4z5+(a2+1)*x+(a+1)
texpoly("",f);
==> $-\frac{2a^{2}-b^{3}+2}{a}\cdot x^{2}y^{4}z^{5}+(a^{2}+1)\cdot x+(a+1)$
texpoly("",1/(a2+2)*x2+2/b*x+(a+1)/3);
==> $\frac{1}{a^{2}+2}\cdot x^{2}+\frac{2}{b}\cdot x+\frac{a+1}{3}$


Top Back: texobj Forward: texproc FastBack: FastForward: Up: latex_lib Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4.3.1, 2022, generated by texi2html.