Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!sri-spam!mordor!lll-lcc!ames!ucbcad!ucbvax!decvax!decwrl!pyramid!prls!philabs!tg!pluto!warren From: warren@pluto.UUCP Newsgroups: comp.text,comp.sources.wanted Subject: Re: Table of Contents in nroff Message-ID: <247@pluto.UUCP> Date: Sun, 1-Mar-87 22:45:39 EST Article-I.D.: pluto.247 Posted: Sun Mar 1 22:45:39 1987 Date-Received: Fri, 6-Mar-87 01:48:51 EST References: <189@pluto.UUCP> Organization: Industrial Automation Systems - New York, NY Lines: 41 Xref: utgpu comp.text:487 comp.sources.wanted:688 Summary: this is a repost in case your mail bounced I posted this some time ago. I since discovered that old maps were routing my mail through phri and pyrnj to which we were not connected. If you replied and it bounced, please try again as we are now linked. And thanks to all who have replied. Two people mentioned the lbl package. Was this posted to a source group a while ago? < I am looking for ways to create a table of contents in nroff < documents, and would also like to be able to tag sections so < I could say "See section " and foo's number would appear < in my output. I would like to use -ms macros since much < has been written using them. < < I noticed, in my /usr/lib/ms directory, a file called s.toc. < It seems to redefine the NH macro and will dump a table of < contents at the end of your document. There is no doc, anyone < tried it? It doesn't solve the other problem, as far as I can < tell, and I like TOC's in front of the document, not at the < end (or I'm guaranteed to forget to move it the time the < document goes to be copied and bound) < < Before I noticed this file, I had kluged as follows - rewrote < the NH macro so it placed _TITLE_ in front of < each title (underlined, of course), then sent the output through < a bunch of filters to remove the junk from each line, produce < a list of titles, feed it through nroff again to paginate and < include titles, and splice it into the document after 66 lines. < The document has to be in .RP format so there is a cover page < to stick the TOC after. < < It works, and you can have a copy by asking, but it's klugey and < I have to pass my shell script the line width and document title, < and this also doesn't solve the second problem. < < Anyone have any ideas? -- /|/~\~~\ |__/__/_/ | /