ralston@cybavax.UUCP (R. Alston Elec. Eng.) (11/20/84)
Can someone help me with creatation of some new terminal/printer tables for nroff use in usr/lib/term/tab??? I don't follow just what the source tables tab???.c actually represent. Some of the character stuff is obvious but twinit and twrest for example? Thanks in advance Robin Alston - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - login name : ralston machine name: cybavax uucp address: {UK}!ukc!ru-cs44!cybavax!ralston JANET address: ralston@swxa/234207920018 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
gray@SU-ISL (R. M. Gray) (11/21/84)
When I had that problem a local wizard with an IBM loaned me his VENIX manual, which has a complete description of all of the bits in nroff tables. If you have BSD or XENIX or VENIX or V. 7, you need only cc the c source with the -c option (easy) after making table modifications. If you have System V, then you are in for much pain. (Ask me again if that is the case as you will need a special postprocessing filters written by the aforementioned wizard who divined it from the binary.) Let me know if you find out any other tidbits on this subject as I am struggling with trying to get nroff & maybe troff to drive cheap Bell unsupported printers like okidata & hp thinkjet & do all the usual stuff (italics, Greek, math, etc.).
Alan Crosswell <US.ALAN%CU20B@COLUMBIA.ARPA> (11/21/84)
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 -------