🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #3258

Table of Contents in nroff

#3258
From: warren
Date: Tue, 10 Feb 1987 19:24
34 lines
1916 bytes
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 <foo>" 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_ <page_number> 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?
Thanks
-- 
/|/~\~~\
 |__/__/_/
 |
/
Technical Details
Message-ID: <189@pluto.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!sri-spam!mordor!styx!twg-ap!amdahl!pyramid!prls!philabs!tg!pluto!warren

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!sri-spam!mordor!styx!twg-ap!amdahl!pyramid!prls!philabs!tg!pluto!warren
From: warren@pluto.UUCP
Newsgroups: comp.text,comp.sources.wanted
Subject: Table of Contents in nroff
Message-ID: <189@pluto.UUCP>
Date: Tue, 10-Feb-87 14:24:09 EST
Article-I.D.: pluto.189
Posted: Tue Feb 10 14:24:09 1987
Date-Received: Fri, 13-Feb-87 06:09:05 EST
Organization: Industrial Automation Systems - New York, NY
Lines: 34