Re: man-pages input, how to forward esc seq to tty output dev

Phi Debian <[email protected]>
Newsgroups gmane.comp.printing.groff.general
Message-ID <CAJOr74iBjZk6mcDdoBhp3dFc5jk77pOuBXzVQZei6QOKH_qckw@mail.gmail.com>
HI Branden,

On Sat, Nov 15, 2025 at 11:07 AM G. Branden Robinson <
[email protected]> wrote:

> Hi Phi,
>
> Nothing defines strings named `red`, `green`, or `blue` by default.
> You'll have to do so yourself, or use a different escape sequence to
> access these color names, which are defined in a different name space.
>


> The grotty(1) man page has an extensive example.
>

Jeez, I red that but didn't thought about actually cut/paste it.
I was more focusing on man like .XYZ macro's to use and was digging in all
the .tmac I got in /us/share...


> Notice the `\m` and `\M` escape sequences.
>
> You might want to avoid going through man(1) if you're using colors;
> I've read that some implementations deliberately introduce an SGR
> stripper to the rendering pipeline.
>

Ha good point, I was suspecting that. Well I need man(1) (I guess) because
I need all the tools around (mandb(1) for instance), but you put me back on
track, I guess the trick is to pass some protocol through man(1) (like the
char<bs>char for bold, char<bs>'_' for underline etc), skip over SGR
killers, then let the backend end handle it (like grotty(1) for the man
pipe or ul(1) for the CLI explicit pipe), I already have my own grotty so I
should go this path then.

I look into that.

Thanx
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.