Path: utzoo!attcan!uunet!pyrdc!netsys!ames!elan!kg From: kg@elan.UUCP (Ken Greer) Newsgroups: comp.text Subject: Re: Underlining in Troff Message-ID: <353@elan.UUCP> Date: 24 Sep 88 18:52:30 GMT References: <2610013@hpsal2.HP.COM> Organization: Elan Computer Group, Inc., Palo Alto, CA Lines: 27 From article <2610013@hpsal2.HP.COM>, by morrell@hpsal2.HP.COM (Michael Morrell): > Does anyone have a macro which does proper underlining in troff. The one > supplied in the nroff/troff manual works provided the string to be underlined > does not cross a line. There is no general mechanism in troff, however one can do what you want if you know the printer you're using. Since I know you're an Eroff and LaserJet user, Mike, here's how you do it in Eroff. I've posted this for the sake of other Eroff users since this is a *very* common question we get! For the LaserJet with Eroff... | .ds U+ \X'code="\e033&dD"' | .ds U- \X'code="\e033&d@"' and just use \*(U+ when you want to start underlining and \*(U- to stop. Works fine across line boundaries. If you prefer macros... | .de us | \\*(U+\\$1\\*(U- | .. -- Ken Greer Elan Computer Group, Inc. {ames,hplabs,uunet}!elan!kg 415-322-2450