[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: man: EX/EE nested within nf/fi
From: |
Alejandro Colomar |
Subject: |
Re: man: EX/EE nested within nf/fi |
Date: |
Mon, 17 Jun 2024 00:50:06 +0200 |
On Sun, Jun 16, 2024 at 05:16:25PM GMT, G. Branden Robinson wrote:
> Hi Alex,
Hi Branden,
> At 2024-06-16T23:14:56+0200, Alejandro Colomar wrote:
> > Branden, how about using some register in EX/EE so that it can nest
> > within nf/fi?
>
> In your scenario I would advise the following instead:
>
> .TH foo 1 2024-06-16 "groff test suite"
> .SH Name
> foo \- frobnicate a bar
> .SH Description
> .nf
> .B #include <foo.h>
> .P
> .fi \" NEW
> .EX
> struct {
> int a;
> int b;
> };
> .EE
> .nf \" NEW
> .P
> .B "#include <bar.h> /* foobar foobar foobar foobar foobar foobar */"
> .P
> .B #define BAR \[dq]bar\[dq]
> .fi
Yep; this is the obvious workaround I had in mind.
> Nesting means more state to track and I don't want to reach for that as
> a first resort, and I suspect Ingo doesn't either.
>
> > Well, since groff(1) doesn't behave as I want,
>
> You _can_ always simply use a table. But that has a cost in HTML output
> until https://savannah.gnu.org/bugs/?60052 is fixed.
>
> Let me refer you back to our last deep dive together on this, in July
> 2022.
>
> https://lore.kernel.org/linux-man/20220722033353.ap7aqxh6uhghdcxo@illithid/
>
> > mandoc(1)'s diagnostic is a good advise that I'm writing source that
> > will misbehave.
> >
> > Hopefully, we can fix this to nest nicely.
>
> What's wrong with my foregoing exhibit, apart from spending two more
> kopecks?
Yeah, it's not terrible. It would be nicer to be able to nest them, but
I understand you not wanting to do it. I guess I'll do that.
Have a lovely night!
Alex
--
<https://www.alejandro-colomar.es/>
signature.asc
Description: PGP signature