[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.
- [Groff] blm blues, Miklos Somogyi, 2008/11/10
- Re: [Groff] blm blues, Tadziu Hoffmann, 2008/11/10
- Re: [Groff] blm blues, Werner LEMBERG, 2008/11/11
- Re: [Groff] blm blues, Larry Kollar, 2008/11/15
- Re: [Groff] blm blues, Tadziu Hoffmann, 2008/11/15
- Re: [Groff] blm blues, Ted Harding, 2008/11/15
- Re: [Groff] blm blues,
Tadziu Hoffmann <=
- [Groff] -ms paragraph macros don't reset glyph- and fill-color, Dorai Sitaram, 2008/11/20
- RE: [Groff] -ms paragraph macros don't reset glyph- and fill-col, Ted Harding, 2008/11/20
- Re: [Groff] -ms paragraph macros don't reset glyph- and fill-col, Dorai Sitaram, 2008/11/21
- Re: [Groff] -ms paragraph macros don't reset glyph- and fill-col, Werner LEMBERG, 2008/11/21
- Re: [Groff] blm blues, Miklos Somogyi, 2008/11/17