[Top][All Lists]

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

Re: how far can i go with grotty?

From: G. Branden Robinson
Subject: Re: how far can i go with grotty?
Date: Fri, 7 Aug 2020 01:04:14 +1000
User-agent: NeoMutt/20180716

Hi Marc,

At 2020-07-24T19:46:21+0200, Marc Chantreux wrote:
> hello roffers,
> i wrote this filter
>     sed '
>     1i.TS\
>     tab(:);\
>     lB l l l.
>     $a.TE
>     ' | tbl |groff -kTutf8 | sed '/^$/q'
> so i can get readable tables as stdout of my shell scripts. i wrote it
> as a hack but now i'm wondering ...
> * I already know (using man command) that groff is good for positioning
> * I just looked at the code of tty.cpp and it
>   seems to be able to deal with colors and SGR_REVERSE CSI "7m"
> so i wonder if there would be a way to have some text macros to render
> colored and reversed table headers when rendering in a terminal but
> can also be used when i need some pdf docs.

Have a look at the "Example" section of recent versions of the grotty(1)
man page, for instance here:

You should be able to use tbl(1) and embed escapes in table heading
cells to get the effects you desire.  I haven't tried it myself, though
I did write that example.

Let me know if you could use an example.


Attachment: signature.asc
Description: PGP signature

reply via email to

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