groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Register for text width to be used with \l'..'?


From: Oliver Corff
Subject: Re: Register for text width to be used with \l'..'?
Date: Fri, 8 Nov 2024 22:55:01 +0100
User-agent: Mozilla Thunderbird

Hi Dave,

thank you very much for pointing out the usefulness of units!

Adding the "u" did the trick.

The simple macro

.de hline
\l'\n[LL]u'
..

.hline

now does the trick, the line length is exactly the same es the text line
length, no problems with truncated divisions anymore.

Best,

Oliver.


On 08/11/2024 17:54, Dave Kemper wrote:
On Fri, Nov 8, 2024 at 10:20 AM Oliver Corff<oliver.corff@email.de> wrote:
\n[LL] produces 468000.
Yes.  It's not intuitive that registers defined using any other units
are stored in basic units, and that groff must be explicitly told this
whenever such values are referenced.

$ cat testfile
.nr a 4i
.tm \n[a]
$ groff testfile
288000

The usual way to use such a register is to place a "u" after it, so
that groff interprets its value as being in basic units.  For example,
to put four inches of horizontal space on the page:

.nr a 4i
far\h'\n[a]u'apart

This separates the words "far" and "apart" by four inches.  If you
omit the "u", \h would insert 288,000 ems (its default unit) of
horizontal space, which would require a serious horizontal scrollbar
on your PostScript/PDF viewer.

--

Dr. Oliver Corff
Mail:oliver.corff@email.de


reply via email to

[Prev in Thread] Current Thread [Next in Thread]