Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!ucsd!rutgers!mit-eddie!killer!dcs!wnp From: wnp@dcs.UUCP (Wolf N. Paul) Newsgroups: comp.text Subject: Re: troff magic Message-ID: <191@dcs.UUCP> Date: 2 Sep 88 05:01:55 GMT References: <597@intvax.UUCP> Reply-To: wnp@dcs.UUCP (Wolf N. Paul) Organization: DCS, Dallas, Texas Lines: 35 In article <597@intvax.UUCP> davidson@intvax.UUCP (William M. Davidson) writes: >I noticed an example in the Troff Reference Manual that looks strange >and I have no idea how it works. > >In chapter 11, the following macro example was given to draw a line under >a string: > >.de us >\\$1\l'|0\\(ul' >.. > >I understand everything except the "|0". I assume it is the >N argument for the line drawing function, \l'Nc'. > >It does work so it is not a typo in the manual. As far as I can tell, this assumes that you are at the beginning of an output line. It prints the argument ( $1 ), then draws a line from the current print position (i.e. immediately after the argument) to absolute horizontal position 0 (i.e., back to the beginning of the line. It also leaves the current print position to be at the beginning of the line -- thus it makes a good example, but is of little practical value. The syntax is explained in section 3.1.3 of the Nroff/Troff Users Manual, entitled "Numerical Parameter Input": The absolut position indicator (|) may be prepended to a numer N to generate the distance to the vertical or horizontal place N. Thus, |0 is the absolute zero position; since the line drawing function takes a horizontal measurement, it is here the absolute horizontal zero. -- Wolf N. Paul * 3387 Sam Rayburn Run * Carrollton TX 75007 * (214) 306-9101 UUCP: killer!dcs!wnp ESL: 62832882 DOMAIN: dcs!wnp@killer.dallas.tx.us TLX: 910-380-0585 EES PLANO UD