ROFFIX

Section: User Commands (1)
Index Return to Main Contents
 

NAME

roffix - improve overstriking efficiency in output of nroff  

SYNOPSIS

roffix [ -s count ] [ -o outfile ] file1 ...  

DESCRIPTION

The text formatting program nroff(1) produces output that is very unpleasant to print on dot matrix or daisy wheel printers. Nroff produces an underlined word such as ``'' by generating the output ``_^Hf_^Ho_^Ho'', which causes a print head to reverse direction six times. (Here ``^H'' means ``backspace.'') This is slow, noisy, and probably causes excessive wear on the print head drive. When the boldface font is achieved by overstriking the situation is even worse. Roffix is a post-filter for nroff that fixes this problem by changing ``_^Hf_^Ho_^Ho'' to ``foo^H^H^H___'', which causes only two reversals of the print head.

Files listed on the command line are read as input, unless there are none, in which case standard input is used. The input files should have been generated by nroff. The output goes to outfile if the -o option is used, otherwise to standard output.

The count given with the -s option requires a bit of explanation. Suppose we want to output
     ,
This is best handled as a single unit, i.e.,
     foo, bar^H^H^H^H^H^H^H^H___ ___
If the spacing is greater, e.g.,
     ,
it's probably faster to backspace separately for each word, i.e.,
     foo^H^H^H___, bar^H^H^H___
Count is the maximum number of consecutive non-overstruck characters that can be between two groups of overstruck characters and still have the backspacing for both groups be done at once. The default for count is 4.

The backspacing for the characters that precede a control character or escape sequence is always done separately from the backspacing for the characters that follow. The control character or escape sequence itself is always output verbatim, and is not involved in backspace processing. An escape sequence is always assumed to consist of ESC followed by one character. The characters SO (ASCII \016) and SI (ASCII \017) are assumed to begin and end a sequence of characters from an alternate character set. They and the characters they delimit are output verbatim without any processing of imbedded backspaces. Roffix recognizes the following control characters and escape sequences for the purpose of keeping track of the current line number: new line, return, form feed, ESC 7 (reverse line feed), ESC 8 (reverse half line feed), ESC 9 (forward half line feed), and VT (ASCII \013 - interpreted as reverse line feed for compatibility with old programs).

Warnings are issued if there is any backspacing over a tab, new line, return, or form feed. Backspacing over other control characters is done without warnings; it is assumed nroff knows what it's doing.

The return value of roffix is the number of errors encountered (0 if no errors).  

EXAMPLE

nroff -Tlp -man roffix.1 | roffix | lp  

SEE ALSO

nroff(1), col(1)  

BUGS

Roffix reverses the order in which characters are overstruck. This should not matter on any normal hardcopy printer. Multi-character escape sequences may get garbled. Backspacing over control sequences that make the printer space horizontally or vertically in strange ways will probably confuse roffix.


 

Index

NAME
SYNOPSIS
DESCRIPTION
EXAMPLE
SEE ALSO
BUGS

This document was created by man2html, using the manual pages.
Time: 07:00:19 GMT, December 12, 2024