Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!uunet!seismo!sundc!newstop!sun!angel!henry From: henry%angel@Sun.COM (Henry McGilton -- Software Products) Newsgroups: comp.unix.questions Subject: Re: Underlining text in troff Summary: Underlining Works. Examples Wrong. What texts are you reading. Keywords: troff Message-ID: <129925@sun.Eng.Sun.COM> Date: 5 Jan 90 18:28:47 GMT References: <3037@mcgp1.UUCP> Sender: news@sun.Eng.Sun.COM Distribution: usa Lines: 57 In article <3037@mcgp1.UUCP>, flak@mcgp1.UUCP (Dan Flak) writes: * Does anyone have a good macro for underlining text in * troff. The example in my book: .de us \\$1\l'|O\ul' .. * doesn't work. Don't know which book you're reading -- hope it's not the Sun manuals. No -- I just looked. The Sun manuals are wrong also, but in a different way. Anyway, let me know which book you took the example from. Two things wrong with the above example: o the upper case letter O after the | sign should be a 0 (zero). That takes care of the first problem. o Then the construct \u requests a half line upwards motion. Anybody's guess why. And the final l is just kind of hanging there doing something. When I `correct' that version to read: .de us \\$1\l'|0\ul' .. My version of troff croaks with an arithmetic exception. So, on to your next example: * Neither does: .de us \\$1\l'|O\(ul' .. This one has the same problem -- the upper case O should be a 0 (zero). Try this version: .de us \\$1\l'|0\(ul' .. Note that this macro is still not robust. Sometimes words very close to the right margin of the text can show strange effects, but this should be enough to get you started. By the way, did you try looking at the .UL macro in the -ms macro package and the .u macro in the -me macro package? .................. Henry +-------------------+--------------------------+---------------------------+ | Henry McGilton | Think of using TROFF as | | | Sun Microsystems | writing microcode for a | arpa: hmcgilton@sun.com | | 2550 Garcia | typesetter, and you have | uucp: ...!sun!angel!henry | | Mountain View, CA | the idea. | | +-------------------+--------------------------+---------------------------+