[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Graph in a man page
From: |
Ken Smith |
Subject: |
Re: [Groff] Graph in a man page |
Date: |
Fri, 20 Aug 2010 09:58:07 -0700 |
On Fri, Aug 20, 2010 at 7:13 AM, Andre Majorel <address@hidden> wrote:
> OK, so pic is out (and so is tbl unless I kludge the arrows in).
> For the moment, I'm following the path of least resistance :
Have you considered graphviz? Here is graph.dot for your example.
digraph g {
rankdir=LR
X -> Y [label=A]
Y -> X [label=B]
Y -> Z [label=C]
Z -> Y [label=D]
}
EOF
And a makefile that renders an eps using dot (from graphviz) and ASCII
art (using graph-easy).
graph := graph.dot
outputs := eps txt
.PHONY: all
all \
: $(addprefix $(graph:dot=),$(outputs))
$(graph:dot=eps) \
: $(graph) \
; dot -T ps < $< > $@
$(graph:dot=txt) \
: $(graph) \
; graph-easy --as=ascii $< > $@
EOF
The generated EPS is attached (sorry if that is not customarily done.
It is small so I figured, what the heck.) Here is the ASCII
rendering.
B
+----------+
v |
+---+ A +---+ C +---+
| X | ---> | Y | ---> | Z |
+---+ +---+ +---+
^ D |
+----------+
Regards,
Ken
graph.eps
Description: PostScript document
- [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 <=
Re: [Groff] Graph in a man page, Ralph Corderoy, 2010/08/20