Path: utzoo!mnetor!uunet!husc6!bbn!rochester!cornell!batcomputer!pyramid!leadsv!mth From: mth@leadsv.UUCP (Mike Heideman) Newsgroups: comp.text Subject: Re: HELP: nroff and laser printers Message-ID: <2378@leadsv.UUCP> Date: 7 Mar 88 23:26:41 GMT References: <4740@ecsvax.UUCP> Reply-To: mth@leadsv.LEADS.LMSC.COM.UUCP (Mike Heideman) Organization: LMSC-LEADS, Sunnyvale, Ca. Lines: 34 Keywords: nroff device driver laser printer italics underline In article <4740@ecsvax.UUCP> dfh@ecsvax.UUCP (David Hinnant) writes: >One more question on a slightly different subject: How can I generate >undelining in troff. I have ditroff and devps on another machine. My >".ul" commands turn italics on instead.... Regarding your question of how to do underlining in troff (as opposed to nroff). First, if you use the -me macro package, then you can simply use the .u macro. That is what I do. Alternatively, check out section 12.4 of the NROFF/TROFF User's Manual. It shows how to set up a macro (.us) that will underscore a string. There is an obvious typo in the example - it should be .us "underlined words" rather than .ul . The .u macro of -me is essentially the same, but allows a second argument that appends additional text in the original font. See Section 7 of the -ME Reference Manual for the documentation. Note that both of these underlining schemes screw up if the underlined text ends up getting broken across a line or if horizontal movement is done. I know from personal experience. I had a need to underline some column headings for a small table, where I wanted each heading individually underlined - hence tbl was not appropriate. The .u macro could not handle this; I was using \k's and \h's for the columns and the underlining came out offset. I ended up putting a bunch of spaces as the second argument to .u, which worked, but required several iterations to line up properly. -- Mike Heideman - Lockheed Palo Alto Research Labs. UUCP: sun!sunncal!dipl!mth sun!sunncal!leadsv!mth