nterm(5) nterm(5)
NAME
nterm - terminal driving tables for nroff
DESCRIPTION
nroff(1M) uses driving tables to customize its output for various
types of output devices, such as printing terminals, special word-
processing terminals (such as Diablo, Qume, or NEC Spinwriter mechan-
isms), or special output filter programs. These driving tables are
written as ASCII files, and are installed in /usr/lib/nterm/tab.name,
where name is the name for that terminal type as given in nroff(1M).
The first line of a driving table should contain the name of the ter-
minal: simply a string with no embedded white space. "White space"
means any combination of spaces, tabs and newlines. The next part of
the driver table is structured as follows:
bset [integer] (not supported in all versions of nroff)
breset [integer] (not supported in all versions of nroff)
Hor [integer]
Vert [integer]
Newline [integer]
Char [integer]
Em [integer]
Halfline [integer]
Adj [integer]
twinit [character string]
twrest [character string]
twnl [character string]
hlr [character string]
hlf [character string]
flr [character string]
bdon [character string]
bdoff [character string]
iton [character string]
itoff [character string]
ploton [character string]
plotoff [character string]
up [character string]
down [character string]
right [character string]
left [character string]
The meanings of these fields are as follows:
bset bits to set in the coflag field of the termio structure
before output.
breset bits to reset in the coflag field of the termio structure
before output.
Hor horizontal resolution in units of 1/240 of an inch.
Page 1 Reliant UNIX 5.44 Printed 11/98
nterm(5) nterm(5)
Vert vertical resolution in units of 1/240 of an inch.
Newline space moved by a newline (linefeed) character in units of
1/240 of an inch.
Char quantum of character sizes, in units of 1/240 of an inch
(i.e. a character is a multiple of Char units wide)
Em size of an em in units of 1/240 of an inch.
Halfline space moved by a half-linefeed (or half-reverse-linefeed)
character in units in 1/240 of an inch.
Adj quantum of white space, in 1/240 of an inch (i.e. white
spaces are a multiple of Adj units wide)
Note: if this is less than the size of the space character,
nroff will output fractional spaces using plot mode. Also,
if the -e switch to nroff is used, Adj is set equal to Hor
by nroff.
twinit sequence of characters used to initialize the terminal in a
mode suitable for nroff.
twrest sequence of characters used to restore the terminal to nor-
mal mode.
twnl sequence of characters used to move down one line.
hlr sequence of characters used to move up one-half line.
hlf sequence of characters used to move down one-half line.
flr sequence of characters used to move up one line.
bdon sequence of characters used to turn on hardware boldface
mode, if any.
bdoff sequence of characters used to turn off hardware boldface
mode, if any.
iton sequence of characters used to turn on hardware italics
mode, if any.
itoff sequence of characters used to turn off hardware italics
mode, if any.
ploton sequence of characters used to turn on hardware plot mode
(for Diablo type mechanisms), if any.
plotoff sequence of characters used to turn off hardware plot mode
(for Diablo type mechanisms), if any.
Page 2 Reliant UNIX 5.44 Printed 11/98
nterm(5) nterm(5)
up sequence of characters used to move up one resolution unit
(Vert) in plot mode, if any.
down sequence of characters used to move down one resolution unit
(Vert) in plot mode, if any.
right sequence of characters used to move right one resolution
unit (Hor) in plot mode, if any.
left sequence of characters used to move left one resolution unit
(Hor) in plot mode, if any.
This part of the driving table is fixed format, and you cannot change
the order of entries. You should put entries on separate lines, and
these lines should contain exactly two fields (no comments allowed)
separated by white space. For example,
bset 0
breset 0
Hor 24
and so on.
Follow this first part of the driving table with a line containing the
word charset, and then specify a table of special characters that you
want to include. That is, specify all the non-ASCII characters that
nroff(1M) knows by two character names, such as \(hy. If nroff does
not find the word charset where it expects to, it will abort with an
error message.
Each definition in the part after charset occupies one line, and has
the following format:
chname width output
where chname is the two-character name (e.g. \(dg for dagger) of the
special character, width is its width in ems, and output is the string
of characters and escape sequences to send to the terminal to produce
the special character.
If any field in the charset part of the driving table does not pertain
to the output device, you may give that particular sequence as a null
string, or leave out the entry. Special characters that do not have a
definition in this file are ignored on output by nroff(1M).
Page 3 Reliant UNIX 5.44 Printed 11/98
nterm(5) nterm(5)
The following escapes may be used in the definition of the character
output:
Escape Function
\b backspace
\t tab
\r return (no line feed)
\n line return (new line)
You may put the charset definitions in any order, so it is possible to
speed up nroff by putting the most frequently used characters first.
For example,
charset
em 1 -
hy 1 -
\- 1 -
bu 1 +\bo
and so on.
The best way to create a terminal table for a new device is to take an
existing terminal table and edit it to suit your needs. Once you
create such a file, put it in the directory /usr/lib/nterm, and give
it the name tab.xyz where xyz is the name of the terminal and the name
that you pass nroff via the -T option (for example, nroff -Txyz).
NOTES
Normal 8-bit input is an encoding of local motions interpreted by
nroff. For example, octal codes 000 through 177 represent ordinary 7-
bit ASCII. Some local motions (for octal codes 200 through 377)
include: 200 means "right", 240 means "left", 300 means "down" and 340
means "up", any of which can be used with a 5-bit value (octal codes
001 through 037) to represent the magnitude of motion.
By default, nroff treats any octal value of 200 or greater as a local
motion; however, if a definition includes a %, the following byte is
output verbatim. To pass through an octal code for a particular
device, uninterpreted by nroff, use the form %\nnn where nnn is the
octal value (three digits).
FILES
/usr/lib/nterm/tab.name terminal files
SEE ALSO
nroff(1M).
Page 4 Reliant UNIX 5.44 Printed 11/98