EmittingOnePage


Emitting One Page of text if output format is text only for sending preview versions

Sometimes it is required that a document that normally is printed as a properly typeset PostScript? should be delivered in plain text (nroff) as well. Here is one approach:

 .if '\*[.T]'latin1' \{\
 .   pl 9999
 .   nr HY 0
 .   na
 .\}
 Standard ms macro text.
 Standard ms macro text.
 .if '\*[.T]'latin1' \{\
 .	sp 4
 .	BT \" print the ms Bottom Line
 .	pl \n[nl]u
 .\}

The first part disables hyphenation and line adjustment. The output can be easily used for importing the text in other systems.


Another way was explaind in [Groff] mailing list by Anton Shepelev.

Just use an end-of-input trap to set the real page-length in the end. This way, it can be included/declared in the beginning of a file and you won't have to insert any code at the bottom:

    .\" Trim page to total height of text.
    .de sp-adj
    .  br
    .  pl \\n[nl]u
    ..
    .
    .\" Set single-page mode
    .de sp-set
    .  pl 99999
    .  em sp-adj
    ..

Now just call sp-set and you're done.


Edit EmittingOnePage FrontPage PageList RecentChanges PageHistory