groff
[Top][All Lists]
Advanced

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

Re: [groff] Advice wanted on drawing a file tree with pic


From: Tadziu Hoffmann
Subject: Re: [groff] Advice wanted on drawing a file tree with pic
Date: Wed, 6 Jun 2018 19:41:11 +0200
User-agent: Mutt/1.9.1 (2017-09-22)


> Therefore please critique the following PIC.  It looks okay
> but I'm sure it could be improved in appearance and
> (especially) general style.

Since this is structurally like a bulleted list, maybe doing
this in pic is more complicated than necessary?  I'm thinking
a simple approach with a few macros should do the trick.
All that needs to be done is to remember the height of the
previous items at each level, and then use the \D'l ...' escape
to draw the lines instead of the list bullets, something like
in the attached example.  (Most of the finicky stuff here is
for treating the first entry differently.)
The added bonus is that it also works nicely in nroff.


Attachment: filetree.ro
Description: Text document

Attachment: filetree.pdf
Description: Binary data


reply via email to

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