Hi!
On 5/9/22 18:27, G. Branden Robinson wrote:
Hi, Alex!
At 2022-05-09T17:44:01+0200, Alejandro Colomar wrote:
Is it possible to represent the following precisely in a manual page?:
Yes.
It's the output of a program that I'd like to represent precisely in
EXAMPLES, but groff(1) doesn't like things like:
[[
.EX
.RB $ " echo -e \"\n\nHere's some text.\n\n\nAnd here's some more.\""
Here's some text.
And here's some more.
.EE
]]
Right. You'll get warnings about the blank lines if the CHECKSTYLE
register is set to 3 or more.
Once again the non-printing input break comes to the rescue. Here's how
I'd do it.
:-)
[[
.TH foo 1 2022-05-09 "groff test suite"
.P
Here is an example.
.RS
.P
.EX
$ \c
.B printf \[dq]\[rs]n\[rs]nfoo\[rs]n\[rs]n\[rs]n\[rs]n\[rs]nbar\[rs]n\[dq]
\&
\&
foo
\&
\&
\&
bar
.EE
.RE
.P
That was an example.
]]
Very interesting.
There are of course many other ways to achieve the same goal, if one
strays beyond the portability advice offered in groff_man(7) (to be
found in groff_man_style(7) in groff 1.23).
BTW, I just downloaded groff.git into my current computer, so it's
likely that I'll try to review the new groff_man*(7) manual pages soon
(and possibly others).
In a *roff document that was not a manual page, I'd use the 'sp' request
or a macro package's wrapper for it, if one were present.
Just out of curiosity: why?
Thanks!
Alex
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/