[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Graph in a man page
From: |
Clemens Ladisch |
Subject: |
Re: [Groff] Graph in a man page |
Date: |
Fri, 20 Aug 2010 11:09:45 +0200 |
User-agent: |
Thunderbird 2.0.0.24 (Windows/20100228) |
Andre Majorel wrote:
> On 2010-08-20 09:37 +0200, Werner LEMBERG wrote:
> > > 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 ?
> >
> > The advantage of tbl is that you get a real graphics with non-TTy
> > output devices.
>
> But for the boxes, not for the arrows, if I'm not mistaken.
>
> > > It must work both in print and in a terminal and not depend on
> > > Groff.
> >
> > `Must not depend on groff'? What does this mean?
>
> Simply that it must work with any nroff & troff, not just Groff.
Runing "man -p p ./testfile" on this file:
.TH a b c d e
.PS
box "X"
arrow "A" ""
box "Y"
arrow "B" ""
box "Z"
.PE
results in this output, which is better than nothing:
a(b) e a(b)
+------+ +------+ +------+
| +-A-+-| +-B-++ |
| X | | Y | | Z |
+------+ +------+ +------+
d c a(b)
I don't know how portable pic is (especially with its output shown as
text); this depends on what your target machines are.
If you want to avoid the "-p p" parameter for man, you'd have to set
MANROFFSEQ instead.
Regards,
Clemens
- [Groff] Graph in a man page, Andre Majorel, 2010/08/20
- Re: [Groff] Graph in a man page, Werner LEMBERG, 2010/08/20
- Re: [Groff] Graph in a man page, Andre Majorel, 2010/08/20
- Re: [Groff] Graph in a man page, Ted Harding, 2010/08/20
- Re: [Groff] Graph in a man page, Ruud Baart, 2010/08/20
- Re: [Groff] Graph in a man page, Werner LEMBERG, 2010/08/20
- Re: [Groff] Graph in a man page, Andre Majorel, 2010/08/20
- Re: [Groff] Graph in a man page, Ken Smith, 2010/08/20
Re: [Groff] Graph in a man page, Ralph Corderoy, 2010/08/20