LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

grap

Graph language preprocessor for groff documents

TLDR

Process a grap script into PostScript via groff
$ grap [script.grap] | groff -Tps > [output.ps]
copy
Pipe grap output through pic and groff
$ grap [script.grap] | pic | troff -Tps > [output.ps]
copy
Define a variable from the command line
$ grap -d "[x=100]" [script.grap] | groff -Tps > [output.ps]
copy
Read from standard input
$ cat [script.grap] | grap | groff -Tps > [output.ps]
copy

SYNOPSIS

grap [options] [file]

DESCRIPTION

grap is a preprocessor for creating graphs within groff/troff documents. Input is written in a simple declarative language enclosed between .G1 and .G2 macros, and the output is pic(1) code suitable for further processing by pic and troff/groff.The tool creates publication-quality graphs for technical documents, supporting features like labeled axes, multiple data sets, logarithmic scales, and coordinate systems. It integrates seamlessly with the troff document processing pipeline.

PARAMETERS

FILE

Grap input file. If omitted, reads from standard input.
-d VAR=VALUE
Define a variable and its value before processing.
-l
Use the graph's default line thickness.
-R
Do not load the default macro startup file.
--help
Display help information.

INSTALL

sudo apt install grap
copy
brew install grap
copy
nix profile install nixpkgs#grap
copy

CAVEATS

Part of the groff ecosystem. Outputs pic format that must be further processed by pic(1) and troff/groff. Not installed by default on most distributions; often available as a separate package.

HISTORY

grap was developed at Bell Labs as part of the Unix document preparation tools, described by Kernighan and Bentley.

SEE ALSO

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

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid