groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] tmac.an: using .RS/.RE inside .IP inside .SS


From: Ingo Schwarze
Subject: Re: [Groff] tmac.an: using .RS/.RE inside .IP inside .SS
Date: Mon, 21 Aug 2017 13:27:06 +0200
User-agent: Mutt/1.8.0 (2017-02-23)

Hi,

Tadziu Hoffmann wrote on Mon, Aug 21, 2017 at 12:21:01PM +0200:
> Ralph Corderoy wrote:
>> G. Branden Robinson wrote:

>>> Any tips?

>> Here's a simpler test case.

> "IP" is a temporary indent.  "RS" indents not relative to the indent
> of "IP", but relative to the indent of a corresponding "PP"
> (and by default indents the same amount).

That said, .RS/.RE can be nested, while .TP, .IP, and .HP cannot,
which can be understood because the latter do not have explicit
closing macros.  If they could nest, how would you ever get out
of the indented item body again?

Note that in contrast to man(7), mdoc(7) does not have such a
restriction.  The .Bl macro freely nests, except that .Bl -column
cannot contain inner lists.

If you are forced to remain with man(7), it may be an option to
use .RS/.RE for the outer level, similar to this:

  top level text
  .TP
  non-nesting tag
  body for the non-nesting tag
  .PP
  outer tag
  .RS
  outer body
  .TP
  inner tag
  inner body
  .PP 
  back to outer body
  .RE
  back to top level

Yes, i do admit that is ugly, but man(7) is almost never elegant
and definitely never semantic but always purely presentational.
At least the above is pure man(7) without resorting to low-level
roff requests like .in, and it works as you want, IIUC.

Yours,
  Ingo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]