LinuxCommandLibrary

pic

troff preprocessor for drawing diagrams

TLDR

Process pic to troff

$ pic [diagram.pic] | troff
copy
Generate output
$ pic [diagram.pic] > [output.troff]
copy
Safe mode
$ pic -S [diagram.pic]
copy
Check syntax only
$ pic -n [diagram.pic]
copy
Show version
$ pic --version
copy

SYNOPSIS

pic [-S] [-n] [-C] [options] [files]

DESCRIPTION

pic is a troff preprocessor for drawing diagrams. It converts textual descriptions into troff drawing commands.
Diagrams use geometric primitives: boxes, circles, lines, arrows. Positioning is relative or absolute.
Objects connect with lines and arrows. Labels and text annotate elements.
The language supports macros and variables. Complex diagrams build from reusable components.
Output integrates with groff/troff document processing. Pic diagrams embed in technical documents.

PARAMETERS

-S

Safe mode (no shell commands).
-n
Suppress output, check syntax.
-C
Compatible mode.
-D
Define macro.
-T DEVICE
Output device.
-z
GNU extensions.

EXAMPLE

$ .PS
box "Start"
arrow
circle "Process"
arrow
box "End"
.PE
copy

CAVEATS

Limited compared to modern diagramming tools. Troff output only. Steep learning curve.

HISTORY

pic was created by Brian Kernighan at Bell Labs in the 1980s. It was part of the troff/groff document preparation system and influenced later diagramming languages.

SEE ALSO

groff(1), troff(1), tbl(1), eqn(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community