> 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


Reply via email to