🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #5090

Re: troff magic

#5090
From: Pat Sullivan
Date: Fri, 02 Sep 1988 17:41
33 lines
1835 bytes
+In article <597@intvax.UUCP+ davidson@intvax.UUCP (William M. Davidson) writes:
++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".  

In article <191@dcs.UUCP+ wnp@dcs.UUCP (Wolf N. Paul) writes:
+As far as I can tell, this assumes that you are at the beginning of
+an output line ... 

This would appear to be true, but the underlining and boxing (see below)
works anywhere on the line, very much like the mm ``.B'' and ``.I'' macros.

+Thus, |0 is the absolute zero position; since the line drawing function
+takes a horizontal measurement, it is here the absolute horizontal zero.

It is not necessarily intuitive exactly where ``absolute'' zero is here ...
The "|N" is explained briefly at the end of section 1.3 of the same document
(DWB 2 *roff Reference Manual).
What makes this somewhat magic is the apparently undocumented feature that
the absolute 0 position is the current position when the macro is entered,
not the left edge of the paper.
An even more interesting (and perhaps useful) example of this magic is a
little later in the same chapter; it draws a box around its argument:
.de bx
\(br\|\\$1\|\(br\l'|0\(rn'\l'|0\(ul'
..
We have used one similar to this to represent function keys.

=================================================================
Pat Sullivan - {att|gatech|akgua}!sortac!pls - voice 404-573-7382
Technical Details
Message-ID: <280@sortac.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!akgua!sortac!pls
References: <597@intvax.UUCP+ <191@dcs.UUCP+

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!akgua!sortac!pls
From: pls@sortac.UUCP (Pat Sullivan)
Newsgroups: comp.text
Subject: Re: troff magic
Message-ID: <280@sortac.UUCP>
Date: 2 Sep 88 17:41:13 GMT
References: <597@intvax.UUCP+ <191@dcs.UUCP+
Reply-To: pls@sortac.UUCP (Pat Sullivan)
Organization: AT&T Southern Region, Atlanta
Lines: 33