[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] blm blues
From: |
Werner LEMBERG |
Subject: |
Re: [Groff] blm blues |
Date: |
Tue, 11 Nov 2008 08:15:40 +0100 (CET) |
> I am trying to produce a macro for request blm that would set space
> as a given fraction of the current vertical spacing.
>
> I did the following:
>
> .de blank
> . nr blankreg (c;\\$1)
> ..
>
> .de blank_aux
> . sp (\\n[.v]u*\\n[blankreg]u/28340)u
> ..
>
> .blm blank_aux
>
> This does not work (does not produce any space).
Again, you haven't applied `u' correctly. In a request which doesn't
use `u' as the default scaling indicator, *each* element gets
converted to the request's default unit before it is processed
arithmetically. In your example, the `28340' is converted to `v'
also. Additionally, it has no effect to apply `u' to an expression.
The right way to write the call to .sp is
.sp (\\n[.v]u * \\n[blankreg]u / 28340u)
Alternatively, you might write
.sp (u;(\\n[.v] * \\n[blankreg] / 28340))
See section 5.2.1 (Default Units) in groff.info for more examples.
Werner
- [Groff] blm blues, Miklos Somogyi, 2008/11/10
- Re: [Groff] blm blues, Tadziu Hoffmann, 2008/11/10
- Re: [Groff] blm blues,
Werner LEMBERG <=
- 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, 2008/11/15
- [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