[comp.unix.xenix] [nt]roff drivers for EPSON printers

mbrands@idca.tds.PHILIPS.nl (Manfred Brands) (03/31/89)

I just received a xenix package including development and text processing
system and I have two questions regarding nroff and troff.

- Nroff uses file from /usr/lib/term.
	Has anybody managed to create drivers for the ANSI screen and/or EPSON
	printers. I can't get characters in the driver having the eight bit on.
	I read in the documentation that this couses nroff to go into plot mode,
	whatever this may be in a character oriented text processor.
	For my EPSON printer I could print each character using an escape
	sequence telling the printer to set the eight bit to 1, send the
	character with the eight bit off and an escape sequence to tell my
	EPSON to clean the eight bit.
	But this way I need 5 characters instead of 1.
	And I can't use it for my screen.

- Troff generates files for a C/A/T phototypesetter
	Does anybody know what the format is of the commands used.
    Again, has anybody made a driver for an EPSON and/or EGA/HERCULES
	grafics.

Any help would be appreciated,

Manfred.

-- 
# Manfred Brands                       INTERNET:  mbrands@idca.tds.philips.nl #
# Philips TDS, Dept. SSP               UUCP:      ...!mcvax!philapd!mbrands   #
# P.O. Box 245                         VOICE:     +31 55 432097               #
# 7300 AE Apeldoorn, The Netherlands                                          #

chip@vector.Dallas.TX.US (Chip Rosenthal) (04/08/89)

In article <356@ssp2.idca.tds.philips.nl> mbrands@idca.tds.PHILIPS.nl (Manfred Brands) writes:
>- Nroff uses file from /usr/lib/term.

I post because somebody else might be interested.  There are two parts
to my solution to using SCO's nroff.  I've implemented it for HP LaserJet
and Okitdata 193-type printers.

The first part is the nroff driver tables which include the appropriate
escape codes and special characters.  The second part is a filter called
"colpr", which serves a number of functions.  First, it filters backspaces
into multiple printhead passes.  Second, it performs line folding/truncation.
Third, it performs NL to CR/LF translation.  Finally, it cooperates with
the driver tables to access the full 8-bit character set.

>	I can't get characters in the driver having the eight bit on.

That's correct.  My solution was to use a flag character in the nroff driver
table to set the eight bit.  I arbitrarily chose DEL (octal 177) as the
flag character.  For example, to generate an octal 201, my nroff driver
table emits the two character sequence { DEL, 001 }, and "colpr" restores
it.

However, if you are using this, you can't use the "col" program.  If you
run "col" before "colpr", it strips the DEL characters.  If you run "col"
after "colpr", it strips the MSB.

>- Troff generates files for a C/A/T phototypesetter

There is a filter in the USENET archives called "cat2dit" which translates
C/A/T codes to ditroff output.  I've been told that there are some problems
with this filter, but I believe Mike Slifcak <slif@oliven.atc.olivetti.com>
has hacked on it enough to get output from SCO's troff to work with Rick
Richardson's jetroff.
-- 
Chip Rosenthal / chip@vector.Dallas.TX.US / Dallas Semiconductor / 214-450-5337