Pic language

From Wikipedia, the free encyclopedia

Pic is a domain-specific language by Brian Kernighan for specifying diagrams in terms of objects such as boxes with arrows between them. The pic compiler translates this description into concrete drawing commands. Pic is a procedural programming language, with variable assignment, macros, conditionals, and looping.

Pic was first implemented, and is still most typically used, as a preprocessor in the troff document processing system. The pic preprocessor filters a troff document, replacing diagram descriptions by concrete drawing commands, and passing the rest of the document through without change.

A version of pic is included in groff, the GNU version of troff. GNU pic can also act as a preprocessor for TeX documents. Dwight Aplevich's implementation, DPIC, can also generate images by itself, as well as act as a preprocessor.

Pic has some similarity with MetaPost and the DOT language.

[edit] References

  • Brian W. Kernighan. PIC - A Language for Typesetting Graphics, Software Practice Experience 12 (1982), 1–20.

[edit] external links