NTERM(5)

NAME
nterm - terminal driving tables for nroff

DESCRIPTION
nroff(1) 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 mechanisms), or special output filter programs. These driving tables are written as ASCII files, and are installed in where name is the name for that terminal type as given in nroff(1).

The first line of a driving table should contain the name of the terminal: 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:

    [integer]     (not supported in all versions of
        nroff)

    [integer]     (not supported in all versions of
        nroff)

    [integer]

    [integer]

    [integer]

    [integer]

    [integer]

    [integer]

    [integer]

    [character string]

    [character string]

    [character string]

    [character string]

    [character string]

    [character string]

    [character string]

    [character string]

    [character string]

    [character string]

    [character string]

    [character string]

    [character string]

    [character string]

    [character string]

    [character string]

The meanings of these fields are as follows:

bits to set in the
    c_oflag field of the termio structure before output.

bits to reset in the
    c_oflag field of the termio structure before output.

horizontal resolution in units of 1/240 of an inch.

vertical resolution in units of 1/240 of an inch.

space moved by a newline (linefeed) character in
    units of 1/240 of an inch.

quantum of character sizes, in units of 1/240 of an inch.
    (i.e., a character is a multiple of units wide)

size of an em in units of 1/240 of an inch.

space moved by a half-linefeed (or half-reverse-linefeed)
    character in units in 1/240 of an inch.

quantum of white space, in 1/240 of an inch.
    (i.e., white spaces are a multiple of 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, is set equal to by nroff.

sequence of characters used to initialize the terminal in a mode suitable for
    nroff.

sequence of characters used to restore the terminal to normal mode.

sequence of characters used to move down one line.

sequence of characters used to move up one-half line.

sequence of characters used to move down one-half line.

sequence of characters used to move up one line.

sequence of characters used to turn on hardware boldface mode, if any.

sequence of characters used to turn off hardware boldface mode, if any.

sequence of characters used to turn on hardware italics mode, if any.

sequence of characters used to turn off hardware italics mode, if any.

sequence of characters used to turn on hardware plot mode
    (for Diablo-type mechanisms), if any.

sequence of characters used to turn off hardware plot mode
    (for Diablo-type mechanisms), if any.

sequence of characters used to move up one resolution unit
    in plot mode, if any.

sequence of characters used to move down one resolution unit
    in plot mode, if any.

sequence of characters used to move right one resolution unit
    in plot mode, if any.

sequence of characters used to move left one resolution unit
    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(1) knows by two character names, such as \(hy(.) If nroff does not find the word where it expects to, it will abort with an error message.

Each definition in the part after occupies one line, and has the following format:
    chname  width  output
where chname is the two-character name (e.g., 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 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(1).

The following escapes may be used in the definition of the character output:
    \b     backspace
    \t     tab
    \r     return (no linefeed)
    \n     line return (newline)
You may put the 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/pkgsrc/textproc/DWB/work/.destdir/usr/pkg/DWB/lib/nterm(,) and give it the name where xyz is the name of the terminal and the name that you pass nroff via the [-T] option (for example, [nroff -T xyz ).]

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

SEE ALSO
nroff(1)