eqn2graph(1)

πŸ’… eqn2graph β€” from the eqn2graph(1) page in your General Commands Manual, bestie

okay so picture this: you've got one (1) single line of eqn code and you need it to become a whole actual image. that's the entire plot of eqn2graph. she's a little icon, she's a specialist, and she's about to make your equation look cute. ✨


✨ NAME ✨

eqn2graph β€” literally converts an eqn equation into a cropped image. that's it, that's the job, and she does it flawlessly. πŸŽ€


🌸 SYNOPSIS 🌸

eqn2graph [-format output-format] [convert-argument ...]

eqn2graph --help

eqn2graph -v

eqn2graph --version

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the vibe: eqn2graph reads a one-line eqn(1) equation from the standard input and writes an image file to the standard output. default output format? Portable Network Graphics (PNG). iconic behavior, no notes. πŸ’…

now, important detail bestie, listen up πŸ‘‡ the input EQN code should not be preceded by the .EQ macro that normally precedes it inside groff(1) macros. and no, you do not need dollar-sign delimiters or any other delimiters wrapped around the equation either. just the raw equation, raw and unfiltered, and she'll handle it. 🫢

here's the fun part: any arguments that eqn2graph doesn't recognize get passed straight to the ImageMagick or GraphicsMagick program convert(1). so by specifying those, you can give your image a border, set the image's pixel density, or do other useful transformations. lowkey a whole customization era. πŸ”₯

and the output image gets clipped using convert's -trim option, down to the smallest possible bounding box that contains all the black pixels. so no awkward empty margins, she crops herself. ✨


πŸ’– OPTIONS πŸ’–

  • --help β€” displays a usage message. exits right after, no lingering. πŸ‘‹
  • -v, --version β€” show version information. also exits right after. πŸ‘‹
  • -format output-format β€” write the image in output-format, which has to be something convert understands. the default is PNG. ⭐
and yes, all of --help, -v and --version exit afterward β€” they do not stick around to see the rest. πŸ’€

🌈 ENVIRONMENT 🌈

  • GROFF_TMPDIR
  • TMPDIR
  • TMP
  • TEMP

these environment variables are searched in exactly the order shown above to determine the directory where temporary files will be created. if none of them are set, /tmp is used. the fallback queen herself. πŸ‘‘ (iykyk)


🧚 AUTHORS 🧚

eqn2graph was written by Eric S. Raymond, based on a recipe for pic2graph(1) by W. Richard Stevens. giving credit where credit is due, we love to see it. 🫢


πŸ“ SEE ALSO πŸ“

pic2graph(1), grap2graph(1), eqn(1), groff(1), convert(1)

go read the whole friend group, they're all serving. πŸ’œ


k bye bestie, go make some gorgeous equations πŸ’…βœ¨ β€” this was the eqn2graph(1) page from groff 1.24.2, dated 2026-10-01. mwah. πŸŽ€

πŸ“¦ where this page comes from