|
From: | Alejandro Colomar |
Subject: | Re: Represent several consecutive newlines |
Date: | Mon, 9 May 2022 18:32:08 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 |
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/
[Prev in Thread] | Current Thread | [Next in Thread] |