Pic: does anyone use it for charts? is there a version that displays svg? (against troff or tex)

I am in the middle of reading More Pearls programming and have read the Pic language chapter (see also Kernighan paper ) with some interest.

Does anyone out there use it? It looks like it could have been easily converted to SVG. There is a version of GNU (w / docs from Eric Raymond !), But it only displays groff and TeX.

+4
source share
2 answers

I am using this. This is very convenient for drawing sequence diagrams in plain text, which can then be versioned.

In the past, I worked with WYSIWYG UML diagram editors and came to the conclusion that plain text is a much more reliable option.

Which would you prefer? 80 lines of text or a 500 kilobyte zip file containing impenetrable XML?

The language is so tiny but expressive - you can learn it in a day or two.

Use it for:

  • Component Dependency Charts
  • Flowcharts
  • Sequence diagrams
  • Server room layouts
  • Floor plan

Basically ... Any diagram that does not need to be put on a site with a beta / web 2.0 sticker. It is not surprisingly beautiful, however, it does its job.

More resources:

Archive http://www.umlgraph.org from 2016

http://floppsie.comp.glam.ac.uk/Glamorgan/gaius/web/pic.html

+5
source

aha, it looks like esr also wrote a program called doclifter :

doclifter translates documents written in troff macros into DocBook. Structural subsets of queries in man (7), mdoc (7), ms (7), me (7), mm (7), and troff (1) are supported.

The translation translates the entire structure of the source document in the section, sub-section and paragraph level. Summary of C commands and functions is translated into DocBook by markup, not just verbatim display. Tables (TBL markup) are translated into the DocBook markup table. PIC schemes are converted to SVG. Troff level information that may have structural implications is stored in XML comments.

edit: even better, GNU pic2plot :

Pic2plot accepts one or more pic files and displays the numbers they contain on the X Window System screen, or creates an output file containing numbers. Many image file formats are supported.

Pic is a β€œsmall language” developed by Bell Laboratories to create box-and-arrow diagrams that are often found in technical documents and textbooks. A catalog containing pic documentation is distributed with graphing utilities. On most systems, it is installed as /usr/share/pic2plot or /usr/local/share/pic2plot . The reference includes Brian Kernighan's original language technical report, Eric Raymond GNU Implementation Tutorial, and some examples of pic macros contributed by W. Richard Stevens.

+3
source

All Articles