[Top][All Lists]

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

Re: [Groff] blm blues

From: Tadziu Hoffmann
Subject: Re: [Groff] blm blues
Date: Sun, 16 Nov 2008 01:20:01 +0100
User-agent: Mutt/1.5.17 (2007-11-01)

> .de blank_aux
> .sp \\n[.v]u/10u*4u
> ..
> .blm blank_aux

This is exactly the working principle of Miklos's solution --
multiply the *current* vertical spacing by some factor -- only
that he wanted this factor (4/10 in your example) configurable,
and not hardcoded in the macro, so that he could say
".blank 0.4" or ".blank 0.68" to switch from one factor to
another without redefining the macro.

The trivial solution would be to save the desired factor in a
register and then use that to multiply with the current "V".
The only problem with this is that number registers store only
integers, so we can't save the number "0.4" in a register --
we have to scale it up so we can represent it as an integer,
say with a scale factor of 1000 (so that we save the integer
0.4*1000 = 400), and then divide by that scale factor wherever
we use our saved number.  You effectively did the same,
using a scale factor of 10.

reply via email to

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