joe@cca.UUCP (Joseph Chapman) (11/18/84)
(Warning: I no longer have access to the nroff/troff source, so this may be merely an hallucination.) I thought that nroff checked to see if bold and underscore mode-starting-strings (t.bdon, t.iton) existed before attempting backspace/overprint kludgery to simulate bold and italic. The test would be somewhere in n10.c. Even if your printer doesn't have a sequence to turn underlining (or italic or bold) mode on and off, adding distinctive t.bdon, t.bdoff, t.iton, and t.itoff sequences to your terminal driver would turn off the backspace/overprint stuff and make it easier to write a filter for the output. --- Joseph Chapman CCA Uniworks 617-492-8860 4 Cambridge Center decvax!cca!joe Cambridge, MA 02142 joe@cca-unix.ARPA -- --- Joseph Chapman CCA Uniworks 617-492-8860 4 Cambridge Center decvax!cca!joe Cambridge, MA 02142 joe@cca-unix.ARPA
guy@rlgvax.UUCP (Guy Harris) (11/21/84)
> I thought that nroff checked to see if bold and underscore > mode-starting-strings (t.bdon, t.iton) existed before attempting > backspace/overprint kludgery to simulate bold and italic. Versions of "nroff" prior to System III only supported the "bdon" and "bdoff" sequences, and didn't do overprinting for emboldening. The System III and later versions are nicely orthogonal in this matter, supporting magic sequences for both and supporting overprinting for both. Guy Harris {seismo,ihnp4,allegra}!rlgvax!guy
rcd@opus.UUCP (Dick Dunn) (11/28/84)
After posting the questions about this, I backed away from any idea of doing proportional with nroff and attacked only the italics business. It now works, though the method is a little clunky: For several reasons, we need a post-processor between nroff and our laser printer (an LN01, but somewhat un-brain-damaged with local mods, tho they left us with a comparatively small memory). The post-processor handles things akin to col(1) processing to get superscripts and subscripts from half-line motions, turning on upper bits, etc. Since nroff doesn't get the underline character from the terminal-driving table, I just mapped the various input characters that are underline-ish (_, \(ul, \(ru) to appropriate other codes; thus when the filter sees an _ come through, it knows that it must come from the underscoring code; it expects a backspace to swallow followed by the character to be italicized. The only remaining hitch seems to be that if you mark ligatures as underlinable in the terminal tables, they come out as, e.g., __\b\bff. However, nroff won't generate ligatures even if you turn on ligature mode--the only way to get them is to insert the actual characters. I found it di\(Ficult to believe that anyone would type in the magic sequence for a ligature (see what I mean?) so I just disabled those characters entirely to save a small mess in the filter. I should probably enable them but make them non-underlinable. -- Dick Dunn {hao,ucbvax,allegra}!nbires!rcd (303)444-5710 x3086 ...Reality? Gad, that's worse than puberty!