Goeke@MIT-MULTICS.ARPA (01/14/85)
First, my thanks to Guy Harris for posting his MAN page on the printer tables for nroff. They were more useful than mine. Since a dozen folks have now asked for it, the latter part of this message is my source for the term entry to nroff for an Epson FX-80 operating in proportional mode. Some comments: a) We don't make assumptions about the initial state of the printer. Proportional mode is commanded on at the beginning and off at the end. b) The backspace doesn't work in Proportional, so fancy characters have to be separately loaded into the download set -- and I haven't done the work to generate these; has anyone else? c) Because putting the incremental spaces in in plot mode is very slow, I recommend you generate a clone to this file for draft printing; simply set the '*ploton' string to "" and let fly. Bob Goeke [ Goeke @ MIT-Multics.ARPA ] MIT Center for Space Research 617-253-1910 ---------Cut here------------ /************************************************************************* * this is 'tabfx80p.c' for an Epson FX80 set to do proportional spacing * * --> RFGoeke, 1/12/85; Goeke @ MIT-Multics.ARPA * * * * NB A null can't be within a character string since it will wind up * * looking like an end-of-string marker --> hence we use a fudge * * character \200 which comes out the other end as a NULL! ! ! * * On the other hand, we can't use this construct in the code table, * * since nroff uses the high three bits as plotting instructions! * * * * The special symbols should be set up as calls to the alternate char. * * set, with these separately defined and loaded into the printer * * (since there is no way you can get the plot codes across). * * * * The '*bdon' string can't invoke a true bold here, since a double * * strike isn't available in proportional. We also can't underline * * -- for a silly reason. The "off" code is sent just before the * * next printing character following its invocation, which means * * that the trailing space gets underlined! We settled for italics.* *************************************************************************/ #define INCH 240 struct { int bset; /* terminal driver set */ int breset; /* terminal driver reset */ int Hor; /* horizontal resolution */ int Vert; /* vetical resolution */ int Newline; /* length on one line feed */ int Char; /* character size increment */ int Em; /* em size */ int Halfline; /* length of half line feed */ int Adj; /* white size increment */ char *twinit; /* initialize string to printer */ char *twrest; /* reset string to printer */ char *twnl; /* newline string */ char *hlr; /* half-line-feed-reverse */ char *hlf; /* half-line-feed-forward */ char *flr; /* full-line-feed-reverse */ char *bdon; /* bold-on string */ char *bdoff; /* bold-off string */ char *ploton; /* plot on string */ char *plotoff; /* plot off string */ char *up; /* these strings move as */ char *down; /* indicated in plot mode */ char *right; /* in best available */ char *left; /* resolution */ char *codetab[256-32]; /* see the table */ int zzz; } t { /*bset*/ 0, /*breset*/ 0, /*Hor*/ INCH/120, /* must be consisten with plot increments */ /*Vert*/ INCH/216, /* ditto */ /*Newline*/ INCH/6, /*Char*/ INCH/120, /* the character unit for the code table */ /*Em*/ INCH/10, /* the nominal space size */ /*Halfline*/ INCH/12, /*Adj*/ INCH/120, /* the white caused by a single plot move */ /*twinit*/ "\033p1", /* invoke proportional */ /*twrest*/ "\033p0", /* cancel proportional */ /*twnl*/ "\n", /* newline code */ /*hlr*/ "\033j\018", /* reverse feed, 18/216 of an inch */ /*hlf*/ "\033J\018", /* forward feed */ /*flr*/ "\033j\036", /* reverse feed, 36/216 of an inch */ /*bdon*/ "\0334", /* Alternate chars. '\fB' to invoke */ /*bdoff*/ "\0335", /* Standard chars. '\fP' to invoke */ /*ploton*/ "\200", /* This must be non-null for plot to work */ /*plotoff*/ "", /* Evidently not needed */ /*up*/ "\033j\01", /* reverse feed, 1/216 of an inch */ /*down*/ "\033J\01", /* forward feed, 1/216 of an inch */ /*right*/ "\33L\01\200\200",/* Move right 1/12 em = 1/120 of an inch */ /*left*/ "", /* No back motion is possible in propor. */ /* codetab from the #include "code.80" starts here */ "\014?", /*space*/ /* This give the size of the inter-word space you want on output; if it is any width other than the definition of 'em' preceeding, it will be generated by a combination of printable spaces and plot moves. The actual character which appears here is irrelevant! */ "\005!", /*!*/ "\010\"", /*"*/ "\014#", /*#*/ "\014$", /*$*/ "\014%", /*%*/ "\014&", /*&*/ "\005'", /*' close*/ "\006(", /*(*/ "\006)", /*)*/ "\014*", /***/ "\014+", /*+*/ "\007,", /*,*/ "\014-", /*- hyphen*/ "\006.", /*.*/ "\012/", /*/*/ "\2140", /*0*/ "\2101", /*1*/ "\2142", /*2*/ "\2143", /*3*/ "\2144", /*4*/ "\2145", /*5*/ "\2146", /*6*/ "\2147", /*7*/ "\2148", /*8*/ "\2149", /*9*/ "\006:", /*:*/ "\006;", /*;*/ "\012<", /*<*/ "\014=", /*=*/ "\012>", /*>*/ "\014?", /*?*/ "\014@", /*@*/ "\214A", /*A*/ "\214B", /*B*/ "\214C", /*C*/ "\214D", /*D*/ "\214E", /*E*/ "\214F", /*F*/ "\214G", /*G*/ "\214H", /*H*/ "\210I", /*I*/ "\213J", /*J*/ "\214K", /*K*/ "\214L", /*L*/ "\214M", /*M*/ "\214N", /*N*/ "\214O", /*O*/ "\214P", /*P*/ "\214Q", /*Q*/ "\214R", /*R*/ "\214S", /*S*/ "\214T", /*T*/ "\214U", /*U*/ "\214V", /*V*/ "\214W", /*W*/ "\212X", /*X*/ "\214Y", /*Y*/ "\212Z", /*Z*/ "\010[", /*[*/ "\012\\", /*\*/ "\010]", /*]*/ "\014^", /*^*/ "\014_", /*_ dash*/ "\005`", /*` open*/ "\214a", /*a*/ "\213b", /*b*/ "\213c", /*c*/ "\213d", /*d*/ "\214e", /*e*/ "\212f", /*f*/ "\213g", /*g*/ "\213h", /*h*/ "\210i", /*i*/ "\211j", /*j*/ "\212k", /*k*/ "\210l", /*l*/ "\214m", /*m*/ "\213n", /*n*/ "\214o", /*o*/ "\213p", /*p*/ "\213q", /*q*/ "\213r", /*r*/ "\214s", /*s*/ "\213t", /*t*/ "\214u", /*u*/ "\214v", /*v*/ "\214w", /*w*/ "\212x", /*x*/ "\214y", /*y*/ "\212z", /*z*/ "\011{", /*{*/ "\005|", /*|*/ "\011}", /*}*/ "\014~", /*~*/ "\000\0", /* narrow sp => 1/6 em ought to be an ESC K series, but you can't do this because putting a \200 in for a (virtual) null will be interpreted as a plotting instruction */ "\014-", /*hyphen*/ "\000\0", /*bullet*/ "\020\[]", /*square*/ "\014-", /*3/4 em*/ "\014_", /*rule*/ "\0361/4", /*1/4*/ "\0361/2", /*1/2*/ "\0423/4", /*3/4*/ "\014-", /*minus*/ "\222fi", /*fi*/ "\222fl", /*fl*/ "\224ff", /*ff*/ "\234ffi", /*ffi*/ "\234ffl", /*ffl*/ "\000\0", /*degree*/ "\000\0", /*dagger*/ "\000\0", /* section*/ "\005'", /*foot mark*/ "\005'", /*acute accent*/ "\005`", /*grave accent*/ "\014_", /*underrule*/ "\012/", /*slash (longer)*/ "\033L\001\000\000", /*half narrow space => 1/12 em */ "\014*", /*unpaddable space -- this isn't '\(space)' !!! */ /* use '\0' to get a standard space */ "\000\0", /*alpha*/ "\000\0", /*beta*/ "\000\0", /*gamma*/ "\000\0", /*delta*/ "\000\0", /*epsilon*/ "\000\0", /*zeta*/ "\000\0", /*eta*/ "\000\0", /*theta*/ "\000\0", /*iota*/ "\000\0", /*kappa*/ "\000\0", /*lambda*/ "\000\0", /*mu*/ "\000\0", /*nu*/ "\000\0", /*xi*/ "\000\0", /*omicron*/ "\000\0", /*pi*/ "\000\0", /*rho*/ "\000\0", /*sigma*/ "\000\0", /*tau*/ "\000\0", /*upsilon*/ "\000\0", /*phi*/ "\000\0", /*chi*/ "\000\0", /*psi*/ "\000\0", /*omega*/ "\000\0", /*Gamma*/ "\000\0", /*Delta*/ "\000\0", /*Theta*/ "\000\0", /*Lambda*/ "\000\0", /*Xi*/ "\000\0", /*Pi*/ "\000\0", /*Sigma*/ "\000\0", /**/ "\000\0", /*Upsilon*/ "\000\0", /*Phi*/ "\000\0", /*Psi*/ "\000\0", /*Omega*/ "\000\0", /*square root*/ "\000\0", /*terminal sigma*/ "\000\0", /*root en*/ "\000\0", /*>=*/ "\000\0", /*<=*/ "\000\0", /*identically equal*/ "\000\0", /*equation minus*/ "\000\0", /*approx =*/ "\000\0", /*approximates*/ "\000\0", /*not equal*/ "\000\0", /*right arrow*/ "\000\0", /*left arrow*/ "\000\0", /*up arrow*/ "\000\0", /*down arrow*/ "\000\0", /*equation equal*/ "\000\0", /*multiply*/ "\000\0", /*divide*/ "\000\0", /*plus-minus*/ "\000\0", /*cup (union)*/ "\000\0", /*cap (intersection)*/ "\000\0", /*subset of*/ "\000\0", /*superset of*/ "\000\0", /*improper subset*/ "\000\0", /* improper superset*/ "\000\0", /*infinity*/ "\000\0", /*partial derivative*/ "\000\0", /*gradient*/ "\000\0", /*not*/ "\000\0", /*integral sign*/ "\000\0", /*proportional to*/ "\000\0", /*empty set*/ "\000\0", /*member of*/ "\000\0", /*equation plus*/ "\000\0", /*registered*/ "\000\0", /*copyright*/ "\000\0", /*box rule */ "\000\0", /*cent sign*/ "\000\0", /*dbl dagger*/ "\000\0335", /* FX80 cancel Alternate */ /* \(rh */ "\000\0334", /* FX80 set Alternate Mode */ /* \(lh */ "\000\0", /*math * */ "\000\033p0", /* FX80 cancel Proportional */ /* \(bs */ "\000\0", /*or (was star)*/ "\000\0", /*circle*/ "\000\033G", /* FX80 set Double Strike */ /* \(lt */ "\000\033H", /* FX80 cancels D.S. */ /* \(lb */ "\000\017", /* FX80 set Condensed */ /* \(rt */ "\000\022", /* FX80 cancels Condensed */ /* \(rb */ "\000\033P", /* FX80 set Pica size */ /* \(lk */ "\000\033M", /* FX80 set Elite size */ /* \(rk */ "\000\033p1", /* FX80 set Proportional */ /* \(bv */ "\000\016", /* FX80 set Enlarged Mode */ /* \(lf */ "\000\024", /* FX80 cancel E. M. */ /* \(rf */ "\000\033-1", /* FX80 underline on */ /* \(lc */ "\000\033-0", /* FX80 underline off */ /* \(rc */ }; /* A very necessary terminator! ! ! */