Path: utzoo!utgpu!watmath!att!dptg!rutgers!usc!ucsd!nprdc!apple
From: apple@nprdc.arpa (James Apple)
Newsgroups: comp.text
Subject: Need help with page number 1 of X and TOC in  [ntp]roff
Message-ID: <3285@seashore.nprdc.arpa>
Date: 15 Aug 89 14:35:10 GMT
Reply-To: apple@nprdc.arpa (James Apple)
Organization: Navy Personnel R&D Center, San Diego
Lines: 44



	hi
		i'm working on a document  that is composed of many sheets.
	each sheet may be one or more pages long.  So on the top of each
	sheet it must have page numbering like page 1 of 8, and on the
	bottom of each page the standard page number 1,2,3 etc ...

		they way i'm working on this now is to use the .tm command
	on the top of each page.  I dump the document to /dev/null and the
	terminal messages to a file and then grind through the file to 
	count the number of pages per sheet.  Then a format the document 
	again and print it.  Ugly ......


		But it get worse , I also need a table of contents that
	lists which page each sheet starts on.  So i print the whole document
	to /dev/null and then ......   

		By the time i've printed the whole document, which can be 
	hundreds of pages long,  i've formated each page 4 times.


	HELP it seems that there has to be a better way to handle this.
	
	Summary:
		
	How do I get page x of x without formatting it twice ?

	How do I get a Table of contents with the starting page of each sheet
	on it ?

--------

	Any help would be great,  even if you just have a "idea" please
	let me know, i'll try anything.


	Thanks in Advance.
-- 
	Jim Apple WB1DOG

	apple@nprdc.navy.mil
	...}ucsd!nprdc!apple