Top
Back: D.8.2.9 texpoly
Forward: D.8.2.11 texring
FastBack: D. SINGULAR libraries
FastForward: E. Release Notes
Up: D.8.2 latex_lib
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. 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: D.8.2.9 texpoly Forward: D.8.2.11 texring FastBack: D. SINGULAR libraries FastForward: E. Release Notes Up: D.8.2 latex_lib Top: Singular 2-0-4 Manual Contents: Table of Contents Index: F. Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.