Top
Back: texpoly
Forward: texring
FastBack: graphics_lib
FastForward: paramet_lib
Up: latex_lib
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: Index
About: About this document

D.8.2.10 texproc

Procedure from library latex.lib (see latex_lib).

Usage:
texproc(fname,pname); fname,pname strings

Assume:
`pname` is a procedure.

Return:
if fname="": string, the proc `pname` in a verbatim environment 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.
texproc cannot be applied to itself correctly.

Example:
 
LIB "latex.lib";
proc exp(int i,int j,list #)
{ string s;
if (size(#))
{
for(i;i<=j;i++)
{ s = s + string(j) + string(#); }
}
return(s);
}
export exp;
==> // ** `exp` is already global
texproc("","exp");
==> \begin{verbatim}
==> proc exp(int i,int j,list #)
==> { 
==>  string s;
==> if (size(#))
==> {
==> for(i;i<=j;i++)
==> { s = s + string(j) + string(#); }
==> }
==> return(s);
==> 
==> }
==> \end{verbatim}
==> 
kill exp;


Top Back: texpoly Forward: texring FastBack: graphics_lib FastForward: paramet_lib Up: latex_lib Top: Singular 2-0-4 Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 2-0-4, May 2003, generated by texi2html.