pic2graph(1)

πŸ’– pic2graph(1) β€” the group-chat guide πŸ’–

okay so bestie, welcome to pic2graph, the general commands manual page that turns your little pic diagram into a cropped image. yes, that pic. the diagram one. not a selfie. we're being productive today πŸ’…


✨ NAME ✨

pic2graph β€” convert a pic diagram into a cropped image. that's the whole vibe. icon behavior only πŸ‘‘


🌸 SYNOPSIS 🌸

pic2graph [-unsafe] [-format output-format] [-eqn delimiters] [convert-argument ...]

pic2graph --help

pic2graph -v

pic2graph --version

literally four whole ways to summon it. pick your fighter 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: pic2graph reads a pic(1) program from the standard input and writes an image file to the standard output β€” and by default that image is in Portable Network Graphics (PNG) format. cute, right? πŸŽ€

and it furthermore translates eqn(1) constructs, which means you can absolutely use it to generate images of mathematical formulae. math girlies stay winning πŸ”₯

🚨 important bestie note: the input PIC code should not be wrapped with the .PS and .PE/.PF/.PY macros that normally guard it within groff(1) documents. like, don't do that. take the guard rails off. it's giving "trust the process" 😭

Arguments that pic2graph doesn't recognize get passed straight to the ImageMagick or GraphicsMagick program convert(1). why do we love this? because by specifying those, you can give your image a border, set the image's pixel density, or perform other useful transformations. your image, your rules ✨

oh and the output image gets clipped using convert's -trim option to the smallest possible bounding box that contains all the black pixels. no wasted space. no awkward empty margins. it's giving cropped and flawless 🌈


πŸ’œ OPTIONS πŸ’œ

  • --help β€” displays a usage message. and -v and --version show version information. all of them exit afterward, so like… they're not staying for the afterparty. bye bestie πŸ‘‹
  • -eqn delimiters β€” use delimiters as the opening and closing characters that delimit eqn directives. the default is β€œ$$” β€” iconic, classic, no notes. the option argument delimiters should be a two-character string, but an empty string ("") is accepted as a directive to disable eqn processing. yes, you can just switch it off entirely. sometimes the move is no thoughts head empty πŸ’€
  • -format output-format β€” write the image in output-format, which must be understood by convert. the default is PNG. so if you're feeling spicy, go off, but it has to be something convert actually speaks, okay? πŸ”₯
  • -unsafe β€” run groff in unsafe mode, enabling the PIC command sh to execute arbitrary Unix shell commands. 🚨 and the groff default is to forbid this. so like, bestie. be so serious. only use this if you actually know what you're doing, because arbitrary shell commands are exactly as chaotic as they sound πŸ™ˆ

πŸ“ ENVIRONMENT πŸ“

  • GROFF_TMPDIR
  • TMPDIR
  • TMP
  • TEMP

these environment variables are searched in the order shown to determine the directory where temporary files will be created. in order, bestie, not vibes-based. and if none of them are set, /tmp is used. the default. the fallback. the main character of directories 🌸


🧚 AUTHORS 🧚

pic2graph was written by Eric S. Raymond, based on a recipe by W. Richard Stevens. we stan a documented credit chain πŸ’–


⭐ SEE ALSO ⭐

go read the whole little family, they're all icons πŸ‘‘


and that's the whole page, bestie!! this cutie came to you courtesy of groff 1.24.2, dated 2026-10-01 β€” so you know it's fresh ✨ mwah, go make some cropped images πŸ’‹πŸŽ€

πŸ“¦ where this page comes from