[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] colorized man pages
From: |
Larry Kollar |
Subject: |
Re: [Groff] colorized man pages |
Date: |
Tue, 23 Aug 2016 23:05:42 -0400 |
> Steffen Nurpmeso <address@hidden> wrote:
>
> |still working with a text terminal, I'd expect escape codes to
> |be your daily bread and butter, not something to scoff at.
> |(Unless I'm missing the good-natured, approving irony here?)
>
> Yeeeeaaaaah! It seems control codes won't go away, Unicode adds
> some more of them.
>
> ..
> |> It shouldn't be too much work to instrument a few important
> |> man and mdoc macros and add an environment variable, say,
> |> MANUAL_COLOURS, in equal spirit to LS_COLORS. In the Linux
> |> world there is now a dircolors(1) command which can be used
> |> to control LS_COLORS. ...
>
> Yes, i have read the referenced article. That is a hack that
> people use, but i was referring to something durable, regular.
> For something semantically correct, yes, but – you know i had to
> think about it – as a starter being able to define several
> mappings wouldn't be that bad. We have bold and underlined
> output, why not warp that on request to something, _if_ the
> terminal supports it. I.e., /dev/tty i guess would have to be for
> roff. Also i think being able to map the plain roff colour names
> would then be nice too, the blue that is used for URLs is really
> screaming on this terminal, in the context of a manual.
AT&T nroff had what they called “drivers,” a compiled data structure that
defined control codes for printer motions. In the early years of my tech
writing career, I wrote one to take advantage of the NEC Spinwriter’s
fractional motions; it supported stretchable spaces. GNU *roff doesn’t really
have that. A custom post-processor might fill the bill, but is much more
complex than a data structure.
OTOH, a post-processor that hooked into terminfo could solve the problem almost
automatically, no? If the user’s $TERM supports color, and a manpage requests
color, then the user gets color. A register or string could be defined to set a
color for highlighting bold body text and/or headings.
Finally, users that want color now should check their terminal preferences. The
one I use (iTerm on OS X) automatically colors bold text (and can be changed in
preferences).
Larry
- Re: [Groff] colorized man pages, (continued)
Re: [Groff] colorized man pages, Ingo Schwarze, 2016/08/19
Re: [Groff] colorized man pages, James K. Lowden, 2016/08/24
Re: [Groff] colorized man pages, Steffen Nurpmeso, 2016/08/24
Re: [Groff] colorized man pages, Tadziu Hoffmann, 2016/08/24
Re: [Groff] colorized man pages, Peter Schaffter, 2016/08/25
Re: [Groff] colorized man pages, Russell Hyer, 2016/08/25
Re: [Groff] colorized man pages, John Gardner, 2016/08/25
Re: [Groff] colorized man pages, Ralph Corderoy, 2016/08/26
Re: [Groff] colorized man pages, John Gardner, 2016/08/26
Re: [Groff] colorized man pages, Ralph Corderoy, 2016/08/26