groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Raw colored ASCII/UTF art for manpages


From: Tim Landscheidt
Subject: Re: Raw colored ASCII/UTF art for manpages
Date: Thu, 28 Dec 2023 21:47:34 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)

Lennart Jablonka <humm@ljabl.com> wrote:

>>It would be very nice to add raw ASCII/UTF art to manpages. That would
>>make manpages very expressive, as package maintainers will be able to
>>add ASCII/UTF diagrams and/or art. Imagine your manpage showing you a
>>colored text chart, logo, and what not. Groff would add \e[0m to
>>beginning and end of every line, so the styles defined in such raw
>>input have no interference with surrounding manpage text. This feature
>>is similar to adding jpeg images to html pages that previously just
>>displayed text. Perhaps the only requirement from the user would be
>>that such image fits in a nice rectangular shape, the character height
>>and width of which is perhaps provided by them.

> I disagree, but apart from that, there’s nothing stopping
> you from doing just that today with your man pages.  Get
> your fixed-width type face with .EX or whatever and play
> with groff’s color stuff.  grotty is capable of emitting SGR
> escape sequences for colors.

> I also want to point at pic, which allows you to draw
> diagrams if your device supports line drawing stuff, and at
> the primitive line drawing capability of grotty.

BTW, something I always found interesting in that area was
the other way around: Prettifying ASCII "art" when output to
non-TTY devices.

Take for example this paragraph from git-rebase(1):

|        Assume the following history exists and the current
|        branch is "topic":

|                      A---B---C topic
|                     /
|                D---E---F---G master

When outputting this with "man -t", it just gets printed as
is (even in a proportional font).  It would be much more vi-
sually pleasing if this was instead printed as a pic diagram
with circles and lines.

It should be possible to produce different output depending
on the n or t condition.

Tim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]