grap2graph(1)
β¨ grap2graph(1) β convert a grap diagram into a cropped image β¨
okay bestie, welcome to the General Commands Manual π this page is all about grap2graph, and she is genuinely so good at turning a grap diagram into a cropped image. no cap.
πΈ NAME πΈ
grap2graph β convert a grap diagram into a cropped image
β¨ SYNOPSIS β¨
grap2graph [-unsafe] [-format output-format] [convert-argument ...]
grap2graph --help
grap2graph -v
grap2graph --version
π DESCRIPTION π
grap2graph reads a grap(1) program from the standard input and writes an image file β by default in Portable Network Graphics (PNG) format β to the standard output. that's the main plot, and she ate. π
quick vibe check on the input: the GRAP code should not be wrapped with the .G1 and .G2 macros that normally guard it within groff(1) documents. leave those at home, bestie. π«Ά
Arguments that grap2graph doesn't recognize get passed straight to the ImageMagick or GraphicsMagick program convert(1). by specifying these, you can give your image a border, set the image's pixel density, or perform other useful transformations. slay. π
The output image is clipped using convert's -trim option to the smallest possible bounding box that contains all the black pixels. iconic cropping behavior, honestly. β¨
π OPTIONS π
--help displays a usage message, while -v and --version show version information; all exit afterward. they're like, done after that. π
--helpβ displays a usage message, then exits afterward-v,--versionβ show version information, then exit afterward-format output-formatβ write the image in output-format, which must be understood byconvert; the default is PNG-unsafeβ rungroffin unsafe mode, enabling the PIC commandshto execute arbitrary Unix shell commands; thegroffdefault is to forbid this β οΈ
-unsafeis literally named that for a reason, bestie: it lets PIC'sshcommand execute arbitrary Unix shell commands. only use it if you know what you're doing. π¨
π ENVIRONMENT π
These environment variables are searched in the order shown to determine the directory where temporary files will be created:
GROFF_TMPDIRβ checked firstTMPDIRβ checked secondTMPβ checked thirdTEMPβ checked fourth
If none are set, /tmp is used. π«‘
π AUTHORS π
grap2graph was written by Eric S. Raymond, based on a recipe for pic2graph(1), by W. Richard Stevens. king behavior from both of them. π
π¦ SEE ALSO π¦
go read these too, bestie:
this page is from groff 1.24.2, dated 2026-10-01. mwah πβ¨
π¦ where this page comes from
- alpine 3.24: groff-doc 1.24.2-r0 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms