groff
[Top][All Lists]
Advanced

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

[Groff] pic - drawing a line back to the beginning


From: Larry Kollar
Subject: [Groff] pic - drawing a line back to the beginning
Date: Mon, 16 Oct 2006 23:50:55 -0400

I got busy learning pic today, since there was only a tantalizing reference to a utility that doesn't seem to exist anymore. :-) Turns out that pic is a fairly simple way to produce flowcharts... mostly. I was surprised at how quickly I got something that just needed some tweaking, not having done anything quite so complex with pic before, but ran into a glitch at the end. This is representative of what I had to work around (interesting part at the end).

.PS
down;
box wid 1 "xyzzy";
arrow;
box "plugh";
arrow;
box "plove";
#
# here's the part I'm interested in
line left from last box .w;
line up to 1st box .w + (-0.5,0);
arrow to 1st box .w;
.PE

One can get a straight line by adjusting the coordinates in the next- to-last line, although for a more complex chart (like the real one was), it might take several iterations. On my computer, I get a left, up, then a diagonal instead of just left & diagonal. (PS file attached.)

I was wondering if anyone could: 1) explain why the dogleg appears; 2) provide a more elegant method of drawing a line back up to the first box that doesn't require guesswork.

        Larry
 

Attachment: test.ps
Description: PostScript document


reply via email to

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