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;

<font size="-1">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; User manual for <a href="http://www.singular.uni-kl.de/"><i>Singular</i></a> version 2-0-4, October 2002,
generated by <a href="http://www.gnu.org/software/texinfo/"><i>texi2html</i></a>.
</font>

</body>
</html>
