nroff terminal driving tables, help please.

Alan Crosswell US.ALAN%CU20B at COLUMBIA.ARPA
Thu Nov 22 04:02:23 AEST 1984


Paraphrased from the PRO/VENIX Document Processing Guide (Digital
Equipment Corportation and Venturcom, Inc.) with some interjections
from experience trying to make nroff work for an LA100 and a XEROX 9700:

bset & breset are used to set the terminal modes:
	new_mode = old_mode & ~breset | bset

Hor & Vert are resolution in basic units, where 1 inch = 240 basic units.

Newline is the length of one linefeed up or down.

Halfline is the length of a halfline up or down (make it the same as newline
if your device can't do halflines.

Char, Em, & Adj are all the width of a single character.  They each have
a different meaning but in practice are all equivalent.

Twinit & twreset are character strings which are sent to initialize and
reset the terminal (i.e. escape sequence to go into letter-quality mode
on an LA100 for example).

Twnl is the string sent out at the end of every line,  usually "\n".

Hlr, hlf & flr are strings containing the control codes for reverse
half-linefeed,  forward half-linefeed,  and reverse full-linefeed
respectively.  Make sure that hlr and hlf are in line with the value of
Halfline (i.e. if it is the same as Newline,  then make hlr and hlf do a 
full forward or reverse linefeed).  Set them null if your terminal can't
do a reverse,  but don't be surprised when tbl output looks crummy.
This is the hardest part to get to work.  You may end up writing a
reverse-linefeed filter.

bdon & bdoff are for turning on and off bold mode.  Again, you may
want to make these inputs to a filter that converts to overstriking
if the device can't do it directly.

ploton & plotoff go into and out of graphics mode.  When in this mode,
the up, down, right, & left strings move one unit in the best resolution
possible (see Hor & Vert).  

Codetab[] is an array of strings to output for each character in the
nroff character set (regular ascii plus some specials -- read the
comments).  The first character of the string contains the width
of the character (normally one unless you do something like arrow as
"->" which would have a length of 2).  Bit 0200 of the character
says that it can be underlined.  The remaining characters are the
actual sequence to send out to get the desired effect.  For example,
"\001O\b/" is an O with a slash thru it.  NOTE: you can't put
characters with values higher than 0200 in the string,  so, if your
device has a full 256 character set,  you will need a filter to
convert some sequence like "\177c" to c | 0200.  The reason for this
is that plot mode motions are encoded as 0340, 0300, 0240, 0200
for up, down, left, right, respectively.  Then,  the low order 5 bits
(masked by 037) specify the number of plot-mode units (see Hor and Vert)
to move in.  This short hand allows you to generate special characters.
The example they give is for PI:
	"\001\303'\203'\243\341'\203'\243\341~\201~\201~\201~\341\243"
Remember,  the you must position back to the original position as if the
character was just a simple letter.

Hope this helps.
/a
-------



More information about the Comp.unix.wizards mailing list