add sipbThis will generate a file (filename.tex) of code (-llanguage) formatted for inclusion in a LaTeX file (-latex). For example, to format a C program called mycode.c:
tgrind -latex -llanguage filename > filename.tex
tgrind -latex -lc mycode.c > mycode.c.texIf you get errors latexd'ing, it may be necessary to remove the line which contains:
\input{tgrindmac}at the top of the created .tex file, and the line:
\vfill\eject\endat the bottom of it. You can also format languages other than C:
-lp Pascal programs -lcsh Csh (C shell scripts) -lsh sh (Bourne shell scripts) -ltex TeX code -lprolog prolog -lratfor Fortran -ly Yacc -lc++ C++To include this file in your document: o Make sure you have the tgrind documentstyle option specified. (Include tgrind in the square brackets in the \documentstyle command at the top of your file.)
Place the line
\tgrindfile{mycode.c.tex}in your .tex file where you want to insert the formatted code.
That's all there is to it. For more information, see the man page on tgrind, and the file /usr/sipb/lib/vgrindefs (after typing add sipb).