troff and eof

Jay Plett jay at silence.princeton.nj.us
Sun Mar 5 15:40:10 AEST 1989


In article <16238 at ccicpg.UUCP>, nick at ccicpg.UUCP (Nick Crossley) writes:
. I need to get some text printed after the end of a troff document.
. So, I use .em to set up an end-of-input trap, and in that I put my
. text.  So far, so good.  However, I want that text on a new page.
. So, I add a .bp request before the text.  Unfortunately, this does not
. work.  n/troff (and ditroff) exit *within* the .bp call and never process
. the additional text I want on the next page.
. 
. Does anyone know of some way of getting a .em macro to add a trailing page
. of text??

It's worse than that.  Try closing and ejecting a diversion with .em.
When *roff is finished reading its input files, it is determined that
there shall be no new pages of output.  It would take major surgery
on *roff to change this behavior.  Profficient provides an end-of-file
trap which does behave as you would expect, but with this you must
somehow divine that you are at the end of the last input file if you
only want an event to happen at the end of the job.

Can you accomplish your objective by simply tacking on another input
file which contains a .bp followed by the text you want to output?
If you don't want to type the name of the appendage every time you
invoke roff, you could end your last regular input file with a .so
or ".nx final_file".

	Jay Plett
	jay at princeton.edu



More information about the Comp.unix.questions mailing list