groff
[Top][All Lists]
Advanced

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

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


From: G. Branden Robinson
Subject: [groff] Advice wanted on drawing a file tree with pic
Date: Tue, 5 Jun 2018 14:04:41 -0400
User-agent: NeoMutt/20170113 (1.7.2)

Hi folks,

I'm trying to help out another project (quilt) with some non-portability
in one of their man pages.  Right now they're embedding raw UTF-8
codepoints into text to use line-drawing characters to depict a file
hierarchy.  This has the unfortunate consequences you might expect for
output formats other than -Tutf8.

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

Any improvements you can offer that would facilitate generalize this
into output that might be generated by a tool for turning a (sorted)
list of file specs into a pic diagram would be especially helpful,
because this is not the only man page that tries to draw a file tree,
and a general solution that we could hand to man page writers would be
ideal.

Please don't mind the doubled backslashes; this page undergoes macro
expansion, so each pair of backslashes gets reduces.  But the leading
whitespace gets eaten, too, so I didn't paste the post-processed
version.

.PS
boxht = 0.12
boxwid = 0.8
lineht = 0.18
linewid = 0.5
B1: box invisible "project\\-1.2.3/"
L1: line down from B1.s; line right
{
  B2: box invisible "patches/"
  line down from B2.s
  { line right; box invisible "series" }
  line down
  { line right; box invisible "patch1.diff" }
  line down
  { line right; box invisible "patch2.diff" }
  line down
  { line right; box invisible ".\\|.\\|." }
}
line down lineht*5 from L1.s; line right
{
  B3: box invisible ".pc/"
  line down from B3.s
  { line right; box invisible ".quilt_patches" }
  line down
  { line right; box invisible ".quilt_series" }
  line down
  {
     line right
     B4: box invisible ".patch1.diff/"
     line down from B4.s
     { line right; box invisible ".\\|.\\|." }
  }
  line down lineht*2
  {
     line right
     B5: box invisible ".patch2.diff/"
     line down from B5.s
     { line right; box invisible ".\\|.\\|." }
  }
}
.PE

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

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