[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: macro returning a value?
From: |
Peter Schaffter |
Subject: |
Re: macro returning a value? |
Date: |
Mon, 15 Nov 2021 13:42:28 -0500 |
User-agent: |
Mutt/1.9.4 (2018-02-28) |
On Mon, Nov 15, 2021, Ulrich Lauther wrote:
> .de Pos
> \R'foo (\\n[.d]-\\n[.v]*254+1)/72000'\\n[foo]mm/10
> ..
>
> which allows you to enter
>
> position: \n[.d] units, \*[Pos].
>
> > Wow! Works nicely.
> >
> > And I had to add a line ".sp -1v" at the end of the macro; otherwise I get
> > a
> > blank line after position: ...
> >
>
> I now found out that the space between "foo" and the openening
> bracket causes the unintended blank line. But why?
You shouldn't be seeing a blank line. What's more, removing the
space before the opening parens should cause the \R escape to fail
with 'troff: <file>:<line>: warning: missing number'. A backtrace
points directly to the \R line.
I'm mystified. Can you send a small example exhibiting the problem
(input and output) along with your groff command line?
--
Peter Schaffter
https://www.schaffter.ca