Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uwmcsd1!bbn!bbn.com!cosell
From: cosell@bbn.com (Bernie Cosell)
Newsgroups: comp.text
Subject: Re: Underlining in Troff
Message-ID: <30054@bbn.COM>
Date: 24 Sep 88 20:42:54 GMT
References: <2610013@hpsal2.HP.COM> <353@elan.UUCP>
Sender: news@bbn.COM
Reply-To: cosell@BBN.COM (Bernie Cosell)
Organization: Bolt Beranek and Newman Inc., Cambridge MA
Lines: 27

In article <353@elan.UUCP> kg@elan.UUCP (Ken Greer) writes:
}From article <2610013@hpsal2.HP.COM>, by morrell@hpsal2.HP.COM (Michael Morrell):
}> Does anyone have a macro which does proper underlining in troff.  ...
}
}There is no general mechanism in troff, however one can do what you
}want if you know the printer you're using.  ...
}
}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-
}|	..

  But it doesn't work fine across *page* boundaries.  To get it really right,
  you have to have U+ set a global, and have the footnote, float and
  header/footer machinery push and pop U+/- mode appropriately.

   __
  /  )                              Bernie Cosell
 /--<  _  __  __   o _              BBN Sys & Tech, Cambridge, MA 02238
/___/_(<_/ (_/) )_(_(<_             cosell@bbn.com