[comp.text] HELP!: LaTeX losing TOC!

webb@webb.applicon.UUCP (08/29/87)

 Any LaTeX wizards out there?  I need help.  I am running what I think is a
fairly generic LaTeX session, and LaTeX is failing to write anything into
the table-of-contents file.  The command I am using to generate the toc 
entries is:

\refstepcounter{section}
\addcontentsline{toc}{section}{\thesection~#1}

My document runs through LaTeX perfectly, even produces an aux file, with 
various pieces of information in it, but no toc file.  The aux file even
contains the \addcontentsline commands that were issued, so those aren't
getting completely lost.  If I have a toc file
with something in it before the session begins, that file will have been
truncated to zero length by the time LaTeX is finished with my file.  I ran
it with \tracingoutput=1 and got the following strange message:

(lst.toc)
\tf@toc=\write3


Completed box being shipped out [1]

What does that mean? I don't recognize the \write3 command - nor could I find
documentation for it in either the TeXbook or the LaTeX manual.

What do I have to have set up for LaTeX to create a toc file?  I have not had
this problem before.  The beginning of my file is:

\input{appstylelarge}
\input{applicon}
\input{spec}
\begin{document}
\title{Generic List Package}
\author{Peter Webb}
\docnumber{1.0}
\maketitle
\tableofcontents
\chap{Manipulating Entire Lists}


Where chap is a abbreveation for the \chapter command and appstylelarge,
applicon and spec are files full of LaTeX and TeX macros.  Any assistance
on how the tableofcontents command works, which commands actually write to the
toc file and what booleans have to be true for the toc to be created would be
greatly appreciated.


				Peter Webb.

{allegra|decvax|harvard|yale|mit-eddie|mirror}!ima!applicon!webb, 
{raybed2|spar|ulowell|sun}!applicon!webb