groff
[Top][All Lists]
Advanced

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

Re: [Groff] Graph in a man page


From: Ralph Corderoy
Subject: Re: [Groff] Graph in a man page
Date: Fri, 20 Aug 2010 13:00:32 +0100

Hi Andre,

> I'd like to include a simple diagram in a man page, something like
> this :
> 
>                _____       _____        _____
>               |     |  A  |     |   C  |     |
>               |  X  |---->|  Y  |----->|  Z  |
>               |     |<----|     |<-----|     |
>               |_____|  B  |_____|   D  |_____|
> 
> I suppose I could use tbl or switch to a fixed-spacing font and use
> .nf. What would you recommend ?

IIRC, some of the Sun OS man pages from the 80s used to have the odd
diagram.  It may be worth a grep through collections of man pages to see
if you can find some that use tbl, or pic, etc., and see how they handle
the different output formats.

I suspect the best result, especially if it doesn't create too much
duplication, would be to use `.if t' and `.if n' to determine which kind
of output device you have and either do a nice pic for `t', or an ASCII
diagram, assuming at most an 80-char wide terminal, for `n'.  That test
works on all [nt]roffs.

Cheers,
Ralph.




reply via email to

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