> Steffen Nurpmeso <[email protected]> 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