Hello,
is it safe to divert into a string variable? That means instead of:
.br
.di A
...text...
.br
.di
.A
use something like:
.br
.di A
...text...
.br
.di
...\*A...
The 4.4BSD mdoc macros use this in the macro .x2. The string is even
interpolated in fill mode there... It works somehow but
|I think his point is[.]
No, it works fine in practice:
CLEAN UP <\&Os\&>
1st substr <\&> (of <\&Os\&>)
1st substr starts with \&: <\&Os\&> new
2nd substr <\&> (of <\&Os\&>)
2nd substr ends with \&: <\&Os\&> new
CLEANUP RETURNS (for <\&Os\&>)
It was generated with this piece of c
> is it safe to divert into a string variable?
In a way, roff doesn't really distinguish between "strings",
"macros", and "diversions". They all share the same namespace
and can be accessed both via ".xx" at the beginning of an input
line and as "\*[xx]". The results, however, will depend on wh
On 11/28/14, Carsten Kunze wrote:
> This usage is IMHO not documented in the troff manual § 7.4 or groff manual §
> 5.25.
It's documented in the groff manual in section 5.19; see the sentence
"Strings, macros, and diversions (and boxes) share the same name
space" and the following few paragraphs
>> This usage is IMHO not documented in the troff manual § 7.4 or
>> groff manual § 5.25.
>
> It's documented in the groff manual in section 5.19; see the
> sentence "Strings, macros, and diversions (and boxes) share the same
> name space" and the following few paragraphs.
... and please look up