grn
Search groonga datasets
SYNOPSIS
grn [ -CTZ ] [ -M dir ] [ -d num ] [ -f family ] [ -s num ] [ -m num ] [ -o num ] [ -p num ] [ -F dir ] [ files ... ]
PARAMETERS
-C
Enables compatibility mode for older Gremlin files.
-T dev
Specifies the output device for groff, such as -Tps for PostScript.
-Z
Suppresses the output of groff commands that represent comments in the Gremlin input. Useful for debugging.
-M dir
Adds dir to the list of directories searched for Gremlin font files.
-d num
Sets the default text size (in Gremlin units) for text objects that do not explicitly specify one.
-f family
Sets the default font family for text objects.
-s num
Applies a scaling factor to all generated graphic coordinates. A value of 1.0 implies no scaling.
-m num
Sets the minimum line thickness for drawing objects. Lines thinner than this value will be rendered at this thickness.
-o num
Sets the default oblique angle (in degrees) for text objects that do not specify one.
-p num
Prints debugging information related to points, useful for understanding coordinate transformations.
-F dir
Adds dir to the list of directories searched for groff font files. This option is passed to groff.
files ...
One or more Gremlin input files to be processed. If no files are specified, grn reads from standard input.
DESCRIPTION
grn is a specialized preprocessor for the groff text formatting system, designed to interpret and render picture descriptions written in the Gremlin language. Originally developed at Xerox PARC, Gremlin provides a simple, structured way to define vector graphics through commands for drawing lines, arcs, circles, ellipses, and placing text.
When invoked, grn reads one or more Gremlin input files or standard input. It then translates these graphical commands into corresponding groff drawing requests, effectively embedding the pictures directly into the groff document stream. This allows users to combine complex graphical elements with textual content formatted by groff.
grn acts as a pipeline component within the groff processing chain, much like pic or eqn. Its primary utility lies in maintaining compatibility with existing Gremlin graphics files and integrating them seamlessly into modern groff workflows, although Gremlin itself is now a relatively obscure format.
CAVEATS
grn is a highly specialized and somewhat legacy tool. It does not support all features of the Gremlin language; notably, it currently lacks support for fill and color commands. Its primary purpose is integration with the groff system, making it less suitable for standalone graphics creation or for workflows outside the troff/groff ecosystem. Modern graphics tools offer far more extensive capabilities and broader output formats.
<B>GREMLIN FILE FORMAT</B>
grn processes files written in the Gremlin picture language. Gremlin files consist of commands describing graphical objects such as lines, curves, circles, ellipses, and text. Each command specifies the object type and its associated parameters, such as coordinates, sizes, and font information for text. The language is text-based and relatively simple, designed for programmatic generation and manipulation of vector graphics.
<B>ENVIRONMENT VARIABLES</B>
grn respects several environment variables:
- GROFF_FONT_PATH: Specifies directories to search for groff font description files, similar to the -F option.
- GROFF_TMPDIR: Defines the directory where temporary files are created during processing.
HISTORY
grn's history is intertwined with the development of the groff project and the Gremlin picture language itself. Gremlin was developed at Xerox PARC in the late 1970s and early 1980s as a vector graphics description language. When James Clark began the groff project in 1989 as a free software replacement for AT&T's troff, he aimed to include compatible preprocessors for various functionalities. grn was created to provide compatibility for users with existing Gremlin picture files, allowing them to continue using these graphics within the new groff environment. Its development has since proceeded as part of the broader groff utilities suite, ensuring continued support for this niche, yet historically significant, graphics format within the traditional Unix document processing pipeline.