rsalz@uunet.uu.net (Rich Salz) (10/26/89)
Submitted-by: "John Rupley" <rupley@arizona.edu> Posting-number: Volume 20, Issue 61 Archive-name: epf/part01 In these days of cheap laser printers, can there be anyone who uses an Epson LQ dot matrix device to produce text with Greek and other special characters, equations, and relatively complex tables, yet that is clean enough for submission to a journal? If you are among those who find the Epson still useful, read on. For my own use, I put together recently the following for an Epson LQ-1500 compatible printer: (1) nroff driver table; (2) filter to translate special characters to printer control strings for 24-pin user-defined-characters; (3) filter to handle overstriking; (4) miscellaneous files (tests, eqnchar for epson, etc.). Neqn and tbl produce decent output. The files take the user-defined character graphics designed by John Nellen (Delft Univ. of Technology, mcvax!dutesta!john) for the LQ-1500 and wrap them in an nroff driver and filters compatible with col, and thus with neqn and tbl. John Rupley uucp: ..{uunet | ucbvax | cmcl2 | hao!ncar!noao}!arizona!rupley!local internet: rupley!local@megaron.arizona.edu #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of archive 1 (of 6)." # Contents: ./README ./README.EPF.ORI ./MANIFEST ./Makefile ./charlist # ./code.epson ./epf.1 ./epf.c ./epseqnchar ./epseqnchar.ctl ./epson # ./mk.code.list ./nobs.1 ./nroff.to.epson ./Matrix # ./Matrix/mk.addin.sh PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f './README' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./README'\" else echo shar: Extracting \"'./README'\" \(7669 characters\) sed "s/^X//" >'./README' <<'END_OF_FILE' In these days of cheap laser printers, can there be anyone who uses an XEpson LQ dot matrix device to produce text with Greek and other special characters, equations, and relatively complex tables, yet that is clean enough for submission to a journal? If you are among the hard-core few who find the Epson useful, read on. X These programs provide the following: X X(1) Nroff driver tables for LQ-1500-compatible printers, for Elite and Pica modes. There is an essentially complete set of nroff special characters (Greek, math, etc). Neqn and tbl work properly. The nroff drivers (/usr/lib/term/tabepson*) are compiled from "tabepson*.c" and X"code.epson". X X(2) The nroff output must be processed before printing, first by the UNIX filter "col", to convert reverse movements to the half and full line forward movements allowed by the Epson, and then by "epf", to convert the driver codes to Epson LQ-1500 printer control strings for user-defined characters. X X(3) If text contains both (a) reverse line feeds and (b) bold or italic font in a reverse line-feed section, then bold and italic must be implemented by overstriking, rather than by Epson "font" changes. This is because "col" processing changes the ordering of characters. The X"nobs" filter handles overstriking like "col" handles carriage movements; it is needed for printers than cannot overstrike a character with itself, and is generally convenient for reducing chatter. X X(4) Miscellaneous: Test files (specialgrk, specialtbl, specialeqn1, specialeqn2). Man pages (epf.1, nobs.1). Mk.code.list (shell script gives a table of the non-ascii special characters -- showing nroff notation, description, tabepson code, SO-SI code). Epseqnchar X(/usr/pub/eqnchar modified to use the tabepson driver table). A prototype lp interface script ("epson"). X X Code from the following public domain sources was used: X X(1) John Nellen, Delft Univ. of Technology X..!{decvax,philabs}!mcvax!dutesta!john Newsgroups: net.sources Subject: Epson filter to type nroff Non-ASCII char's (no 1 of 4) Date: 30 Oct 85 09:54:20 GMT X This package is not in the comp.sources archives. It is on simtel20.arpa. X The LQ-1500 user-defined characters were taken over without change. A few math symbols were added. This code is in matrix.h. The generating programs and pictures are in the Matrix directory. The graphics designed by John Nellen are notably good. X The code for the driver tables ("tabepson.c" and "code.epson") was rewritten. In order to get compatiblity with "col", and thus the capability of using "tbl" and "neqn", all special characters not obtained from the printable ascii set are represented by strings of the form SO-<single printable char>-SI; half-line forward and reverse line movements are represented by ESC-[789]; printer setup and reset is minimal (better to do this in the "lp" interface); bold and italics are implemented by overstriking; the horizontal and vertical motions possible with the Epson are described properly in parameter values used by tbl and eqn. X The filter for translating the driver table code to Epson LQ printer control strings ("epf.c") was rewritten, to be compatible with the driver tables and with "col". X X X(2) The "nobs" filter, which handles overstriking, is loosely based on: X X comp.sources.misc: Volume 3, Issue 44 X Submitted-By: "A. Nonymous" <chad@anasaz.UUCP> X Archive-Name: nobs X It is fully compatible with "col" (SO-<char>-SI and ESC-[789]), and with "epf". X X X(3) Compilation of the driver tables relies on the package by Bruce Townsend (bnr-vpa!bruce) Phone: (613) 726-3008: X X Subject: v13i069: Nroff driver table utility X Newsgroups: comp.sources.unix,comp.text X Posting-number: Volume 13, Issue 69 X Archive-name: nroff-driver X The two files needed for making the driver tables ("table.c" and X"table.h") are included here. The full sources can be obtained from the comp.sources.unix archives, and they are well worth acquiring (elbat, a disassembler for nroff drivers; table.5, the man page; and other goodies). X X COMMENTS: X Tested with sysV.rel2 only. The driver tables appear to be compatible with our cs department's nroff, running under BSD4.3. X Some thought might to be given to configuration of the printer and printer port. This can be done by building configuration commands into the interface in /usr/spool/lp, or if this is not possible, by wrapping them in a shell script. It may be convenient also to wrap "col", "nobs", X"epf", etc, into the interface or a shell script. A prototype lp interface, "epson", is included. X The "col", "nobs", and "epf" filters signicantly increase the size of the output from nroff, if there are reverse carriage movements or user-defined characters, or worse, overstruck user-defined characters. X"Epf" expands each such character to a 105-byte printer control sequence and "col" and "nobs" work by adding half-spaced or overwriting with largely space-filled lines. Generally the raw nroff output should be piped through the filters directly to a printer. The test targets of the makefile, however, generate intermediate files, for inspection during testing. X The widths of the user-defined characters are significantly greater than the 1/12" of Epson Elite mode. They are close to 1/10" and thus more suitable for Epson Pica mode. For best-looking results, use unidirectional printing. And if using user-defined characters heavily, better not use Elite mode. X There are control characters in the makefile, in the script X"nroff.to.epson", and in "epseqnchar". For the first two files, mnemonics for the control characters are given in a makefile comment. XFor the latter, compare "epseqnchar" and "epseqnchar.ctl", the latter obtained as: X cat -v epseqnchar >epseqnchar.ctl X The Townsend package and the driver table code provided here are for the X"old" nroff version, with compiled tables in /usr/lib/term. For interconversion between old and new styles, see: X X Subject: v15i046: Tools for nroff graphics on dot-matrix printers X Newsgroups: comp.sources.unix X Submitted-by: snark!eric (Eric Raymond) X Posting-number: Volume 15, Issue 46 X Archive-name: nroffgraphics (2 parts) X XFor packages for MX80 compatibles, see the above distribution and also the following one, obtainable from simtel20.arpa: X X From: "Thomas E. Tkacik" <tet@uvaee.uucp> X Newsgroups: net.sources X Subject: UNIX PC epson printer driver for nroff X Date: 18 Feb 86 16:28:15 GMT X This driver implements Epson bold and italic modes, rather than using overstriking for them. X X TESTING: X X(1) Create two files in "/usr/lib/term" that you can write upon, that can be recognized as tab files by nroff, and that do not conflict with system file names (makefile defaults are tabepstst and tabepstst-12). If the default names are not used, redefine T and T12. Uncomment the lines marked "careful" in the *.tab targets. X X(2) Identify a device in LP and LP12 that can pass a file through to an LQ-type printer, without altering it. The makefile default is X">/dev/epson". If you use it, you probably will have to configure the printer ports by hand, to put them into raw mode. The drivers put the printer into pica or elite mode, but do no other configuration. The file "epson" is a printer interface script that has options for printer configuration and calls a routine to configure the printer ports. X X(3) run: make test test12 X X X Would appreciate learning of improvements. X Cheers, X John Rupley X uucp: ..{uunet | ucbvax | cmcl2 | hao!ncar!noao}!arizona!rupley!local X internet: rupley!local@megaron.arizona.edu X (H) 30 Calle Belleza, Tucson AZ 85716 - (602) 325-4533 X (O) Dept. Biochemistry, Univ. Arizona, Tucson AZ 85721 - (602) 621-3929 END_OF_FILE if test 7669 -ne `wc -c <'./README'`; then echo shar: \"'./README'\" unpacked with wrong size! fi # end of './README' fi if test -f './README.EPF.ORI' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./README.EPF.ORI'\" else echo shar: Extracting \"'./README.EPF.ORI'\" \(572 characters\) sed "s/^X//" >'./README.EPF.ORI' <<'END_OF_FILE' This is a shar archive of a filter used for the Epson LQ-1500 to print the nroff Non-ASCII Special Characters given in the manual. The greek characters as well as the mathematical characters are implemented. This comes with all the defined characters and the makefiles to build your epf.c (epson filter) At dutesta we work with it for half a year now and we are pleased with it. X XFor those who want to implement Italic writing via nroff on an Epson I do have some ideas too (mail me) X X-- X John Nellen, Delft Univ. of Technology X ..!{decvax,philabs}!mcvax!dutesta!john END_OF_FILE if test 572 -ne `wc -c <'./README.EPF.ORI'`; then echo shar: \"'./README.EPF.ORI'\" unpacked with wrong size! fi # end of './README.EPF.ORI' fi if test -f './MANIFEST' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./MANIFEST'\" else echo shar: Extracting \"'./MANIFEST'\" \(3289 characters\) sed "s/^X//" >'./MANIFEST' <<'END_OF_FILE' X File Name Archive # Description X----------------------------------------------------------- X ./README 1 X ./README.EPF.ORI 1 X ./MANIFEST 1 X ./Makefile 1 X ./charlist 1 X ./code.epson 1 X ./epf.1 1 X ./epf.c 1 X ./epseqnchar 1 X ./epseqnchar.ctl 1 X ./epson 1 X ./matrix.h 2 X ./mk.code.list 1 X ./nobs.1 1 X ./nobs.c 3 X ./nroff.to.epson 1 X ./specialeqn1 3 X ./specialeqn2 3 X ./specialerr 3 X ./specialgrk 3 X ./specialtbl 3 X ./tabepson.c 3 X ./tabepson12.c 3 X ./table.c 3 X ./table.h 3 X ./Matrix 1 X ./Matrix/Delta 3 X ./Matrix/Gamma 3 X ./Matrix/Lambda 3 X ./Matrix/Makefile 3 X ./Matrix/NOTE 3 X ./Matrix/Omega 3 X ./Matrix/Phi 3 X ./Matrix/Pi 3 X ./Matrix/Psi 3 X ./Matrix/README 3 X ./Matrix/Sigma 3 X ./Matrix/Theta 3 X ./Matrix/Upsilon 4 X ./Matrix/Xi 4 X ./Matrix/alpha 4 X ./Matrix/approx 4 X ./Matrix/approximates 4 X ./Matrix/beta 4 X ./Matrix/bold_vert 4 X ./Matrix/bullet 4 X ./Matrix/cap 4 X ./Matrix/chi 4 X ./Matrix/cup 4 X ./Matrix/dagger 4 X ./Matrix/degree 4 X ./Matrix/delta 4 X ./Matrix/divide 4 X ./Matrix/down_arrow 4 X ./Matrix/epsilon 4 X ./Matrix/eta 4 X ./Matrix/gradient 4 X ./Matrix/great_eq 4 X ./Matrix/ident 4 X ./Matrix/imp_subs 4 X ./Matrix/imp_superset 4 X ./Matrix/infinity 4 X ./Matrix/integral 5 X ./Matrix/iota 5 X ./Matrix/kappa 5 X ./Matrix/lambda 5 X ./Matrix/left_arrow 5 X ./Matrix/left_bot 5 X ./Matrix/left_top 5 X ./Matrix/mat.c 3 X ./Matrix/matrix.c 5 X ./Matrix/member_of 5 X ./Matrix/mk.addin.sh 1 X ./Matrix/multiply 5 X ./Matrix/not 5 X ./Matrix/notequal 5 X ./Matrix/nu 5 X ./Matrix/omega 5 X ./Matrix/omicron 5 X ./Matrix/orig 5 X ./Matrix/partial 5 X ./Matrix/phi 5 X ./Matrix/pi 5 X ./Matrix/propor 5 X ./Matrix/psi 5 X ./Matrix/rho 5 X ./Matrix/right_arrow 5 X ./Matrix/right_bot 5 X ./Matrix/right_top 6 X ./Matrix/section 6 X ./Matrix/sigma 6 X ./Matrix/smal_eq 6 X ./Matrix/square 6 X ./Matrix/square_root 6 X ./Matrix/subset_of 6 X ./Matrix/superset_of 6 X ./Matrix/tau 6 X ./Matrix/term_sigma 6 X ./Matrix/theta 6 X ./Matrix/up_arrow 6 X ./Matrix/upsilon 6 X ./Matrix/xi 6 X ./Matrix/zeta 6 END_OF_FILE if test 3289 -ne `wc -c <'./MANIFEST'`; then echo shar: \"'./MANIFEST'\" unpacked with wrong size! fi # end of './MANIFEST' fi if test -f './Makefile' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./Makefile'\" else echo shar: Extracting \"'./Makefile'\" \(4116 characters\) sed "s/^X//" >'./Makefile' <<'END_OF_FILE' X#TESTING: X# X#(1) Create two files in "/usr/lib/term" that you can write upon, that X#can be recognized as tab files by nroff, and that do not conflict with X#system file names (makefile defaults are tabepstst and tabepstst-12). X#If the default names are not used, redefine T and T12. Uncomment the X#lines marked "careful" in the *.tab targets. X# X#(2) Identify a device in LP and LP12 that can pass a file through to an X#LQ-type printer, without altering it. The makefile default is X#">/dev/epson". If you use it, you probably will have to configure the X#printer ports by hand, to put them into raw mode. The drivers put the X#printer into pica or elite mode, but do no other configuration. The X#file "epson" is a printer interface script that has options for printer X#configuration and calls a routine to configure the printer ports. X# X#(3) run: make test test12 X X#Table.c and table.h are required to compile the nroff driver. X#They are from the Townsend package, in volume 13 of comp.sourcs.unix. X#The full package is well worth extracting from a sources archive X#(elbat, to disassemble a driver; table.5, the man page; and more). X CFLAGS = -O X#CFLAGS = -g X#LDFLAGS X X#need writable files in driver directory, with names that X#do not conflict with system files T = epstst T12 = epstst-12 TERMFILE = /usr/lib/term/tab$(T) TERMFILE12 = /usr/lib/term/tab$(T12) X X#Set up LP and LP12 to pass stream without processing. X#May have to configure printer port and printer by hand. LP = >/dev/epson LP12 = >/dev/epson X#if have installed install "epson" or equivalent in lp/interface X#LP = | lp -depson -setlp -ounidiron -olq -onofilter X#LP12 = | lp -depson -osetlp -ounidiron -olq -onofilter -oresetpica X X#for installation only BINDIR = /usr/local/bin PUBDIR = /usr/pub MAN1DIR = /usr/man/new/man1 MAN5DIR = /usr/man/new/man5 X dummy: X @echo please give a target X all: epf nobs tabepson.tab tabepson12.tab X epf: epf.c matrix.h X cc $(CFLAGS) $(LDFLAGS) epf.c -o epf X nobs: nobs.c X cc $(CFLAGS) $(LDFLAGS) nobs.c -o nobs X tabepson.tab: tabepson.o table.o X cc tabepson.o table.o X a.out tabepson.tab X cp tabepson.tab $(TERMFILE) #careful! X tabepson12.tab: tabepson12.o table.o X cc tabepson12.o table.o X a.out tabepson12.tab X cp tabepson12.tab $(TERMFILE12) #careful! X table.o: table.h X tabepson.o: code.epson X tabepson12.o: code.epson X special: X#uncomment to run all tests - else copy test into "special" X cat specialgrk specialtbl specialeqn[12] >special X special.epf: tabepson.tab epf nobs special X#pipe through pic for including files in tbl and eqn X cat special|pic|tbl|neqn|nroff -T$(T) >special.raw X#the sed filter fixes the SO-<bksp> / SI-<bksp> problem; X#to use, substitute true control characters for the mnemonics, X#and appropriately alter commenting X# cat special.raw|\ X# sed -e "s/\^N\^H[\^H\^N]*\^N/\^N/g" \ X# -e "s/\^O\^H[\^H\^O]*\^O/\^O/g"|\ X# col -fx >special.col X cat special.raw|\ X sed -e "s/\\[\\]*\/\/g" \ X -e "s/\\[\\]*\/\/g"|\ X col -fx >special.col X# cat special.raw|col -fx >special.col X cat special.col|nobs >special.nobs X cat special.nobs|epf >special.epf X special12.epf: tabepson12.tab epf nobs special X cat special|pic|tbl|neqn|nroff -T$(T12) >special12.raw X cat special12.raw|\ X sed -e "s/\\[\\]*\/\/g" \ X -e "s/\\[\\]*\/\/g"|\ X col -fx >special12.col X cat special12.col|nobs >special12.nobs X cat special12.nobs|epf >special12.epf X test: special.epf X cat special.epf $(LP) X test12: special12.epf X cat special12.epf $(LP12) X install: nobs epf tabepson.tab tabepson12.tab epseqnchar X strip nobs epf X mv nobs epf $(BINDIR) X cp epseqnchar $(PUBDIR) X# mv tabepson.tab $(TERMFILE) #shouldn't be needed X# mv tabepson12.tab $(TERMFILE12) X cp epf.1 nobs.1 $(MAN1DIR) X cp table.5 $(MAN5DIR) X#do the right thing by permissions-ownerships X#lp interface? X clean: X -rm core *.o tabepson*.tab a.out special*.* special nobs epf X spotless: clean X -rm $(BINDIR)/nobs $(BINDIR)/epf X -rm $(TERMFILE) $(TERMFILE12) $(PUBDIR)/epseqnchar X -rm $(MAN1DIR)/epf.1 $(MAN1DIR)/nobs.1 $(MAN5DIR)/table.5 X shar: X cat MANIFEST | sed 1,2d | makekit -pX -s42k >scr X diff scr MANIFEST X rm scr END_OF_FILE echo shar: 24 control characters may be missing from \"'./Makefile'\" if test 4116 -ne `wc -c <'./Makefile'`; then echo shar: \"'./Makefile'\" unpacked with wrong size! fi # end of './Makefile' fi if test -f './charlist' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./charlist'\" else echo shar: Extracting \"'./charlist'\" \(2107 characters\) sed "s/^X//" >'./charlist' <<'END_OF_FILE' X "narrow sp" X\(hy "hyphen" X\(bu "bullet" X\(sq "square" X\(em "3/4em" X\(ru "rule" X\(14 "1/4" X\(12 "1/2" X\(34 "3/4" X\- "minus" X\(fi "fi" X\(fl "fl" X\(ff "ff" X\(Fi "ffi" X\(Fl "ffl" X\(de "degree" X\(dg "dagger" X\(sc "section" X\(fm "foot mark" X\(aa "acute accent" X\(ga "grave accent" X\(ul "underrule" X\(sl "slash (longer)" X "half narrow space" X "unpaddable space" X\(*a "alpha" X\(*b "beta" X\(*g "gamma" X\(*d "delta" X\(*e "epsilon" X\(*z "zeta" X\(*y "eta" X\(*h "theta" X\(*i "iota" X\(*k "kappa" X\(*l "lambda" X\(*m "mu" X\(*n "nu" X\(*c "xi" X\(*o "omicron" X\(*p "pi" X\(*r "rho" X\(*s "sigma" X\(*t "tau" X\(*u "upsilon" X\(*f "phi" X\(*x "chi" X\(*q "psi" X\(*w "omega" X\(*A "Alpha" /*A*/ X\(*B "Beta" /*B*/ X\(*G "Gamma" X\(*D "Delta" X\(*E "Epsilon" /*E*/ X\(*Z "Zeta" /*Z*/ X\(*Y "Eta" /*H*/ X\(*H "Theta" X\(*I "Iota" /*I*/ X\(*K "Kappa" /*K*/ X\(*L "Lambda" X\(*M "Mu" /*M*/ X\(*N "Nu" /*N*/ X\(*C "Xi" X\(*O "Omicron" /*O*/ X\(*P "Pi" X\(*R "Rho" /*P*/ X\(*S "Sigma" X\(*T "Tau" /*T*/ X "" X\(*U "Upsilon" X\(*F "Phi" X\(*X "Chi" /*X*/ X\(*Q "Psi" X\(*W "Omega" X\(sr "square root" X\(ts "terminal sigma" X\(rn "root en" X\(>= ">=" X\(<= "<=" X\(== "identically equal" X\(mi "equation minus" X\(~= "approx =" X\(ap "approximates" X\(!= "not equal" X\(-> "right arrow" X\(<- "left arrow" X\(ua "up arrow" X\(da "down arrow" X\(eq "equation equal" X\(mu "multiply" X\(di "divide" X\(+- "plus-minus" X\(cu "cup (union)" X\(ca "cap (intersection)" X\(sb "subset of" X\(sp "superset of" X\(ib "improper subset" X\(ip " '' superset" X\(if "infinity" X\(pd "partial derivative" X\(gr "gradient" X\(no "not" X\(is "integral sign" X\(pt "proportional to" X\(es "empty set" X\(mo "member of" X\(pl "equation plus" X\(rg "registered" X\(co "copyright" X\(br "box vert rule" X\(ct "cent sign" X\(dd "dbl dagger" X\(rh "right hand" X\(lh "left hand" X\(** "math * " X\(bs "bell system sign" X\(or "or" X\(ci "circle" X\(lt "left top of big { or (" X\(lb "left bottom" X\(rt "right top" X\(rb "right bot" X\(lk "left center of big {" X\(rk "right center of big {" X\(bv "bold vertical" X\(lf "left floor (lb of big [)" X\(rf "right floor (rb of '')" X\(lc "left ceiling (lt of '')" X\(rc "right ceiling (rt of '')" END_OF_FILE if test 2107 -ne `wc -c <'./charlist'`; then echo shar: \"'./charlist'\" unpacked with wrong size! fi # end of './charlist' fi if test -f './code.epson' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./code.epson'\" else echo shar: Extracting \"'./code.epson'\" \(5691 characters\) sed "s/^X//" >'./code.epson' <<'END_OF_FILE' X/*space*/ "\001 ", X/*!*/ "\001!", X/*"*/ "\001\"", X/*#*/ "\001#", X/*$*/ "\001$", X/*%*/ "\001%", X/*&*/ "\001&", X/*' close*/ "\001'", X/*(*/ "\001(", X/*)*/ "\001)", X/***/ "\001*", X/*+*/ "\001+", X/*,*/ "\001,", X/*- hyphen*/ "\001-", X/*.*/ "\001.", X/*/*/ "\001/", X/*0*/ "\2010", X/*1*/ "\2011", X/*2*/ "\2012", X/*3*/ "\2013", X/*4*/ "\2014", X/*5*/ "\2015", X/*6*/ "\2016", X/*7*/ "\2017", X/*8*/ "\2018", X/*9*/ "\2019", X/*:*/ "\001:", X/*;*/ "\001;", X/*<*/ "\001<", X/*=*/ "\001=", X/*>*/ "\001>", X/*?*/ "\001?", X/*@*/ "\001@", X/*A*/ "\201A", X/*B*/ "\201B", X/*C*/ "\201C", X/*D*/ "\201D", X/*E*/ "\201E", X/*F*/ "\201F", X/*G*/ "\201G", X/*H*/ "\201H", X/*I*/ "\201I", X/*J*/ "\201J", X/*K*/ "\201K", X/*L*/ "\201L", X/*M*/ "\201M", X/*N*/ "\201N", X/*O*/ "\201O", X/*P*/ "\201P", X/*Q*/ "\201Q", X/*R*/ "\201R", X/*S*/ "\201S", X/*T*/ "\201T", X/*U*/ "\201U", X/*V*/ "\201V", X/*W*/ "\201W", X/*X*/ "\201X", X/*Y*/ "\201Y", X/*Z*/ "\201Z", X/*[*/ "\001[", X/*\*/ "\001\\", X/*]*/ "\001]", X/*^*/ "\001^", X/*_ dash*/ "\001_", X/*` open*/ "\001`", X/*a*/ "\201a", X/*b*/ "\201b", X/*c*/ "\201c", X/*d*/ "\201d", X/*e*/ "\201e", X/*f*/ "\201f", X/*g*/ "\201g", X/*h*/ "\201h", X/*i*/ "\201i", X/*j*/ "\201j", X/*k*/ "\201k", X/*l*/ "\201l", X/*m*/ "\201m", X/*n*/ "\201n", X/*o*/ "\201o", X/*p*/ "\201p", X/*q*/ "\201q", X/*r*/ "\201r", X/*s*/ "\201s", X/*t*/ "\201t", X/*u*/ "\201u", X/*v*/ "\201v", X/*w*/ "\201w", X/*x*/ "\201x", X/*y*/ "\201y", X/*z*/ "\201z", X/*{*/ "\001{", X/*|*/ "\001|", X/*}*/ "\001}", X/*~*/ "\001~", X/*narrow sp*/ "\000\0", X/*hyphen*/ "\001-", X/*bullet*/ "\001\016(\017", X/*square*/ "\001\016)\017", X/*3/4 em*/ "\001- ", /* this one is needed for DL */ X/*rule*/ "\001_", X/*1/4*/ "\0031/4", X/*1/2*/ "\0031/2", X/*3/4*/ "\0033/4", X/*minus*/ "\001-", X/*fi*/ "\202fi", X/*fl*/ "\202fl", X/*ff*/ "\202ff", X/*ffi*/ "\203ffi", X/*ffl*/ "\203ffl", X/*degree*/ "\001\016*\017", X/*dagger*/ "\001\016+\017", X/*section*/ "\001\016,\017", X/*foot mark*/ "\001'", X/*acute accent*/ "\001'", X/*grave accent*/ "\001`", X/*underrule*/ "\001_", X/*slash (longer)*/ "\001/", X/*half narrow space*/ "\000\0", X/*unpaddable space*/ "\000\0", X/*alpha*/ "\201\016-\017", X/*beta*/ "\201\016.\017", X/*gamma*/ "\201\016/\017", X/*delta*/ "\201\016\060\017", X/*epsilon*/ "\201\016\061\017", X/*zeta*/ "\201\016\062\017", X/*eta*/ "\201\016\063\017", X/*theta*/ "\201\016\064\017", X/*iota*/ "\201\016\065\017", X/*kappa*/ "\201\016\066\017", X/*lambda*/ "\201\016\067\017", X/*mu*/ "\201\016\070\017", X/*nu*/ "\201\016\071\017", X/*xi*/ "\201\016:\017", X/*omicron*/ "\201\016;\017", X/*pi*/ "\201\016<\017", X/*rho*/ "\201\016=\017", X/*sigma*/ "\201\016>\017", X/*tau*/ "\201\016\?\017", X/*upsilon*/ "\201\016@\017", X/*phi*/ "\201\016A\017", X/*chi*/ "\201\016B\017", X/*psi*/ "\201\016C\017", X/*omega*/ "\201\016D\017", X/*Gamma*/ "\201\016E\017", X/*Delta*/ "\201\016F\017", X/*Theta*/ "\201\016G\017", X/*Lambda*/ "\201\016H\017", X/*Xi*/ "\201\016I\017", X/*Pi*/ "\201\016J\017", X/*Sigma*/ "\201\016K\017", X/**/ "\200\0", X/*Upsilon*/ "\201\016L\017", X/*Phi*/ "\201\016M\017", X/*Psi*/ "\201\016N\017", X/*Omega*/ "\201\016O\017", X/*square root*/ "\001\016P\017", X/*terminal sigma*/ "\201\016Q\017", X/*root en*/ "\000\0", X/*>=*/ "\001\016R\017", X/*<=*/ "\001\016S\017", X/*identically equal*/ "\001\016T\017", X/*equation minus*/ "\001-", X/*approx =*/ "\001\016U\017", X/*approximates*/ "\001\016V\017", X/*not equal*/ "\001\016W\017", X/*right arrow*/ "\001\016X\017", X/*left arrow*/ "\001\016Y\017", X/*up arrow*/ "\001\016Z\017", X/*down arrow*/ "\001\016[\017", X/*equation equal*/ "\001=", X/*multiply*/ "\001X", X/*divide*/ "\001\016\\\017", X/*plus-minus*/ "\001+\010_", X/*cup (union)*/ "\001\016]\017", X/*cap (intersection)*/ "\001\016^\017", X/*subset of*/ "\001\016_\017", X/*superset of*/ "\001\016`\017", X/*improper subset*/ "\001\016a\017", X/*improper superset*/ "\001\016b\017", X/*infinity*/ "\001\016c\017", X/*partial derivative*/ "\001\016d\017", X/*gradient*/ "\001\016e\017", X/*not*/ "\001\016f\017", X/*integral sign*/ "\001\016g\017", X/*proportional to*/ "\001\016&\017", X/*empty set*/ "\001o\010/", X/*member of*/ "\001\016h\017", X/*equation plus*/ "\001+", X/*registered*/ "\003(R)", X/*copyright*/ "\003(C)", X/*box rule */ "\001|", X/*cent sign*/ "\001c\b/", X/*dbl dagger*/ "\001\016Z\017\b=", X/*right hand*/ "\002=>", X/*left hand*/ "\002<=", X/*math * */ "\001*", X/*bell system sign*/ "\000\0", X/*or (was star)*/ "\001|", X/*circle*/ "\001O", X/*left top (of big curly)*/ "\001\016#\017", X/*left bottom*/ "\001\016\"\017", X/*right top*/ "\001\016%\017", X/*right bot*/ "\001\016$\017", X/*left center of big curly bracket*/ "\001\016!\017", X/*right center of big curly bracket*/ "\001\016!\017", X/*bold vertical*/ "\001\016!\017", X/*left floor (left bot of big sq bract)*/ "\001\016\"\017", X/*right floor (rb of ")*/ "\001\016$\017", X/*left ceiling (lt of ")*/ "\001\016#\017", X/*right ceiling (rt of ")*/ "\001\016%\017", X#if 0 X/*left top (of big curly)*/ "\001\016#\017\b\0339\016!\017\0338", X/*left bottom*/ "\001\016\"\017", X/*right top*/ "\001\016%\017\b\0339\016!\017\0338", X/*right bot*/ "\001\016$\017", X/*left center of big curly bracket*/ "\001\016!\017\b\0339\016!\017\0338", X/*right center of big curly bracket*/ "\001\016!\017\b\0339\016!\017\0338", X/*bold vertical*/ "\001\016!\017\b\0339\016!\017\0338", X/*left floor (left bot of big sq bract)*/ "\001\016\"\017", X/*right floor (rb of ")*/ "\001\016$\017", X/*left ceiling (lt of ")*/ "\001\016#\017\b\0339\016!\017\0338", X/*right ceiling (rt of ")*/ "\001\016%\017\b\0339\016!\017\0338", X#endif X}; END_OF_FILE if test 5691 -ne `wc -c <'./code.epson'`; then echo shar: \"'./code.epson'\" unpacked with wrong size! fi # end of './code.epson' fi if test -f './epf.1' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./epf.1'\" else echo shar: Extracting \"'./epf.1'\" \(3386 characters\) sed "s/^X//" >'./epf.1' <<'END_OF_FILE' X.TH EPF 1 X.SH NAME epf \- filter to handle nroff output for Epson LQ-1500 compatible printers X.SH SYNOPSIS X.B epf X[ no options ] X.SH DESCRIPTION X.B Epf converts the X.B nroff(1) driver table representations of the special characters (Greek letters, math symbols, etc.) into XEpson LQ-1500 printer control strings. X.B Nroff(1) output should be processed by X.B col(1) and, according to the overstrike capabilities of the printer, possibly also by X.B nobs(1), before processing by X.B epf. X.PP X.B Epf recognizes printer control strings of the type recognized by X.B col(1), viz., those for half-line forward and reverse, and full-line reverse motions X(ESC-9, -8, and -7, respectively), and those for the special characters X(SO-<single printable character>-SI). X.PP X.B Epf implements the printer control and graphics needed for X.B tbl(1) and X.B neqn(1). X.SS "SAMPLE USAGE" XFor Epson Pica mode: X.in +5 cat file | pic | tbl | neqn | nroff -Tepson | col -fx | nobs | epf > /dev/epson X.PP XFor Epson Elite mode (12 characters per inch), as above, except use the X.B nroff(1) option, -Tepson-12. X.PP The X.B nobs(1) filter is not needed if the printer can overstrike a character with itself, but even if not needed, it may cut down on clatter. X.SH FILES Printer driver tables: X.br X/usr/lib/term/tabepson, /usr/lib/term/tabepson-12 X.SH AUTHOR John Nellen, Delft Univ. of Technology X.br X\&..!{decvax,philabs}!mcvax!dutesta!john X.PP J.A. Rupley, University of Arizona X.br X\&..{uunet | ucbvax | cmcl2 | hao!ncar!noao}!arizona!rupley!local X.br rupley!local@megaron.arizona.edu X.SH "SEE ALSO" X\fBcol(1), nobs(1), nroff(1), neqn(1), tbl(1), pic(1).\fP X.SH BUGS The printer and printer port must be properly configured for interpreting and passing the Epson printer control strings. This can be done within the printer interface, perhaps more appropriately than by code in X.B epf and the X.B nroff(1) driver table. X.PP XEpson LQ printers with tractor feed cannot usefully execute full- or half-line reverse motions. Thus X.B col(1) processing is essential, to convert reverse to forward motions. There is no thought of finer grain than one-character horizontal and half-line vertical. X.PP The widths of the user-defined characters are slightly greater than the 10-character-per-inch width of the Epson Pica font. The difference is small enough to allow mixing of graphics and Pica. However, mixing of user-defined characters with 12-character-per-inch Epson Elite can give noticeable loss of registration. X.PP The graphics are good, but like most things probably can be made better. X.PP X.B Epf of course must be written to be compatible with the coding of the driver tables. X.B Epf and the driver tables constitute a unit. There are various versions of X.B nroff(1). The driver tables are written for the "old" nroff. X.PP Compilation of the driver tables requires the Townsend package. X.PP X.B Nroff(1) overstrikes the SO,SI delimiters of a special character representation, moving the overstruck special character improperly to the left. XFix by filtering the raw nroff output to remove SO-<bksp> and SI-<bbksp> sequences. X.PP X.B Col(1) does not pass a file-ending SO,SI sequence, specifically, a printer reset command. Fix by filtering the raw nroff output or ensuring reset of the printer in the printer interface. X.PP Printer implementations are messy enought to ensure perpetual bugginess. END_OF_FILE if test 3386 -ne `wc -c <'./epf.1'`; then echo shar: \"'./epf.1'\" unpacked with wrong size! fi # end of './epf.1' fi if test -f './epf.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./epf.c'\" else echo shar: Extracting \"'./epf.c'\" \(2206 characters\) sed "s/^X//" >'./epf.c' <<'END_OF_FILE' X/* epf */ X X/*- X * This filter for Epson LQ-1500 compatibles prints the nroff Non-ASCII X * Special Characters. X * X * Greek characters and mathematical characters are implemented. X * X * Neqn displays are not bad. X * X * Assumes the nroff driver tables were written for representations X * compatible with "col", ie SO-<single printable char>-SI and X * ESC-[789] for line movements. X * X * The table of user-defined-character strings is in matrix.h. X * X * Author: X * John Nellen, Delft Univ. of Technology X * ..!{decvax,philabs}!mcvax!dutesta!john X * X * Source: X * Newsgroups: net.sources X * Subject: Epson filter to type nroff Non-ASCII char's (no 1 of 4) X * Message-ID: <371@dutesta.UUCP> X * Date: 30 Oct 85 09:54:20 GMT X * X * Rewritten Jul 1, 1989: X * J.A. Rupley X * rupley!local@megaron.arizona.edu X */ X X X#include <stdio.h> X X#define LINE 30 /* 180 / 6 -- Epson ESC-J scale */ X#define HALFLINE 15 /* LINE / 2 */ X X#define NORMAL 0 X#define GRAPHICS 1 X X#define ESC 27 X#define SO '\016' /* shift out to alternate char set */ X#define SI '\017' X X#include "matrix.h" X int main() X{ X int j, cnt, state; X int c, curchar; X X state = NORMAL; X curchar = getchar(); X while (curchar != EOF) { X if (curchar == ESC) { X if ((c = getchar()) == EOF) X break; X switch (c) { X case '8': X putchar(ESC); /* reverse half line feed */ X putchar('j'); /* not passed by "col" */ X putchar(HALFLINE); /* therefore useless? */ X break; X case '9': X putchar(ESC); /* forward half line feed */ X putchar('J'); X putchar(HALFLINE); X break; X case '7': X putchar(ESC); /* reverse full line feed */ X putchar('j'); /* not passed by "col" */ X putchar(LINE); /* therefore useless? */ X break; X default: X putchar(ESC); /* put ESC back on line */ X putchar(c); X } X } else if (curchar == SI) { X state = NORMAL; X } else if (curchar == SO) { X state = GRAPHICS; X } else if (state == GRAPHICS) { X cnt = (curchar - '!'); X if (cnt < 0 || cnt >= TABLE_ARRAY_SIZE) { X putchar(curchar); X } else { X for (j = 0; j < TABLE_ELEM_SIZE; j++) { X putchar(table[cnt][j]); X } X } X } else { X putchar(curchar); X } X curchar = getchar(); X } X X return 0; X} END_OF_FILE if test 2206 -ne `wc -c <'./epf.c'`; then echo shar: \"'./epf.c'\" unpacked with wrong size! fi # end of './epf.c' fi if test -f './epseqnchar' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./epseqnchar'\" else echo shar: Extracting \"'./epseqnchar'\" \(1334 characters\) sed "s/^X//" >'./epseqnchar' <<'END_OF_FILE' X'''\" eqnchar for EPSON LQ 1500 user-defined character set X.EQ ndefine ciplus % \(pl\(ci % ndefine citimes % \(mu\(ci % ndefine =wig % "\(eq\u\(ap\d" % ndefine bigstar % \(pl\(mu % ndefine =dot % "\(eq\h'-1'\u.\d" % ndefine orsign % \e/ % ndefine andsign % /\e % ndefine =del % "\(eq\h'-1'\u\(*D\d" % ndefine oppA % V- % ndefine oppE % E/ % ndefine incl % C_ % ndefine nomem % "\(mo\\h'-1'\(sl" % ndefine angstrom % A\(de % ndefine star % * % ndefine || % \(or\(or % ndefine <wig % "<\h'-1'\d\(ap\u" % ndefine >wig % ">\h'-1'\d\(ap\u" % ndefine langle %<% ndefine rangle %>% ndefine hbar % h\u-\d % ndefine ppd % _\(bv % ndefine <-> % "<-->" % ndefine <=> % "<=>" % ndefine |< % <\(bv % ndefine |> % \(bv> % ndefine ang % /_ % ndefine rang % L % ndefine 3dot % .\u.\u.\d\d % ndefine thf % ..\u.\d % ndefine quarter % 1/4 % ndefine 3quarter % 3/4 % ndefine degree % \(de % ndefine square % \(sq % ndefine circle % \(ci % ndefine blot % HIX\(bu % ndefine bullet % \(bu % ndefine -wig % "\(~=" % ndefine wig % \(ap % ndefine prop % \(pt % ndefine empty % O/ % ndefine member % \(mo % ndefine scrL % (/ % ndefine ==> % "\(eq\h'-1'\u>\d" % ndefine ==< % "\(eq\h'-1'\u<\d" % ndefine cap % \(ca % ndefine cup % \(cu % ndefine subset % \(sb % ndefine supset % \(sp % ndefine !subset % \(ib % ndefine !supset % \(ip % X.EN END_OF_FILE echo shar: 21 control characters may be missing from \"'./epseqnchar'\" if test 1334 -ne `wc -c <'./epseqnchar'`; then echo shar: \"'./epseqnchar'\" unpacked with wrong size! fi # end of './epseqnchar' fi if test -f './epseqnchar.ctl' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./epseqnchar.ctl'\" else echo shar: Extracting \"'./epseqnchar.ctl'\" \(1355 characters\) sed "s/^X//" >'./epseqnchar.ctl' <<'END_OF_FILE' X'''\" eqnchar for EPSON LQ 1500 user-defined character set X.EQ ndefine ciplus % \(pl^H\(ci % ndefine citimes % \(mu^H\(ci % ndefine =wig % "\(eq^H\u\(ap\d" % ndefine bigstar % \(pl^H\(mu % ndefine =dot % "\(eq\h'-1'\u.\d" % ndefine orsign % \e/ % ndefine andsign % /\e % ndefine =del % "\(eq\h'-1'\u\(*D\d" % ndefine oppA % V^H- % ndefine oppE % E^H/ % ndefine incl % C^H_ % ndefine nomem % "\(mo\\h'-1'\(sl" % ndefine angstrom % A^H\(de % ndefine star % * % ndefine || % \(or\(or % ndefine <wig % "<\h'-1'\d\(ap\u" % ndefine >wig % ">\h'-1'\d\(ap\u" % ndefine langle %<% ndefine rangle %>% ndefine hbar % h^H\u-\d % ndefine ppd % _^H\(bv % ndefine <-> % "<-->" % ndefine <=> % "<=>" % ndefine |< % <^H\(bv % ndefine |> % \(bv^H> % ndefine ang % /^H_ % ndefine rang % L % ndefine 3dot % .^H\u.^H\u.\d\d % ndefine thf % ..^H\u.\d % ndefine quarter % 1/4 % ndefine 3quarter % 3/4 % ndefine degree % \(de % ndefine square % \(sq % ndefine circle % \(ci % ndefine blot % H^HI^HX^H\(bu % ndefine bullet % \(bu % ndefine -wig % "\(~=" % ndefine wig % \(ap % ndefine prop % \(pt % ndefine empty % O^H/ % ndefine member % \(mo % ndefine scrL % (^H/ % ndefine ==> % "\(eq\h'-1'\u>\d" % ndefine ==< % "\(eq\h'-1'\u<\d" % ndefine cap % \(ca % ndefine cup % \(cu % ndefine subset % \(sb % ndefine supset % \(sp % ndefine !subset % \(ib % ndefine !supset % \(ip % X.EN END_OF_FILE if test 1355 -ne `wc -c <'./epseqnchar.ctl'`; then echo shar: \"'./epseqnchar.ctl'\" unpacked with wrong size! fi # end of './epseqnchar.ctl' fi if test -f './epson' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./epson'\" else echo shar: Extracting \"'./epson'\" \(2724 characters\) sed "s/^X//" >'./epson' <<'END_OF_FILE' X# iPAX286 lp interface for dumb parallel line printer X# configured for Epson LQ-800 X# and enough options to handle tbl|eqn|nroff output X# X#ident "@(#) 1.2" X# X# X DEFAULT="\033@" #printer configuration strings UNION="\033U\001" UNIOFF="\033U\000" DRAFT="\033x\000" NLQ="\033x\001" PICA="\033P" XELITE="\033M" X TRON="/usr/local/bin/lptoggle 1" #reconfigure printer port TROFF="/usr/local/bin/lptoggle 0" #restore printer port to defaults NTOEPS="| /usr/local/bin/nroff.to.epson" RESET="" #load with printer control strings to restore X #printer defaults LPRESET="" #set to $TROFF if need to restore printer port XFILTER="-v" #default to remove ctrl chars - else may pass thru X #unwanted printer control codes X #set to $NTOEPS for printing of nroff output x="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" X X#use lp -o<options> in $5 to setup and restore the printer; X#probably there should be a man page or usage message, even though the X#option list is pretty obvious and mnemonic. X echo $5|egrep 'nroff|filter' >/dev/null if [ $? -eq 0 ] then X FILTER="$NTOEPS" fi echo $5|egrep 'epson|nofilter' >/dev/null if [ $? -eq 0 ] then X FILTER="" fi echo $5|egrep 'nroff|setlp|lpset|tron' >/dev/null if [ $? -eq 0 ] then X LPRESET="$TROFF" fi echo $5|egrep 'nroff|lq|resetdraft' >/dev/null if [ $? -eq 0 ] then X RESET="$DRAFT$RESET" fi echo $5|egrep 'nroff|12|elite|resetpica' >/dev/null if [ $? -eq 0 ] then X RESET="$PICA$RESET" fi echo $5|egrep 'resetall|resetdefault' >/dev/null if [ $? -eq 0 ] then X RESET="$DEFAULT$RESET" fi echo $5|egrep 'uni[^ ]*on|resetuni' >/dev/null if [ $? -eq 0 ] then X RESET="$UNIOFF$RESET" fi for i in $5 do X case $i in X nroff|setlp|lpset|tron) X eval $TRON ;; X troff) X eval $TROFF ;; X uni*off) X echo "$UNIOFF" ;; X uni*on) X echo "$UNION" ;; X nlq|lq) X echo "$NLQ" ;; X draft) X echo "$DRAFT" ;; X 10|pica) X echo "$PICA" ;; X 12|elite) X echo "$ELITE" ;; X default) X echo "$DEFAULT" X eval $TROFF ;; X filter|epson|nofilter|reset*) X ;; X *) X echo bad option;exit 1 ;; X esac done X printer=`basename $0` copies=$4 X if [ X${BANNER:+yes} = Xyes ] then X echo "$x\n$x\n$x\n$x\n" X banner "$2" X echo "\n" X user=`grep "^$2:" /etc/passwd | line | cut -d: -f5` X if [ -n "$user" ] X then X echo "User: $user\n" X else X echo "\n" X fi X echo "Request id: $1 Printer: $printer\n" X date X echo "\n" X if [ -n "$3" ] X then X banner $3 X fi X echo "Print Options: \n" X echo " Copies="$copies"\n" X echo "\014\c" fi X shift; shift; shift; shift; shift files="$*" i=1 while [ $i -le $copies ] do X for file in $files X do X eval cat $FILTER "$file" 2>&1 X echo "\014\c" X done X i=`expr $i + 1` done echo "$x\n$x\n$x\n$x\n" echo "\014\c" echo "${RESET}\c" eval ${LPRESET} exit 0 END_OF_FILE if test 2724 -ne `wc -c <'./epson'`; then echo shar: \"'./epson'\" unpacked with wrong size! fi chmod +x './epson' # end of './epson' fi if test -f './mk.code.list' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./mk.code.list'\" else echo shar: Extracting \"'./mk.code.list'\" \(816 characters\) sed "s/^X//" >'./mk.code.list' <<'END_OF_FILE' X#\- print list of non-ascii special characters, with denotation, description, and tabepson code X#usage: % [no options] X sed -e "1,/001~/d" -e "/^#if/,1000d" \ X -e "s/[ ][ ]*\"/ /g" -e "s/\",//" code.epson | awk ' BEGIN { X OFS = "\t" X FS = "\t" X print "NON-ASCII SPECIAL CHARACTERS\n" X print "notation","name","tabepson code","SO<char>SI" X} X { X code = $2 X if (sub(/^.*\\016/, "", $2) && sub(/\\017.*$/, "", $2)) X letter = $2 X else X letter = "" X while ((getline < "charlist" > 0) && $3 != "") { X print $1,$2,$3 X } X print $1,$2,code,letter X}' | expand -12,40,65 X X(echo "\f" echo "USER-DEFINED CHARACTERS IN MATRIX.H\n" echo "table[<n>]\t name\tSO<char>SI" cat matrix.h | sed -n -e "s/^.*\/\*\([^/]*\)[ ]*\/\*[ ]*\([^ ][^ ]*\)[ ]*\*\/$/\1 \2/p" \ X -e "s/^.*\/\* \([^ ][^ ]*\) \*\/$/ \1/p" | nl ) | expand -12,40 END_OF_FILE if test 816 -ne `wc -c <'./mk.code.list'`; then echo shar: \"'./mk.code.list'\" unpacked with wrong size! fi chmod +x './mk.code.list' # end of './mk.code.list' fi if test -f './nobs.1' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./nobs.1'\" else echo shar: Extracting \"'./nobs.1'\" \(2652 characters\) sed "s/^X//" >'./nobs.1' <<'END_OF_FILE' X.TH NOBS 1 local X.SH NAME nobs \- filter to optimize backspaces for printer output. X.SH SYNOPSIS X.B nobs X.SH DESCRIPTION X.B Nobs will take lines containing backspace characters and convert them to individual lines of output with a return but no line feed between them. It is designed for filtering X.B nroff(1) and X.B col(1) output to line printers that cannot back space (or on which back spaces are expensive). X.PP Input is always from standard input. Output is always to standard output. X.PP To use as a filter with X.B nroff(1), try: X.in +5 cat file.mm | pic | tbl | neqn | nroff -mm -Tprinter | col -fx | nobs | printer-filter >/dev/lp X.in X.PP If reverse carriage motions are coded in the nroff output, run X.B col(1) before X.B nobs. X.SH AUTHORS Chad R. Larson DCF, Inc. X.br Kevin O'Gorman Vital Computer Systems. X.br J.A. Rupley rupley!local@megaron.arizona.edu X.SH "SEE ALSO" X\fBcol(1), nroff(1).\fP X.SH BUGS Only the following control characters are expected: X\\b, \\t, \\n, \\r, \\f, ESC, SO, and SI. X\\t is expanded, with fixed tab-stops every 8 columns. X\\b is processed (obviously). SO and SI delimit an alternate character set. A single printer control character must follow ESC; it is assumed that in the nroff output this character was a 7, 8, or 9, for forward or reverse carriage motion, and that "col" processing has made each ESC passed part of a line terminator sequence (\\n-ESC-9 or ESC-9-\\r). Other ESC sequences are near-certain to corrupt the output. Other control characters may be passed, but with undefined results if there is overstriking. Nulls are treated as newlines. X.PP Output from "col -f" is processed properly. Indeed, if there are reverse or half-line forward carriage motions (ESC-[789]), then the raw nroff output X_must_ be filtered through "col" before "nobs". As noted, X"Nobs" assumes that escape sequences terminate a line, as in the output from "col". X.PP X"Nobs", like "col", passes strings in an alternate character set, delimited by SO (\\016) and SI (\\017). Characters of the alternate set are translated subsequently by a printer-specific filter into printer control strings and serve, e.g., to generate Greek characters and math symbols. Characters of the alternate set have unit width for char < 'r' and zero width for char X>= 'r' (there is a non-portable assumption of ascii order). The correspondences of the alternate character set are built into the nroff driver table. X.PP Input lines with more than 1024 bytes between carriage motions are not acceptable. X.PP Lines with more than 8 overstrikes in any one position cause a fatal error. X.PP There are more bugs than features. END_OF_FILE if test 2652 -ne `wc -c <'./nobs.1'`; then echo shar: \"'./nobs.1'\" unpacked with wrong size! fi # end of './nobs.1' fi if test -f './nroff.to.epson' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./nroff.to.epson'\" else echo shar: Extracting \"'./nroff.to.epson'\" \(566 characters\) sed "s/^X//" >'./nroff.to.epson' <<'END_OF_FILE' X#\- filter nroff output to epson LQ-1500 or compatible printer X#usage: file.nroff|pic|tbl|eqn|nroff -Tepson| % >/dev/epson X#the sed filter is to remove overstriking of SO SI delimiters of the X#alternate character set; X#col filters extraneous control characters (from where?) and converts X#reverse carriage motions to forward motions only; X#nobs does what col does, but for overstrikes; X#epf translates the alternate character set, built into the nroff driver table, X#into printer control sequences. X sed -e "s/[]*//g" -e "s/[]*//g" $* |col -fx|nobs|epf END_OF_FILE echo shar: 12 control characters may be missing from \"'./nroff.to.epson'\" if test 566 -ne `wc -c <'./nroff.to.epson'`; then echo shar: \"'./nroff.to.epson'\" unpacked with wrong size! fi chmod +x './nroff.to.epson' # end of './nroff.to.epson' fi if test ! -d './Matrix' ; then echo shar: Creating directory \"'./Matrix'\" mkdir './Matrix' fi if test -f './Matrix/mk.addin.sh' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./Matrix/mk.addin.sh'\" else echo shar: Extracting \"'./Matrix/mk.addin.sh'\" \(118 characters\) sed "s/^X//" >'./Matrix/mk.addin.sh' <<'END_OF_FILE' for i in $* do X echo $i X sed -e "s/[ ],/0,/g" $i >matrix.c X make X echo "/* $i /* . */" >>addin X cat to* >>addin done X END_OF_FILE if test 118 -ne `wc -c <'./Matrix/mk.addin.sh'`; then echo shar: \"'./Matrix/mk.addin.sh'\" unpacked with wrong size! fi chmod +x './Matrix/mk.addin.sh' # end of './Matrix/mk.addin.sh' fi echo shar: End of archive 1 \(of 6\). cp /dev/null ark1isdone MISSING="" for I in 1 2 3 4 5 6 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 6 archives. rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0 -- Please send comp.sources.unix-related mail to rsalz@uunet.uu.net. Use a domain-based address or give alternate paths, or you may lose out.